From 9d254366366b3443375601a332017d2a9cfb179a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 May 2007 00:42:20 +0000 Subject: [PATCH] use C++ compiler for va_copy test, at least under IRIX the C99 C compiler has it but C++ compiler doesn't have it [backport from HEAD] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 14 +++++++++++++- configure.in | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 262a80811a..57a2efce17 100755 --- a/configure +++ b/configure @@ -21270,6 +21270,12 @@ if test "${wx_cv_func_va_copy+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 #include @@ -21296,7 +21302,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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=$? @@ -21318,6 +21324,12 @@ wx_cv_func_va_copy=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext 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 diff --git a/configure.in b/configure.in index ca699e3dbf..b996a7e920 100644 --- a/configure.in +++ b/configure.in @@ -1922,6 +1922,7 @@ dnl checks needed to define wxVaCopy AC_CACHE_CHECK([for va_copy], wx_cv_func_va_copy, [ + AC_LANG_PUSH(C++) AC_LINK_IFELSE([ #include void foo(char *f, ...) @@ -1940,6 +1941,7 @@ AC_CACHE_CHECK([for va_copy], wx_cv_func_va_copy=yes, wx_cv_func_va_copy=no ) + AC_LANG_POP() ] )