Remove variadic macros test from configure
This is useless, all still supported compilers except ancient MSVS versions (for which configure is not used anyhow) support variadic macros, so don't waste time testing for them. Note that the checks for HAVE_VARIADIC_MACROS in the sources are still left because it is still possible to explicitly disable variadic macros support using --disable-vararg_macros for strict C++98 compatibility.
This commit is contained in:
@@ -743,11 +743,6 @@
|
||||
*/
|
||||
#cmakedefine VA_LIST_IS_ARRAY 1
|
||||
|
||||
/*
|
||||
* Define if the compiler supports variadic macros
|
||||
*/
|
||||
#cmakedefine HAVE_VARIADIC_MACROS 1
|
||||
|
||||
/*
|
||||
* Define if you don't want variadic macros to be used even if they are
|
||||
* supported by the compiler.
|
||||
|
58
configure
vendored
58
configure
vendored
@@ -19954,63 +19954,7 @@ $as_echo "$wx_cv_type_va_list_lvalue" >&6; }
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_VARARG_MACROS" = "yes"; then
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports variadic macros" >&5
|
||||
$as_echo_n "checking whether the compiler supports variadic macros... " >&6; }
|
||||
if ${wx_cv_have_variadic_macros+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#define test(fmt, ...) printf(fmt, __VA_ARGS__)
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
test("%s %d %p", "test", 1, 0);
|
||||
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
wx_cv_have_variadic_macros=yes
|
||||
else
|
||||
wx_cv_have_variadic_macros=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_have_variadic_macros" >&5
|
||||
$as_echo "$wx_cv_have_variadic_macros" >&6; }
|
||||
|
||||
if test $wx_cv_have_variadic_macros = "yes"; then
|
||||
$as_echo "#define HAVE_VARIADIC_MACROS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
if test "$wxUSE_VARARG_MACROS" != "yes"; then
|
||||
$as_echo "#define wxNO_VARIADIC_MACROS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
36
configure.in
36
configure.in
@@ -1722,41 +1722,11 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl don't check for vararg macros if they're explicitly disabled: this is
|
||||
dnl TODO-C++11: remove this, as it won't make sense when C++11 is required
|
||||
dnl don't use vararg macros if they're explicitly disabled: this is
|
||||
dnl useful if the user code using the library wants to limit itself to standard
|
||||
dnl C++ only (e.g. is compiled with g++ -std=c++98)
|
||||
if test "$wxUSE_VARARG_MACROS" = "yes"; then
|
||||
|
||||
dnl Check if variadic macros (C99 feature) are supported:
|
||||
AC_CACHE_CHECK(
|
||||
[whether the compiler supports variadic macros],
|
||||
[wx_cv_have_variadic_macros],
|
||||
[
|
||||
dnl C compiler might support variadic macros when C++ one doesn't
|
||||
dnl (happens with gcc/g++ 2.95.4), so must use C++ one explicitly
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM(
|
||||
[
|
||||
#include <stdio.h>
|
||||
#define test(fmt, ...) printf(fmt, __VA_ARGS__)
|
||||
],
|
||||
[
|
||||
test("%s %d %p", "test", 1, 0);
|
||||
]
|
||||
)],
|
||||
[wx_cv_have_variadic_macros=yes],
|
||||
[wx_cv_have_variadic_macros=no]
|
||||
)
|
||||
AC_LANG_POP()
|
||||
]
|
||||
)
|
||||
|
||||
if test $wx_cv_have_variadic_macros = "yes"; then
|
||||
AC_DEFINE(HAVE_VARIADIC_MACROS)
|
||||
fi
|
||||
|
||||
else
|
||||
if test "$wxUSE_VARARG_MACROS" != "yes"; then
|
||||
AC_DEFINE(wxNO_VARIADIC_MACROS)
|
||||
fi dnl wxUSE_VARARG_MACROS == yes
|
||||
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#define wx_USE_NANOX 0
|
||||
|
||||
#define HAVE_VA_COPY 1
|
||||
#define HAVE_VARIADIC_MACROS 1
|
||||
#define HAVE_STD_WSTRING 1
|
||||
#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 2 )
|
||||
#if !defined(__has_include)
|
||||
|
@@ -743,11 +743,6 @@
|
||||
*/
|
||||
#undef VA_LIST_IS_ARRAY
|
||||
|
||||
/*
|
||||
* Define if the compiler supports variadic macros
|
||||
*/
|
||||
#undef HAVE_VARIADIC_MACROS
|
||||
|
||||
/*
|
||||
* Define if you don't want variadic macros to be used even if they are
|
||||
* supported by the compiler.
|
||||
|
@@ -801,11 +801,6 @@ typedef pid_t GPid;
|
||||
*/
|
||||
#undef VA_LIST_IS_ARRAY
|
||||
|
||||
/*
|
||||
* Define if the compiler supports variadic macros
|
||||
*/
|
||||
#undef HAVE_VARIADIC_MACROS
|
||||
|
||||
#if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY)
|
||||
/*
|
||||
* Define if your compiler has std::wstring
|
||||
|
Reference in New Issue
Block a user