diff options
author | Kevin Ryde <user42@zip.com.au> | 2003-07-12 03:17:22 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2003-07-12 03:17:22 +0200 |
commit | 90f241644fc72f1d4373e59200c9599bc84e306b (patch) | |
tree | c3c85567419526829c15fb81834e49ed3358e3f5 /configure | |
parent | 1bf1324202fd091111c8ff635e88037c7e2e76a0 (diff) | |
download | gmp-90f241644fc72f1d4373e59200c9599bc84e306b.tar.gz |
Regenerate for:
* configure.in (GMP_PROG_CXX_WORKS): Include $CPPFLAGS, same as
automake does in the actual build.
* acinclude.m4 (GMP_PROG_CXX_WORKS): In the namespace test, declare
namespace before trying to use. In std iostream test, provoke a
failure from Compaq C++ in pre-standard mode.
Correction to:
* acinclude.m4 (GMP_PROG_CC_WORKS): Use separate compiles for various
known problems, and indicate to the user the reason for rejecting.
(GMP_PROG_CXX_WORKS): Ditto, and insist on being able to execute each
compiled program.
C++ test program should be ".cc", compaq "cxx" demands this.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 99 |
1 files changed, 50 insertions, 49 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.553 . +# From configure.in Revision: 1.554 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for GNU MP 4.1. # @@ -6502,20 +6502,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # other hand the user didn't specify CXXFLAGS then we get to try here our # $cxxflags_list alternatives. # + # Automake includes $CPPFLAGS in a C++ compile, so we do the same here. + # for cxxflags_choice in $cxxflags_list; do eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\" - echo "$as_me:$LINENO: checking C++ compiler $CXX $CXXFLAGS" >&5 -echo $ECHO_N "checking C++ compiler $CXX $CXXFLAGS... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS" >&5 +echo $ECHO_N "checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS... $ECHO_C" >&6 gmp_prog_cxx_works=yes # start with a plain "main()", then go on to further checks if test "$gmp_prog_cxx_works" = yes; then - cat >conftest.c <<EOF + cat >conftest.cc <<EOF int main (void) { return 0; } EOF echo "Test compile: " >&5 - gmp_cxxcompile="$CXX $CXXFLAGS conftest.c >&5" + gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" if { (eval echo "$as_me:$LINENO: \"$gmp_cxxcompile\"") >&5 (eval $gmp_cxxcompile) 2>&5 ac_status=$? @@ -6538,7 +6540,7 @@ EOF case $gmp_prog_cxx_works in no*) echo "failed program was:" >&5 - cat conftest.c >&5 + cat conftest.cc >&5 ;; esac rm -f conftest* a.out b.out a.exe a_out.exe @@ -6546,13 +6548,14 @@ fi if test "$gmp_prog_cxx_works" = yes; then - cat >conftest.c <<EOF -using namespace std; + cat >conftest.cc <<EOF +namespace foo { } +using namespace foo; int main (void) { return 0; } EOF echo "Test compile: namespace" >&5 - gmp_cxxcompile="$CXX $CXXFLAGS conftest.c >&5" + gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" if { (eval echo "$as_me:$LINENO: \"$gmp_cxxcompile\"") >&5 (eval $gmp_cxxcompile) 2>&5 ac_status=$? @@ -6575,30 +6578,28 @@ EOF case $gmp_prog_cxx_works in no*) echo "failed program was:" >&5 - cat conftest.c >&5 + cat conftest.cc >&5 ;; esac rm -f conftest* a.out b.out a.exe a_out.exe fi +# GMP requires the standard C++ iostream classes if test "$gmp_prog_cxx_works" = yes; then - cat >conftest.c <<EOF -/* GMP requires the standard C++ iostream classes. This test rejects g++ - 2.7.2 which has only a pre-standard iostream.h. */ + cat >conftest.cc <<EOF +/* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a + pre-standard iostream.h. */ #include <iostream> -using namespace std; -void -foo (void) -{ - cout.setf (ios::hex); - cout << 123; -} + +/* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream + mode, since that mode puts cout in the global namespace, not "std". */ +void someoutput (void) { std::cout << 123; } int main (void) { return 0; } EOF echo "Test compile: std iostream" >&5 - gmp_cxxcompile="$CXX $CXXFLAGS conftest.c >&5" + gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" if { (eval echo "$as_me:$LINENO: \"$gmp_cxxcompile\"") >&5 (eval $gmp_cxxcompile) 2>&5 ac_status=$? @@ -6621,7 +6622,7 @@ EOF case $gmp_prog_cxx_works in no*) echo "failed program was:" >&5 - cat conftest.c >&5 + cat conftest.cc >&5 ;; esac rm -f conftest* a.out b.out a.exe a_out.exe @@ -8499,7 +8500,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 8502 "configure"' > conftest.$ac_ext + echo '#line 8503 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9919,11 +9920,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9922: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9923: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9926: \$? = $ac_status" >&5 + echo "$as_me:9927: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10151,11 +10152,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10154: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10155: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10158: \$? = $ac_status" >&5 + echo "$as_me:10159: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10218,11 +10219,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10221: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10222: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10225: \$? = $ac_status" >&5 + echo "$as_me:10226: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12230,7 +12231,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 12233 "configure" +#line 12234 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12328,7 +12329,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 12331 "configure" +#line 12332 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14460,11 +14461,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14463: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14464: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14467: \$? = $ac_status" >&5 + echo "$as_me:14468: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14527,11 +14528,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14530: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14531: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14534: \$? = $ac_status" >&5 + echo "$as_me:14535: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15770,7 +15771,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 15773 "configure" +#line 15774 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15868,7 +15869,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 15871 "configure" +#line 15872 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16690,11 +16691,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16693: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16694: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16697: \$? = $ac_status" >&5 + echo "$as_me:16698: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16757,11 +16758,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16760: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16761: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16764: \$? = $ac_status" >&5 + echo "$as_me:16765: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18697,11 +18698,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18700: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18701: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18704: \$? = $ac_status" >&5 + echo "$as_me:18705: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -18929,11 +18930,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18932: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18933: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18936: \$? = $ac_status" >&5 + echo "$as_me:18937: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -18996,11 +18997,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18999: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19000: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19003: \$? = $ac_status" >&5 + echo "$as_me:19004: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21008,7 +21009,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 21011 "configure" +#line 21012 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -21106,7 +21107,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 21109 "configure" +#line 21110 "configure" #include "confdefs.h" #if HAVE_DLFCN_H |