comparison configure @ 112308:474d5026a5a2

Regenerate.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 08 Jan 2011 22:57:07 -0800
parents f31011c088d9
children babd014aab81
comparison
equal deleted inserted replaced
112307:161cf5d0fd8b 112308:474d5026a5a2
665 TERMCAP_OBJ 665 TERMCAP_OBJ
666 LIBS_TERMCAP 666 LIBS_TERMCAP
667 LIBGNU_LTLIBDEPS 667 LIBGNU_LTLIBDEPS
668 LIBGNU_LIBDEPS 668 LIBGNU_LIBDEPS
669 gltests_WITNESS 669 gltests_WITNESS
670 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
671 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
672 TIME_H_DEFINES_STRUCT_TIMESPEC
673 NEXT_AS_FIRST_DIRECTIVE_TIME_H
674 NEXT_TIME_H
675 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
676 NEXT_STDDEF_H
677 PRAGMA_COLUMNS
678 PRAGMA_SYSTEM_HEADER
679 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
680 INCLUDE_NEXT
681 STDDEF_H
682 HAVE_WCHAR_T
683 REPLACE_NULL
684 APPLE_UNIVERSAL_BUILD
685 REPLACE_TIMEGM
686 REPLACE_NANOSLEEP
687 REPLACE_MKTIME
688 REPLACE_LOCALTIME_R
689 HAVE_TIMEGM
690 HAVE_STRPTIME
691 HAVE_NANOSLEEP
692 HAVE_DECL_LOCALTIME_R
693 GNULIB_TIME_R
694 GNULIB_TIMEGM
695 GNULIB_STRPTIME
696 GNULIB_NANOSLEEP
697 GNULIB_MKTIME
670 GL_COND_LIBTOOL_FALSE 698 GL_COND_LIBTOOL_FALSE
671 GL_COND_LIBTOOL_TRUE 699 GL_COND_LIBTOOL_TRUE
672 GETOPTOBJS 700 GETOPTOBJS
673 GETOPT_H 701 GETOPT_H
674 GETLOADAVG_LIBS 702 GETLOADAVG_LIBS
1729 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1730 as_fn_set_status $ac_retval 1758 as_fn_set_status $ac_retval
1731 1759
1732 } # ac_fn_c_try_compile 1760 } # ac_fn_c_try_compile
1733 1761
1734 # ac_fn_c_try_link LINENO
1735 # -----------------------
1736 # Try to link conftest.$ac_ext, and return whether this succeeded.
1737 ac_fn_c_try_link ()
1738 {
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 rm -f conftest.$ac_objext conftest$ac_exeext
1741 if { { ac_try="$ac_link"
1742 case "(($ac_try" in
1743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1744 *) ac_try_echo=$ac_try;;
1745 esac
1746 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1747 $as_echo "$ac_try_echo"; } >&5
1748 (eval "$ac_link") 2>conftest.err
1749 ac_status=$?
1750 if test -s conftest.err; then
1751 grep -v '^ *+' conftest.err >conftest.er1
1752 cat conftest.er1 >&5
1753 mv -f conftest.er1 conftest.err
1754 fi
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && {
1757 test -z "$ac_c_werror_flag" ||
1758 test ! -s conftest.err
1759 } && test -s conftest$ac_exeext && {
1760 test "$cross_compiling" = yes ||
1761 $as_test_x conftest$ac_exeext
1762 }; then :
1763 ac_retval=0
1764 else
1765 $as_echo "$as_me: failed program was:" >&5
1766 sed 's/^/| /' conftest.$ac_ext >&5
1767
1768 ac_retval=1
1769 fi
1770 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1771 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1772 # interfere with the next link command; also delete a directory that is
1773 # left behind by Apple's compiler. We do this before executing the actions.
1774 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1776 as_fn_set_status $ac_retval
1777
1778 } # ac_fn_c_try_link
1779
1780 # ac_fn_c_try_cpp LINENO 1762 # ac_fn_c_try_cpp LINENO
1781 # ---------------------- 1763 # ----------------------
1782 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 1764 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1783 ac_fn_c_try_cpp () 1765 ac_fn_c_try_cpp ()
1784 { 1766 {
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 1953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972 $as_echo "$ac_res" >&6; } 1954 $as_echo "$ac_res" >&6; }
1973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1955 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974 1956
1975 } # ac_fn_c_check_header_compile 1957 } # ac_fn_c_check_header_compile
1958
1959 # ac_fn_c_try_link LINENO
1960 # -----------------------
1961 # Try to link conftest.$ac_ext, and return whether this succeeded.
1962 ac_fn_c_try_link ()
1963 {
1964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965 rm -f conftest.$ac_objext conftest$ac_exeext
1966 if { { ac_try="$ac_link"
1967 case "(($ac_try" in
1968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1969 *) ac_try_echo=$ac_try;;
1970 esac
1971 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1972 $as_echo "$ac_try_echo"; } >&5
1973 (eval "$ac_link") 2>conftest.err
1974 ac_status=$?
1975 if test -s conftest.err; then
1976 grep -v '^ *+' conftest.err >conftest.er1
1977 cat conftest.er1 >&5
1978 mv -f conftest.er1 conftest.err
1979 fi
1980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1981 test $ac_status = 0; } && {
1982 test -z "$ac_c_werror_flag" ||
1983 test ! -s conftest.err
1984 } && test -s conftest$ac_exeext && {
1985 test "$cross_compiling" = yes ||
1986 $as_test_x conftest$ac_exeext
1987 }; then :
1988 ac_retval=0
1989 else
1990 $as_echo "$as_me: failed program was:" >&5
1991 sed 's/^/| /' conftest.$ac_ext >&5
1992
1993 ac_retval=1
1994 fi
1995 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1996 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1997 # interfere with the next link command; also delete a directory that is
1998 # left behind by Apple's compiler. We do this before executing the actions.
1999 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001 as_fn_set_status $ac_retval
2002
2003 } # ac_fn_c_try_link
1976 2004
1977 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES 2005 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1978 # --------------------------------------------- 2006 # ---------------------------------------------
1979 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 2007 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1980 # accordingly. 2008 # accordingly.
2511 fi 2539 fi
2512 2540
2513 as_fn_append ac_header_list " stdlib.h" 2541 as_fn_append ac_header_list " stdlib.h"
2514 as_fn_append ac_header_list " unistd.h" 2542 as_fn_append ac_header_list " unistd.h"
2515 as_fn_append ac_header_list " sys/param.h" 2543 as_fn_append ac_header_list " sys/param.h"
2544 as_fn_append ac_func_list " alarm"
2545 as_fn_append ac_header_list " stddef.h"
2546 as_fn_append ac_header_list " time.h"
2516 as_fn_append ac_header_list " sys/time.h" 2547 as_fn_append ac_header_list " sys/time.h"
2517 as_fn_append ac_func_list " alarm" 2548 as_fn_append ac_func_list " localtime_r"
2518 # Check that the precious variables saved in the cache have kept the same 2549 # Check that the precious variables saved in the cache have kept the same
2519 # value. 2550 # value.
2520 ac_cache_corrupted=false 2551 ac_cache_corrupted=false
2521 for ac_var in $ac_precious_vars; do 2552 for ac_var in $ac_precious_vars; do
2522 eval ac_old_set=\$ac_cv_env_${ac_var}_set 2553 eval ac_old_set=\$ac_cv_env_${ac_var}_set
5181 else 5212 else
5182 RANLIB="$ac_cv_prog_RANLIB" 5213 RANLIB="$ac_cv_prog_RANLIB"
5183 fi 5214 fi
5184 5215
5185 5216
5186
5187 # Code from module ftoastr:
5188 # Code from module intprops:
5189
5190
5191 # On Suns, sometimes $CPP names a directory.
5192 if test -n "$CPP" && test -d "$CPP"; then
5193 CPP=
5194 fi
5195
5196 ## If not using gcc, and on Solaris, and no CPP specified, see if
5197 ## using a Sun compiler, which needs -Xs to prevent whitespace.
5198 if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
5199 test x"$CPP" = x; then
5200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
5201 $as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
5202
5203 if ${emacs_cv_sunpro_c+:} false; then :
5204 $as_echo_n "(cached) " >&6
5205 else
5206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5207 /* end confdefs.h. */
5208
5209 int
5210 main ()
5211 {
5212 #ifndef __SUNPRO_C
5213 fail;
5214 #endif
5215
5216 ;
5217 return 0;
5218 }
5219 _ACEOF
5220 if ac_fn_c_try_link "$LINENO"; then :
5221 emacs_cv_sunpro_c=yes
5222 else
5223 emacs_cv_sunpro_c=no
5224 fi
5225 rm -f core conftest.err conftest.$ac_objext \
5226 conftest$ac_exeext conftest.$ac_ext
5227 fi
5228
5229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
5230 $as_echo "$emacs_cv_sunpro_c" >&6; }
5231
5232 if test x"$emacs_cv_sunpro_c" = xyes; then
5233 NON_GNU_CPP="$CC -E -Xs"
5234 fi
5235 fi
5236
5237 #### Some systems specify a CPP to use unless we are using GCC.
5238 #### Now that we know whether we are using GCC, we can decide whether
5239 #### to use that one.
5240 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
5241 then
5242 CPP="$NON_GNU_CPP"
5243 fi
5244
5245 #### Some systems specify a CC to use unless we are using GCC.
5246 #### Now that we know whether we are using GCC, we can decide whether
5247 #### to use that one.
5248 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
5249 test x$cc_specified != xyes
5250 then
5251 CC="$NON_GNU_CC"
5252 fi
5253
5254 if test x$GCC = xyes; then
5255 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5256 else
5257 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5258 fi
5259
5260 ac_ext=c 5217 ac_ext=c
5261 ac_cpp='$CPP $CPPFLAGS' 5218 ac_cpp='$CPP $CPPFLAGS'
5262 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5263 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5264 ac_compiler_gnu=$ac_cv_c_compiler_gnu 5221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5653 5610
5654 done 5611 done
5655 5612
5656 5613
5657 5614
5615
5616
5658 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" 5617 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5659 if test "x$ac_cv_header_minix_config_h" = xyes; then : 5618 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5660 MINIX=yes 5619 MINIX=yes
5661 else 5620 else
5662 MINIX= 5621 MINIX=
5672 5631
5673 5632
5674 $as_echo "#define _MINIX 1" >>confdefs.h 5633 $as_echo "#define _MINIX 1" >>confdefs.h
5675 5634
5676 fi 5635 fi
5636
5637 case "$host_os" in
5638 hpux*)
5639
5640 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5641
5642 ;;
5643 esac
5677 5644
5678 5645
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5680 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } 5647 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5681 if ${ac_cv_safe_to_define___extensions__+:} false; then : 5648 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5682 $as_echo_n "(cached) " >&6 5649 $as_echo_n "(cached) " >&6
5683 else 5650 else
5684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5685 /* end confdefs.h. */ 5652 /* end confdefs.h. */
5686 5653
5687 # define __EXTENSIONS__ 1 5654 # define __EXTENSIONS__ 1
5688 $ac_includes_default 5655 $ac_includes_default
5689 int 5656 int
5690 main () 5657 main ()
5691 { 5658 {
5692 5659
5693 ; 5660 ;
5711 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h 5678 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5712 5679
5713 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h 5680 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5714 5681
5715 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h 5682 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693 # Code from module arg-nonnull:
5694 # Code from module c++defs:
5695 # Code from module extensions:
5696
5697 # Code from module ftoastr:
5698 # Code from module include_next:
5699 # Code from module intprops:
5700 # Code from module mktime:
5701 # Code from module multiarch:
5702 # Code from module stddef:
5703 # Code from module time:
5704 # Code from module time_r:
5705 # Code from module warn-on-use:
5706
5707
5708 # On Suns, sometimes $CPP names a directory.
5709 if test -n "$CPP" && test -d "$CPP"; then
5710 CPP=
5711 fi
5712
5713 ## If not using gcc, and on Solaris, and no CPP specified, see if
5714 ## using a Sun compiler, which needs -Xs to prevent whitespace.
5715 if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
5716 test x"$CPP" = x; then
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
5718 $as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
5719 if ${emacs_cv_sunpro_c+:} false; then :
5720 $as_echo_n "(cached) " >&6
5721 else
5722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5723 /* end confdefs.h. */
5724
5725 int
5726 main ()
5727 {
5728 #ifndef __SUNPRO_C
5729 fail;
5730 #endif
5731
5732 ;
5733 return 0;
5734 }
5735 _ACEOF
5736 if ac_fn_c_try_link "$LINENO"; then :
5737 emacs_cv_sunpro_c=yes
5738 else
5739 emacs_cv_sunpro_c=no
5740 fi
5741 rm -f core conftest.err conftest.$ac_objext \
5742 conftest$ac_exeext conftest.$ac_ext
5743 fi
5744
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
5746 $as_echo "$emacs_cv_sunpro_c" >&6; }
5747
5748 if test x"$emacs_cv_sunpro_c" = xyes; then
5749 NON_GNU_CPP="$CC -E -Xs"
5750 fi
5751 fi
5752
5753 #### Some systems specify a CPP to use unless we are using GCC.
5754 #### Now that we know whether we are using GCC, we can decide whether
5755 #### to use that one.
5756 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
5757 then
5758 CPP="$NON_GNU_CPP"
5759 fi
5760
5761 #### Some systems specify a CC to use unless we are using GCC.
5762 #### Now that we know whether we are using GCC, we can decide whether
5763 #### to use that one.
5764 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
5765 test x$cc_specified != xyes
5766 then
5767 CC="$NON_GNU_CC"
5768 fi
5769
5770 if test x$GCC = xyes; then
5771 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5772 else
5773 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5774 fi
5716 5775
5717 5776
5718 5777
5719 ### Use -Wno-pointer-sign if the compiler supports it 5778 ### Use -Wno-pointer-sign if the compiler supports it
5720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5 5779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
12694 12753
12695 12754
12696 for ac_func in gethostname getdomainname dup2 \ 12755 for ac_func in gethostname getdomainname dup2 \
12697 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ 12756 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
12698 random lrand48 logb frexp fmod rint cbrt ftime setsid \ 12757 random lrand48 logb frexp fmod rint cbrt ftime setsid \
12699 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ 12758 strerror fpathconf select euidaccess getpagesize tzset setlocale \
12700 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ 12759 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
12701 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ 12760 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \
12702 sendto recvfrom getsockopt setsockopt getsockname getpeername \ 12761 sendto recvfrom getsockopt setsockopt getsockname getpeername \
12703 gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ 12762 gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
12704 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ 12763 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
12757 12816
12758 fi 12817 fi
12759 12818
12760 done 12819 done
12761 12820
12762
12763
12764
12765
12766
12767
12768 for ac_func in $ac_func_list
12769 do :
12770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12771 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12772 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12773 cat >>confdefs.h <<_ACEOF
12774 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12775 _ACEOF
12776
12777 fi
12778 done
12779
12780
12781
12782
12783
12784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
12785 $as_echo_n "checking for working mktime... " >&6; }
12786 if ${ac_cv_func_working_mktime+:} false; then :
12787 $as_echo_n "(cached) " >&6
12788 else
12789 if test "$cross_compiling" = yes; then :
12790 ac_cv_func_working_mktime=no
12791 else
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12793 /* end confdefs.h. */
12794 /* Test program from Paul Eggert and Tony Leneis. */
12795 #ifdef TIME_WITH_SYS_TIME
12796 # include <sys/time.h>
12797 # include <time.h>
12798 #else
12799 # ifdef HAVE_SYS_TIME_H
12800 # include <sys/time.h>
12801 # else
12802 # include <time.h>
12803 # endif
12804 #endif
12805
12806 #include <limits.h>
12807 #include <stdlib.h>
12808
12809 #ifdef HAVE_UNISTD_H
12810 # include <unistd.h>
12811 #endif
12812
12813 #ifndef HAVE_ALARM
12814 # define alarm(X) /* empty */
12815 #endif
12816
12817 /* Work around redefinition to rpl_putenv by other config tests. */
12818 #undef putenv
12819
12820 static time_t time_t_max;
12821 static time_t time_t_min;
12822
12823 /* Values we'll use to set the TZ environment variable. */
12824 static const char *tz_strings[] = {
12825 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
12826 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
12827 };
12828 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
12829
12830 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
12831 Based on a problem report from Andreas Jaeger. */
12832 static int
12833 spring_forward_gap ()
12834 {
12835 /* glibc (up to about 1998-10-07) failed this test. */
12836 struct tm tm;
12837
12838 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
12839 instead of "TZ=America/Vancouver" in order to detect the bug even
12840 on systems that don't support the Olson extension, or don't have the
12841 full zoneinfo tables installed. */
12842 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
12843
12844 tm.tm_year = 98;
12845 tm.tm_mon = 3;
12846 tm.tm_mday = 5;
12847 tm.tm_hour = 2;
12848 tm.tm_min = 0;
12849 tm.tm_sec = 0;
12850 tm.tm_isdst = -1;
12851 return mktime (&tm) != (time_t) -1;
12852 }
12853
12854 static int
12855 mktime_test1 (time_t now)
12856 {
12857 struct tm *lt;
12858 return ! (lt = localtime (&now)) || mktime (lt) == now;
12859 }
12860
12861 static int
12862 mktime_test (time_t now)
12863 {
12864 return (mktime_test1 (now)
12865 && mktime_test1 ((time_t) (time_t_max - now))
12866 && mktime_test1 ((time_t) (time_t_min + now)));
12867 }
12868
12869 static int
12870 irix_6_4_bug ()
12871 {
12872 /* Based on code from Ariel Faigon. */
12873 struct tm tm;
12874 tm.tm_year = 96;
12875 tm.tm_mon = 3;
12876 tm.tm_mday = 0;
12877 tm.tm_hour = 0;
12878 tm.tm_min = 0;
12879 tm.tm_sec = 0;
12880 tm.tm_isdst = -1;
12881 mktime (&tm);
12882 return tm.tm_mon == 2 && tm.tm_mday == 31;
12883 }
12884
12885 static int
12886 bigtime_test (int j)
12887 {
12888 struct tm tm;
12889 time_t now;
12890 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
12891 now = mktime (&tm);
12892 if (now != (time_t) -1)
12893 {
12894 struct tm *lt = localtime (&now);
12895 if (! (lt
12896 && lt->tm_year == tm.tm_year
12897 && lt->tm_mon == tm.tm_mon
12898 && lt->tm_mday == tm.tm_mday
12899 && lt->tm_hour == tm.tm_hour
12900 && lt->tm_min == tm.tm_min
12901 && lt->tm_sec == tm.tm_sec
12902 && lt->tm_yday == tm.tm_yday
12903 && lt->tm_wday == tm.tm_wday
12904 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
12905 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
12906 return 0;
12907 }
12908 return 1;
12909 }
12910
12911 static int
12912 year_2050_test ()
12913 {
12914 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
12915 ignoring leap seconds. */
12916 unsigned long int answer = 2527315200UL;
12917
12918 struct tm tm;
12919 time_t t;
12920 tm.tm_year = 2050 - 1900;
12921 tm.tm_mon = 2 - 1;
12922 tm.tm_mday = 1;
12923 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
12924 tm.tm_isdst = -1;
12925
12926 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
12927 instead of "TZ=America/Vancouver" in order to detect the bug even
12928 on systems that don't support the Olson extension, or don't have the
12929 full zoneinfo tables installed. */
12930 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
12931
12932 t = mktime (&tm);
12933
12934 /* Check that the result is either a failure, or close enough
12935 to the correct answer that we can assume the discrepancy is
12936 due to leap seconds. */
12937 return (t == (time_t) -1
12938 || (0 < t && answer - 120 <= t && t <= answer + 120));
12939 }
12940
12941 int
12942 main ()
12943 {
12944 time_t t, delta;
12945 int i, j;
12946
12947 /* This test makes some buggy mktime implementations loop.
12948 Give up after 60 seconds; a mktime slower than that
12949 isn't worth using anyway. */
12950 alarm (60);
12951
12952 for (;;)
12953 {
12954 t = (time_t_max << 1) + 1;
12955 if (t <= time_t_max)
12956 break;
12957 time_t_max = t;
12958 }
12959 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
12960
12961 delta = time_t_max / 997; /* a suitable prime number */
12962 for (i = 0; i < N_STRINGS; i++)
12963 {
12964 if (tz_strings[i])
12965 putenv ((char*) tz_strings[i]);
12966
12967 for (t = 0; t <= time_t_max - delta; t += delta)
12968 if (! mktime_test (t))
12969 return 1;
12970 if (! (mktime_test ((time_t) 1)
12971 && mktime_test ((time_t) (60 * 60))
12972 && mktime_test ((time_t) (60 * 60 * 24))))
12973 return 1;
12974
12975 for (j = 1; ; j <<= 1)
12976 if (! bigtime_test (j))
12977 return 1;
12978 else if (INT_MAX / 2 < j)
12979 break;
12980 if (! bigtime_test (INT_MAX))
12981 return 1;
12982 }
12983 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
12984 }
12985 _ACEOF
12986 if ac_fn_c_try_run "$LINENO"; then :
12987 ac_cv_func_working_mktime=yes
12988 else
12989 ac_cv_func_working_mktime=no
12990 fi
12991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12992 conftest.$ac_objext conftest.beam conftest.$ac_ext
12993 fi
12994
12995 fi
12996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
12997 $as_echo "$ac_cv_func_working_mktime" >&6; }
12998 if test $ac_cv_func_working_mktime = no; then
12999 case " $LIBOBJS " in
13000 *" mktime.$ac_objext "* ) ;;
13001 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
13002 ;;
13003 esac
13004
13005 fi
13006
13007 if test "$ac_cv_func_working_mktime" = no; then
13008
13009 $as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
13010
13011 fi
13012 12821
13013 ac_have_func=no # yes means we've found a way to get the load average. 12822 ac_have_func=no # yes means we've found a way to get the load average.
13014 12823
13015 # Make sure getloadavg.c is where it belongs, at configure-time. 12824 # Make sure getloadavg.c is where it belongs, at configure-time.
13016 test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || 12825 test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
13788 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h 13597 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
13789 13598
13790 fi 13599 fi
13791 13600
13792 13601
13602 GNULIB_MKTIME=0;
13603 GNULIB_NANOSLEEP=0;
13604 GNULIB_STRPTIME=0;
13605 GNULIB_TIMEGM=0;
13606 GNULIB_TIME_R=0;
13607 HAVE_DECL_LOCALTIME_R=1;
13608 HAVE_NANOSLEEP=1;
13609 HAVE_STRPTIME=1;
13610 HAVE_TIMEGM=1;
13611 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
13612 REPLACE_MKTIME=GNULIB_PORTCHECK;
13613 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
13614 REPLACE_TIMEGM=GNULIB_PORTCHECK;
13615
13616
13617
13618
13619 for ac_func in $ac_func_list
13620 do :
13621 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13622 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13623 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13624 cat >>confdefs.h <<_ACEOF
13625 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13626 _ACEOF
13627
13628 fi
13629 done
13630
13631
13632
13633
13634 gl_cv_c_multiarch=no
13635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13636 /* end confdefs.h. */
13637 #ifndef __APPLE_CC__
13638 not a universal capable compiler
13639 #endif
13640 typedef int dummy;
13641
13642 _ACEOF
13643 if ac_fn_c_try_compile "$LINENO"; then :
13644
13645 arch=
13646 prev=
13647 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
13648 if test -n "$prev"; then
13649 case $word in
13650 i?86 | x86_64 | ppc | ppc64)
13651 if test -z "$arch" || test "$arch" = "$word"; then
13652 arch="$word"
13653 else
13654 gl_cv_c_multiarch=yes
13655 fi
13656 ;;
13657 esac
13658 prev=
13659 else
13660 if test "x$word" = "x-arch"; then
13661 prev=arch
13662 fi
13663 fi
13664 done
13665
13666 fi
13667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13668 if test $gl_cv_c_multiarch = yes; then
13669
13670 $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13671
13672 APPLE_UNIVERSAL_BUILD=1
13673 else
13674 APPLE_UNIVERSAL_BUILD=0
13675 fi
13676
13677
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13679 $as_echo_n "checking for inline... " >&6; }
13680 if ${ac_cv_c_inline+:} false; then :
13681 $as_echo_n "(cached) " >&6
13682 else
13683 ac_cv_c_inline=no
13684 for ac_kw in inline __inline__ __inline; do
13685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13686 /* end confdefs.h. */
13687 #ifndef __cplusplus
13688 typedef int foo_t;
13689 static $ac_kw foo_t static_foo () {return 0; }
13690 $ac_kw foo_t foo () {return 0; }
13691 #endif
13692
13693 _ACEOF
13694 if ac_fn_c_try_compile "$LINENO"; then :
13695 ac_cv_c_inline=$ac_kw
13696 fi
13697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13698 test "$ac_cv_c_inline" != no && break
13699 done
13700
13701 fi
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13703 $as_echo "$ac_cv_c_inline" >&6; }
13704
13705 case $ac_cv_c_inline in
13706 inline | yes) ;;
13707 *)
13708 case $ac_cv_c_inline in
13709 no) ac_val=;;
13710 *) ac_val=$ac_cv_c_inline;;
13711 esac
13712 cat >>confdefs.h <<_ACEOF
13713 #ifndef __cplusplus
13714 #define inline $ac_val
13715 #endif
13716 _ACEOF
13717 ;;
13718 esac
13719
13720
13721 REPLACE_NULL=0;
13722 HAVE_WCHAR_T=1;
13723 STDDEF_H='';
13724
13725
13726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13727 $as_echo_n "checking for wchar_t... " >&6; }
13728 if ${gt_cv_c_wchar_t+:} false; then :
13729 $as_echo_n "(cached) " >&6
13730 else
13731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13732 /* end confdefs.h. */
13733 #include <stddef.h>
13734 wchar_t foo = (wchar_t)'\0';
13735 int
13736 main ()
13737 {
13738
13739 ;
13740 return 0;
13741 }
13742 _ACEOF
13743 if ac_fn_c_try_compile "$LINENO"; then :
13744 gt_cv_c_wchar_t=yes
13745 else
13746 gt_cv_c_wchar_t=no
13747 fi
13748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13749 fi
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13751 $as_echo "$gt_cv_c_wchar_t" >&6; }
13752 if test $gt_cv_c_wchar_t = yes; then
13753
13754 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13755
13756 fi
13757
13758
13759
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
13761 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
13762 if ${gl_cv_have_include_next+:} false; then :
13763 $as_echo_n "(cached) " >&6
13764 else
13765 rm -rf conftestd1a conftestd1b conftestd2
13766 mkdir conftestd1a conftestd1b conftestd2
13767 cat <<EOF > conftestd1a/conftest.h
13768 #define DEFINED_IN_CONFTESTD1
13769 #include_next <conftest.h>
13770 #ifdef DEFINED_IN_CONFTESTD2
13771 int foo;
13772 #else
13773 #error "include_next doesn't work"
13774 #endif
13775 EOF
13776 cat <<EOF > conftestd1b/conftest.h
13777 #define DEFINED_IN_CONFTESTD1
13778 #include <stdio.h>
13779 #include_next <conftest.h>
13780 #ifdef DEFINED_IN_CONFTESTD2
13781 int foo;
13782 #else
13783 #error "include_next doesn't work"
13784 #endif
13785 EOF
13786 cat <<EOF > conftestd2/conftest.h
13787 #ifndef DEFINED_IN_CONFTESTD1
13788 #error "include_next test doesn't work"
13789 #endif
13790 #define DEFINED_IN_CONFTESTD2
13791 EOF
13792 gl_save_CPPFLAGS="$CPPFLAGS"
13793 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
13794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13795 /* end confdefs.h. */
13796 #include <conftest.h>
13797 _ACEOF
13798 if ac_fn_c_try_compile "$LINENO"; then :
13799 gl_cv_have_include_next=yes
13800 else
13801 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
13802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13803 /* end confdefs.h. */
13804 #include <conftest.h>
13805 _ACEOF
13806 if ac_fn_c_try_compile "$LINENO"; then :
13807 gl_cv_have_include_next=buggy
13808 else
13809 gl_cv_have_include_next=no
13810 fi
13811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13812
13813 fi
13814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13815 CPPFLAGS="$gl_save_CPPFLAGS"
13816 rm -rf conftestd1a conftestd1b conftestd2
13817
13818 fi
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
13820 $as_echo "$gl_cv_have_include_next" >&6; }
13821 PRAGMA_SYSTEM_HEADER=
13822 if test $gl_cv_have_include_next = yes; then
13823 INCLUDE_NEXT=include_next
13824 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
13825 if test -n "$GCC"; then
13826 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
13827 fi
13828 else
13829 if test $gl_cv_have_include_next = buggy; then
13830 INCLUDE_NEXT=include
13831 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
13832 else
13833 INCLUDE_NEXT=include
13834 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
13835 fi
13836 fi
13837
13838
13839
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
13841 $as_echo_n "checking whether system header files limit the line length... " >&6; }
13842 if ${gl_cv_pragma_columns+:} false; then :
13843 $as_echo_n "(cached) " >&6
13844 else
13845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846 /* end confdefs.h. */
13847
13848 #ifdef __TANDEM
13849 choke me
13850 #endif
13851
13852 _ACEOF
13853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13854 $EGREP "choke me" >/dev/null 2>&1; then :
13855 gl_cv_pragma_columns=yes
13856 else
13857 gl_cv_pragma_columns=no
13858 fi
13859 rm -f conftest*
13860
13861
13862 fi
13863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
13864 $as_echo "$gl_cv_pragma_columns" >&6; }
13865 if test $gl_cv_pragma_columns = yes; then
13866 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
13867 else
13868 PRAGMA_COLUMNS=
13869 fi
13870
13871
13872
13873
13874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13875 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
13876 if ${ac_cv_c_restrict+:} false; then :
13877 $as_echo_n "(cached) " >&6
13878 else
13879 ac_cv_c_restrict=no
13880 # The order here caters to the fact that C++ does not require restrict.
13881 for ac_kw in __restrict __restrict__ _Restrict restrict; do
13882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13883 /* end confdefs.h. */
13884 typedef int * int_ptr;
13885 int foo (int_ptr $ac_kw ip) {
13886 return ip[0];
13887 }
13888 int
13889 main ()
13890 {
13891 int s[1];
13892 int * $ac_kw t = s;
13893 t[0] = 0;
13894 return foo(t)
13895 ;
13896 return 0;
13897 }
13898 _ACEOF
13899 if ac_fn_c_try_compile "$LINENO"; then :
13900 ac_cv_c_restrict=$ac_kw
13901 fi
13902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13903 test "$ac_cv_c_restrict" != no && break
13904 done
13905
13906 fi
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
13908 $as_echo "$ac_cv_c_restrict" >&6; }
13909
13910 case $ac_cv_c_restrict in
13911 restrict) ;;
13912 no) $as_echo "#define restrict /**/" >>confdefs.h
13913 ;;
13914 *) cat >>confdefs.h <<_ACEOF
13915 #define restrict $ac_cv_c_restrict
13916 _ACEOF
13917 ;;
13918 esac
13919
13920
13921
13922
13923
13924
13925
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
13927 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
13928 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
13929 $as_echo_n "(cached) " >&6
13930 else
13931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13932 /* end confdefs.h. */
13933 #include <time.h>
13934
13935 int
13936 main ()
13937 {
13938 static struct timespec x; x.tv_sec = x.tv_nsec;
13939 ;
13940 return 0;
13941 }
13942 _ACEOF
13943 if ac_fn_c_try_compile "$LINENO"; then :
13944 gl_cv_sys_struct_timespec_in_time_h=yes
13945 else
13946 gl_cv_sys_struct_timespec_in_time_h=no
13947 fi
13948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13949 fi
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
13951 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
13952
13953 TIME_H_DEFINES_STRUCT_TIMESPEC=0
13954 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
13955 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
13956 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
13957 TIME_H_DEFINES_STRUCT_TIMESPEC=1
13958 else
13959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
13960 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
13961 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
13962 $as_echo_n "(cached) " >&6
13963 else
13964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965 /* end confdefs.h. */
13966 #include <sys/time.h>
13967
13968 int
13969 main ()
13970 {
13971 static struct timespec x; x.tv_sec = x.tv_nsec;
13972 ;
13973 return 0;
13974 }
13975 _ACEOF
13976 if ac_fn_c_try_compile "$LINENO"; then :
13977 gl_cv_sys_struct_timespec_in_sys_time_h=yes
13978 else
13979 gl_cv_sys_struct_timespec_in_sys_time_h=no
13980 fi
13981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13982 fi
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
13984 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
13985 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
13986 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
13987 else
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
13989 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
13990 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
13991 $as_echo_n "(cached) " >&6
13992 else
13993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994 /* end confdefs.h. */
13995 #include <pthread.h>
13996
13997 int
13998 main ()
13999 {
14000 static struct timespec x; x.tv_sec = x.tv_nsec;
14001 ;
14002 return 0;
14003 }
14004 _ACEOF
14005 if ac_fn_c_try_compile "$LINENO"; then :
14006 gl_cv_sys_struct_timespec_in_pthread_h=yes
14007 else
14008 gl_cv_sys_struct_timespec_in_pthread_h=no
14009 fi
14010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14011 fi
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
14013 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
14014 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
14015 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14016 fi
14017 fi
14018 fi
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032 if test $gl_cv_have_include_next = yes; then
14033 gl_cv_next_time_h='<'time.h'>'
14034 else
14035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
14036 $as_echo_n "checking absolute name of <time.h>... " >&6; }
14037 if ${gl_cv_next_time_h+:} false; then :
14038 $as_echo_n "(cached) " >&6
14039 else
14040
14041 if test $ac_cv_header_time_h = yes; then
14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h. */
14044 #include <time.h>
14045
14046 _ACEOF
14047 case "$host_os" in
14048 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14049 *) gl_absname_cpp="$ac_cpp" ;;
14050 esac
14051 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14052 sed -n '\#/time.h#{
14053 s#.*"\(.*/time.h\)".*#\1#
14054 s#^/[^/]#//&#
14055 p
14056 q
14057 }'`'"'
14058 else
14059 gl_cv_next_time_h='<'time.h'>'
14060 fi
14061
14062 fi
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
14064 $as_echo "$gl_cv_next_time_h" >&6; }
14065 fi
14066 NEXT_TIME_H=$gl_cv_next_time_h
14067
14068 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14069 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14070 gl_next_as_first_directive='<'time.h'>'
14071 else
14072 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14073 gl_next_as_first_directive=$gl_cv_next_time_h
14074 fi
14075 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
14076
14077
14078
14079
14080
14081 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
14082 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
14083 ac_have_decl=1
14084 else
14085 ac_have_decl=0
14086 fi
14087
14088 cat >>confdefs.h <<_ACEOF
14089 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
14090 _ACEOF
14091
14092
14093
14094
13793 if false; then 14095 if false; then
13794 GL_COND_LIBTOOL_TRUE= 14096 GL_COND_LIBTOOL_TRUE=
13795 GL_COND_LIBTOOL_FALSE='#' 14097 GL_COND_LIBTOOL_FALSE='#'
13796 else 14098 else
13797 GL_COND_LIBTOOL_TRUE='#' 14099 GL_COND_LIBTOOL_TRUE='#'
13810 14112
13811 14113
13812 14114
13813 14115
13814 gl_source_base='lib' 14116 gl_source_base='lib'
14117 # Code from module arg-nonnull:
14118 # Code from module c++defs:
14119 # Code from module extensions:
13815 # Code from module ftoastr: 14120 # Code from module ftoastr:
13816 14121
14122 # Code from module include_next:
13817 # Code from module intprops: 14123 # Code from module intprops:
14124 # Code from module mktime:
14125
14126
14127
14128
14129
14130 if test $APPLE_UNIVERSAL_BUILD = 1; then
14131 # A universal build on Apple MacOS X platforms.
14132 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
14133 # But we need a configuration result that is valid in both modes.
14134 ac_cv_func_working_mktime=no
14135 fi
14136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
14137 $as_echo_n "checking for working mktime... " >&6; }
14138 if ${ac_cv_func_working_mktime+:} false; then :
14139 $as_echo_n "(cached) " >&6
14140 else
14141 if test "$cross_compiling" = yes; then :
14142 ac_cv_func_working_mktime=no
14143 else
14144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14145 /* end confdefs.h. */
14146 /* Test program from Paul Eggert and Tony Leneis. */
14147 #include <limits.h>
14148 #include <stdlib.h>
14149 #include <time.h>
14150
14151 #ifdef HAVE_UNISTD_H
14152 # include <unistd.h>
14153 #endif
14154
14155 #ifndef HAVE_ALARM
14156 # define alarm(X) /* empty */
14157 #endif
14158
14159 /* Work around redefinition to rpl_putenv by other config tests. */
14160 #undef putenv
14161
14162 static time_t time_t_max;
14163 static time_t time_t_min;
14164
14165 /* Values we'll use to set the TZ environment variable. */
14166 static char *tz_strings[] = {
14167 (char *) 0, "TZ=GMT0", "TZ=JST-9",
14168 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14169 };
14170 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
14171
14172 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
14173 Based on a problem report from Andreas Jaeger. */
14174 static int
14175 spring_forward_gap ()
14176 {
14177 /* glibc (up to about 1998-10-07) failed this test. */
14178 struct tm tm;
14179
14180 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14181 instead of "TZ=America/Vancouver" in order to detect the bug even
14182 on systems that don't support the Olson extension, or don't have the
14183 full zoneinfo tables installed. */
14184 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14185
14186 tm.tm_year = 98;
14187 tm.tm_mon = 3;
14188 tm.tm_mday = 5;
14189 tm.tm_hour = 2;
14190 tm.tm_min = 0;
14191 tm.tm_sec = 0;
14192 tm.tm_isdst = -1;
14193 return mktime (&tm) != (time_t) -1;
14194 }
14195
14196 static int
14197 mktime_test1 (time_t now)
14198 {
14199 struct tm *lt;
14200 return ! (lt = localtime (&now)) || mktime (lt) == now;
14201 }
14202
14203 static int
14204 mktime_test (time_t now)
14205 {
14206 return (mktime_test1 (now)
14207 && mktime_test1 ((time_t) (time_t_max - now))
14208 && mktime_test1 ((time_t) (time_t_min + now)));
14209 }
14210
14211 static int
14212 irix_6_4_bug ()
14213 {
14214 /* Based on code from Ariel Faigon. */
14215 struct tm tm;
14216 tm.tm_year = 96;
14217 tm.tm_mon = 3;
14218 tm.tm_mday = 0;
14219 tm.tm_hour = 0;
14220 tm.tm_min = 0;
14221 tm.tm_sec = 0;
14222 tm.tm_isdst = -1;
14223 mktime (&tm);
14224 return tm.tm_mon == 2 && tm.tm_mday == 31;
14225 }
14226
14227 static int
14228 bigtime_test (int j)
14229 {
14230 struct tm tm;
14231 time_t now;
14232 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14233 now = mktime (&tm);
14234 if (now != (time_t) -1)
14235 {
14236 struct tm *lt = localtime (&now);
14237 if (! (lt
14238 && lt->tm_year == tm.tm_year
14239 && lt->tm_mon == tm.tm_mon
14240 && lt->tm_mday == tm.tm_mday
14241 && lt->tm_hour == tm.tm_hour
14242 && lt->tm_min == tm.tm_min
14243 && lt->tm_sec == tm.tm_sec
14244 && lt->tm_yday == tm.tm_yday
14245 && lt->tm_wday == tm.tm_wday
14246 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14247 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14248 return 0;
14249 }
14250 return 1;
14251 }
14252
14253 static int
14254 year_2050_test ()
14255 {
14256 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
14257 ignoring leap seconds. */
14258 unsigned long int answer = 2527315200UL;
14259
14260 struct tm tm;
14261 time_t t;
14262 tm.tm_year = 2050 - 1900;
14263 tm.tm_mon = 2 - 1;
14264 tm.tm_mday = 1;
14265 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
14266 tm.tm_isdst = -1;
14267
14268 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14269 instead of "TZ=America/Vancouver" in order to detect the bug even
14270 on systems that don't support the Olson extension, or don't have the
14271 full zoneinfo tables installed. */
14272 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14273
14274 t = mktime (&tm);
14275
14276 /* Check that the result is either a failure, or close enough
14277 to the correct answer that we can assume the discrepancy is
14278 due to leap seconds. */
14279 return (t == (time_t) -1
14280 || (0 < t && answer - 120 <= t && t <= answer + 120));
14281 }
14282
14283 int
14284 main ()
14285 {
14286 int result = 0;
14287 time_t t, delta;
14288 int i, j;
14289
14290 /* This test makes some buggy mktime implementations loop.
14291 Give up after 60 seconds; a mktime slower than that
14292 isn't worth using anyway. */
14293 alarm (60);
14294
14295 for (;;)
14296 {
14297 t = (time_t_max << 1) + 1;
14298 if (t <= time_t_max)
14299 break;
14300 time_t_max = t;
14301 }
14302 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
14303
14304 delta = time_t_max / 997; /* a suitable prime number */
14305 for (i = 0; i < N_STRINGS; i++)
14306 {
14307 if (tz_strings[i])
14308 putenv (tz_strings[i]);
14309
14310 for (t = 0; t <= time_t_max - delta; t += delta)
14311 if (! mktime_test (t))
14312 result |= 1;
14313 if (! (mktime_test ((time_t) 1)
14314 && mktime_test ((time_t) (60 * 60))
14315 && mktime_test ((time_t) (60 * 60 * 24))))
14316 result |= 2;
14317
14318 for (j = 1; ; j <<= 1)
14319 if (! bigtime_test (j))
14320 result |= 4;
14321 else if (INT_MAX / 2 < j)
14322 break;
14323 if (! bigtime_test (INT_MAX))
14324 result |= 8;
14325 }
14326 if (! irix_6_4_bug ())
14327 result |= 16;
14328 if (! spring_forward_gap ())
14329 result |= 32;
14330 if (! year_2050_test ())
14331 result |= 64;
14332 return result;
14333 }
14334 _ACEOF
14335 if ac_fn_c_try_run "$LINENO"; then :
14336 ac_cv_func_working_mktime=yes
14337 else
14338 ac_cv_func_working_mktime=no
14339 fi
14340 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14341 conftest.$ac_objext conftest.beam conftest.$ac_ext
14342 fi
14343
14344 fi
14345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
14346 $as_echo "$ac_cv_func_working_mktime" >&6; }
14347 if test $ac_cv_func_working_mktime = no; then
14348
14349
14350
14351
14352
14353
14354
14355
14356 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
14357
14358 fi
14359
14360 if test $ac_cv_func_working_mktime = no; then
14361 REPLACE_MKTIME=1
14362
14363
14364
14365 else
14366 REPLACE_MKTIME=0
14367 fi
14368
14369
14370
14371
14372 GNULIB_MKTIME=1
14373
14374
14375
14376 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
14377
14378
14379
14380 # Code from module multiarch:
14381
14382 # Code from module stddef:
14383
14384
14385
14386 if test $gt_cv_c_wchar_t = no; then
14387 HAVE_WCHAR_T=0
14388 STDDEF_H=stddef.h
14389 fi
14390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14391 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
14392 if ${gl_cv_decl_null_works+:} false; then :
14393 $as_echo_n "(cached) " >&6
14394 else
14395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14396 /* end confdefs.h. */
14397 #include <stddef.h>
14398 int test[2 * (sizeof NULL == sizeof (void *)) -1];
14399
14400 int
14401 main ()
14402 {
14403
14404 ;
14405 return 0;
14406 }
14407 _ACEOF
14408 if ac_fn_c_try_compile "$LINENO"; then :
14409 gl_cv_decl_null_works=yes
14410 else
14411 gl_cv_decl_null_works=no
14412 fi
14413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14414 fi
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14416 $as_echo "$gl_cv_decl_null_works" >&6; }
14417 if test $gl_cv_decl_null_works = no; then
14418 REPLACE_NULL=1
14419 STDDEF_H=stddef.h
14420 fi
14421 if test -n "$STDDEF_H"; then
14422
14423
14424
14425
14426
14427
14428 if test $gl_cv_have_include_next = yes; then
14429 gl_cv_next_stddef_h='<'stddef.h'>'
14430 else
14431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14432 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
14433 if ${gl_cv_next_stddef_h+:} false; then :
14434 $as_echo_n "(cached) " >&6
14435 else
14436
14437 if test $ac_cv_header_stddef_h = yes; then
14438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14439 /* end confdefs.h. */
14440 #include <stddef.h>
14441
14442 _ACEOF
14443 case "$host_os" in
14444 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14445 *) gl_absname_cpp="$ac_cpp" ;;
14446 esac
14447 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14448 sed -n '\#/stddef.h#{
14449 s#.*"\(.*/stddef.h\)".*#\1#
14450 s#^/[^/]#//&#
14451 p
14452 q
14453 }'`'"'
14454 else
14455 gl_cv_next_stddef_h='<'stddef.h'>'
14456 fi
14457
14458 fi
14459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14460 $as_echo "$gl_cv_next_stddef_h" >&6; }
14461 fi
14462 NEXT_STDDEF_H=$gl_cv_next_stddef_h
14463
14464 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14465 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14466 gl_next_as_first_directive='<'stddef.h'>'
14467 else
14468 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14469 gl_next_as_first_directive=$gl_cv_next_stddef_h
14470 fi
14471 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14472
14473
14474
14475 fi
14476
14477 # Code from module time:
14478
14479
14480
14481 # Code from module time_r:
14482
14483
14484
14485
14486
14487
14488
14489 if test $ac_cv_have_decl_localtime_r = no; then
14490 HAVE_DECL_LOCALTIME_R=0
14491 fi
14492
14493
14494 if test $ac_cv_func_localtime_r = yes; then
14495 HAVE_LOCALTIME_R=1
14496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
14497 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
14498 if ${gl_cv_time_r_posix+:} false; then :
14499 $as_echo_n "(cached) " >&6
14500 else
14501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502 /* end confdefs.h. */
14503 #include <time.h>
14504 int
14505 main ()
14506 {
14507 /* We don't need to append 'restrict's to the argument types,
14508 even though the POSIX signature has the 'restrict's,
14509 since C99 says they can't affect type compatibility. */
14510 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
14511 if (ptr) return 0;
14512 /* Check the return type is a pointer.
14513 On HP-UX 10 it is 'int'. */
14514 *localtime_r (0, 0);
14515 ;
14516 return 0;
14517 }
14518
14519 _ACEOF
14520 if ac_fn_c_try_compile "$LINENO"; then :
14521 gl_cv_time_r_posix=yes
14522 else
14523 gl_cv_time_r_posix=no
14524 fi
14525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14526
14527 fi
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
14529 $as_echo "$gl_cv_time_r_posix" >&6; }
14530 if test $gl_cv_time_r_posix = yes; then
14531 REPLACE_LOCALTIME_R=0
14532 else
14533 REPLACE_LOCALTIME_R=1
14534 fi
14535 else
14536 HAVE_LOCALTIME_R=0
14537 fi
14538 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
14539
14540
14541
14542
14543
14544
14545
14546
14547 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
14548
14549
14550 :
14551
14552 fi
14553
14554
14555
14556
14557 GNULIB_TIME_R=1
14558
14559
14560
14561 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
14562
14563
14564
14565 # Code from module warn-on-use:
13818 # End of code from modules 14566 # End of code from modules
14567
14568
13819 14569
13820 14570
13821 14571
13822 14572
13823 14573
15401 else 16151 else
15402 16152
15403 $as_echo "#define mbstate_t int" >>confdefs.h 16153 $as_echo "#define mbstate_t int" >>confdefs.h
15404 16154
15405 fi 16155 fi
15406
15407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
15408 $as_echo_n "checking for C restrict keyword... " >&6; }
15409 if ${emacs_cv_c_restrict+:} false; then :
15410 $as_echo_n "(cached) " >&6
15411 else
15412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15413 /* end confdefs.h. */
15414 void fred (int *restrict x);
15415 int
15416 main ()
15417 {
15418
15419 ;
15420 return 0;
15421 }
15422 _ACEOF
15423 if ac_fn_c_try_compile "$LINENO"; then :
15424 emacs_cv_c_restrict=yes
15425 else
15426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15427 /* end confdefs.h. */
15428 void fred (int *__restrict x);
15429 int
15430 main ()
15431 {
15432
15433 ;
15434 return 0;
15435 }
15436 _ACEOF
15437 if ac_fn_c_try_compile "$LINENO"; then :
15438 emacs_cv_c_restrict=__restrict
15439 else
15440 emacs_cv_c_restrict=no
15441 fi
15442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15443 fi
15444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15445 fi
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
15447 $as_echo "$emacs_cv_c_restrict" >&6; }
15448 case "$emacs_cv_c_restrict" in
15449 yes) emacs_restrict=restrict;;
15450 no) emacs_restrict="";;
15451 *) emacs_restrict="$emacs_cv_c_restrict";;
15452 esac
15453 if test "$emacs_restrict" != __restrict; then
15454
15455 cat >>confdefs.h <<_ACEOF
15456 #define __restrict $emacs_restrict
15457 _ACEOF
15458
15459 fi
15460 16156
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 16157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15462 $as_echo_n "checking for C restricted array declarations... " >&6; } 16158 $as_echo_n "checking for C restricted array declarations... " >&6; }
15463 if ${emacs_cv_c_restrict_arr+:} false; then : 16159 if ${emacs_cv_c_restrict_arr+:} false; then :
15464 $as_echo_n "(cached) " >&6 16160 $as_echo_n "(cached) " >&6