configure
上传用户:qaz666999
上传日期:2022-08-06
资源大小:2570k
文件大小:938k
- {
- unsigned long cy, rp[2], up[2];
- up[0] = ~ 0L;
- up[1] = 0;
- cy = lshift_com (rp, up, 2L, 1);
- if (cy != 1L)
- return 1;
- return 0;
- }
- #else
- int
- main ()
- {
- return 0;
- }
- #endif
- EOF
- echo "Test compile: mpn_lshift_com optimization" >&5
- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- cc_works_part=yes
- if test "$cross_compiling" = no; then
- if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
- { { eval echo ""$as_me":${as_lineno-$LINENO}: "$ac_try""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; }; then :;
- else
- cc_works_part=norun
- fi
- fi
- else
- cc_works_part=no
- fi
- if test "$cc_works_part" != yes; then
- echo "failed program was:" >&5
- cat conftest.c >&5
- fi
- rm -f conftest* a.out b.out a.exe a_out.exe
- case $cc_works_part in
- yes)
- ;;
- no)
- gmp_prog_cc_works="no, mpn_lshift_com optimization"
- ;;
- norun)
- gmp_prog_cc_works="no, mpn_lshift_com optimization, program does not run"
- ;;
- esac
- fi
- if test "$gmp_prog_cc_works" = yes; then
- # remove anything that might look like compiler output to our "||" expression
- rm -f conftest* a.out b.out a.exe a_out.exe
- cat >conftest.c <<EOF
- /* The following is mis-compiled by Intel ia-64 icc version 1.8 under
- "icc -O3", After several calls, the function writes parial garbage to
- the result vector. Perhaps relates to the chk.a.nc insn. This code needs
- to be run to show the problem, but that's fine, the offending cc is a
- native-only compiler so we don't have to worry about cross compiling. */
- #if ! defined (__cplusplus)
- #include <stdlib.h>
- void
- lshift_com (rp, up, n, cnt)
- unsigned long *rp;
- unsigned long *up;
- long n;
- unsigned cnt;
- {
- unsigned long high_limb, low_limb;
- unsigned tnc;
- long i;
- up += n;
- rp += n;
- tnc = 8 * sizeof (unsigned long) - cnt;
- low_limb = *--up;
- high_limb = low_limb << cnt;
- for (i = n - 1; i != 0; i--)
- {
- low_limb = *--up;
- *--rp = ~(high_limb | (low_limb >> tnc));
- high_limb = low_limb << cnt;
- }
- *--rp = ~high_limb;
- }
- int
- main ()
- {
- unsigned long *r, *r2;
- unsigned long a[88 + 1];
- long i;
- for (i = 0; i < 88 + 1; i++)
- a[i] = ~0L;
- r = malloc (10000 * sizeof (unsigned long));
- r2 = r;
- for (i = 0; i < 528; i += 22)
- {
- lshift_com (r2, a,
- i / (8 * sizeof (unsigned long)) + 1,
- i % (8 * sizeof (unsigned long)));
- r2 += 88 + 1;
- }
- if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 ||
- r[2052] != 0 || r[2053] != 0 || r[2054] != 0)
- abort ();
- return 0;
- }
- #else
- int
- main ()
- {
- return 0;
- }
- #endif
- EOF
- echo "Test compile: mpn_lshift_com optimization 2" >&5
- gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- cc_works_part=yes
- if test "$cross_compiling" = no; then
- if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
- { { eval echo ""$as_me":${as_lineno-$LINENO}: "$ac_try""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; }; then :;
- else
- cc_works_part=norun
- fi
- fi
- else
- cc_works_part=no
- fi
- if test "$cc_works_part" != yes; then
- echo "failed program was:" >&5
- cat conftest.c >&5
- fi
- rm -f conftest* a.out b.out a.exe a_out.exe
- case $cc_works_part in
- yes)
- ;;
- no)
- gmp_prog_cc_works="no, mpn_lshift_com optimization 2"
- ;;
- norun)
- gmp_prog_cc_works="no, mpn_lshift_com optimization 2, program does not run"
- ;;
- esac
- fi
- # A certain _GLOBAL_OFFSET_TABLE_ problem in past versions of gas, tickled
- # by recent versions of gcc.
- #
- if test "$gmp_prog_cc_works" = yes; then
- case $host in
- i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*)
- # this problem only arises in PIC code, so don't need to test when
- # --disable-shared. We don't necessarily have $enable_shared set to
- # yes at this point, it will still be unset for the default (which is
- # yes); hence the use of "!= no".
- if test "$enable_shared" != no; then
- echo "Testing gcc GOT with eax emitted" >&5
- cat >conftest.c <<EOF
- int foo;
- int bar () { return foo; }
- EOF
- tmp_got_emitted=no
- gmp_compile="$cc $cflags $cppflags $flag -fPIC -S conftest.c >&5 2>&1"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- if grep "addl.*_GLOBAL_OFFSET_TABLE_.*eax" conftest.s >/dev/null; then
- tmp_got_emitted=yes
- fi
- fi
- rm -f conftest.*
- echo "Result: $tmp_got_emitted" >&5
- if test "$tmp_got_emitted" = yes; then
- echo "Testing gas GOT with eax good" >&5
- cat >conftest.awk <<EOF
- BEGIN {
- want[0] = "001"
- want[1] = "043"
- want[2] = "105"
- want[3] = "147"
- want[4] = "211"
- want[5] = "253"
- want[6] = "315"
- want[7] = "357"
- want[8] = "005"
- want[9] = "002"
- want[10] = "000"
- want[11] = "000"
- want[12] = "000"
- want[13] = "376"
- want[14] = "334"
- want[15] = "272"
- want[16] = "230"
- want[17] = "166"
- want[18] = "124"
- want[19] = "062"
- want[20] = "020"
- result = "yes"
- }
- {
- for (f = 2; f <= NF; f++)
- {
- for (i = 0; i < 20; i++)
- got[i] = got[i+1];
- got[20] = $f;
- found = 1
- for (i = 0; i < 21; i++)
- if (got[i] != want[i])
- {
- found = 0
- break
- }
- if (found)
- {
- result = "no"
- exit
- }
- }
- }
- END {
- print result
- }
- EOF
- cat >conftest.s <<EOF
- .text
- .byte 1, 35, 69, 103, 137, 171, 205, 239
- addl $_GLOBAL_OFFSET_TABLE_, %eax
- .byte 254, 220, 186, 152, 118, 84, 50, 16
- EOF
- tmp_got_good=yes
- gmp_compile="$cc $cflags $cppflags $flag -fPIC -o conftest.o -c conftest.s >&5 2>&1"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- tmp_got_good=`od -b conftest.o | $AWK -f conftest.awk`
- fi
- rm -f conftest.*
- echo "Result: $tmp_got_good" >&5
- if test "$tmp_got_good" = no; then
- gmp_prog_cc_works="no, bad gas GOT with eax"
- else
- :
- fi
- else
- :
- fi
- fi
- ;;
- esac
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5
- $as_echo "$gmp_prog_cc_works" >&6; }
- case $gmp_prog_cc_works in
- yes)
- cflags="$cflags $flag"
- break
- ;;
- *)
- ;;
- esac
- done
- done
- fi
- ABI="$abi"
- CC="$cc"
- CFLAGS="$cflags"
- CPPFLAGS="$cppflags"
- # Could easily have this in config.h too, if desired.
- ABI_nodots=`echo $ABI | sed 's/./_/'`
- echo "define_not_for_expansion(`HAVE_ABI_$ABI_nodots')" >> $gmp_tmpconfigm4p
- # GMP_LDFLAGS substitution, selected according to ABI.
- # These are needed on libgmp.la and libmp.la, but currently not on
- # convenience libraries like tune/libspeed.la or mpz/libmpz.la.
- #
- eval GMP_LDFLAGS="$${ccbase}${abi1}_ldflags"
- test -n "$GMP_LDFLAGS" || eval GMP_LDFLAGS="$${ccbase}${abi1}_ldflags"
- # extra_functions, selected according to ABI
- eval tmp="$extra_functions$abi1"
- test -n "$tmp" || eval tmp="$extra_functions$abi2"
- extra_functions="$tmp"
- # Cycle counter, selected according to ABI.
- #
- eval tmp="$SPEED_CYCLECOUNTER_OBJ$abi1"
- test -n "$tmp" || eval tmp="$SPEED_CYCLECOUNTER_OBJ$abi2"
- SPEED_CYCLECOUNTER_OBJ="$tmp"
- eval tmp="$cyclecounter_size$abi1"
- test -n "$tmp" || eval tmp="$cyclecounter_size$abi2"
- cyclecounter_size="$tmp"
- if test -n "$SPEED_CYCLECOUNTER_OBJ"; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_SPEED_CYCLECOUNTER $cyclecounter_size
- _ACEOF
- fi
- # Calling conventions checking, selected according to ABI.
- #
- eval tmp="$CALLING_CONVENTIONS_OBJS$abi1"
- test -n "$tmp" || eval tmp="$CALLING_CONVENTIONS_OBJS$abi2"
- CALLING_CONVENTIONS_OBJS="$tmp"
- if test -n "$CALLING_CONVENTIONS_OBJS"; then
- $as_echo "#define HAVE_CALLING_CONVENTIONS 1" >>confdefs.h
- fi
- fi
- # If the user gave an MPN_PATH, use that verbatim, otherwise choose
- # according to the ABI and add "generic".
- #
- if test -n "$MPN_PATH"; then
- path="$MPN_PATH"
- else
- eval tmp="$path$abi1"
- test -n "$tmp" || eval tmp="$path$abi2"
- path="$tmp generic"
- fi
- # Long long limb setup for gmp.h.
- case $limb_chosen in
- longlong) DEFN_LONG_LONG_LIMB="#define _LONG_LONG_LIMB 1" ;;
- *) DEFN_LONG_LONG_LIMB="/* #undef _LONG_LONG_LIMB */" ;;
- esac
- # The C compiler and preprocessor, put into ANSI mode if possible.
- 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 -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
- set dummy ${ac_tool_prefix}gcc; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
- $as_echo "$CC" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- fi
- if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
- set dummy gcc; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_CC=$ac_cv_prog_ac_ct_CC
- if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
- $as_echo "$ac_ct_CC" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
- yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
- $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
- CC=$ac_ct_CC
- fi
- else
- CC="$ac_cv_prog_CC"
- fi
- if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
- set dummy ${ac_tool_prefix}cc; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
- $as_echo "$CC" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- fi
- fi
- if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
- set dummy cc; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- ac_prog_rejected=no
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
- fi
- fi
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
- $as_echo "$CC" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- fi
- if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- set dummy $ac_tool_prefix$ac_prog; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
- $as_echo "$CC" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- test -n "$CC" && break
- done
- fi
- if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_CC=$ac_cv_prog_ac_ct_CC
- if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
- $as_echo "$ac_ct_CC" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- test -n "$ac_ct_CC" && break
- done
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
- yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
- $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
- CC=$ac_ct_CC
- fi
- fi
- fi
- test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in `$ac_pwd':" >&5
- $as_echo "$as_me: error: in `$ac_pwd':" >&2;}
- as_fn_error "no acceptable C compiler found in $PATH
- See `config.log' for more details." "$LINENO" 5; }
- # Provide some information about the compiler.
- $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
- set X $ac_compile
- ac_compiler=$2
- for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval ac_try_echo=""$as_me:${as_lineno-$LINENO}: $ac_try_echo""
- $as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a
- ... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }
- done
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- ac_clean_files_save=$ac_clean_files
- ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
- # Try to create an executable without -o first, disregard a.out.
- # It will help us diagnose broken compilers, and finding out an intuition
- # of exeext.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
- $as_echo_n "checking whether the C compiler works... " >&6; }
- ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
- # The possible output files:
- ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
- ac_rmfiles=
- for ac_file in $ac_files
- do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
- done
- rm -f $ac_rmfiles
- if { { ac_try="$ac_link_default"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval ac_try_echo=""$as_me:${as_lineno-$LINENO}: $ac_try_echo""
- $as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
- # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
- # in a Makefile. We should not override ac_cv_exeext if it was cached,
- # so that the user can short-circuit this test for compilers unknown to
- # Autoconf.
- for ac_file in $ac_files ''
- do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*(..*)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
- done
- test "$ac_cv_exeext" = no && ac_cv_exeext=
- else
- ac_file=''
- fi
- if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- $as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in `$ac_pwd':" >&5
- $as_echo "$as_me: error: in `$ac_pwd':" >&2;}
- { as_fn_set_status 77
- as_fn_error "C compiler cannot create executables
- See `config.log' for more details." "$LINENO" 5; }; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
- $as_echo_n "checking for C compiler default output file name... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
- $as_echo "$ac_file" >&6; }
- ac_exeext=$ac_cv_exeext
- rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
- ac_clean_files=$ac_clean_files_save
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
- $as_echo_n "checking for suffix of executables... " >&6; }
- if { { ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval ac_try_echo=""$as_me:${as_lineno-$LINENO}: $ac_try_echo""
- $as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
- # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
- # work properly (i.e., refer to `conftest.exe'), while it won't with
- # `rm'.
- for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*(..*)'`
- break;;
- * ) break;;
- esac
- done
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in `$ac_pwd':" >&5
- $as_echo "$as_me: error: in `$ac_pwd':" >&2;}
- as_fn_error "cannot compute suffix of executables: cannot compile and link
- See `config.log' for more details." "$LINENO" 5; }
- fi
- rm -f conftest conftest$ac_cv_exeext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
- $as_echo "$ac_cv_exeext" >&6; }
- rm -f conftest.$ac_ext
- EXEEXT=$ac_cv_exeext
- ac_exeext=$EXEEXT
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <stdio.h>
- int
- main ()
- {
- FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
- ;
- return 0;
- }
- _ACEOF
- ac_clean_files="$ac_clean_files conftest.out"
- # Check that the compiler produces executables we can run. If not, either
- # the compiler is broken, or we cross compile.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
- $as_echo_n "checking whether we are cross compiling... " >&6; }
- if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval ac_try_echo=""$as_me:${as_lineno-$LINENO}: $ac_try_echo""
- $as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval ac_try_echo=""$as_me:${as_lineno-$LINENO}: $ac_try_echo""
- $as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in `$ac_pwd':" >&5
- $as_echo "$as_me: error: in `$ac_pwd':" >&2;}
- as_fn_error "cannot run C compiled programs.
- If you meant to cross compile, use `--host'.
- See `config.log' for more details." "$LINENO" 5; }
- fi
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
- $as_echo "$cross_compiling" >&6; }
- rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
- ac_clean_files=$ac_clean_files_save
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
- $as_echo_n "checking for suffix of object files... " >&6; }
- if test "${ac_cv_objext+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.o conftest.obj
- if { { ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval ac_try_echo=""$as_me:${as_lineno-$LINENO}: $ac_try_echo""
- $as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*.(.*)'`
- break;;
- esac
- done
- else
- $as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in `$ac_pwd':" >&5
- $as_echo "$as_me: error: in `$ac_pwd':" >&2;}
- as_fn_error "cannot compute suffix of object files: cannot compile
- See `config.log' for more details." "$LINENO" 5; }
- fi
- rm -f conftest.$ac_cv_objext conftest.$ac_ext
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
- $as_echo "$ac_cv_objext" >&6; }
- OBJEXT=$ac_cv_objext
- ac_objext=$OBJEXT
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
- $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
- if test "${ac_cv_c_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- #ifndef __GNUC__
- choke me
- #endif
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
- else
- ac_compiler_gnu=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_c_compiler_gnu=$ac_compiler_gnu
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
- $as_echo "$ac_cv_c_compiler_gnu" >&6; }
- if test $ac_compiler_gnu = yes; then
- GCC=yes
- else
- GCC=
- fi
- ac_test_CFLAGS=${CFLAGS+set}
- ac_save_CFLAGS=$CFLAGS
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
- $as_echo_n "checking whether $CC accepts -g... " >&6; }
- if test "${ac_cv_prog_cc_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
- else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
- else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
- $as_echo "$ac_cv_prog_cc_g" >&6; }
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
- elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
- else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
- $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
- if test "${ac_cv_prog_cc_c89+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- ac_cv_prog_cc_c89=no
- ac_save_CC=$CC
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <stdarg.h>
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
- struct buf { int x; };
- FILE * (*rcsopen) (struct buf *, struct stat *, int);
- static char *e (p, i)
- char **p;
- int i;
- {
- return p[i];
- }
- static char *f (char * (*g) (char **, int), char **p, ...)
- {
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
- }
- /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not 'xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously 'x00'!='x' always comes out true, for an
- array size at least. It's necessary to write 'x00'==0 to get something
- that's true only with -std. */
- int osf4_cc_array ['x00' == 0 ? 1 : -1];
- /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
- #define FOO(x) 'x'
- int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
- int test (int i, double x);
- struct s1 {int (*f) (int a);};
- struct s2 {int (*f) (double a);};
- int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
- int argc;
- char **argv;
- int
- main ()
- {
- return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
- }
- _ACEOF
- for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
- do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
- fi
- rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
- done
- rm -f conftest.$ac_ext
- CC=$ac_save_CC
- fi
- # AC_CACHE_VAL
- case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
- $as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
- $as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
- $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
- esac
- if test "x$ac_cv_prog_cc_c89" != xno; then :
- fi
- 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
- case $ac_cv_prog_cc_stdc in #(
- no) :
- ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
- $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
- if test "${ac_cv_prog_cc_c99+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- ac_cv_prog_cc_c99=no
- ac_save_CC=$CC
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <stdarg.h>
- #include <stdbool.h>
- #include <stdlib.h>
- #include <wchar.h>
- #include <stdio.h>
- // Check varargs macros. These examples are taken from C99 6.10.3.5.
- #define debug(...) fprintf (stderr, __VA_ARGS__)
- #define showlist(...) puts (#__VA_ARGS__)
- #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
- static void
- test_varargs_macros (void)
- {
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %dn", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
- }
- // Check long long types.
- #define BIG64 18446744073709551615ull
- #define BIG32 4294967295ul
- #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
- #if !BIG_OK
- your preprocessor is broken;
- #endif
- #if BIG_OK
- #else
- your preprocessor is broken;
- #endif
- static long long int bignum = -9223372036854775807LL;
- static unsigned long long int ubignum = BIG64;
- struct incomplete_array
- {
- int datasize;
- double data[];
- };
- struct named_init {
- int number;
- const wchar_t *name;
- double average;
- };
- typedef const char *ccp;
- static inline int
- test_restrict (ccp restrict text)
- {
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != ' '; ++i)
- continue;
- return 0;
- }
- // Check varargs and va_copy.
- static void
- test_varargs (const char *format, ...)
- {
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
- const char *str;
- int number;
- float fnumber;
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
- }
- int
- main ()
- {
- // Check bool.
- _Bool success = false;
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
- ni.number = 58;
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
- ;
- return 0;
- }
- _ACEOF
- for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
- do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c99=$ac_arg
- fi
- rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c99" != "xno" && break
- done
- rm -f conftest.$ac_ext
- CC=$ac_save_CC
- fi
- # AC_CACHE_VAL
- case "x$ac_cv_prog_cc_c99" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
- $as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
- $as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
- $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
- esac
- if test "x$ac_cv_prog_cc_c99" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
- $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
- if test "${ac_cv_prog_cc_c89+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- ac_cv_prog_cc_c89=no
- ac_save_CC=$CC
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <stdarg.h>
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
- struct buf { int x; };
- FILE * (*rcsopen) (struct buf *, struct stat *, int);
- static char *e (p, i)
- char **p;
- int i;
- {
- return p[i];
- }
- static char *f (char * (*g) (char **, int), char **p, ...)
- {
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
- }
- /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not 'xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously 'x00'!='x' always comes out true, for an
- array size at least. It's necessary to write 'x00'==0 to get something
- that's true only with -std. */
- int osf4_cc_array ['x00' == 0 ? 1 : -1];
- /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
- #define FOO(x) 'x'
- int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
- int test (int i, double x);
- struct s1 {int (*f) (int a);};
- struct s2 {int (*f) (double a);};
- int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
- int argc;
- char **argv;
- int
- main ()
- {
- return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
- }
- _ACEOF
- for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
- do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
- fi
- rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
- done
- rm -f conftest.$ac_ext
- CC=$ac_save_CC
- fi
- # AC_CACHE_VAL
- case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
- $as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
- $as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
- $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
- esac
- if test "x$ac_cv_prog_cc_c89" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
- else
- ac_cv_prog_cc_stdc=no
- fi
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
- $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
- if test "${ac_cv_prog_cc_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
- fi
- case $ac_cv_prog_cc_stdc in #(
- no) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
- $as_echo "unsupported" >&6; } ;; #(
- '') :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
- $as_echo "none needed" >&6; } ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
- $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
- esac
- 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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
- $as_echo_n "checking how to run the C preprocessor... " >&6; }
- # On Suns, sometimes $CPP names a directory.
- if test -n "$CPP" && test -d "$CPP"; then
- CPP=
- fi
- if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
- for ac_c_preproc_warn_flag in '' yes
- do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
- Syntax error
- _ACEOF
- if ac_fn_c_try_cpp "$LINENO"; then :
- else
- # Broken: fails on valid input.
- continue
- fi
- rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <ac_nonexistent.h>
- _ACEOF
- if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
- continue
- else
- # Passes both tests.
- ac_preproc_ok=:
- break
- fi
- rm -f conftest.err conftest.$ac_ext
- done
- # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
- rm -f conftest.err conftest.$ac_ext
- if $ac_preproc_ok; then :
- break
- fi
- done
- ac_cv_prog_CPP=$CPP
- fi
- CPP=$ac_cv_prog_CPP
- else
- ac_cv_prog_CPP=$CPP
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
- $as_echo "$CPP" >&6; }
- ac_preproc_ok=false
- for ac_c_preproc_warn_flag in '' yes
- do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
- Syntax error
- _ACEOF
- if ac_fn_c_try_cpp "$LINENO"; then :
- else
- # Broken: fails on valid input.
- continue
- fi
- rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <ac_nonexistent.h>
- _ACEOF
- if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
- continue
- else
- # Passes both tests.
- ac_preproc_ok=:
- break
- fi
- rm -f conftest.err conftest.$ac_ext
- done
- # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
- rm -f conftest.err conftest.$ac_ext
- if $ac_preproc_ok; then :
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in `$ac_pwd':" >&5
- $as_echo "$as_me: error: in `$ac_pwd':" >&2;}
- as_fn_error "C preprocessor "$CPP" fails sanity check
- See `config.log' for more details." "$LINENO" 5; }
- fi
- 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
- case $ac_cv_prog_cc_stdc in
- no)
- ;;
- *)
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
- #define GMP_NAIL_BITS $GMP_NAIL_BITS
- #define GMP_LIMB_BITS 123
- $DEFN_LONG_LONG_LIMB
- #include "$srcdir/gmp-h.in"
- #if ! __GMP_HAVE_PROTOTYPES
- die die die
- #endif
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp.h doesnt recognise compiler as ANSI, prototypes and "const" will be unavailable" >&5
- $as_echo "$as_me: WARNING: gmp.h doesnt recognise compiler as ANSI, prototypes and "const" will be unavailable" >&2;}
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
- esac
- # The C compiler on the build system, and associated tests.
- if test -n "$CC_FOR_BUILD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $CC_FOR_BUILD" >&5
- $as_echo_n "checking build system compiler $CC_FOR_BUILD... " >&6; }
- # remove anything that might look like compiler output to our "||" expression
- rm -f conftest* a.out b.out a.exe a_out.exe
- cat >conftest.c <<EOF
- int
- main ()
- {
- exit(0);
- }
- EOF
- gmp_compile="$CC_FOR_BUILD conftest.c"
- cc_for_build_works=no
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then
- cc_for_build_works=yes
- fi
- fi
- rm -f conftest* a.out b.out a.exe a_out.exe
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5
- $as_echo "$cc_for_build_works" >&6; }
- if test "$cc_for_build_works" = yes; then
- :
- else
- as_fn_error "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5
- fi
- elif test -n "$HOST_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $HOST_CC" >&5
- $as_echo_n "checking build system compiler $HOST_CC... " >&6; }
- # remove anything that might look like compiler output to our "||" expression
- rm -f conftest* a.out b.out a.exe a_out.exe
- cat >conftest.c <<EOF
- int
- main ()
- {
- exit(0);
- }
- EOF
- gmp_compile="$HOST_CC conftest.c"
- cc_for_build_works=no
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then
- cc_for_build_works=yes
- fi
- fi
- rm -f conftest* a.out b.out a.exe a_out.exe
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5
- $as_echo "$cc_for_build_works" >&6; }
- if test "$cc_for_build_works" = yes; then
- CC_FOR_BUILD=$HOST_CC
- else
- as_fn_error "Specified HOST_CC doesn't seem to work" "$LINENO" 5
- fi
- else
- for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $i" >&5
- $as_echo_n "checking build system compiler $i... " >&6; }
- # remove anything that might look like compiler output to our "||" expression
- rm -f conftest* a.out b.out a.exe a_out.exe
- cat >conftest.c <<EOF
- int
- main ()
- {
- exit(0);
- }
- EOF
- gmp_compile="$i conftest.c"
- cc_for_build_works=no
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then
- cc_for_build_works=yes
- fi
- fi
- rm -f conftest* a.out b.out a.exe a_out.exe
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5
- $as_echo "$cc_for_build_works" >&6; }
- if test "$cc_for_build_works" = yes; then
- CC_FOR_BUILD=$i
- break
- else
- :
- fi
- done
- if test -z "$CC_FOR_BUILD"; then
- as_fn_error "Cannot find a build system compiler" "$LINENO" 5
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system preprocessor" >&5
- $as_echo_n "checking for build system preprocessor... " >&6; }
- if test -z "$CPP_FOR_BUILD"; then
- if test "${gmp_cv_prog_cpp_for_build+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat >conftest.c <<EOF
- #define FOO BAR
- EOF
- for i in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" "/lib/cpp"; do
- gmp_compile="$i conftest.c"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; } >&5 2>&1; then
- gmp_cv_prog_cpp_for_build=$i
- break
- fi
- done
- rm -f conftest* a.out b.out a.exe a_out.exe
- if test -z "$gmp_cv_prog_cpp_for_build"; then
- as_fn_error "Cannot find build system C preprocessor." "$LINENO" 5
- fi
- fi
- CPP_FOR_BUILD=$gmp_cv_prog_cpp_for_build
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5
- $as_echo "$CPP_FOR_BUILD" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
- $as_echo_n "checking for build system executable suffix... " >&6; }
- if test "${gmp_cv_prog_exeext_for_build+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat >conftest.c <<EOF
- int
- main ()
- {
- exit (0);
- }
- EOF
- for i in .exe ,ff8 ""; do
- gmp_compile="$CC_FOR_BUILD conftest.c -o conftest$i"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- if (./conftest) 2>&5; then
- gmp_cv_prog_exeext_for_build=$i
- break
- fi
- fi
- done
- rm -f conftest*
- if test "${gmp_cv_prog_exeext_for_build+set}" != set; then
- as_fn_error "Cannot determine executable suffix" "$LINENO" 5
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_prog_exeext_for_build" >&5
- $as_echo "$gmp_cv_prog_exeext_for_build" >&6; }
- EXEEXT_FOR_BUILD=$gmp_cv_prog_exeext_for_build
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build system compiler is ANSI" >&5
- $as_echo_n "checking whether build system compiler is ANSI... " >&6; }
- if test "${gmp_cv_c_for_build_ansi+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat >conftest.c <<EOF
- int
- main (int argc, char **argv)
- {
- exit(0);
- }
- EOF
- gmp_compile="$CC_FOR_BUILD conftest.c"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- gmp_cv_c_for_build_ansi=yes
- else
- gmp_cv_c_for_build_ansi=no
- fi
- rm -f conftest* a.out b.out a.exe a_out.exe
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_for_build_ansi" >&5
- $as_echo "$gmp_cv_c_for_build_ansi" >&6; }
- if test "$gmp_cv_c_for_build_ansi" = yes; then
- U_FOR_BUILD=
- else
- U_FOR_BUILD=_
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system compiler math library" >&5
- $as_echo_n "checking for build system compiler math library... " >&6; }
- if test "${gmp_cv_check_libm_for_build+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat >conftest.c <<EOF
- int
- main ()
- {
- exit(0);
- }
- double d;
- double
- foo ()
- {
- return log (d);
- }
- EOF
- gmp_compile="$CC_FOR_BUILD conftest.c -lm"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_compile""; } >&5
- (eval $gmp_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- gmp_cv_check_libm_for_build=-lm
- else
- gmp_cv_check_libm_for_build=no
- fi
- rm -f conftest* a.out b.out a.exe a_out.exe
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_check_libm_for_build" >&5
- $as_echo "$gmp_cv_check_libm_for_build" >&6; }
- case $gmp_cv_check_libm_for_build in
- yes) LIBM_FOR_BUILD=-lm
- ;;
- no) LIBM_FOR_BUILD= ;;
- *) LIBM_FOR_BUILD=$gmp_cv_check_libm_for_build ;;
- esac
- # How to assemble, used with CFLAGS etc, see mpn/Makeasm.am.
- # Using the compiler is a lot easier than figuring out how to invoke the
- # assembler directly.
- #
- test -n "$CCAS" || CCAS="$CC -c"
- # The C++ compiler, if desired.
- want_cxx=no
- if test $enable_cxx != no; then
- test_CXXFLAGS=${CXXFLAGS+set}
- 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
- if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- set dummy $ac_tool_prefix$ac_prog; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- CXX=$ac_cv_prog_CXX
- if test -n "$CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
- $as_echo "$CXX" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- test -n "$CXX" && break
- done
- fi
- if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
- if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
- $as_echo "$ac_ct_CXX" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- test -n "$ac_ct_CXX" && break
- done
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
- yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
- $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
- CXX=$ac_ct_CXX
- fi
- fi
- fi
- fi
- # Provide some information about the compiler.
- $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
- set X $ac_compile
- ac_compiler=$2
- for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval ac_try_echo=""$as_me:${as_lineno-$LINENO}: $ac_try_echo""
- $as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a
- ... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
- $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
- if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- #ifndef __GNUC__
- choke me
- #endif
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
- else
- ac_compiler_gnu=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
- $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
- if test $ac_compiler_gnu = yes; then
- GXX=yes
- else
- GXX=
- fi
- ac_test_CXXFLAGS=${CXXFLAGS+set}
- ac_save_CXXFLAGS=$CXXFLAGS
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
- $as_echo_n "checking whether $CXX accepts -g... " >&6; }
- if test "${ac_cv_prog_cxx_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
- else
- CXXFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_cxx_try_compile "$LINENO"; then :
- else
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
- $as_echo "$ac_cv_prog_cxx_g" >&6; }
- if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
- elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
- else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
- fi
- 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
- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&5
- cxxflags_ac_prog_cxx=$CXXFLAGS
- cxxflags_list=ac_prog_cxx
- # If the user didn't specify $CXXFLAGS, then try $CFLAGS, with -g removed
- # if AC_PROG_CXX thinks that doesn't work. $CFLAGS stands a good chance
- # of working, eg. on a GNU system where CC=gcc and CXX=g++.
- #
- if test "$test_CXXFLAGS" != set; then
- cxxflags_cflags=$CFLAGS
- cxxflags_list="cflags $cxxflags_list"
- if test "$ac_prog_cxx_g" = no; then
- cxxflags_cflags=`echo "$cxxflags_cflags" | sed -e 's/ -g //' -e 's/^-g //' -e 's/ -g$//'`
- fi
- fi
- # See if the C++ compiler works. If the user specified CXXFLAGS then all
- # we're doing is checking whether AC_PROG_CXX succeeded, since it doesn't
- # give a fatal error, just leaves CXX set to a default g++. If on the
- # 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"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS" >&5
- $as_echo_n "checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS... " >&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
- # remove anything that might look like compiler output to our "||" expression
- rm -f conftest* a.out b.out a.exe a_out.exe
- cat >conftest.cc <<EOF
- int main (void) { return 0; }
- EOF
- echo "Test compile: " >&5
- gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_cxxcompile""; } >&5
- (eval $gmp_cxxcompile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- if test "$cross_compiling" = no; then
- if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
- { { eval echo ""$as_me":${as_lineno-$LINENO}: "$ac_try""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; }; then :;
- else
- gmp_prog_cxx_works="no, program does not run"
- fi
- fi
- else
- gmp_prog_cxx_works="no"
- fi
- case $gmp_prog_cxx_works in
- no*)
- echo "failed program was:" >&5
- cat conftest.cc >&5
- ;;
- esac
- rm -f conftest* a.out b.out a.exe a_out.exe
- fi
- if test "$gmp_prog_cxx_works" = yes; then
- # remove anything that might look like compiler output to our "||" expression
- rm -f conftest* a.out b.out a.exe a_out.exe
- cat >conftest.cc <<EOF
- namespace foo { }
- using namespace foo;
- int main (void) { return 0; }
- EOF
- echo "Test compile: namespace" >&5
- gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_cxxcompile""; } >&5
- (eval $gmp_cxxcompile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- if test "$cross_compiling" = no; then
- if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
- { { eval echo ""$as_me":${as_lineno-$LINENO}: "$ac_try""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; }; then :;
- else
- gmp_prog_cxx_works="no, namespace, program does not run"
- fi
- fi
- else
- gmp_prog_cxx_works="no, namespace"
- fi
- case $gmp_prog_cxx_works in
- no*)
- echo "failed program was:" >&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
- # remove anything that might look like compiler output to our "||" expression
- rm -f conftest* a.out b.out a.exe a_out.exe
- cat >conftest.cc <<EOF
- /* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a
- pre-standard iostream.h. */
- #include <iostream>
- /* 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 $CPPFLAGS $CXXFLAGS conftest.cc >&5"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_cxxcompile""; } >&5
- (eval $gmp_cxxcompile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- if test "$cross_compiling" = no; then
- if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
- { { eval echo ""$as_me":${as_lineno-$LINENO}: "$ac_try""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; }; then :;
- else
- gmp_prog_cxx_works="no, std iostream, program does not run"
- fi
- fi
- else
- gmp_prog_cxx_works="no, std iostream"
- fi
- case $gmp_prog_cxx_works in
- no*)
- echo "failed program was:" >&5
- cat conftest.cc >&5
- ;;
- esac
- rm -f conftest* a.out b.out a.exe a_out.exe
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cxx_works" >&5
- $as_echo "$gmp_prog_cxx_works" >&6; }
- case $gmp_prog_cxx_works in
- yes)
- want_cxx=yes
- break
- ;;
- *)
- ;;
- esac
- done
- # If --enable-cxx=yes but a C++ compiler can't be found, then abort.
- if test $want_cxx = no && test $enable_cxx = yes; then
- as_fn_error "C++ compiler not available, see config.log for details" "$LINENO" 5
- fi
- fi
- if test $want_cxx = yes; then
- WANT_CXX_TRUE=
- WANT_CXX_FALSE='#'
- else
- WANT_CXX_TRUE='#'
- WANT_CXX_FALSE=
- fi
- # FIXME: We're not interested in CXXCPP for ourselves, but if we don't do it
- # here then AC_PROG_LIBTOOL will AC_REQUIRE it (via _LT_AC_TAGCONFIG) and
- # hence execute it unconditionally, and that will fail if there's no C++
- # compiler (and no generic /lib/cpp).
- #
- if test $want_cxx = yes; then
- 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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
- $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
- if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- # Double quotes because CXXCPP needs to be expanded
- for CXXCPP in "$CXX -E" "/lib/cpp"
- do
- ac_preproc_ok=false
- for ac_cxx_preproc_warn_flag in '' yes
- do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
- Syntax error
- _ACEOF
- if ac_fn_cxx_try_cpp "$LINENO"; then :
- else
- # Broken: fails on valid input.
- continue
- fi
- rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <ac_nonexistent.h>
- _ACEOF
- if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
- continue
- else
- # Passes both tests.
- ac_preproc_ok=:
- break
- fi
- rm -f conftest.err conftest.$ac_ext
- done
- # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
- rm -f conftest.err conftest.$ac_ext
- if $ac_preproc_ok; then :
- break
- fi
- done
- ac_cv_prog_CXXCPP=$CXXCPP
- fi
- CXXCPP=$ac_cv_prog_CXXCPP
- else
- ac_cv_prog_CXXCPP=$CXXCPP
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
- $as_echo "$CXXCPP" >&6; }
- ac_preproc_ok=false
- for ac_cxx_preproc_warn_flag in '' yes
- do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
- Syntax error
- _ACEOF
- if ac_fn_cxx_try_cpp "$LINENO"; then :
- else
- # Broken: fails on valid input.
- continue
- fi
- rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <ac_nonexistent.h>
- _ACEOF
- if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
- continue
- else
- # Passes both tests.
- ac_preproc_ok=:
- break
- fi
- rm -f conftest.err conftest.$ac_ext
- done
- # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
- rm -f conftest.err conftest.$ac_ext
- if $ac_preproc_ok; then :
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in `$ac_pwd':" >&5
- $as_echo "$as_me: error: in `$ac_pwd':" >&2;}
- as_fn_error "C++ preprocessor "$CXXCPP" fails sanity check
- See `config.log' for more details." "$LINENO" 5; }
- fi
- 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
- # Path setups for Cray, according to IEEE or CFP. These must come after
- # deciding the compiler.
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
- $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
- if test "${ac_cv_path_GREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
- # Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
- case `"$ac_path_GREP" --version 2>&1` in
- *GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
- *)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
- esac
- $ac_path_GREP_found && break 3
- done
- done
- done
- IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
- else
- ac_cv_path_GREP=$GREP
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
- $as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
- $as_echo_n "checking for egrep... " >&6; }
- if test "${ac_cv_path_EGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
- # Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
- case `"$ac_path_EGREP" --version 2>&1` in
- *GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
- *)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
- esac
- $ac_path_EGREP_found && break 3
- done
- done
- done
- IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
- else
- ac_cv_path_EGREP=$EGREP
- fi
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
- $as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
- case $host_cpu in
- c90 | t90)
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #ifdef _CRAYIEEE
- yes
- #endif
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
- add_path="cray/ieee"
- else
- add_path="cray/cfp"; extra_functions="mulwwc90"
- fi
- rm -f conftest*
- ;;
- j90 | sv1)
- add_path="cray/cfp"; extra_functions="mulwwj90"
- ;;
- esac
- if test -z "$MPN_PATH"; then
- path="$add_path $path"
- fi
- # For a nail build, also look in "nails" subdirectories.
- #
- if test $GMP_NAIL_BITS != 0 && test -z "$MPN_PATH"; then
- new_path=
- for i in $path; do
- case $i in
- generic) new_path="$new_path $i" ;;
- *) new_path="$new_path $i/nails $i" ;;
- esac
- done
- path=$new_path
- fi
- # Put all directories into CPUVEC_list so as to get a full set of
- # CPUVEC_SETUP_$tmp_suffix defines into config.h, even if some of them are
- # empty because mmx and/or sse2 had to be dropped.
- #
- for i in $fat_path; do
- tmp_suffix=`echo $i | sed -e '///s:^[^/]*/::' -e 's:[\/]:_:g'`
- CPUVEC_list="$CPUVEC_list CPUVEC_SETUP_$tmp_suffix"
- done
- # If there's any sse2 or mmx in the path, check whether the assembler
- # supports it, and remove if not.
- #
- # We only need this in ABI=32, for ABI=64 on x86_64 we can assume a new
- # enough assembler.
- #
- case $host in
- i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*)
- if test "$ABI" = 32; then
- case "$path $fat_path" in
- *mmx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about MMX instructions" >&5
- $as_echo_n "checking if the assembler knows about MMX instructions... " >&6; }
- if test "${gmp_cv_asm_x86_mmx+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat >conftest.s <<EOF
- .text
- movq %mm0, %mm1
- EOF
- gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_assemble""; } >&5
- (eval $gmp_assemble) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- cat conftest.out >&5
- gmp_cv_asm_x86_mmx=yes
- case $host in
- *-*-solaris*)
- if (dis conftest.$OBJEXT >conftest.out) 2>/dev/null; then
- if grep "0f 6f c1" conftest.out >/dev/null; then
- gmp_cv_asm_x86_mmx=movq-bug
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: "dis" not available to check for "as" movq bug" >&5
- $as_echo "$as_me: WARNING: "dis" not available to check for "as" movq bug" >&2;}
- fi
- esac
- else
- cat conftest.out >&5
- echo "configure: failed program was:" >&5
- cat conftest.s >&5
- gmp_cv_asm_x86_mmx=no
- fi
- rm -f conftest*
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_mmx" >&5
- $as_echo "$gmp_cv_asm_x86_mmx" >&6; }
- case $gmp_cv_asm_x86_mmx in
- movq-bug)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
- $as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5
- $as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has MMX code, but the assembler" >&5
- $as_echo "$as_me: WARNING: | Host CPU has MMX code, but the assembler" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5
- $as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | has the Solaris 2.6 and 2.7 bug where register to register" >&5
- $as_echo "$as_me: WARNING: | has the Solaris 2.6 and 2.7 bug where register to register" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | movq operands are reversed." >&5
- $as_echo "$as_me: WARNING: | movq operands are reversed." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-MMX replacements will be used." >&5
- $as_echo "$as_me: WARNING: | Non-MMX replacements will be used." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5
- $as_echo "$as_me: WARNING: | This will be an inferior build." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
- $as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
- ;;
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
- $as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5
- $as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has MMX code, but it can't be assembled by" >&5
- $as_echo "$as_me: WARNING: | Host CPU has MMX code, but it can't be assembled by" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5
- $as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-MMX replacements will be used." >&5
- $as_echo "$as_me: WARNING: | Non-MMX replacements will be used." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5
- $as_echo "$as_me: WARNING: | This will be an inferior build." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
- $as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
- ;;
- esac
- if test "$gmp_cv_asm_x86_mmx" = yes; then
- :
- else
- tmp_path=
- for i in $path; do
- case $i in
- */*mmx*) ;;
- *) tmp_path="$tmp_path $i" ;;
- esac
- done
- path="$tmp_path"
- tmp_path=
- for i in $fat_path; do
- case $i in
- */*mmx*) ;;
- *) tmp_path="$tmp_path $i" ;;
- esac
- done
- fat_path="$tmp_path"
- fi
- ;;
- esac
- case "$path $fat_path" in
- *sse2*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about SSE2 instructions" >&5
- $as_echo_n "checking if the assembler knows about SSE2 instructions... " >&6; }
- if test "${gmp_cv_asm_x86_sse2+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat >conftest.s <<EOF
- .text
- paddq %mm0, %mm1
- EOF
- gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
- if { { eval echo ""$as_me":${as_lineno-$LINENO}: "$gmp_assemble""; } >&5
- (eval $gmp_assemble) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; then
- cat conftest.out >&5
- gmp_cv_asm_x86_sse2=yes
- else
- cat conftest.out >&5
- echo "configure: failed program was:" >&5
- cat conftest.s >&5
- gmp_cv_asm_x86_sse2=no
- fi
- rm -f conftest*
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_sse2" >&5
- $as_echo "$gmp_cv_asm_x86_sse2" >&6; }
- case $gmp_cv_asm_x86_sse2 in
- yes)
- :
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
- $as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5
- $as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has SSE2 code, but it can't be assembled by" >&5
- $as_echo "$as_me: WARNING: | Host CPU has SSE2 code, but it can't be assembled by" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5
- $as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-SSE2 replacements will be used." >&5
- $as_echo "$as_me: WARNING: | Non-SSE2 replacements will be used." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5
- $as_echo "$as_me: WARNING: | This will be an inferior build." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
- $as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
- tmp_path=
- for i in $path; do
- case $i in
- */sse2) ;;
- *) tmp_path="$tmp_path $i" ;;
- esac
- done
- path="$tmp_path"
- tmp_path=
- for i in $fat_path; do
- case $i in
- */sse2) ;;
- *) tmp_path="$tmp_path $i" ;;
- esac
- done
- fat_path="$tmp_path"
- ;;
- esac
- ;;
- esac
- fi
- ;;
- esac
- cat >&5 <<EOF
- Decided:
- ABI=$ABI
- CC=$CC
- CFLAGS=$CFLAGS
- CPPFLAGS=$CPPFLAGS
- GMP_LDFLAGS=$GMP_LDFLAGS
- CXX=$CXX
- CXXFLAGS=$CXXFLAGS
- path=$path
- EOF
- echo "using ABI="$ABI""
- echo " CC="$CC""
- echo " CFLAGS="$CFLAGS""
- echo " CPPFLAGS="$CPPFLAGS""
- if test $want_cxx = yes; then
- echo " CXX="$CXX""
- echo " CXXFLAGS="$CXXFLAGS""
- fi
- echo " MPN_PATH="$path""
- # Automake ansi2knr support.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
- $as_echo_n "checking for function prototypes... " >&6; }
- if test "$ac_cv_prog_cc_c89" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- $as_echo "#define PROTOTYPES 1" >>confdefs.h
- $as_echo "#define __PROTOTYPES 1" >>confdefs.h
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
- $as_echo_n "checking for ANSI C header files... " >&6; }
- if test "${ac_cv_header_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <stdlib.h>
- #include <stdarg.h>
- #include <string.h>
- #include <float.h>
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
- else
- ac_cv_header_stdc=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <string.h>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
- else
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- fi
- if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <stdlib.h>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
- else
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- fi
- if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <ctype.h>
- #include <stdlib.h>
- #if ((' ' & 0x0FF) == 0x020)
- # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #else
- # define ISLOWER(c)
- (('a' <= (c) && (c) <= 'i')
- || ('j' <= (c) && (c) <= 'r')
- || ('s' <= (c) && (c) <= 'z'))
- # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
- #endif
- #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
- int
- main ()
- {
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- else
- ac_cv_header_stdc=no
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext
- conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
- $as_echo "$ac_cv_header_stdc" >&6; }
- if test $ac_cv_header_stdc = yes; then
- $as_echo "#define STDC_HEADERS 1" >>confdefs.h
- fi
- # On IRIX 5.3, sys/types and inttypes.h are conflicting.
- for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h
- inttypes.h stdint.h unistd.h
- do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
- ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
- "
- eval as_val=$$as_ac_Header
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- if test "$ac_cv_prog_cc_stdc" != no; then
- U= ANSI2KNR=
- else
- U=_ ANSI2KNR=./ansi2knr
- fi
- # Ensure some checks needed by ansi2knr itself.
- for ac_header in string.h
- do :
- ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
- if test "x$ac_cv_header_string_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
- #define HAVE_STRING_H 1
- _ACEOF
- fi
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports --noexecstack option" >&5
- $as_echo_n "checking whether assembler supports --noexecstack option... " >&6; }
- if test "${cl_cv_as_noexecstack+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- cat > conftest.c <<EOF
- void foo() {}
- EOF
- if { ac_try='${CC} $CFLAGS $CPPFLAGS
- -S -o conftest.s conftest.c >/dev/null'
- { { eval echo ""$as_me":${as_lineno-$LINENO}: "$ac_try""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; }
- && grep .note.GNU-stack conftest.s >/dev/null
- && { ac_try='${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack
- -c -o conftest.o conftest.s >/dev/null'
- { { eval echo ""$as_me":${as_lineno-$LINENO}: "$ac_try""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
- test $ac_status = 0; }; }
- then
- cl_cv_as_noexecstack=yes
- else
- cl_cv_as_noexecstack=no
- fi
- rm -f conftest*
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_as_noexecstack" >&5
- $as_echo "$cl_cv_as_noexecstack" >&6; }
- if test "$cl_cv_as_noexecstack" = yes; then
- ASMFLAGS="$ASMFLAGS -Wa,--noexecstack"
- fi
- gmp_user_AR=$AR
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
- set dummy ${ac_tool_prefix}ar; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- AR=$ac_cv_prog_AR
- if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
- $as_echo "$AR" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- fi
- if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
- set dummy ar; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_AR=$ac_cv_prog_ac_ct_AR
- if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
- $as_echo "$ac_ct_AR" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- if test "x$ac_ct_AR" = x; then
- AR="ar"
- else
- case $cross_compiling:$ac_tool_warned in
- yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
- $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
- AR=$ac_ct_AR
- fi
- else
- AR="$ac_cv_prog_AR"
- fi
- if test -z "$gmp_user_AR"; then
- eval arflags="$ar${abi1}_flags"
- test -n "$arflags" || eval arflags="$ar${abi2}_flags"
- if test -n "$arflags"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra ar flags" >&5
- $as_echo_n "checking for extra ar flags... " >&6; }
- AR="$AR $arflags"
- ac_cv_prog_AR="$AR $arflags"
- ac_cv_prog_ac_ct_AR="$AR $arflags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $arflags" >&5
- $as_echo "$arflags" >&6; }
- fi
- fi
- if test -z "$AR_FLAGS"; then
- AR_FLAGS=cq
- fi
- gmp_user_NM=$NM
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
- $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
- if test "${lt_cv_path_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
- else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
- $as_echo "$lt_cv_path_NM" >&6; }
- if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
- else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$ac_tool_prefix"; then
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- set dummy $ac_tool_prefix$ac_prog; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- DUMPBIN=$ac_cv_prog_DUMPBIN
- if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
- $as_echo "$DUMPBIN" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- test -n "$DUMPBIN" && break
- done
- fi
- if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
- if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
- $as_echo "$ac_ct_DUMPBIN" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- test -n "$ac_ct_DUMPBIN" && break
- done
- if test "x$ac_ct_DUMPBIN" = x; then
- DUMPBIN=":"
- else
- case $cross_compiling:$ac_tool_warned in
- yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
- $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
- DUMPBIN=$ac_ct_DUMPBIN
- fi
- fi
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
- fi
- test -z "$NM" && NM=nm
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
- $as_echo_n "checking the name lister ($NM) interface... " >&6; }
- if test "${lt_cv_nm_interface+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo ""$as_me:11213: $ac_compile"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo ""$as_me:11216: $NM \"conftest.$ac_objext\""" >&5)
- (eval "$NM "conftest.$ac_objext"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo ""$as_me:11219: output"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
- $as_echo "$lt_cv_nm_interface" >&6; }
- # FIXME: When cross compiling (ie. $ac_tool_prefix not empty), libtool
- # defaults to plain "nm" if a "${ac_tool_prefix}nm" is not found. In this
- # case run it again to try the native "nm", firstly so that likely locations
- # are searched, secondly so that -B or -p are added if necessary for BSD
- # format. This is necessary for instance on OSF with "./configure
- # --build=alphaev5-dec-osf --host=alphaev6-dec-osf".
- #
- if test -z "$gmp_user_NM" && test -n "$ac_tool_prefix" && test "$NM" = nm; then
- $as_unset lt_cv_path_NM
- gmp_save_ac_tool_prefix=$ac_tool_prefix
- ac_tool_prefix=
- NM=
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
- $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
- if test "${lt_cv_path_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
- else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
- $as_echo "$lt_cv_path_NM" >&6; }
- if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
- else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$ac_tool_prefix"; then
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- set dummy $ac_tool_prefix$ac_prog; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- DUMPBIN=$ac_cv_prog_DUMPBIN
- if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
- $as_echo "$DUMPBIN" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- test -n "$DUMPBIN" && break
- done
- fi
- if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
- if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
- $as_echo "$ac_ct_DUMPBIN" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- test -n "$ac_ct_DUMPBIN" && break
- done
- if test "x$ac_ct_DUMPBIN" = x; then
- DUMPBIN=":"
- else
- case $cross_compiling:$ac_tool_warned in
- yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
- $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
- DUMPBIN=$ac_ct_DUMPBIN
- fi
- fi
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
- fi
- test -z "$NM" && NM=nm
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
- $as_echo_n "checking the name lister ($NM) interface... " >&6; }
- if test "${lt_cv_nm_interface+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo ""$as_me:11413: $ac_compile"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo ""$as_me:11416: $NM \"conftest.$ac_objext\""" >&5)
- (eval "$NM "conftest.$ac_objext"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo ""$as_me:11419: output"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
- $as_echo "$lt_cv_nm_interface" >&6; }
- ac_tool_prefix=$gmp_save_ac_tool_prefix
- fi
- if test -z "$gmp_user_NM"; then
- eval nmflags="$nm${abi1}_flags"
- test -n "$nmflags" || eval nmflags="$nm${abi2}_flags"
- if test -n "$nmflags"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra nm flags" >&5
- $as_echo_n "checking for extra nm flags... " >&6; }
- NM="$NM $nmflags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nmflags" >&5
- $as_echo "$nmflags" >&6; }
- fi
- fi
- case $host in
- # FIXME: On AIX 3 and 4, $libname.a is included in libtool
- # $library_names_spec, so libgmp.a becomes a symlink to libgmp.so, making
- # it impossible to build shared and static libraries simultaneously.
- # Disable shared libraries by default, but let the user override with
- # --enable-shared --disable-static.
- #
- # FIXME: This $libname.a problem looks like it might apply to *-*-amigaos*
- # and *-*-os2* too, but wait for someone to test this before worrying
- # about it. If there is a problem then of course libtool is the right
- # place to fix it.
- #
- *-*-aix[34]*)
- if test -z "$enable_shared"; then enable_shared=no; fi ;;
- esac
- # Configs for Windows DLLs.
- enable_win32_dll=yes
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
- set dummy ${ac_tool_prefix}as; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_AS+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- AS=$ac_cv_prog_AS
- if test -n "$AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
- $as_echo "$AS" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- fi
- if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
- set dummy as; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AS="as"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_AS=$ac_cv_prog_ac_ct_AS
- if test -n "$ac_ct_AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
- $as_echo "$ac_ct_AS" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- if test "x$ac_ct_AS" = x; then
- AS="false"
- else
- case $cross_compiling:$ac_tool_warned in
- yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
- $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
- AS=$ac_ct_AS
- fi
- else
- AS="$ac_cv_prog_AS"
- fi
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
- set dummy ${ac_tool_prefix}dlltool; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- DLLTOOL=$ac_cv_prog_DLLTOOL
- if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
- $as_echo "$DLLTOOL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- fi
- if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
- set dummy dlltool; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
- if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
- $as_echo "$ac_ct_DLLTOOL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- if test "x$ac_ct_DLLTOOL" = x; then
- DLLTOOL="false"
- else
- case $cross_compiling:$ac_tool_warned in
- yes:)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
- $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
- ac_tool_warned=yes ;;
- esac
- DLLTOOL=$ac_ct_DLLTOOL
- fi
- else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
- fi
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
- set dummy ${ac_tool_prefix}objdump; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- OBJDUMP=$ac_cv_prog_OBJDUMP
- if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
- $as_echo "$OBJDUMP" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- fi
- if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
- set dummy objdump; ac_word=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
- if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
- done
- done
- IFS=$as_save_IFS
- fi
- fi
- ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
- if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
- $as_echo "$ac_ct_OBJDUMP" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi