]> git.saurik.com Git - wxWidgets.git/commitdiff
use C++ for variadic macros test as e.g. gcc 2.95.4 supports them while g++ 2.95...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Nov 2006 12:40:38 +0000 (12:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Nov 2006 12:40:38 +0000 (12:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in

index 01717ba791db7399d25a8d0ac410309eb72fb5c1..e1486e6ffbb565bad898eaf47cbaee6af6ceec04 100755 (executable)
--- a/configure
+++ b/configure
@@ -21603,6 +21603,12 @@ if test "${wx_cv_have_variadic_macros+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
+                        ac_ext=cc
+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 >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21633,7 +21639,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21654,6 +21660,12 @@ wx_cv_have_variadic_macros=no
 
 fi
 rm -f 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
index fdf6f3651979817ffeef4a3db0c570f402e8df74..cea9dafdb0e09ebfd5d66720823f6c1dd081e5cb 100644 (file)
@@ -1974,6 +1974,9 @@ 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(
                 [
@@ -1987,6 +1990,7 @@ AC_CACHE_CHECK(
             [wx_cv_have_variadic_macros=yes],
             [wx_cv_have_variadic_macros=no]
             )
+        AC_LANG_POP()
     ]
 )