From c6d0530757c48b9a6cd72222ef86e4486457f4a7 Mon Sep 17 00:00:00 2001 From: Krister Walfridsson Date: Fri, 29 Nov 2002 18:53:45 +0100 Subject: configure.in (_XOPEN_SOURCE, [...]): Check that _XOPEN_SOURCE 500L may be defined before defining these. 2002-10-18 Krister Walfridsson * libU77/configure.in (_XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, __EXTENSIONS__, _FILE_OFFSET_BITS): Check that _XOPEN_SOURCE 500L may be defined before defining these. * libU77/configure: Regenerate. * libI77/configure.in (_XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, __EXTENSIONS__, _FILE_OFFSET_BITS): Check that _XOPEN_SOURCE 500L may be defined before defining these. * libI77/configure: Regenerate. From-SVN: r59639 --- libf2c/ChangeLog | 11 +++ libf2c/libI77/configure | 209 +++++++++++++++++++++++++-------------------- libf2c/libI77/configure.in | 33 ++++--- libf2c/libU77/configure | 201 ++++++++++++++++++++++++------------------- libf2c/libU77/configure.in | 31 ++++--- 5 files changed, 282 insertions(+), 203 deletions(-) (limited to 'libf2c') diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index 7e10295..12c566e 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -3,6 +3,17 @@ PR fortran/8587 * libF77/pow_zz.c: Handle (0.0, 0.0) ** power. +2002-10-18 Krister Walfridsson + + * libU77/configure.in (_XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, + __EXTENSIONS__, _FILE_OFFSET_BITS): Check that _XOPEN_SOURCE 500L + may be defined before defining these. + * libU77/configure: Regenerate. + * libI77/configure.in (_XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, + __EXTENSIONS__, _FILE_OFFSET_BITS): Check that _XOPEN_SOURCE 500L + may be defined before defining these. + * libI77/configure: Regenerate. + 2002-09-23 Zack Weinberg * libF77/Version.c: Rename junk to __LIBF77_VERSION__. Add diff --git a/libf2c/libI77/configure b/libf2c/libI77/configure index 7b8efd8..7bca4a7 100755 --- a/libf2c/libI77/configure +++ b/libf2c/libI77/configure @@ -523,32 +523,6 @@ fi -# These defines are necessary to get 64-bit file size support. - -cat >> confdefs.h <<\EOF -#define _XOPEN_SOURCE 500L -EOF - -# The following is needed by irix6.2 so that struct timeval is declared. -cat >> confdefs.h <<\EOF -#define _XOPEN_SOURCE_EXTENDED 1 -EOF - -# The following is needed by Solaris2.5.1 so that struct timeval is declared. -cat >> confdefs.h <<\EOF -#define __EXTENSIONS__ 1 -EOF - -cat >> confdefs.h <<\EOF -#define _FILE_OFFSET_BITS 64 -EOF - -cat >> confdefs.h <<\EOF -#define _LARGEFILE_SOURCE 1 -EOF - - - # For g77 we'll set CC to point at the built gcc, but this will get it into @@ -556,7 +530,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:560: checking for $ac_word" >&5 +echo "configure:534: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -586,7 +560,7 @@ 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 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:590: checking for $ac_word" >&5 +echo "configure:564: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -637,7 +611,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:641: checking for $ac_word" >&5 +echo "configure:615: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -670,7 +644,7 @@ fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:674: checking whether we are using GNU C" >&5 +echo "configure:648: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -679,7 +653,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -698,7 +672,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:702: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:676: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -730,13 +704,64 @@ else fi +# These defines are necessary to get 64-bit file size support. +# NetBSD 1.4 header files does not support XOPEN_SOURCE == 500, but it +# handles 64-bit file sizes without needing these defines. +echo $ac_n "checking whether _XOPEN_SOURCE may be defined""... $ac_c" 1>&6 +echo "configure:712: checking whether _XOPEN_SOURCE may be defined" >&5 +cat > conftest.$ac_ext < +int main() { + +; return 0; } +EOF +if { (eval echo configure:722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + may_use_xopen_source=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + may_use_xopen_source=no +fi +rm -f conftest* +echo "$ac_t""$may_use_xopen_source" 1>&6 +if test $may_use_xopen_source = yes; then + cat >> confdefs.h <<\EOF +#define _XOPEN_SOURCE 500L +EOF + + # The following is needed by irix6.2 so that struct timeval is declared. + cat >> confdefs.h <<\EOF +#define _XOPEN_SOURCE_EXTENDED 1 +EOF + + # The following is needed by Solaris2.5.1 so that struct timeval is declared. + cat >> confdefs.h <<\EOF +#define __EXTENSIONS__ 1 +EOF + + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + + cat >> confdefs.h <<\EOF +#define _LARGEFILE_SOURCE 1 +EOF + +fi + + LIBTOOL='$(SHELL) ../libtool' test "$AR" || AR=ar echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:740: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:765: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -766,7 +791,7 @@ fi # Sanity check for the cross-compilation case: echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:770: checking how to run the C preprocessor" >&5 +echo "configure:795: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -781,13 +806,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -798,13 +823,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -815,13 +840,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -847,17 +872,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for stdio.h""... $ac_c" 1>&6 -echo "configure:851: checking for stdio.h" >&5 +echo "configure:876: checking for stdio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -885,12 +910,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:889: checking for ANSI C header files" >&5 +echo "configure:914: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -898,7 +923,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -915,7 +940,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -933,7 +958,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -954,7 +979,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -965,7 +990,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -989,12 +1014,12 @@ EOF fi echo $ac_n "checking for posix""... $ac_c" 1>&6 -echo "configure:993: checking for posix" >&5 +echo "configure:1018: checking for posix" >&5 if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1020,12 +1045,12 @@ echo "$ac_t""$g77_cv_header_posix" 1>&6 # We can rely on the GNU library being posix-ish. I guess checking the # header isn't actually like checking the functions, though... echo $ac_n "checking for GNU library""... $ac_c" 1>&6 -echo "configure:1024: checking for GNU library" >&5 +echo "configure:1049: checking for GNU library" >&5 if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef __GNU_LIBRARY__ @@ -1049,12 +1074,12 @@ echo "$ac_t""$g77_cv_lib_gnu" 1>&6 # Apparently cygwin needs to be special-cased. echo $ac_n "checking for cyg\`win'32""... $ac_c" 1>&6 -echo "configure:1053: checking for cyg\`win'32" >&5 +echo "configure:1078: checking for cyg\`win'32" >&5 if eval "test \"`echo '$''{'g77_cv_sys_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 # ditto for mingw32. echo $ac_n "checking for mingw32""... $ac_c" 1>&6 -echo "configure:1081: checking for mingw32" >&5 +echo "configure:1106: checking for mingw32" >&5 if eval "test \"`echo '$''{'g77_cv_sys_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1109: checking for working const" >&5 +echo "configure:1134: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1180,12 +1205,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1184: checking for size_t" >&5 +echo "configure:1209: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1218,12 +1243,12 @@ fi # Apparently positive result on cygwin loses re. NON_UNIX_STDIO # (as of cygwin b18). Likewise on mingw. echo $ac_n "checking for fstat""... $ac_c" 1>&6 -echo "configure:1222: checking for fstat" >&5 +echo "configure:1247: checking for fstat" >&5 if eval "test \"`echo '$''{'ac_cv_func_fstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_fstat=yes" else @@ -1266,7 +1291,7 @@ else fi echo $ac_n "checking need for NON_UNIX_STDIO""... $ac_c" 1>&6 -echo "configure:1270: checking need for NON_UNIX_STDIO" >&5 +echo "configure:1295: checking need for NON_UNIX_STDIO" >&5 if test $g77_cv_sys_cygwin32 = yes \ || test $g77_cv_sys_mingw32 = yes \ || test $ac_cv_func_fstat = no; then @@ -1282,12 +1307,12 @@ fi for ac_func in fseeko do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1286: checking for $ac_func" >&5 +echo "configure:1311: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1337,12 +1362,12 @@ done for ac_func in ftello do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1341: checking for $ac_func" >&5 +echo "configure:1366: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1392,12 +1417,12 @@ done for ac_func in ftruncate do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1396: checking for $ac_func" >&5 +echo "configure:1421: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1447,12 +1472,12 @@ done for ac_func in mkstemp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1451: checking for $ac_func" >&5 +echo "configure:1476: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1502,12 +1527,12 @@ done for ac_func in tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1506: checking for $ac_func" >&5 +echo "configure:1531: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1557,12 +1582,12 @@ done for ac_func in tmpnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1561: checking for $ac_func" >&5 +echo "configure:1586: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1615,19 +1640,19 @@ done # However, on my sunos4/gcc setup unistd.h leads us wrongly to believe # we're posix-conformant, so always do the test. echo $ac_n "checking for ansi/posix sprintf result""... $ac_c" 1>&6 -echo "configure:1619: checking for ansi/posix sprintf result" >&5 +echo "configure:1644: checking for ansi/posix sprintf result" >&5 if test "$cross_compiling" = yes; then g77_cv_sys_sprintf_ansi=no else cat > conftest.$ac_ext < /* does sprintf return the number of chars transferred? */ main () {char foo[2]; (sprintf(foo, "1") == 1) ? exit(0) : exit(1);} EOF -if { (eval echo configure:1631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then g77_cv_sys_sprintf_ansi=yes else @@ -1658,9 +1683,9 @@ fi # define NON_ANSI_RW_MODES on unix (can't hurt) echo $ac_n "checking NON_ANSI_RW_MODES""... $ac_c" 1>&6 -echo "configure:1662: checking NON_ANSI_RW_MODES" >&5 +echo "configure:1687: checking NON_ANSI_RW_MODES" >&5 cat > conftest.$ac_ext <&6 -echo "configure:1709: checking for off_t" >&5 +echo "configure:1734: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS diff --git a/libf2c/libI77/configure.in b/libf2c/libI77/configure.in index 0455647..40713e0 100644 --- a/libf2c/libI77/configure.in +++ b/libf2c/libI77/configure.in @@ -23,18 +23,6 @@ AC_PREREQ(2.12.1) AC_INIT(ftell_.c) AC_CONFIG_HEADER(config.h) -# These defines are necessary to get 64-bit file size support. - -AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics]) -# The following is needed by irix6.2 so that struct timeval is declared. -AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics]) -# The following is needed by Solaris2.5.1 so that struct timeval is declared. -AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions]) -AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support]) -AC_DEFINE(_LARGEFILE_SOURCE, 1, [Define for HP-UX ftello and fseeko extension.]) - -dnl Checks for programs. - dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may dnl not be able to. define([AC_PROG_CC_WORKS],[]) @@ -43,6 +31,27 @@ define([AC_PROG_CC_WORKS],[]) # the makefiles AC_PROG_CC +# These defines are necessary to get 64-bit file size support. +# NetBSD 1.4 header files does not support XOPEN_SOURCE == 500, but it +# handles 64-bit file sizes without needing these defines. +AC_MSG_CHECKING(whether _XOPEN_SOURCE may be defined) +AC_TRY_COMPILE([#define _XOPEN_SOURCE 500L +#include ],, +may_use_xopen_source=yes, +may_use_xopen_source=no) +AC_MSG_RESULT($may_use_xopen_source) +if test $may_use_xopen_source = yes; then + AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics]) + # The following is needed by irix6.2 so that struct timeval is declared. + AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics]) + # The following is needed by Solaris2.5.1 so that struct timeval is declared. + AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions]) + AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support]) + AC_DEFINE(_LARGEFILE_SOURCE, 1, [Define for HP-UX ftello and fseeko extension.]) +fi + +dnl Checks for programs. + LIBTOOL='$(SHELL) ../libtool' AC_SUBST(LIBTOOL) diff --git a/libf2c/libU77/configure b/libf2c/libU77/configure index 6eb7f25..6b288ee 100755 --- a/libf2c/libU77/configure +++ b/libf2c/libU77/configure @@ -523,28 +523,6 @@ fi -# These defines are necessary to get 64-bit file size support. - -cat >> confdefs.h <<\EOF -#define _XOPEN_SOURCE 500L -EOF - -# The following is needed by irix6.2 so that struct timeval is declared. -cat >> confdefs.h <<\EOF -#define _XOPEN_SOURCE_EXTENDED 1 -EOF - -# The following is needed by Solaris2.5.1 so that struct timeval is declared. -cat >> confdefs.h <<\EOF -#define __EXTENSIONS__ 1 -EOF - -cat >> confdefs.h <<\EOF -#define _FILE_OFFSET_BITS 64 -EOF - - - # For g77 we'll set CC to point at the built gcc, but this will get it into @@ -552,7 +530,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:556: checking for $ac_word" >&5 +echo "configure:534: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -582,7 +560,7 @@ 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 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:586: checking for $ac_word" >&5 +echo "configure:564: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -633,7 +611,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:637: checking for $ac_word" >&5 +echo "configure:615: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -666,7 +644,7 @@ fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:670: checking whether we are using GNU C" >&5 +echo "configure:648: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -675,7 +653,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -694,7 +672,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:698: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:676: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -726,6 +704,53 @@ else fi +# These defines are necessary to get 64-bit file size support. +# NetBSD 1.4 header files does not support XOPEN_SOURCE == 500, but it +# handles 64-bit file sizes without needing these defines. +echo $ac_n "checking whether _XOPEN_SOURCE may be defined""... $ac_c" 1>&6 +echo "configure:712: checking whether _XOPEN_SOURCE may be defined" >&5 +cat > conftest.$ac_ext < +int main() { + +; return 0; } +EOF +if { (eval echo configure:722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + may_use_xopen_source=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + may_use_xopen_source=no +fi +rm -f conftest* +echo "$ac_t""$may_use_xopen_source" 1>&6 +if test $may_use_xopen_source = yes; then + cat >> confdefs.h <<\EOF +#define _XOPEN_SOURCE 500L +EOF + + # The following is needed by irix6.2 so that struct timeval is declared. + cat >> confdefs.h <<\EOF +#define _XOPEN_SOURCE_EXTENDED 1 +EOF + + # The following is needed by Solaris2.5.1 so that struct timeval is declared. + cat >> confdefs.h <<\EOF +#define __EXTENSIONS__ 1 +EOF + + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + +fi + + LIBTOOL='$(SHELL) ../libtool' @@ -738,7 +763,7 @@ fi test "$AR" || AR=ar echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:742: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:767: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -768,7 +793,7 @@ fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:772: checking for $ac_word" >&5 +echo "configure:797: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ac_cv_prog_chmod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -812,7 +837,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:816: checking how to run the C preprocessor" >&5 +echo "configure:841: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -827,13 +852,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -844,13 +869,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -861,13 +886,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -892,12 +917,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:896: checking for ANSI C header files" >&5 +echo "configure:921: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -905,7 +930,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -922,7 +947,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -940,7 +965,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -961,7 +986,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -972,7 +997,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -996,12 +1021,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1000: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1025: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1010,7 +1035,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1035,17 +1060,17 @@ for ac_hdr in limits.h unistd.h sys/time.h string.h stdlib.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1039: checking for $ac_hdr" >&5 +echo "configure:1064: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1073,12 +1098,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1077: checking for working const" >&5 +echo "configure:1102: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1148,12 +1173,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1152: checking for size_t" >&5 +echo "configure:1177: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1181,12 +1206,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:1185: checking for mode_t" >&5 +echo "configure:1210: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1215,12 +1240,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1219: checking for pid_t" >&5 +echo "configure:1244: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1248,12 +1273,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:1252: checking for st_blksize in struct stat" >&5 +echo "configure:1277: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1261,7 +1286,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -1282,12 +1307,12 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:1286: checking for st_blocks in struct stat" >&5 +echo "configure:1311: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1295,7 +1320,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -1318,12 +1343,12 @@ else fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:1322: checking for st_rdev in struct stat" >&5 +echo "configure:1347: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1331,7 +1356,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:1335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -1352,12 +1377,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:1356: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:1381: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1365,7 +1390,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:1369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -1387,7 +1412,7 @@ fi echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6 -echo "configure:1391: checking for gethostname in -lsocket" >&5 +echo "configure:1416: checking for gethostname in -lsocket" >&5 ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1395,7 +1420,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1432,12 +1457,12 @@ for ac_func in symlink getcwd getwd lstat gethostname strerror clock \ getrusage times alarm getlogin getgid getuid kill link ttyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1436: checking for $ac_func" >&5 +echo "configure:1461: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1489,12 +1514,12 @@ done for ac_func in gettimeofday do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1493: checking for $ac_func" >&5 +echo "configure:1518: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1543,19 +1568,19 @@ done if test "$ac_cv_func_gettimeofday" = yes; then echo $ac_n "checking for struct timezone""... $ac_c" 1>&6 -echo "configure:1547: checking for struct timezone" >&5 +echo "configure:1572: checking for struct timezone" >&5 if eval "test \"`echo '$''{'g77_cv_struct_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct timezone tz; ; return 0; } EOF -if { (eval echo configure:1559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* g77_cv_struct_timezone=yes else @@ -1576,7 +1601,7 @@ EOF else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cat >> confdefs.h <<\EOF #define HAVE_TIMEZONE 1 @@ -1615,12 +1640,12 @@ fi fi echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6 -echo "configure:1619: checking whether gettimeofday can accept two arguments" >&5 +echo "configure:1644: checking whether gettimeofday can accept two arguments" >&5 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* emacs_cv_gettimeofday_two_arguments=yes else diff --git a/libf2c/libU77/configure.in b/libf2c/libU77/configure.in index fefc194..b0e0aed 100644 --- a/libf2c/libU77/configure.in +++ b/libf2c/libU77/configure.in @@ -23,17 +23,6 @@ AC_PREREQ(2.12.1) AC_INIT(access_.c) AC_CONFIG_HEADER(config.h:config.hin) -# These defines are necessary to get 64-bit file size support. - -AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics]) -# The following is needed by irix6.2 so that struct timeval is declared. -AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics]) -# The following is needed by Solaris2.5.1 so that struct timeval is declared. -AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions]) -AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support]) - -dnl Checks for programs. - dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may dnl not be able to. define([AC_PROG_CC_WORKS],[]) @@ -42,6 +31,26 @@ define([AC_PROG_CC_WORKS],[]) # the makefiles AC_PROG_CC +# These defines are necessary to get 64-bit file size support. +# NetBSD 1.4 header files does not support XOPEN_SOURCE == 500, but it +# handles 64-bit file sizes without needing these defines. +AC_MSG_CHECKING(whether _XOPEN_SOURCE may be defined) +AC_TRY_COMPILE([#define _XOPEN_SOURCE 500L +#include ],, +may_use_xopen_source=yes, +may_use_xopen_source=no) +AC_MSG_RESULT($may_use_xopen_source) +if test $may_use_xopen_source = yes; then + AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics]) + # The following is needed by irix6.2 so that struct timeval is declared. + AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics]) + # The following is needed by Solaris2.5.1 so that struct timeval is declared. + AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions]) + AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support]) +fi + +dnl Checks for programs. + LIBTOOL='$(SHELL) ../libtool' AC_SUBST(LIBTOOL) -- cgit v1.1