]> git.saurik.com Git - wxWidgets.git/commitdiff
test for round() using C++ compiler, not C one (should fix IRIX mipsPro build)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 May 2007 16:29:05 +0000 (16:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 May 2007 16:29:05 +0000 (16:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in

index 806a9a263b56ea72b8da9d51d9107d1387491ef9..e7286de131c7041fb8714a445c08052869fabcc9 100755 (executable)
--- a/configure
+++ b/configure
@@ -35158,6 +35158,12 @@ _ACEOF
 
 fi
 
+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
+
 
   for wx_func in round
   do
@@ -35206,7 +35212,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+        test -z "$ac_cxx_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
@@ -35239,6 +35245,12 @@ _ACEOF
     fi
   done
 
+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
+
 
 if test "$TOOLKIT" != "MSW"; then
 
index fccdba171ddde4b715a1ddd5238984a0d9119f2e..554af1ca3d98cac3f8f32cc848f19a071e495e74 100644 (file)
@@ -4713,7 +4713,11 @@ if test "$wxUSE_FILE" = "yes"; then
     WX_CHECK_FUNCS(fsync)
 fi
 
+dnl at least under IRIX with mipsPro the C99 round() function is available when
+dnl building using the C compiler but not when using C++ one
+AC_LANG_PUSH(C++)
 WX_CHECK_FUNCS(round,,,[#include <math.h>])
+AC_LANG_POP()
 
 dnl the following tests are for Unix(like) systems only
 if test "$TOOLKIT" != "MSW"; then