-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
- (defined(__cplusplus) && __cplusplus >= 201103L)
- #define wxHAS_VARIADIC_MACROS
-#elif defined(__GNUC__) && __GNUC__ >= 3
- #define wxHAS_VARIADIC_MACROS
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
- #define wxHAS_VARIADIC_MACROS
-#endif
+/* Auto-detect variadic macros support unless explicitly disabled. */
+#if !defined(HAVE_VARIADIC_MACROS) && !defined(wxNO_VARIADIC_MACROS)
+ /* Any C99 or C++11 compiler should have them. */
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
+ (defined(__cplusplus) && __cplusplus >= 201103L)
+ #define HAVE_VARIADIC_MACROS
+ #elif wxCHECK_GCC_VERSION(3,0)
+ #define HAVE_VARIADIC_MACROS
+ #elif wxCHECK_VISUALC_VERSION(8)
+ #define HAVE_VARIADIC_MACROS
+ #elif wxCHECK_WATCOM_VERSION(1,2)
+ #define HAVE_VARIADIC_MACROS
+ #endif
+#endif /* !HAVE_VARIADIC_MACROS */
+
+