X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/51cab52b054aaf178743aa7775ae29e934eeba9c..18ab493650d648ab8dca651ea2698861f926e895:/autogen/configure diff --git a/autogen/configure b/autogen/configure index dbc4873764..ec0764613f 100755 --- a/autogen/configure +++ b/autogen/configure @@ -607,55 +607,6 @@ SUBDIR_MAKEFILES_IN LIB_GCC LD_FIRSTFLAG LD_SWITCH_SYSTEM_TEMACS -POST_ALLOC_OBJ -PRE_ALLOC_OBJ -CYGWIN_OBJ -RALLOC_OBJ -OLDXMENU_DEPS -LIBX_OTHER -LIBXMENU -OLDXMENU -OLDXMENU_TARGET -LIBXT_OTHER -TOOLKIT_LIBW -WIDGET_OBJ -XOBJ -XMENU_OBJ -FONT_OBJ -OTHER_FILES -GNU_OBJC_CFLAGS -ns_appsrc -ns_appresdir -ns_appbindir -ns_appdir -S_FILE -M_FILE -X_TOOLKIT_TYPE -C_SWITCH_X_SYSTEM -C_SWITCH_X_SITE -LD_SWITCH_X_SITE -gameuser -gamedir -bitmapdir -archlibdir -etcdir -x_default_search_path -lisppath -locallisppath -lispdir -srcdir -canonical -configuration -version -KRB4LIB -DESLIB -KRB5LIB -CRYPTOLIB -COM_ERRLIB -LIBRESOLV -LIBHESIOD -TERMCAP_OBJ -LIBS_TERMCAP LIBGNU_LTLIBDEPS LIBGNU_LIBDEPS gltests_WITNESS @@ -663,8 +614,12 @@ gl_GNULIB_ENABLED_verify_FALSE gl_GNULIB_ENABLED_verify_TRUE gl_GNULIB_ENABLED_strtoull_FALSE gl_GNULIB_ENABLED_strtoull_TRUE +gl_GNULIB_ENABLED_strtoll_FALSE +gl_GNULIB_ENABLED_strtoll_TRUE gl_GNULIB_ENABLED_stat_FALSE gl_GNULIB_ENABLED_stat_TRUE +gl_GNULIB_ENABLED_sigprocmask_FALSE +gl_GNULIB_ENABLED_sigprocmask_TRUE gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE gl_GNULIB_ENABLED_dosname_FALSE @@ -798,6 +753,22 @@ GL_GENERATE_STDARG_H_TRUE STDARG_H NEXT_AS_FIRST_DIRECTIVE_STDARG_H NEXT_STDARG_H +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H +NEXT_SIGNAL_H +REPLACE_PTHREAD_SIGMASK +HAVE_SIGHANDLER_T +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T +HAVE_STRUCT_SIGACTION_SA_SIGACTION +HAVE_SIGACTION +HAVE_SIGINFO_T +HAVE_SIGSET_T +HAVE_PTHREAD_SIGMASK +HAVE_POSIX_SIGNALBLOCKING +GNULIB_SIGACTION +GNULIB_SIGPROCMASK +GNULIB_SIGNAL_H_SIGPIPE +GNULIB_PTHREAD_SIGMASK +LIB_PTHREAD_SIGMASK REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME @@ -894,6 +865,72 @@ PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT +GETLOADAVG_LIBS +REPLACE_WCTOMB +REPLACE_UNSETENV +REPLACE_STRTOD +REPLACE_SETENV +REPLACE_REALPATH +REPLACE_REALLOC +REPLACE_PUTENV +REPLACE_MKSTEMP +REPLACE_MBTOWC +REPLACE_MALLOC +REPLACE_CANONICALIZE_FILE_NAME +REPLACE_CALLOC +HAVE_DECL_UNSETENV +HAVE_UNLOCKPT +HAVE_SYS_LOADAVG_H +HAVE_STRUCT_RANDOM_DATA +HAVE_STRTOULL +HAVE_STRTOLL +HAVE_STRTOD +HAVE_DECL_SETENV +HAVE_SETENV +HAVE_RPMATCH +HAVE_REALPATH +HAVE_RANDOM_R +HAVE_RANDOM_H +HAVE_PTSNAME +HAVE_MKSTEMPS +HAVE_MKSTEMP +HAVE_MKOSTEMPS +HAVE_MKOSTEMP +HAVE_MKDTEMP +HAVE_GRANTPT +HAVE_GETSUBOPT +HAVE_DECL_GETLOADAVG +HAVE_CANONICALIZE_FILE_NAME +HAVE_ATOLL +HAVE__EXIT +GNULIB_WCTOMB +GNULIB_UNSETENV +GNULIB_UNLOCKPT +GNULIB_SYSTEM_POSIX +GNULIB_STRTOULL +GNULIB_STRTOLL +GNULIB_STRTOD +GNULIB_SETENV +GNULIB_RPMATCH +GNULIB_REALPATH +GNULIB_REALLOC_POSIX +GNULIB_RANDOM_R +GNULIB_PUTENV +GNULIB_PTSNAME +GNULIB_MKSTEMPS +GNULIB_MKSTEMP +GNULIB_MKOSTEMPS +GNULIB_MKOSTEMP +GNULIB_MKDTEMP +GNULIB_MBTOWC +GNULIB_MALLOC_POSIX +GNULIB_GRANTPT +GNULIB_GETSUBOPT +GNULIB_GETLOADAVG +GNULIB_CANONICALIZE_FILE_NAME +GNULIB_CALLOC_POSIX +GNULIB_ATOLL +GNULIB__EXIT UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE @@ -1004,78 +1041,64 @@ GNULIB_DUP3 GNULIB_DUP2 GNULIB_CLOSE GNULIB_CHOWN -GETLOADAVG_LIBS -REPLACE_WCTOMB -REPLACE_UNSETENV -REPLACE_STRTOD -REPLACE_SETENV -REPLACE_REALPATH -REPLACE_REALLOC -REPLACE_PUTENV -REPLACE_MKSTEMP -REPLACE_MBTOWC -REPLACE_MALLOC -REPLACE_CANONICALIZE_FILE_NAME -REPLACE_CALLOC -HAVE_DECL_UNSETENV -HAVE_UNLOCKPT -HAVE_SYS_LOADAVG_H -HAVE_STRUCT_RANDOM_DATA -HAVE_STRTOULL -HAVE_STRTOLL -HAVE_STRTOD -HAVE_DECL_SETENV -HAVE_SETENV -HAVE_RPMATCH -HAVE_REALPATH -HAVE_RANDOM_R -HAVE_RANDOM_H -HAVE_PTSNAME -HAVE_MKSTEMPS -HAVE_MKSTEMP -HAVE_MKOSTEMPS -HAVE_MKOSTEMP -HAVE_MKDTEMP -HAVE_GRANTPT -HAVE_GETSUBOPT -HAVE_DECL_GETLOADAVG -HAVE_CANONICALIZE_FILE_NAME -HAVE_ATOLL -HAVE__EXIT -GNULIB_WCTOMB -GNULIB_UNSETENV -GNULIB_UNLOCKPT -GNULIB_SYSTEM_POSIX -GNULIB_STRTOULL -GNULIB_STRTOLL -GNULIB_STRTOD -GNULIB_SETENV -GNULIB_RPMATCH -GNULIB_REALPATH -GNULIB_REALLOC_POSIX -GNULIB_RANDOM_R -GNULIB_PUTENV -GNULIB_PTSNAME -GNULIB_MKSTEMPS -GNULIB_MKSTEMP -GNULIB_MKOSTEMPS -GNULIB_MKOSTEMP -GNULIB_MKDTEMP -GNULIB_MBTOWC -GNULIB_MALLOC_POSIX -GNULIB_GRANTPT -GNULIB_GETSUBOPT -GNULIB_GETLOADAVG -GNULIB_CANONICALIZE_FILE_NAME -GNULIB_CALLOC_POSIX -GNULIB_ATOLL -GNULIB__EXIT +GL_GENERATE_ALLOCA_H_FALSE +GL_GENERATE_ALLOCA_H_TRUE +ALLOCA_H +ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE +POST_ALLOC_OBJ +PRE_ALLOC_OBJ +CYGWIN_OBJ +RALLOC_OBJ +OLDXMENU_DEPS +LIBX_OTHER +LIBXMENU +OLDXMENU +OLDXMENU_TARGET +LIBXT_OTHER +TOOLKIT_LIBW +WIDGET_OBJ +XOBJ +XMENU_OBJ +FONT_OBJ +OTHER_FILES +GNU_OBJC_CFLAGS +ns_appsrc +ns_appresdir +ns_appbindir +ns_appdir +S_FILE +M_FILE +X_TOOLKIT_TYPE +C_SWITCH_X_SYSTEM +C_SWITCH_X_SITE +LD_SWITCH_X_SITE +gameuser +gamedir +bitmapdir +archlibdir +etcdir +x_default_search_path +lisppath +locallisppath +lispdir +srcdir +canonical +configuration +version +KRB4LIB +DESLIB +KRB5LIB +CRYPTOLIB +COM_ERRLIB +LIBRESOLV +LIBHESIOD +TERMCAP_OBJ +LIBS_TERMCAP BLESSMAIL_TARGET LIBS_MAIL liblockfile -ALLOCA LIBXML2_LIBS LIBXML2_CFLAGS LIBXSM @@ -1100,8 +1123,12 @@ LIBXTR6 LIBGNUTLS_LIBS LIBGNUTLS_CFLAGS LIBSELINUX_LIBS +SETTINGS_LIBS +SETTINGS_CFLAGS GCONF_LIBS GCONF_CFLAGS +GSETTINGS_LIBS +GSETTINGS_CFLAGS DBUS_OBJ DBUS_LIBS DBUS_CFLAGS @@ -1129,9 +1156,9 @@ ALSA_LIBS ALSA_CFLAGS PKG_CONFIG LIBSOUND +CRT_DIR START_FILES LIB_MATH -CRT_DIR LIBS_SYSTEM C_SWITCH_SYSTEM UNEXEC_OBJ @@ -1268,6 +1295,7 @@ with_ns with_gpm with_dbus with_gconf +with_gsettings with_selinux with_gnutls with_makeinfo @@ -1924,8 +1952,8 @@ Optional Features: --disable-ns-self-contained disable self contained build under NeXTstep --enable-asserts compile code with asserts enabled - --enable-maintainer-mode - enable make rules and dependencies not useful (and + --disable-maintainer-mode + disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-locallisppath=PATH directories Emacs should search for lisp files @@ -1984,6 +2012,7 @@ Optional Packages: console --without-dbus don't compile with D-Bus support --without-gconf don't compile with GConf support + --without-gsettings don't compile with GSettings support --without-selinux don't compile with SELinux support --without-gnutls don't use -lgnutls for SSL/TLS support --without-makeinfo don't require makeinfo for building manuals @@ -2562,23 +2591,77 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { -static int test_array [1 - 2 * !(($2) >= 0)]; +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0 ; @@ -2739,60 +2822,6 @@ rm -f conftest.val as_fn_set_status $ac_retval } # ac_fn_c_compute_int - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3080,6 +3109,7 @@ as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" as_fn_append ac_func_list " readlinkat" +as_fn_append ac_func_list " dup2" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" as_fn_append ac_header_list " wchar.h" @@ -3087,6 +3117,7 @@ as_fn_append ac_header_list " stdint.h" as_fn_append ac_header_list " inttypes.h" as_fn_append ac_func_list " lstat" as_fn_append ac_func_list " alarm" +as_fn_append ac_func_list " pthread_sigmask" as_fn_append ac_func_list " readlink" as_fn_append ac_header_list " sys/socket.h" as_fn_append ac_func_list " tzset" @@ -3986,6 +4017,14 @@ else fi +# Check whether --with-gsettings was given. +if test "${with_gsettings+set}" = set; then : + withval=$with_gsettings; +else + with_gsettings=yes +fi + + # Check whether --with-selinux was given. if test "${with_selinux+set}" = set; then : withval=$with_selinux; @@ -4460,7 +4499,7 @@ case "${canonical}" in ## Silicon Graphics machines ## Iris 4D mips-sgi-irix6.5 ) - machine=iris4d opsys=irix6-5 + opsys=irix6-5 # Without defining _LANGUAGE_C, things get masked out in the headers # so that, for instance, grepping for `free' in stdlib.h fails and # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). @@ -6535,14 +6574,18 @@ esac + # Code from module alloca-opt: # Code from module allocator: # Code from module arg-nonnull: # Code from module c++defs: # Code from module careadlinkat: # Code from module crypto/md5: # Code from module crypto/sha1: + # Code from module crypto/sha256: + # Code from module crypto/sha512: # Code from module dosname: # Code from module dtoastr: + # Code from module dup2: # Code from module extensions: # Code from module filemode: @@ -6557,7 +6600,10 @@ esac # Code from module lstat: # Code from module mktime: # Code from module multiarch: + # Code from module pthread_sigmask: # Code from module readlink: + # Code from module signal: + # Code from module sigprocmask: # Code from module socklen: # Code from module ssize_t: # Code from module stat: @@ -6569,12 +6615,15 @@ esac # Code from module stdio: # Code from module stdlib: # Code from module strftime: + # Code from module strtoimax: + # Code from module strtoll: # Code from module strtoull: # Code from module strtoumax: # Code from module symlink: # Code from module sys_stat: # Code from module time: # Code from module time_r: + # Code from module u64: # Code from module unistd: # Code from module verify: # Code from module warn-on-use: @@ -7432,6 +7481,8 @@ fi # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. +# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. + # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : @@ -7633,76 +7684,6 @@ fi -## If user specified a crt-dir, use that unconditionally. -if test "X$CRT_DIR" = "X"; then - - case "$canonical" in - x86_64-*-linux-gnu* | s390x-*-linux-gnu*) - ## On x86-64 and s390x GNU/Linux distributions, the standard library - ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. - ## For anything else (eg /usr/lib32), it is up the user to specify - ## the location (bug#5655). - ## Test for crtn.o, not just the directory, because sometimes the - ## directory exists but does not have the relevant files (bug#1287). - ## FIXME better to test for binary compatibility somehow. - test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 - ;; - - powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; - esac - - case "$opsys" in - hpux10-20) CRT_DIR=/lib ;; - esac - - ## Default is /usr/lib. - test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib - - ## If we're using gcc, try to determine it automatically by asking - ## gcc. [If this doesn't work, CRT_DIR will remain at the - ## system-dependent default from above.] - if test "x${GCC}" = xyes; then - crt_file=`$CC --print-file-name=crt1.o 2>/dev/null` - case "$crt_file" in - */*) - CRT_DIR=`$as_dirname -- "$crt_file" || -$as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$crt_file" : 'X\(//\)[^/]' \| \ - X"$crt_file" : 'X\(//\)$' \| \ - X"$crt_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$crt_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - ;; - esac - fi - -else - - ## Some platforms don't use any of these files, so it is not - ## appropriate to put this test outside the if block. - test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ - as_fn_error "crt*.o not found in specified location." "$LINENO" 5 - -fi - - - LIB_MATH=-lm LIB_STANDARD= START_FILES= @@ -7743,6 +7724,99 @@ esac +crt_files= + +for file in x $LIB_STANDARD $START_FILES; do + case "$file" in + *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;; + esac +done + +if test "x$crt_files" != x; then + + ## If user specified a crt-dir, use that unconditionally. + crt_gcc=no + + if test "X$CRT_DIR" = "X"; then + + CRT_DIR=/usr/lib # default + + case "$canonical" in + x86_64-*-linux-gnu* | s390x-*-linux-gnu*) + ## On x86-64 and s390x GNU/Linux distributions, the standard library + ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. + ## For anything else (eg /usr/lib32), it is up the user to specify + ## the location (bug#5655). + ## Test for crtn.o, not just the directory, because sometimes the + ## directory exists but does not have the relevant files (bug#1287). + ## FIXME better to test for binary compatibility somehow. + test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 + ;; + + powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; + esac + + case "$opsys" in + hpux10-20) CRT_DIR=/lib ;; + esac + + test "x${GCC}" = xyes && crt_gcc=yes + + fi # CRT_DIR = "" + + crt_missing= + + for file in $crt_files; do + + ## If we're using gcc, try to determine it automatically by asking + ## gcc. [If this doesn't work, CRT_DIR will remain at the + ## system-dependent default from above.] + if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then + + crt_file=`$CC --print-file-name=$file 2>/dev/null` + case "$crt_file" in + */*) + CRT_DIR=`$as_dirname -- "$crt_file" || +$as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$crt_file" : 'X\(//\)[^/]' \| \ + X"$crt_file" : 'X\(//\)$' \| \ + X"$crt_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$crt_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + ;; + esac + fi + + crt_gcc=no + + test -e $CRT_DIR/$file || crt_missing="$crt_missing $file" + done # $crt_files + + test "x$crt_missing" = x || \ + as_fn_error "Required file(s) not found:$crt_missing +Try using the --with-crt-dir option." "$LINENO" 5 + +fi # crt_files != "" + + + + @@ -7972,7 +8046,7 @@ $as_echo "#define HAVE_SOUND 1" >>confdefs.h fi for ac_header in sys/select.h sys/time.h unistd.h utime.h \ - linux/version.h sys/systeminfo.h limits.h \ + linux/version.h sys/systeminfo.h \ stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ sys/utsname.h pwd.h utmp.h dirent.h util.h @@ -8030,162 +8104,50 @@ fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include +#include +#include +#include int main () { - +if ((struct tm *) 0) +return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes + ac_cv_header_time=yes else - ac_cv_header_stdc=no + ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h -else - ac_cv_header_stdc=no fi -rm -f conftest* +ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" +if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - -ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SYS_SIGLIST $ac_have_decl +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST $ac_have_decl _ACEOF if test $ac_cv_have_decl_sys_siglist != yes; then @@ -11014,6 +10976,111 @@ done fi +HAVE_GSETTINGS=no +if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then + + succeeded=no + + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$PKG_CONFIG" = "no" ; then + HAVE_GSETTINGS=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5 +$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; } + + if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_CFLAGS" >&5 +$as_echo_n "checking GSETTINGS_CFLAGS... " >&6; } + GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26"|sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_CFLAGS" >&5 +$as_echo "$GSETTINGS_CFLAGS" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_LIBS" >&5 +$as_echo_n "checking GSETTINGS_LIBS... " >&6; } + GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26"|sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_LIBS" >&5 +$as_echo "$GSETTINGS_LIBS" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + GSETTINGS_CFLAGS="" + GSETTINGS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_GSETTINGS=yes + else + HAVE_GSETTINGS=no + fi + + if test "$HAVE_GSETTINGS" = "yes"; then + +$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h + + SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" + SETTINGS_LIBS="$GSETTINGS_LIBS" + fi +fi + HAVE_GCONF=no if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then @@ -11114,7 +11181,17 @@ $as_echo "no" >&6; } $as_echo "#define HAVE_GCONF 1" >>confdefs.h - for ac_func in g_type_init + SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" + SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" + fi +fi + +if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CFLAGS="$SETTINGS_CFLAGS $CFLAGS" + LDFLAGS="$SETTINGS_LIBS $LDFLAGS" + for ac_func in g_type_init do : ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" if test "x$ac_cv_func_g_type_init" = x""yes; then : @@ -11125,9 +11202,13 @@ _ACEOF fi done - fi + CFLAGS="$SAVE_CFLAGS" + LDFLAGS="$SAVE_LDFLAGS" fi + + + HAVE_LIBSELINUX=no LIBSELINUX_LIBS= if test "${with_selinux}" = "yes"; then @@ -13310,259 +13391,64 @@ $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h fi -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +# fmod, logb, and frexp are found in -lm on most systems. +# On HPUX 9.01, -lm does not contain logb, so check for sqrt. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); int main () { -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; +return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes + ac_cv_lib_m_sqrt=yes else - ac_cv_working_alloca_h=no + ac_cv_lib_m_sqrt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + LIBS="-lm $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : + +# Check for mail-locking functions in a "mail" library. Probably this should +# have the same check as for liblockfile below. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 +$as_echo_n "checking for maillock in -lmail... " >&6; } +if test "${ac_cv_lib_mail_maillock+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes -else - ac_cv_func_alloca_works=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi - - done -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} - -int -main () -{ - return find_stack_direction () < 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - - -fi - - -if test x"$ac_cv_func_alloca_works" != xyes; then - as_fn_error "a system implementation of alloca is required " "$LINENO" 5 -fi - -# fmod, logb, and frexp are found in -lm on most systems. -# On HPUX 9.01, -lm does not contain logb, so check for sqrt. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 -$as_echo_n "checking for sqrt in -lm... " >&6; } -if test "${ac_cv_lib_m_sqrt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sqrt (); -int -main () -{ -return sqrt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_sqrt=yes -else - ac_cv_lib_m_sqrt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 -$as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -# Check for mail-locking functions in a "mail" library. Probably this should -# have the same check as for liblockfile below. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 -$as_echo_n "checking for maillock in -lmail... " >&6; } -if test "${ac_cv_lib_mail_maillock+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmail $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmail $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -13774,15 +13660,15 @@ esac -for ac_func in gethostname getdomainname dup2 \ +for ac_func in gethostname getdomainname \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ random lrand48 logb frexp fmod rint cbrt ftime setsid \ strerror fpathconf select euidaccess getpagesize tzset setlocale \ utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ -__fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ +__fpending mblen mbrlen mbsinit strsignal setitimer ualarm \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ -gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ -memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ +gai_strerror mkstemp getline getdelim mremap fsync sync \ +difftime mempcpy mblen mbrlen posix_memalign \ cfmakeraw cfsetspeed isnan copysign __executable_start do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -13945,1539 +13831,1499 @@ $as_echo "#define GETPGRP_VOID 1" >>confdefs.h fi -# Configure gnulib. - - - - - - - - - - - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ - +# UNIX98 PTYs. +for ac_func in grantpt +do : + ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" +if test "x$ac_cv_func_grantpt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GRANTPT 1 +_ACEOF +fi +done - for ac_func in $ac_func_list +# PTY-related GNU extensions. +for ac_func in getpt do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : + ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" +if test "x$ac_cv_func_getpt" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_GETPT 1 _ACEOF fi done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +# Check this now, so that we will NOT find the above functions in ncurses. +# That is because we have not set up to link ncurses in lib-src. +# It's better to believe a function is not available +# than to expect to find it in ncurses. +# Also we need tputs and friends to be able to build at all. +have_tputs_et_al=true +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 +$as_echo_n "checking for library containing tputs... " >&6; } +if test "${ac_cv_search_tputs+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tputs (); int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - +return tputs (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include +for ac_lib in '' ncurses terminfo termcap; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_tputs=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_tputs+set}" = set; then : + break +fi +done +if test "${ac_cv_search_tputs+set}" = set; then : + +else + ac_cv_search_tputs=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 +$as_echo "$ac_cv_search_tputs" >&6; } +ac_res=$ac_cv_search_tputs +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + have_tputs_et_al=false +fi + +if test "$have_tputs_et_al" != true; then + as_fn_error "I couldn't find termcap functions (tputs and friends). +Maybe some development libraries/packages are missing? Try installing +libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 +fi +# Must define this when any termcap library is found. + +$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h + +## FIXME This was the cpp logic, but I am not sure it is right. +## The above test has not necessarily found libncurses. +HAVE_LIBNCURSES=yes + +## Use terminfo instead of termcap? +## Note only system files NOT using terminfo are: +## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and +## darwin|gnu without ncurses. +TERMINFO=no +LIBS_TERMCAP= +case "$opsys" in + ## cygwin: Fewer environment variables to go wrong, more terminal types. + ## hpux10-20: Use the system provided termcap(3) library. + ## openbsd: David Mazieres says this + ## is necessary. Otherwise Emacs dumps core when run -nw. + aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; + + ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. + ## The ncurses library has been moved out of the System framework in + ## Mac OS X 10.2. So if configure detects it, set the command-line + ## option to use it. + darwin|gnu*) + ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) + if test "x$HAVE_LIBNCURSES" = "xyes"; then + TERMINFO=yes + LIBS_TERMCAP="-lncurses" + fi + ;; + freebsd) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 +$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } + if test "${emacs_cv_freebsd_terminfo+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif +#if __FreeBSD_version < 400000 +fail; +#endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_freebsd_terminfo=yes else - ac_cv_c_bigendian=no + emacs_cv_freebsd_terminfo=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 +$as_echo "$emacs_cv_freebsd_terminfo" >&6; } + + if test $emacs_cv_freebsd_terminfo = yes; then + TERMINFO=yes + LIBS_TERMCAP="-lncurses" + else + LIBS_TERMCAP="-ltermcap" fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + ;; + + netbsd) + if test $ac_cv_search_tputs = -lterminfo; then + TERMINFO=yes + LIBS_TERMCAP="-lterminfo" + else + LIBS_TERMCAP="-ltermcap" + fi + ;; + +esac + +case "$opsys" in + ## hpux: Make sure we get select from libc rather than from libcurses + ## because libcurses on HPUX 10.10 has a broken version of select. + ## We used to use -lc -lcurses, but this may be cleaner. + hpux*) LIBS_TERMCAP="-ltermcap" ;; + + openbsd) LIBS_TERMCAP="-lncurses" ;; + + ## Must use system termcap, if we use any termcap. It does special things. + sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; +esac + +TERMCAP_OBJ=tparam.o +if test $TERMINFO = yes; then + +$as_echo "#define TERMINFO 1" >>confdefs.h + + + ## Default used to be -ltermcap. Add a case above if need something else. + test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" + + TERMCAP_OBJ=terminfo.o +fi + + + +# Do we have res_init, for detecting changes in /etc/resolv.conf? +resolv=no +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include int main () { -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - +return res_init(); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_link "$LINENO"; then : + have_res_init=yes +else + have_res_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$have_res_init" = no; then + OLIBS="$LIBS" + LIBS="$LIBS -lresolv" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 +$as_echo_n "checking for res_init with -lresolv... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +#include +#include +#include int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif - +return res_init(); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +if ac_fn_c_try_link "$LINENO"; then : + have_res_init=yes else - ac_cv_c_bigendian=no + have_res_init=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 +$as_echo "$have_res_init" >&6; } + if test "$have_res_init" = yes ; then + resolv=yes + fi + LIBS="$OLIBS" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +if test "$have_res_init" = yes; then + +$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h + +fi + +# Do we need the Hesiod library to provide the support routines? +LIBHESIOD= +if test "$with_hesiod" != no ; then + # Don't set $LIBS here -- see comments above. FIXME which comments? + ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" +if test "x$ac_cv_func_res_send" = x""yes; then : + +else + ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" +if test "x$ac_cv_func___res_send" = x""yes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 +$as_echo_n "checking for res_send in -lresolv... " >&6; } +if test "${ac_cv_lib_resolv_res_send+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char res_send (); int main () { -return use_ascii (foo) == use_ebcdic (foo); +return res_send (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_resolv_res_send=yes +else + ac_cv_lib_resolv_res_send=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 +$as_echo "$ac_cv_lib_resolv_res_send" >&6; } +if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : + resolv=yes else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 +$as_echo_n "checking for __res_send in -lresolv... " >&6; } +if test "${ac_cv_lib_resolv___res_send+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __res_send (); int main () { - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - +return __res_send (); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_resolv___res_send=yes else - ac_cv_c_bigendian=yes + ac_cv_lib_resolv___res_send=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 +$as_echo "$ac_cv_lib_resolv___res_send" >&6; } +if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : + resolv=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac +fi + if test "$resolv" = yes ; then + RESOLVLIB=-lresolv + else + RESOLVLIB= + fi + ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" +if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 -$as_echo_n "checking whether strtold conforms to C99... " >&6; } -if test "${gl_cv_func_c99_strtold+set}" = set; then : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 +$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } +if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lhesiod $RESOLVLIB $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* On HP-UX before 11.23, strtold returns a struct instead of - long double. Reject implementations like that, by requiring - compatibility with the C99 prototype. */ - #include - static long double (*p) (char const *, char **) = strtold; - static long double - test (char const *nptr, char **endptr) - { - long double r; - r = strtold (nptr, endptr); - return r; - } + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char hes_getmailhost (); int main () { -return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; +return hes_getmailhost (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_c99_strtold=yes + ac_cv_lib_hesiod_hes_getmailhost=yes else - gl_cv_func_c99_strtold=no + ac_cv_lib_hesiod_hes_getmailhost=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 +$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } +if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : + hesiod=yes +else + : fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 -$as_echo "$gl_cv_func_c99_strtold" >&6; } - if test $gl_cv_func_c99_strtold = yes; then -$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h +fi + + + if test x"$hesiod" = xyes; then + +$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h + LIBHESIOD=-lhesiod fi +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 -$as_echo_n "checking for st_dm_mode in struct stat... " >&6; } -if test "${ac_cv_struct_st_dm_mode+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () +# Do we need libresolv (due to res_init or Hesiod)? +if test "$resolv" = yes ; then + +$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h + + LIBRESOLV=-lresolv +else + LIBRESOLV= +fi + + +# These tell us which Kerberos-related libraries to use. +COM_ERRLIB= +CRYPTOLIB= +KRB5LIB= +DESLIB= +KRB4LIB= + +if test "${with_kerberos}" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 +$as_echo_n "checking for com_err in -lcom_err... " >&6; } +if test "${ac_cv_lib_com_err_com_err+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcom_err $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char com_err (); +int +main () { -struct stat s; s.st_dm_mode; +return com_err (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_st_dm_mode=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_com_err_com_err=yes else - ac_cv_struct_st_dm_mode=no + ac_cv_lib_com_err_com_err=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 +$as_echo "$ac_cv_lib_com_err_com_err" >&6; } +if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : + have_com_err=yes +else + have_com_err=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 -$as_echo "$ac_cv_struct_st_dm_mode" >&6; } - if test $ac_cv_struct_st_dm_mode = yes; then + if test $have_com_err = yes; then + COM_ERRLIB=-lcom_err + LIBS="$COM_ERRLIB $LIBS" -$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h +$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 +$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } +if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - -ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" -if test "x$ac_cv_have_decl_strmode" = x""yes; then : - ac_have_decl=1 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mit_des_cbc_encrypt (); +int +main () +{ +return mit_des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_mit_des_cbc_encrypt=yes else - ac_have_decl=0 + ac_cv_lib_crypto_mit_des_cbc_encrypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 +$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } +if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : + have_crypto=yes +else + have_crypto=no fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRMODE $ac_have_decl + if test $have_crypto = yes; then + CRYPTOLIB=-lcrypto + LIBS="$CRYPTOLIB $LIBS" + +$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 +$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } +if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lk5crypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mit_des_cbc_encrypt (); +int +main () +{ +return mit_des_cbc_encrypt (); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes +else + ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 +$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } +if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : + have_k5crypto=yes +else + have_k5crypto=no +fi + if test $have_k5crypto = yes; then + CRYPTOLIB=-lk5crypto + LIBS="$CRYPTOLIB $LIBS" - GNULIB__EXIT=0; - GNULIB_ATOLL=0; - GNULIB_CALLOC_POSIX=0; - GNULIB_CANONICALIZE_FILE_NAME=0; - GNULIB_GETLOADAVG=0; - GNULIB_GETSUBOPT=0; - GNULIB_GRANTPT=0; - GNULIB_MALLOC_POSIX=0; - GNULIB_MBTOWC=0; - GNULIB_MKDTEMP=0; - GNULIB_MKOSTEMP=0; - GNULIB_MKOSTEMPS=0; - GNULIB_MKSTEMP=0; - GNULIB_MKSTEMPS=0; - GNULIB_PTSNAME=0; - GNULIB_PUTENV=0; - GNULIB_RANDOM_R=0; - GNULIB_REALLOC_POSIX=0; - GNULIB_REALPATH=0; - GNULIB_RPMATCH=0; - GNULIB_SETENV=0; - GNULIB_STRTOD=0; - GNULIB_STRTOLL=0; - GNULIB_STRTOULL=0; - GNULIB_SYSTEM_POSIX=0; - GNULIB_UNLOCKPT=0; - GNULIB_UNSETENV=0; - GNULIB_WCTOMB=0; - HAVE__EXIT=1; - HAVE_ATOLL=1; - HAVE_CANONICALIZE_FILE_NAME=1; - HAVE_DECL_GETLOADAVG=1; - HAVE_GETSUBOPT=1; - HAVE_GRANTPT=1; - HAVE_MKDTEMP=1; - HAVE_MKOSTEMP=1; - HAVE_MKOSTEMPS=1; - HAVE_MKSTEMP=1; - HAVE_MKSTEMPS=1; - HAVE_PTSNAME=1; - HAVE_RANDOM_H=1; - HAVE_RANDOM_R=1; - HAVE_REALPATH=1; - HAVE_RPMATCH=1; - HAVE_SETENV=1; - HAVE_DECL_SETENV=1; - HAVE_STRTOD=1; - HAVE_STRTOLL=1; - HAVE_STRTOULL=1; - HAVE_STRUCT_RANDOM_DATA=1; - HAVE_SYS_LOADAVG_H=0; - HAVE_UNLOCKPT=1; - HAVE_DECL_UNSETENV=1; - REPLACE_CALLOC=0; - REPLACE_CANONICALIZE_FILE_NAME=0; - REPLACE_MALLOC=0; - REPLACE_MBTOWC=0; - REPLACE_MKSTEMP=0; - REPLACE_PUTENV=0; - REPLACE_REALLOC=0; - REPLACE_REALPATH=0; - REPLACE_SETENV=0; - REPLACE_STRTOD=0; - REPLACE_UNSETENV=0; - REPLACE_WCTOMB=0; +$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 +$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } +if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - GNULIB_CHOWN=0; - GNULIB_CLOSE=0; - GNULIB_DUP2=0; - GNULIB_DUP3=0; - GNULIB_ENVIRON=0; - GNULIB_EUIDACCESS=0; - GNULIB_FACCESSAT=0; - GNULIB_FCHDIR=0; - GNULIB_FCHOWNAT=0; - GNULIB_FSYNC=0; - GNULIB_FTRUNCATE=0; - GNULIB_GETCWD=0; - GNULIB_GETDOMAINNAME=0; - GNULIB_GETDTABLESIZE=0; - GNULIB_GETGROUPS=0; - GNULIB_GETHOSTNAME=0; - GNULIB_GETLOGIN=0; - GNULIB_GETLOGIN_R=0; - GNULIB_GETPAGESIZE=0; - GNULIB_GETUSERSHELL=0; - GNULIB_GROUP_MEMBER=0; - GNULIB_LCHOWN=0; - GNULIB_LINK=0; - GNULIB_LINKAT=0; - GNULIB_LSEEK=0; - GNULIB_PIPE=0; - GNULIB_PIPE2=0; - GNULIB_PREAD=0; - GNULIB_PWRITE=0; - GNULIB_READ=0; - GNULIB_READLINK=0; - GNULIB_READLINKAT=0; - GNULIB_RMDIR=0; - GNULIB_SLEEP=0; - GNULIB_SYMLINK=0; - GNULIB_SYMLINKAT=0; - GNULIB_TTYNAME_R=0; - GNULIB_UNISTD_H_GETOPT=0; - GNULIB_UNISTD_H_NONBLOCKING=0; - GNULIB_UNISTD_H_SIGPIPE=0; - GNULIB_UNLINK=0; - GNULIB_UNLINKAT=0; - GNULIB_USLEEP=0; - GNULIB_WRITE=0; - HAVE_CHOWN=1; - HAVE_DUP2=1; - HAVE_DUP3=1; - HAVE_EUIDACCESS=1; - HAVE_FACCESSAT=1; - HAVE_FCHDIR=1; - HAVE_FCHOWNAT=1; - HAVE_FSYNC=1; - HAVE_FTRUNCATE=1; - HAVE_GETDTABLESIZE=1; - HAVE_GETGROUPS=1; - HAVE_GETHOSTNAME=1; - HAVE_GETLOGIN=1; - HAVE_GETPAGESIZE=1; - HAVE_GROUP_MEMBER=1; - HAVE_LCHOWN=1; - HAVE_LINK=1; - HAVE_LINKAT=1; - HAVE_PIPE=1; - HAVE_PIPE2=1; - HAVE_PREAD=1; - HAVE_PWRITE=1; - HAVE_READLINK=1; - HAVE_READLINKAT=1; - HAVE_SLEEP=1; - HAVE_SYMLINK=1; - HAVE_SYMLINKAT=1; - HAVE_UNLINKAT=1; - HAVE_USLEEP=1; - HAVE_DECL_ENVIRON=1; - HAVE_DECL_FCHDIR=1; - HAVE_DECL_GETDOMAINNAME=1; - HAVE_DECL_GETLOGIN_R=1; - HAVE_DECL_GETPAGESIZE=1; - HAVE_DECL_GETUSERSHELL=1; - HAVE_DECL_TTYNAME_R=1; - HAVE_OS_H=0; - HAVE_SYS_PARAM_H=0; - REPLACE_CHOWN=0; - REPLACE_CLOSE=0; - REPLACE_DUP=0; - REPLACE_DUP2=0; - REPLACE_FCHOWNAT=0; - REPLACE_GETCWD=0; - REPLACE_GETDOMAINNAME=0; - REPLACE_GETLOGIN_R=0; - REPLACE_GETGROUPS=0; - REPLACE_GETPAGESIZE=0; - REPLACE_LCHOWN=0; - REPLACE_LINK=0; - REPLACE_LINKAT=0; - REPLACE_LSEEK=0; - REPLACE_PREAD=0; - REPLACE_PWRITE=0; - REPLACE_READ=0; - REPLACE_READLINK=0; - REPLACE_RMDIR=0; - REPLACE_SLEEP=0; - REPLACE_SYMLINK=0; - REPLACE_TTYNAME_R=0; - REPLACE_UNLINK=0; - REPLACE_UNLINKAT=0; - REPLACE_USLEEP=0; - REPLACE_WRITE=0; - UNISTD_H_HAVE_WINSOCK2_H=0; - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 -$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if test "${gl_cv_have_include_next+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=yes -else - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +char krb5_init_context (); +int +main () +{ +return krb5_init_context (); + ; + return 0; +} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=buggy +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5_krb5_init_context=yes else - gl_cv_have_include_next=no + ac_cv_lib_krb5_krb5_init_context=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 +$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } +if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : + have_krb5=yes +else + have_krb5=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 -$as_echo "$gl_cv_have_include_next" >&6; } - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi + if test $have_krb5=yes; then + KRB5LIB=-lkrb5 + LIBS="$KRB5LIB $LIBS" +$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 -$as_echo_n "checking whether system header files limit the line length... " >&6; } -if test "${gl_cv_pragma_columns+set}" = set; then : + fi + if test "${with_kerberos5}" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 +$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } +if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldes425 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __TANDEM -choke me +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif - +char des_cbc_encrypt (); +int +main () +{ +return des_cbc_encrypt (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "choke me" >/dev/null 2>&1; then : - gl_cv_pragma_columns=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_des425_des_cbc_encrypt=yes else - gl_cv_pragma_columns=no + ac_cv_lib_des425_des_cbc_encrypt=no fi -rm -f conftest* - - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 +$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } +if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : + have_des425=yes +else + have_des425=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 -$as_echo "$gl_cv_pragma_columns" >&6; } - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - - - - - - + if test $have_des425 = yes; then + DESLIB=-ldes425 + LIBS="$DESLIB $LIBS" +$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 +$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } +if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldes $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char des_cbc_encrypt (); +int +main () +{ +return des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_des_des_cbc_encrypt=yes +else + ac_cv_lib_des_des_cbc_encrypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 +$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } +if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : + have_des=yes +else + have_des=no +fi + if test $have_des = yes; then + DESLIB=-ldes + LIBS="$DESLIB $LIBS" +$as_echo "#define HAVE_LIBDES 1" >>confdefs.h + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 +$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } +if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb4 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char krb_get_cred (); +int +main () +{ +return krb_get_cred (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb4_krb_get_cred=yes +else + ac_cv_lib_krb4_krb_get_cred=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 +$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } +if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : + have_krb4=yes +else + have_krb4=no +fi + if test $have_krb4 = yes; then + KRB4LIB=-lkrb4 + LIBS="$KRB4LIB $LIBS" +$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h - if test $gl_cv_have_include_next = yes; then - gl_cv_next_getopt_h='<'getopt.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_getopt_h+set}" = set; then : + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 +$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } +if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : $as_echo_n "(cached) " >&6 else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test $ac_cv_header_getopt_h = yes; then +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char krb_get_cred (); +int +main () +{ +return krb_get_cred (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb_krb_get_cred=yes +else + ac_cv_lib_krb_krb_get_cred=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 +$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } +if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : + have_krb=yes +else + have_krb=no +fi + if test $have_krb = yes; then + KRB4LIB=-lkrb + LIBS="$KRB4LIB $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h + + fi + fi + fi + if test "${with_kerberos5}" != no; then + for ac_header in krb5.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" +if test "x$ac_cv_header_krb5_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include +" +if test "x$ac_cv_member_krb5_error_text" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_ERROR_TEXT 1 _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/getopt.h#{ - s#.*"\(.*/getopt.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_getopt_h='<'getopt.h'>' - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 -$as_echo "$gl_cv_next_getopt_h" >&6; } - fi - NEXT_GETOPT_H=$gl_cv_next_getopt_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'getopt.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_getopt_h - fi - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive +ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include +" +if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_ERROR_E_TEXT 1 +_ACEOF +fi - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi +fi +done - gl_replace_getopt= + else + for ac_header in des.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" +if test "x$ac_cv_header_des_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DES_H 1 +_ACEOF - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_header in getopt.h +else + for ac_header in kerberosIV/des.h do : - ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = x""yes; then : + ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" +if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_H 1 +#define HAVE_KERBEROSIV_DES_H 1 _ACEOF else - gl_replace_getopt=yes + for ac_header in kerberos/des.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" +if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROS_DES_H 1 +_ACEOF + fi done - fi +fi - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_func in getopt_long_only -do : - ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_LONG_ONLY 1 -_ACEOF +done -else - gl_replace_getopt=yes fi + done - fi + for ac_header in krb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" +if test "x$ac_cv_header_krb_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB_H 1 +_ACEOF - if test -z "$gl_replace_getopt"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 -$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } -if test "${gl_cv_func_getopt_posix+set}" = set; then : - $as_echo_n "(cached) " >&6 else + for ac_header in kerberosIV/krb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" +if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSIV_KRB_H 1 +_ACEOF - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int *p = &optreset; return optreset; - ; - return 0; -} +else + for ac_header in kerberos/krb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" +if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROS_KRB_H 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_optind_min=1 + +fi + +done + +fi + +done + +fi + +done + + fi + for ac_header in com_err.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" +if test "x$ac_cv_header_com_err_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_COM_ERR_H 1 +_ACEOF + +fi + +done + +fi + + + + + + + +# Solaris requires -lintl if you want strerror (which calls dgettext) +# to return localized messages. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 +$as_echo_n "checking for dgettext in -lintl... " >&6; } +if test "${ac_cv_lib_intl_dgettext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dgettext (); int main () { -return !getopt_clip; +return dgettext (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_optind_min=1 +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_dgettext=yes else - gl_optind_min=0 + ac_cv_lib_intl_dgettext=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 +$as_echo "$ac_cv_lib_intl_dgettext" >&6; } +if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBINTL 1 +_ACEOF - gl_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" - if test "$cross_compiling" = yes; then : - case "$host_os" in - mingw*) gl_cv_func_getopt_posix="guessing no";; - darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; - esac + LIBS="-lintl $LIBS" +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 +$as_echo_n "checking whether localtime caches TZ... " >&6; } +if test "${emacs_cv_localtime_cache+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test x$ac_cv_func_tzset = xyes; then +if test "$cross_compiling" = yes; then : + # If we have tzset, assume the worst when cross-compiling. +emacs_cv_localtime_cache=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#include - -int -main () +#include +char TZ_GMT0[] = "TZ=GMT0"; +char TZ_PST8[] = "TZ=PST8"; +main() { - { - int argc = 0; - char *argv[10]; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; - - c = getopt (argc, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (argc, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - } - /* Some internal state exists at this point. */ - { - int argc = 0; - char *argv[10]; - int c; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; - - c = getopt (argc, argv, "+abp:q:"); - if (!(c == -1)) - return 4; - if (!(strcmp (argv[0], "program") == 0)) - return 5; - if (!(strcmp (argv[1], "donald") == 0)) - return 6; - if (!(strcmp (argv[2], "-p") == 0)) - return 7; - if (!(strcmp (argv[3], "billy") == 0)) - return 8; - if (!(strcmp (argv[4], "duck") == 0)) - return 9; - if (!(strcmp (argv[5], "-a") == 0)) - return 10; - if (!(strcmp (argv[6], "bar") == 0)) - return 11; - if (!(optind == 1)) - return 12; - } - /* Detect MacOS 10.5, AIX 7.1 bug. */ - { - char *argv[3] = { "program", "-ab", NULL }; - optind = OPTIND_MIN; - opterr = 0; - if (getopt (2, argv, "ab:") != 'a') - return 13; - if (getopt (2, argv, "ab:") != '?') - return 14; - if (optopt != 'b') - return 15; - if (optind != 2) - return 16; - } - - return 0; + time_t now = time ((time_t *) 0); + int hour_GMT0, hour_unset; + if (putenv (TZ_GMT0) != 0) + exit (1); + hour_GMT0 = localtime (&now)->tm_hour; + unsetenv("TZ"); + hour_unset = localtime (&now)->tm_hour; + if (putenv (TZ_PST8) != 0) + exit (1); + if (localtime (&now)->tm_hour == hour_GMT0) + exit (1); + unsetenv("TZ"); + if (localtime (&now)->tm_hour != hour_unset) + exit (1); + exit (0); } - _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_posix=yes + emacs_cv_localtime_cache=no else - gl_cv_func_getopt_posix=no + emacs_cv_localtime_cache=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - CPPFLAGS=$gl_save_CPPFLAGS +else + # If we lack tzset, report that localtime does not cache TZ, + # since we can't invalidate the cache if we don't have tzset. + emacs_cv_localtime_cache=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 +$as_echo "$emacs_cv_localtime_cache" >&6; } +if test $emacs_cv_localtime_cache = yes; then + +$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 -$as_echo "$gl_cv_func_getopt_posix" >&6; } - case "$gl_cv_func_getopt_posix" in - *no) gl_replace_getopt=yes ;; - esac - fi - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 -$as_echo_n "checking for working GNU getopt function... " >&6; } -if test "${gl_cv_func_getopt_gnu+set}" = set; then : +if test "x$HAVE_TIMEVAL" = xyes; then + for ac_func in gettimeofday +do : + ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETTIMEOFDAY 1 +_ACEOF + +fi +done + + if test $ac_cv_func_gettimeofday = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 +$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } +if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : $as_echo_n "(cached) " >&6 -else - # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the - # optstring is necessary for programs like m4 that have POSIX-mandated - # semantics for supporting options interspersed with files. - # Also, since getopt_long is a GNU extension, we require optind=0. - # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; - # so take care to revert to the correct (non-)export state. - gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' - case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include +#ifdef TIME_WITH_SYS_TIME +#include +#include +#else +#ifdef HAVE_SYS_TIME_H +#include +#else +#include +#endif +#endif int main () { - - int result = 0; - /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, - and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, - OSF/1 5.1, Solaris 10. */ - { - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - opterr = 0; - if (getopt (2, myargv, "+a") != '?') - result |= 1; - } - /* This code succeeds on glibc 2.8, mingw, - and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, - IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ - { - char *argv[] = { "program", "-p", "foo", "bar", NULL }; - - optind = 1; - if (getopt (4, argv, "p::") != 'p') - result |= 2; - else if (optarg != NULL) - result |= 4; - else if (getopt (4, argv, "p::") != -1) - result |= 6; - else if (optind != 2) - result |= 8; - } - /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ - { - char *argv[] = { "program", "foo", "-p", NULL }; - optind = 0; - if (getopt (3, argv, "-p") != 1) - result |= 16; - else if (getopt (3, argv, "-p") != 'p') - result |= 32; - } - /* This code fails on glibc 2.11. */ - { - char *argv[] = { "program", "-b", "-a", NULL }; - optind = opterr = 0; - if (getopt (3, argv, "+:a:b") != 'b') - result |= 64; - else if (getopt (3, argv, "+:a:b") != ':') - result |= 64; - } - return result; - +struct timeval time; + gettimeofday (&time, 0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_gnu=yes +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_gettimeofday_two_arguments=yes else - gl_cv_func_getopt_gnu=no + emacs_cv_gettimeofday_two_arguments=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 +$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } + if test $emacs_cv_gettimeofday_two_arguments = no; then - case $gl_had_POSIXLY_CORRECT in - exported) ;; - yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; - *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; - esac +$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 -$as_echo "$gl_cv_func_getopt_gnu" >&6; } - if test "$gl_cv_func_getopt_gnu" = "no"; then - gl_replace_getopt=yes fi fi +fi +ok_so_far=yes +ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = x""yes; then : +else + ok_so_far=no +fi +if test $ok_so_far = yes; then + ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = x""yes; then : +else + ok_so_far=no +fi - REPLACE_GETOPT=0 +fi +if test $ok_so_far = yes; then + ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : - if test -n "$gl_replace_getopt"; then : +else + ok_so_far=no +fi - REPLACE_GETOPT=1 fi +if test $ok_so_far = yes; then +$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h - if test $REPLACE_GETOPT = 1; then +fi - GETOPT_H=getopt.h +if test -f /usr/lpp/X11/bin/smt.exp; then -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h +$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 +$as_echo_n "checking whether system supports dynamic ptys... " >&6; } +if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - GNULIB_UNISTD_H_GETOPT=1 - fi +$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h -ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = x""yes; then : - ac_have_decl=1 else - ac_have_decl=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV $ac_have_decl -_ACEOF - +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : - $as_echo_n "(cached) " >&6 else - ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define pid_t int _ACEOF -if ac_fn_c_try_link "$LINENO"; then : -else - ac_cv_type_unsigned_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then -$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h +for ac_header in vfork.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 +_ACEOF - fi +fi + +done +for ac_func in fork vfork +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if test "${ac_cv_type_long_long_int+set}" = set; then : +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if test "${ac_cv_func_fork_works+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - if test "$cross_compiling" = yes; then : - : + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif +$ac_includes_default int main () { -long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - + ac_cv_func_fork_works=yes else - ac_cv_type_long_long_int=no + ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 -$as_echo "$ac_cv_type_long_long_int" >&6; } - if test $ac_cv_type_long_long_int = yes; then - -$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } - gl_cv_c_multiarch=no +else + ac_cv_func_fork_works=$ac_cv_func_fork +fi +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} +fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if test "${ac_cv_func_vfork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_vfork_works=cross +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} +int +main () +{ + pid_t parent = getpid (); + pid_t child; + sparc_address_test (0); + child = vfork (); - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 + /* Did the child fail? (This shouldn't happen.) */ + || status + /* Did the vfork/compiler bug occur? */ + || parent != getpid() - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_vfork_works=yes +else + ac_cv_func_vfork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +fi +if test "x$ac_cv_func_vfork_works" = xyes; then - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h +else +$as_echo "#define vfork fork" >>confdefs.h +fi +if test "x$ac_cv_func_fork_works" = xyes; then +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 +$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } +if test "${emacs_cv_langinfo_codeset+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_langinfo_codeset=yes +else + emacs_cv_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 +$as_echo "$emacs_cv_langinfo_codeset" >&6; } +if test $emacs_cv_langinfo_codeset = yes; then +$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h +fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdint_h='<'stdint.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdint_h+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 +$as_echo_n "checking for mbstate_t... " >&6; } +if test "${ac_cv_type_mbstate_t+set}" = set; then : $as_echo_n "(cached) " >&6 else - - if test $ac_cv_header_stdint_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +$ac_includes_default +# include +int +main () +{ +mbstate_t x; return sizeof x; + ; + return 0; +} _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdint.h#{ - s#.*"\(.*/stdint.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stdint_h='<'stdint.h'>' - fi - - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_mbstate_t=yes +else + ac_cv_type_mbstate_t=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 -$as_echo "$gl_cv_next_stdint_h" >&6; } - fi - NEXT_STDINT_H=$gl_cv_next_stdint_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdint.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdint_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 +$as_echo "$ac_cv_type_mbstate_t" >&6; } + if test $ac_cv_type_mbstate_t = yes; then +$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h + else - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi +$as_echo "#define mbstate_t int" >>confdefs.h + fi - if test $ac_cv_header_stdint_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 -$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } -if test "${gl_cv_header_working_stdint_h+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 +$as_echo_n "checking for C restricted array declarations... " >&6; } +if test "${emacs_cv_c_restrict_arr+set}" = set; then : $as_echo_n "(cached) " >&6 else - gl_cv_header_working_stdint_h=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif - - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - +void fred (int x[__restrict]); int main () { @@ -15487,744 +15333,462 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - if test "$cross_compiling" = yes; then : - gl_cv_header_working_stdint_h=yes - + emacs_cv_c_restrict_arr=yes else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + emacs_cv_c_restrict_arr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 +$as_echo "$emacs_cv_c_restrict_arr" >&6; } +if test "$emacs_cv_c_restrict_arr" = yes; then +$as_echo "#define __restrict_arr __restrict" >>confdefs.h -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include +fi - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif +# Set up the CFLAGS for real compilation, so we can substitute it. +CFLAGS="$REAL_CFLAGS" +CPPFLAGS="$REAL_CPPFLAGS" +## Hack to detect a buggy GCC version. +if test "x$GCC" = xyes \ + && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ + && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ + && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then + as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 +fi -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; +version=$PACKAGE_VERSION -int -main () -{ +### Specify what sort of things we'll be editing into Makefile and config.h. +### Use configuration here uncanonicalized to avoid exceeding size limits. - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return mv - macro_values + 1; - } - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_stdint_h=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi +## Unused? -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 -$as_echo "$gl_cv_header_working_stdint_h" >&6; } - fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else - for ac_header in sys/inttypes.h sys/bitypes.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - if test $APPLE_UNIVERSAL_BUILD = 0; then - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -#include "; then : -else - result=unknown -fi - eval gl_cv_bitsizeof_${gltype}=\$result -fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result -_ACEOF - eval BITSIZEOF_${GLTYPE}=\$result - done - fi +## FIXME? Nothing uses @LD_SWITCH_X_SITE@. +## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the +## end of LIBX_BASE, but nothing ever set it. - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -#include "; then : +## Used in lwlib/Makefile.in. + +if test -n "${machfile}"; then + M_FILE="\$(srcdir)/${machfile}" else - result=unknown + M_FILE= fi +S_FILE="\$(srcdir)/${opsysfile}" - eval gl_cv_bitsizeof_${gltype}=\$result -fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result -_ACEOF - eval BITSIZEOF_${GLTYPE}=\$result - done - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 -$as_echo_n "checking whether $gltype is signed... " >&6; } -if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; -int -main () -{ - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define EMACS_CONFIGURATION "${canonical}" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define EMACS_CONFIG_OPTIONS "${ac_configure_args}" +_ACEOF + +if test -n "$machfile"; then + +cat >>confdefs.h <<_ACEOF +#define config_machfile "${machfile}" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - result=yes -else - result=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval gl_cv_type_${gltype}_signed=\$result fi -eval ac_res=\$gl_cv_type_${gltype}_signed - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_SIGNED_${GLTYPE} 1 + +cat >>confdefs.h <<_ACEOF +#define config_opsysfile "${opsysfile}" _ACEOF - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done +XMENU_OBJ= +XOBJ= +FONT_OBJ= +if test "${HAVE_X_WINDOWS}" = "yes" ; then - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then +$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h + XMENU_OBJ=xmenu.o + XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" + FONT_OBJ=xfont.o + if test "$HAVE_XFT" = "yes"; then + FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" + elif test "$HAVE_FREETYPE" = "yes"; then + FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" + fi - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - extern $gltype foo; - extern $gltype1 foo; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done -fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF - done +WIDGET_OBJ= +MOTIF_LIBW= +if test "${USE_X_TOOLKIT}" != "none" ; then + WIDGET_OBJ=widget.o +$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h - fi + if test "${USE_X_TOOLKIT}" = "LUCID"; then +$as_echo "#define USE_LUCID 1" >>confdefs.h - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + elif test "${USE_X_TOOLKIT}" = "MOTIF"; then - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif +$as_echo "#define USE_MOTIF 1" >>confdefs.h - extern $gltype foo; - extern $gltype1 foo; -int -main () -{ + MOTIF_LIBW=-lXm + case "$opsys" in + gnu-linux) + ## Paul Abrahams says this is needed. + MOTIF_LIBW="$MOTIF_LIBW -lXpm" + ;; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf + unixware) + ## Richard Anthony Ryan + ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. + MOTIF_LIBW="MOTIF_LIBW -lXimp" + ;; + + aix4-2) + ## olson@mcs.anl.gov says -li18n is needed by -lXm. + MOTIF_LIBW="$MOTIF_LIBW -li18n" + ;; + esac + MOTIF_LIBW="$MOTIF_LIBW $LIBXP" + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done + + +TOOLKIT_LIBW= +case "$USE_X_TOOLKIT" in + MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; + LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; + none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; +esac + + +if test "$USE_X_TOOLKIT" = "none"; then + LIBXT_OTHER="\$(LIBXSM)" + OLDXMENU_TARGET="really-oldXMenu" +else + LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" + OLDXMENU_TARGET="really-lwlib" fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF - done +## The X Menu stuff is present in the X10 distribution, but missing +## from X11. If we have X10, just use the installed library; +## otherwise, use our own copy. +if test "${HAVE_X11}" = "yes" ; then +$as_echo "#define HAVE_X11 1" >>confdefs.h - STDINT_H=stdint.h - fi - if test -n "$STDINT_H"; then - GL_GENERATE_STDINT_H_TRUE= - GL_GENERATE_STDINT_H_FALSE='#' + if test "$USE_X_TOOLKIT" = "none"; then + OLDXMENU="\${oldXMenudir}/libXMenu11.a" + else + OLDXMENU="\${lwlibdir}/liblw.a" + fi + LIBXMENU="\$(OLDXMENU)" + LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" + OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" else - GL_GENERATE_STDINT_H_TRUE='#' - GL_GENERATE_STDINT_H_FALSE= + ## For a syntactically valid Makefile; not actually used for anything. + ## See comments in src/Makefile.in. + OLDXMENU=nothing + ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). + if test "${HAVE_X_WINDOWS}" = "yes"; then + LIBXMENU="-lXMenu" + else + LIBXMENU= + fi + LIBX_OTHER= + OLDXMENU_DEPS= fi +if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then + OLDXMENU_TARGET= + OLDXMENU=nothing + LIBXMENU= + OLDXMENU_DEPS= +fi - GNULIB_IMAXABS=0; - GNULIB_IMAXDIV=0; - GNULIB_STRTOIMAX=0; - GNULIB_STRTOUMAX=0; - HAVE_DECL_IMAXABS=1; - HAVE_DECL_IMAXDIV=1; - HAVE_DECL_STRTOIMAX=1; - HAVE_DECL_STRTOUMAX=1; - INT32_MAX_LT_INTMAX_MAX=1; - INT64_MAX_EQ_LONG_MAX='defined _LP64'; - PRI_MACROS_BROKEN=0; - PRIPTR_PREFIX=__PRIPTR_PREFIX; - UINT32_MAX_LT_UINTMAX_MAX=1; - UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; - +if test "${HAVE_MENUS}" = "yes" ; then +$as_echo "#define HAVE_MENUS 1" >>confdefs.h +fi +if test "${GNU_MALLOC}" = "yes" ; then +$as_echo "#define GNU_MALLOC 1" >>confdefs.h +fi +RALLOC_OBJ= +if test "${REL_ALLOC}" = "yes" ; then +$as_echo "#define REL_ALLOC 1" >>confdefs.h + test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o +fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_inttypes_h='<'inttypes.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_inttypes_h+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "$opsys" = "cygwin"; then + CYGWIN_OBJ="sheap.o" + ## Cygwin differs because of its unexec(). + PRE_ALLOC_OBJ= + POST_ALLOC_OBJ=lastfile.o else - - if test $ac_cv_header_inttypes_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/inttypes.h#{ - s#.*"\(.*/inttypes.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_inttypes_h='<'inttypes.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 -$as_echo "$gl_cv_next_inttypes_h" >&6; } - fi - NEXT_INTTYPES_H=$gl_cv_next_inttypes_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'inttypes.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_inttypes_h - fi - NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive - + CYGWIN_OBJ= + PRE_ALLOC_OBJ=lastfile.o + POST_ALLOC_OBJ= +fi +# Configure gnulib here, now that we know LIBS. -$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h - - GNULIB_FCHMODAT=0; - GNULIB_FSTATAT=0; - GNULIB_FUTIMENS=0; - GNULIB_LCHMOD=0; - GNULIB_LSTAT=0; - GNULIB_MKDIRAT=0; - GNULIB_MKFIFO=0; - GNULIB_MKFIFOAT=0; - GNULIB_MKNOD=0; - GNULIB_MKNODAT=0; - GNULIB_STAT=0; - GNULIB_UTIMENSAT=0; - HAVE_FCHMODAT=1; - HAVE_FSTATAT=1; - HAVE_FUTIMENS=1; - HAVE_LCHMOD=1; - HAVE_LSTAT=1; - HAVE_MKDIRAT=1; - HAVE_MKFIFO=1; - HAVE_MKFIFOAT=1; - HAVE_MKNOD=1; - HAVE_MKNODAT=1; - HAVE_UTIMENSAT=1; - REPLACE_FSTAT=0; - REPLACE_FSTATAT=0; - REPLACE_FUTIMENS=0; - REPLACE_LSTAT=0; - REPLACE_MKDIR=0; - REPLACE_MKFIFO=0; - REPLACE_MKNOD=0; - REPLACE_STAT=0; - REPLACE_UTIMENSAT=0; - + LIBC_FATAL_STDERR_=1 + export LIBC_FATAL_STDERR_ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then : $as_echo_n "(cached) " >&6 -else - rm -f conftest.sym conftest.file - echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - # When cross-compiling, be pessimistic so we will end up using the - # replacement version of lstat that checks for trailing slashes and - # calls lstat a second time when necessary. - gl_cv_func_lstat_dereferences_slashed_symlink=no - else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int main () { -struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_lstat_dereferences_slashed_symlink=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes else - gl_cv_func_lstat_dereferences_slashed_symlink=no + ac_cv_working_alloca_h=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - gl_cv_func_lstat_dereferences_slashed_symlink=no - fi - rm -f conftest.sym conftest.file +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } - test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } +if test $ac_cv_func_alloca_works = yes; then +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - GNULIB_MKTIME=0; - GNULIB_NANOSLEEP=0; - GNULIB_STRPTIME=0; - GNULIB_TIMEGM=0; - GNULIB_TIME_R=0; - HAVE_DECL_LOCALTIME_R=1; - HAVE_NANOSLEEP=1; - HAVE_STRPTIME=1; - HAVE_TIMEGM=1; - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; - REPLACE_MKTIME=GNULIB_PORTCHECK; - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; - REPLACE_TIMEGM=GNULIB_PORTCHECK; +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext +$as_echo "#define C_ALLOCA 1" >>confdefs.h - if test $ac_cv_header_sys_socket_h = no; then - for ac_header in ws2tcpip.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" -if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WS2TCPIP_H 1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : -done +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF - fi + break +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then : + done +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then : $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} int -main () +main (int argc, char **argv) { - - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; - return 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdbool_h=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 else - ac_cv_header_stdbool_h=no + ac_cv_c_stack_direction=-1 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } - ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = x""yes; then : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 +#define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF @@ -16232,461 +15796,678 @@ fi - REPLACE_NULL=0; - HAVE_WCHAR_T=1; + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : +fi +done + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + int main () { +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - gt_cv_c_wchar_t=no + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif - fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif - GNULIB_DPRINTF=0; - GNULIB_FCLOSE=0; - GNULIB_FFLUSH=0; - GNULIB_FGETC=0; - GNULIB_FGETS=0; - GNULIB_FOPEN=0; - GNULIB_FPRINTF=0; - GNULIB_FPRINTF_POSIX=0; - GNULIB_FPURGE=0; - GNULIB_FPUTC=0; - GNULIB_FPUTS=0; - GNULIB_FREAD=0; - GNULIB_FREOPEN=0; - GNULIB_FSCANF=0; - GNULIB_FSEEK=0; - GNULIB_FSEEKO=0; - GNULIB_FTELL=0; - GNULIB_FTELLO=0; - GNULIB_FWRITE=0; - GNULIB_GETC=0; - GNULIB_GETCHAR=0; - GNULIB_GETDELIM=0; - GNULIB_GETLINE=0; - GNULIB_GETS=0; - GNULIB_OBSTACK_PRINTF=0; - GNULIB_OBSTACK_PRINTF_POSIX=0; - GNULIB_PERROR=0; - GNULIB_POPEN=0; - GNULIB_PRINTF=0; - GNULIB_PRINTF_POSIX=0; - GNULIB_PUTC=0; - GNULIB_PUTCHAR=0; - GNULIB_PUTS=0; - GNULIB_REMOVE=0; - GNULIB_RENAME=0; - GNULIB_RENAMEAT=0; - GNULIB_SCANF=0; - GNULIB_SNPRINTF=0; - GNULIB_SPRINTF_POSIX=0; - GNULIB_STDIO_H_NONBLOCKING=0; - GNULIB_STDIO_H_SIGPIPE=0; - GNULIB_TMPFILE=0; - GNULIB_VASPRINTF=0; - GNULIB_VFSCANF=0; - GNULIB_VSCANF=0; - GNULIB_VDPRINTF=0; - GNULIB_VFPRINTF=0; - GNULIB_VFPRINTF_POSIX=0; - GNULIB_VPRINTF=0; - GNULIB_VPRINTF_POSIX=0; - GNULIB_VSNPRINTF=0; - GNULIB_VSPRINTF_POSIX=0; - HAVE_DECL_FPURGE=1; - HAVE_DECL_FSEEKO=1; - HAVE_DECL_FTELLO=1; - HAVE_DECL_GETDELIM=1; - HAVE_DECL_GETLINE=1; - HAVE_DECL_OBSTACK_PRINTF=1; - HAVE_DECL_SNPRINTF=1; - HAVE_DECL_VSNPRINTF=1; - HAVE_DPRINTF=1; - HAVE_FSEEKO=1; - HAVE_FTELLO=1; - HAVE_RENAMEAT=1; - HAVE_VASPRINTF=1; - HAVE_VDPRINTF=1; - REPLACE_DPRINTF=0; - REPLACE_FCLOSE=0; - REPLACE_FFLUSH=0; - REPLACE_FOPEN=0; - REPLACE_FPRINTF=0; - REPLACE_FPURGE=0; - REPLACE_FREOPEN=0; - REPLACE_FSEEK=0; - REPLACE_FSEEKO=0; - REPLACE_FTELL=0; - REPLACE_FTELLO=0; - REPLACE_GETDELIM=0; - REPLACE_GETLINE=0; - REPLACE_OBSTACK_PRINTF=0; - REPLACE_PERROR=0; - REPLACE_POPEN=0; - REPLACE_PRINTF=0; - REPLACE_REMOVE=0; - REPLACE_RENAME=0; - REPLACE_RENAMEAT=0; - REPLACE_SNPRINTF=0; - REPLACE_SPRINTF=0; - REPLACE_STDIO_READ_FUNCS=0; - REPLACE_STDIO_WRITE_FUNCS=0; - REPLACE_TMPFILE=0; - REPLACE_VASPRINTF=0; - REPLACE_VDPRINTF=0; - REPLACE_VFPRINTF=0; - REPLACE_VPRINTF=0; - REPLACE_VSNPRINTF=0; - REPLACE_VSPRINTF=0; - - - ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include -" -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : - -$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h - -fi - - - - -ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRTOUMAX $ac_have_decl -_ACEOF - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if test "${ac_cv_header_stat_broken+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -#if defined S_ISBLK && defined S_IFDIR -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; -#endif - -#if defined S_ISBLK && defined S_IFCHR -extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; -#endif - -#if defined S_ISLNK && defined S_IFREG -extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; -#endif - -#if defined S_ISSOCK && defined S_IFREG -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; -#endif - + ; + return 0; +} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stat_broken=no + ac_cv_c_bigendian=yes else - ac_cv_header_stat_broken=yes + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 -$as_echo "$ac_cv_header_stat_broken" >&6; } -if test $ac_cv_header_stat_broken = yes; then - -$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + int main () { -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) +return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : - $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +$ac_includes_default int main () { -static struct timespec x; x.tv_sec = x.tv_nsec; + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_time_h=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no else - gl_cv_sys_struct_timespec_in_time_h=no + ac_cv_c_bigendian=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then : $as_echo_n "(cached) " >&6 else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_sys_time_h=yes -else - gl_cv_sys_struct_timespec_in_sys_time_h=no + ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 +$as_echo_n "checking whether strtold conforms to C99... " >&6; } +if test "${gl_cv_func_c99_strtold+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +/* On HP-UX before 11.23, strtold returns a struct instead of + long double. Reject implementations like that, by requiring + compatibility with the C99 prototype. */ + #include + static long double (*p) (char const *, char **) = strtold; + static long double + test (char const *nptr, char **endptr) + { + long double r; + r = strtold (nptr, endptr); + return r; + } int main () { -static struct timespec x; x.tv_sec = x.tv_nsec; +return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_pthread_h=yes +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_c99_strtold=yes else - gl_cv_sys_struct_timespec_in_pthread_h=no + gl_cv_func_c99_strtold=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - fi - fi - fi - - - - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5 +$as_echo "$gl_cv_func_c99_strtold" >&6; } + if test $gl_cv_func_c99_strtold = yes; then +$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h + fi + GNULIB_CHOWN=0; + GNULIB_CLOSE=0; + GNULIB_DUP2=0; + GNULIB_DUP3=0; + GNULIB_ENVIRON=0; + GNULIB_EUIDACCESS=0; + GNULIB_FACCESSAT=0; + GNULIB_FCHDIR=0; + GNULIB_FCHOWNAT=0; + GNULIB_FSYNC=0; + GNULIB_FTRUNCATE=0; + GNULIB_GETCWD=0; + GNULIB_GETDOMAINNAME=0; + GNULIB_GETDTABLESIZE=0; + GNULIB_GETGROUPS=0; + GNULIB_GETHOSTNAME=0; + GNULIB_GETLOGIN=0; + GNULIB_GETLOGIN_R=0; + GNULIB_GETPAGESIZE=0; + GNULIB_GETUSERSHELL=0; + GNULIB_GROUP_MEMBER=0; + GNULIB_LCHOWN=0; + GNULIB_LINK=0; + GNULIB_LINKAT=0; + GNULIB_LSEEK=0; + GNULIB_PIPE=0; + GNULIB_PIPE2=0; + GNULIB_PREAD=0; + GNULIB_PWRITE=0; + GNULIB_READ=0; + GNULIB_READLINK=0; + GNULIB_READLINKAT=0; + GNULIB_RMDIR=0; + GNULIB_SLEEP=0; + GNULIB_SYMLINK=0; + GNULIB_SYMLINKAT=0; + GNULIB_TTYNAME_R=0; + GNULIB_UNISTD_H_GETOPT=0; + GNULIB_UNISTD_H_NONBLOCKING=0; + GNULIB_UNISTD_H_SIGPIPE=0; + GNULIB_UNLINK=0; + GNULIB_UNLINKAT=0; + GNULIB_USLEEP=0; + GNULIB_WRITE=0; + HAVE_CHOWN=1; + HAVE_DUP2=1; + HAVE_DUP3=1; + HAVE_EUIDACCESS=1; + HAVE_FACCESSAT=1; + HAVE_FCHDIR=1; + HAVE_FCHOWNAT=1; + HAVE_FSYNC=1; + HAVE_FTRUNCATE=1; + HAVE_GETDTABLESIZE=1; + HAVE_GETGROUPS=1; + HAVE_GETHOSTNAME=1; + HAVE_GETLOGIN=1; + HAVE_GETPAGESIZE=1; + HAVE_GROUP_MEMBER=1; + HAVE_LCHOWN=1; + HAVE_LINK=1; + HAVE_LINKAT=1; + HAVE_PIPE=1; + HAVE_PIPE2=1; + HAVE_PREAD=1; + HAVE_PWRITE=1; + HAVE_READLINK=1; + HAVE_READLINKAT=1; + HAVE_SLEEP=1; + HAVE_SYMLINK=1; + HAVE_SYMLINKAT=1; + HAVE_UNLINKAT=1; + HAVE_USLEEP=1; + HAVE_DECL_ENVIRON=1; + HAVE_DECL_FCHDIR=1; + HAVE_DECL_GETDOMAINNAME=1; + HAVE_DECL_GETLOGIN_R=1; + HAVE_DECL_GETPAGESIZE=1; + HAVE_DECL_GETUSERSHELL=1; + HAVE_DECL_TTYNAME_R=1; + HAVE_OS_H=0; + HAVE_SYS_PARAM_H=0; + REPLACE_CHOWN=0; + REPLACE_CLOSE=0; + REPLACE_DUP=0; + REPLACE_DUP2=0; + REPLACE_FCHOWNAT=0; + REPLACE_GETCWD=0; + REPLACE_GETDOMAINNAME=0; + REPLACE_GETLOGIN_R=0; + REPLACE_GETGROUPS=0; + REPLACE_GETPAGESIZE=0; + REPLACE_LCHOWN=0; + REPLACE_LINK=0; + REPLACE_LINKAT=0; + REPLACE_LSEEK=0; + REPLACE_PREAD=0; + REPLACE_PWRITE=0; + REPLACE_READ=0; + REPLACE_READLINK=0; + REPLACE_RMDIR=0; + REPLACE_SLEEP=0; + REPLACE_SYMLINK=0; + REPLACE_TTYNAME_R=0; + REPLACE_UNLINK=0; + REPLACE_UNLINKAT=0; + REPLACE_USLEEP=0; + REPLACE_WRITE=0; + UNISTD_H_HAVE_WINSOCK2_H=0; + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - if test $gl_cv_have_include_next = yes; then - gl_cv_next_time_h='<'time.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_time_h+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 +$as_echo_n "checking for st_dm_mode in struct stat... " >&6; } +if test "${ac_cv_struct_st_dm_mode+set}" = set; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +#include +int +main () +{ +struct stat s; s.st_dm_mode; + ; + return 0; +} _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/time.h#{ - s#.*"\(.*/time.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_st_dm_mode=yes +else + ac_cv_struct_st_dm_mode=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 -$as_echo "$gl_cv_next_time_h" >&6; } - fi - NEXT_TIME_H=$gl_cv_next_time_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'time.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_time_h - fi - NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 +$as_echo "$ac_cv_struct_st_dm_mode" >&6; } + if test $ac_cv_struct_st_dm_mode = yes; then +$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h + fi -ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : +ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" +if test "x$ac_cv_have_decl_strmode" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_LOCALTIME_R $ac_have_decl +#define HAVE_DECL_STRMODE $ac_have_decl _ACEOF - - - if false; then - GL_COND_LIBTOOL_TRUE= - GL_COND_LIBTOOL_FALSE='#' -else - GL_COND_LIBTOOL_TRUE='#' - GL_COND_LIBTOOL_FALSE= -fi - - gl_cond_libtool=false - gl_libdeps= - gl_ltlibdeps= - gl_m4_base='m4' - + GNULIB__EXIT=0; + GNULIB_ATOLL=0; + GNULIB_CALLOC_POSIX=0; + GNULIB_CANONICALIZE_FILE_NAME=0; + GNULIB_GETLOADAVG=0; + GNULIB_GETSUBOPT=0; + GNULIB_GRANTPT=0; + GNULIB_MALLOC_POSIX=0; + GNULIB_MBTOWC=0; + GNULIB_MKDTEMP=0; + GNULIB_MKOSTEMP=0; + GNULIB_MKOSTEMPS=0; + GNULIB_MKSTEMP=0; + GNULIB_MKSTEMPS=0; + GNULIB_PTSNAME=0; + GNULIB_PUTENV=0; + GNULIB_RANDOM_R=0; + GNULIB_REALLOC_POSIX=0; + GNULIB_REALPATH=0; + GNULIB_RPMATCH=0; + GNULIB_SETENV=0; + GNULIB_STRTOD=0; + GNULIB_STRTOLL=0; + GNULIB_STRTOULL=0; + GNULIB_SYSTEM_POSIX=0; + GNULIB_UNLOCKPT=0; + GNULIB_UNSETENV=0; + GNULIB_WCTOMB=0; + HAVE__EXIT=1; + HAVE_ATOLL=1; + HAVE_CANONICALIZE_FILE_NAME=1; + HAVE_DECL_GETLOADAVG=1; + HAVE_GETSUBOPT=1; + HAVE_GRANTPT=1; + HAVE_MKDTEMP=1; + HAVE_MKOSTEMP=1; + HAVE_MKOSTEMPS=1; + HAVE_MKSTEMP=1; + HAVE_MKSTEMPS=1; + HAVE_PTSNAME=1; + HAVE_RANDOM_H=1; + HAVE_RANDOM_R=1; + HAVE_REALPATH=1; + HAVE_RPMATCH=1; + HAVE_SETENV=1; + HAVE_DECL_SETENV=1; + HAVE_STRTOD=1; + HAVE_STRTOLL=1; + HAVE_STRTOULL=1; + HAVE_STRUCT_RANDOM_DATA=1; + HAVE_SYS_LOADAVG_H=0; + HAVE_UNLOCKPT=1; + HAVE_DECL_UNSETENV=1; + REPLACE_CALLOC=0; + REPLACE_CANONICALIZE_FILE_NAME=0; + REPLACE_MALLOC=0; + REPLACE_MBTOWC=0; + REPLACE_MKSTEMP=0; + REPLACE_PUTENV=0; + REPLACE_REALLOC=0; + REPLACE_REALPATH=0; + REPLACE_SETENV=0; + REPLACE_STRTOD=0; + REPLACE_UNSETENV=0; + REPLACE_WCTOMB=0; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 +$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } +if test "${gl_cv_have_include_next+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + rm -rf conftestd1a conftestd1b conftestd2 + mkdir conftestd1a conftestd1b conftestd2 + cat < conftestd1a/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat < conftestd1b/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat < conftestd2/conftest.h +#ifndef DEFINED_IN_CONFTESTD1 +#error "include_next test doesn't work" +#endif +#define DEFINED_IN_CONFTESTD2 +EOF + gl_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_have_include_next=yes +else + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_have_include_next=buggy +else + gl_cv_have_include_next=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="$gl_save_CPPFLAGS" + rm -rf conftestd1a conftestd1b conftestd2 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 +$as_echo "$gl_cv_have_include_next" >&6; } + PRAGMA_SYSTEM_HEADER= + if test $gl_cv_have_include_next = yes; then + INCLUDE_NEXT=include_next + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + if test -n "$GCC"; then + PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' + fi + else + if test $gl_cv_have_include_next = buggy; then + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + else + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include + fi + fi - gl_source_base='lib' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 +$as_echo_n "checking whether system header files limit the line length... " >&6; } +if test "${gl_cv_pragma_columns+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __TANDEM +choke me +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "choke me" >/dev/null 2>&1; then : + gl_cv_pragma_columns=yes +else + gl_cv_pragma_columns=no +fi +rm -f conftest* - : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 +$as_echo "$gl_cv_pragma_columns" >&6; } + if test $gl_cv_pragma_columns = yes; then + PRAGMA_COLUMNS="#pragma COLUMNS 10000" + else + PRAGMA_COLUMNS= + fi - : @@ -16695,553 +16476,1322 @@ fi -# Persuade glibc to declare getloadavg(). -gl_save_LIBS=$LIBS -# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, -# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. -HAVE_GETLOADAVG=1 -ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = x""yes; then : -else - gl_func_getloadavg_done=no - # Some systems with -lutil have (and need) -lkvm as well, some do not. - # On Solaris, -lkvm requires nlist from -lelf, so check that first - # to get the right answer into the cache. - # For kstat on solaris, we need to test for libelf and libkvm to force the - # definition of SVR4 below. - if test $gl_func_getloadavg_done = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 -$as_echo_n "checking for elf_begin in -lelf... " >&6; } -if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : + if test $gl_cv_have_include_next = yes; then + gl_cv_next_getopt_h='<'getopt.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_getopt_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelf $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char elf_begin (); -int -main () -{ -return elf_begin (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_elf_elf_begin=yes -else - ac_cv_lib_elf_elf_begin=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 -$as_echo "$ac_cv_lib_elf_elf_begin" >&6; } -if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : - LIBS="-lelf $LIBS" -fi + if test $ac_cv_header_getopt_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 -$as_echo_n "checking for kvm_open in -lkvm... " >&6; } -if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkvm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kvm_open (); +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/getopt.h#{ + s#.*"\(.*/getopt.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_getopt_h='<'getopt.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 +$as_echo "$gl_cv_next_getopt_h" >&6; } + fi + NEXT_GETOPT_H=$gl_cv_next_getopt_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'getopt.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_getopt_h + fi + NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_getopt_h = yes; then + HAVE_GETOPT_H=1 + else + HAVE_GETOPT_H=0 + fi + + + gl_replace_getopt= + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + for ac_header in getopt.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_H 1 +_ACEOF + +else + gl_replace_getopt=yes +fi + +done + + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + for ac_func in getopt_long_only +do : + ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" +if test "x$ac_cv_func_getopt_long_only" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_LONG_ONLY 1 +_ACEOF + +else + gl_replace_getopt=yes +fi +done + + fi + + if test -z "$gl_replace_getopt"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 +$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } +if test "${gl_cv_func_getopt_posix+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { -return kvm_open (); +int *p = &optreset; return optreset; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_kvm_kvm_open=yes + gl_optind_min=1 else - ac_cv_lib_kvm_kvm_open=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return !getopt_clip; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_optind_min=1 +else + gl_optind_min=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 -$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } -if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : - LIBS="-lkvm $LIBS" -fi - # Check for the 4.4BSD definition of getloadavg. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 -$as_echo_n "checking for getloadavg in -lutil... " >&6; } -if test "${ac_cv_lib_util_getloadavg+set}" = set; then : - $as_echo_n "(cached) " >&6 + gl_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) gl_cv_func_getopt_posix="guessing no";; + darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; + esac + else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lutil $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getloadavg (); +#include +#include +#include + int main () { -return getloadavg (); - ; + { + static char program[] = "program"; + static char a[] = "-a"; + static char foo[] = "foo"; + static char bar[] = "bar"; + char *argv[] = { program, a, foo, bar, NULL }; + int c; + + optind = OPTIND_MIN; + opterr = 0; + + c = getopt (4, argv, "ab"); + if (!(c == 'a')) + return 1; + c = getopt (4, argv, "ab"); + if (!(c == -1)) + return 2; + if (!(optind == 2)) + return 3; + } + /* Some internal state exists at this point. */ + { + static char program[] = "program"; + static char donald[] = "donald"; + static char p[] = "-p"; + static char billy[] = "billy"; + static char duck[] = "duck"; + static char a[] = "-a"; + static char bar[] = "bar"; + char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; + int c; + + optind = OPTIND_MIN; + opterr = 0; + + c = getopt (7, argv, "+abp:q:"); + if (!(c == -1)) + return 4; + if (!(strcmp (argv[0], "program") == 0)) + return 5; + if (!(strcmp (argv[1], "donald") == 0)) + return 6; + if (!(strcmp (argv[2], "-p") == 0)) + return 7; + if (!(strcmp (argv[3], "billy") == 0)) + return 8; + if (!(strcmp (argv[4], "duck") == 0)) + return 9; + if (!(strcmp (argv[5], "-a") == 0)) + return 10; + if (!(strcmp (argv[6], "bar") == 0)) + return 11; + if (!(optind == 1)) + return 12; + } + /* Detect MacOS 10.5, AIX 7.1 bug. */ + { + static char program[] = "program"; + static char ab[] = "-ab"; + char *argv[3] = { program, ab, NULL }; + optind = OPTIND_MIN; + opterr = 0; + if (getopt (2, argv, "ab:") != 'a') + return 13; + if (getopt (2, argv, "ab:") != '?') + return 14; + if (optopt != 'b') + return 15; + if (optind != 2) + return 16; + } + return 0; } + _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_util_getloadavg=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=yes else - ac_cv_lib_util_getloadavg=no + gl_cv_func_getopt_posix=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 -$as_echo "$ac_cv_lib_util_getloadavg" >&6; } -if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : - LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes + + CPPFLAGS=$gl_save_CPPFLAGS + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 +$as_echo "$gl_cv_func_getopt_posix" >&6; } + case "$gl_cv_func_getopt_posix" in + *no) gl_replace_getopt=yes ;; + esac + fi - fi + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 +$as_echo_n "checking for working GNU getopt function... " >&6; } +if test "${gl_cv_func_getopt_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the + # optstring is necessary for programs like m4 that have POSIX-mandated + # semantics for supporting options interspersed with files. + # Also, since getopt_long is a GNU extension, we require optind=0. + # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; + # so take care to revert to the correct (non-)export state. + gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' + case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + +int +main () +{ + + int result = 0; + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, + and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, + OSF/1 5.1, Solaris 10. */ + { + static char conftest[] = "conftest"; + static char plus[] = "-+"; + char *argv[3] = { conftest, plus, NULL }; + opterr = 0; + if (getopt (2, argv, "+a") != '?') + result |= 1; + } + /* This code succeeds on glibc 2.8, mingw, + and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, + IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ + { + static char program[] = "program"; + static char p[] = "-p"; + static char foo[] = "foo"; + static char bar[] = "bar"; + char *argv[] = { program, p, foo, bar, NULL }; + + optind = 1; + if (getopt (4, argv, "p::") != 'p') + result |= 2; + else if (optarg != NULL) + result |= 4; + else if (getopt (4, argv, "p::") != -1) + result |= 6; + else if (optind != 2) + result |= 8; + } + /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ + { + static char program[] = "program"; + static char foo[] = "foo"; + static char p[] = "-p"; + char *argv[] = { program, foo, p, NULL }; + optind = 0; + if (getopt (3, argv, "-p") != 1) + result |= 16; + else if (getopt (3, argv, "-p") != 'p') + result |= 32; + } + /* This code fails on glibc 2.11. */ + { + static char program[] = "program"; + static char b[] = "-b"; + static char a[] = "-a"; + char *argv[] = { program, b, a, NULL }; + optind = opterr = 0; + if (getopt (3, argv, "+:a:b") != 'b') + result |= 64; + else if (getopt (3, argv, "+:a:b") != ':') + result |= 64; + } + /* This code dumps core on glibc 2.14. */ + { + static char program[] = "program"; + static char w[] = "-W"; + static char dummy[] = "dummy"; + char *argv[] = { program, w, dummy, NULL }; + optind = opterr = 1; + if (getopt (3, argv, "W;") != 'W') + result |= 128; + } + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_gnu=yes +else + gl_cv_func_getopt_gnu=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + case $gl_had_POSIXLY_CORRECT in + exported) ;; + yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; + *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 +$as_echo "$gl_cv_func_getopt_gnu" >&6; } + if test "$gl_cv_func_getopt_gnu" = "no"; then + gl_replace_getopt=yes + fi + fi + + + + + + REPLACE_GETOPT=0 + + + if test -n "$gl_replace_getopt"; then : + + REPLACE_GETOPT=1 + +fi + + + if test $REPLACE_GETOPT = 1; then + + GETOPT_H=getopt.h + +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + + GNULIB_UNISTD_H_GETOPT=1 + fi + +ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_getenv" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETENV $ac_have_decl +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if test "${ac_cv_type_long_long_int+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main () +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +$as_echo "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + + + + gl_cv_c_multiarch=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_c_multiarch = yes; then + APPLE_UNIVERSAL_BUILD=1 + else + APPLE_UNIVERSAL_BUILD=0 + fi + + + + + + if test $ac_cv_type_long_long_int = yes; then + HAVE_LONG_LONG_INT=1 + else + HAVE_LONG_LONG_INT=0 + fi + + + if test $ac_cv_type_unsigned_long_long_int = yes; then + HAVE_UNSIGNED_LONG_LONG_INT=1 + else + HAVE_UNSIGNED_LONG_LONG_INT=0 + fi + + + + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi + + + if test $ac_cv_header_inttypes_h = yes; then + HAVE_INTTYPES_H=1 + else + HAVE_INTTYPES_H=0 + fi + + + if test $ac_cv_header_sys_types_h = yes; then + HAVE_SYS_TYPES_H=1 + else + HAVE_SYS_TYPES_H=0 + fi + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdint_h='<'stdint.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_stdint_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_stdint_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdint.h#{ + s#.*"\(.*/stdint.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_stdint_h='<'stdint.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 +$as_echo "$gl_cv_next_stdint_h" >&6; } + fi + NEXT_STDINT_H=$gl_cv_next_stdint_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdint.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdint_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_stdint_h = yes; then + HAVE_STDINT_H=1 + else + HAVE_STDINT_H=0 + fi + + + if test $ac_cv_header_stdint_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 +$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } +if test "${gl_cv_header_working_stdint_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_header_working_stdint_h=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include +/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ +#if !(defined WCHAR_MIN && defined WCHAR_MAX) +#error "WCHAR_MIN, WCHAR_MAX not defined in " +#endif + + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + +#ifdef INT8_MAX +int8_t a1 = INT8_MAX; +int8_t a1min = INT8_MIN; +#endif +#ifdef INT16_MAX +int16_t a2 = INT16_MAX; +int16_t a2min = INT16_MIN; +#endif +#ifdef INT32_MAX +int32_t a3 = INT32_MAX; +int32_t a3min = INT32_MIN; +#endif +#ifdef INT64_MAX +int64_t a4 = INT64_MAX; +int64_t a4min = INT64_MIN; +#endif +#ifdef UINT8_MAX +uint8_t b1 = UINT8_MAX; +#else +typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; +#endif +#ifdef UINT16_MAX +uint16_t b2 = UINT16_MAX; +#endif +#ifdef UINT32_MAX +uint32_t b3 = UINT32_MAX; +#endif +#ifdef UINT64_MAX +uint64_t b4 = UINT64_MAX; +#endif +int_least8_t c1 = INT8_C (0x7f); +int_least8_t c1max = INT_LEAST8_MAX; +int_least8_t c1min = INT_LEAST8_MIN; +int_least16_t c2 = INT16_C (0x7fff); +int_least16_t c2max = INT_LEAST16_MAX; +int_least16_t c2min = INT_LEAST16_MIN; +int_least32_t c3 = INT32_C (0x7fffffff); +int_least32_t c3max = INT_LEAST32_MAX; +int_least32_t c3min = INT_LEAST32_MIN; +int_least64_t c4 = INT64_C (0x7fffffffffffffff); +int_least64_t c4max = INT_LEAST64_MAX; +int_least64_t c4min = INT_LEAST64_MIN; +uint_least8_t d1 = UINT8_C (0xff); +uint_least8_t d1max = UINT_LEAST8_MAX; +uint_least16_t d2 = UINT16_C (0xffff); +uint_least16_t d2max = UINT_LEAST16_MAX; +uint_least32_t d3 = UINT32_C (0xffffffff); +uint_least32_t d3max = UINT_LEAST32_MAX; +uint_least64_t d4 = UINT64_C (0xffffffffffffffff); +uint_least64_t d4max = UINT_LEAST64_MAX; +int_fast8_t e1 = INT_FAST8_MAX; +int_fast8_t e1min = INT_FAST8_MIN; +int_fast16_t e2 = INT_FAST16_MAX; +int_fast16_t e2min = INT_FAST16_MIN; +int_fast32_t e3 = INT_FAST32_MAX; +int_fast32_t e3min = INT_FAST32_MIN; +int_fast64_t e4 = INT_FAST64_MAX; +int_fast64_t e4min = INT_FAST64_MIN; +uint_fast8_t f1 = UINT_FAST8_MAX; +uint_fast16_t f2 = UINT_FAST16_MAX; +uint_fast32_t f3 = UINT_FAST32_MAX; +uint_fast64_t f4 = UINT_FAST64_MAX; +#ifdef INTPTR_MAX +intptr_t g = INTPTR_MAX; +intptr_t gmin = INTPTR_MIN; +#endif +#ifdef UINTPTR_MAX +uintptr_t h = UINTPTR_MAX; +#endif +intmax_t i = INTMAX_MAX; +uintmax_t j = UINTMAX_MAX; + +#include /* for CHAR_BIT */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) +struct s { + int check_PTRDIFF: + PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) + && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) + ? 1 : -1; + /* Detect bug in FreeBSD 6.0 / ia64. */ + int check_SIG_ATOMIC: + SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) + && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) + ? 1 : -1; + int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; + int check_WCHAR: + WCHAR_MIN == TYPE_MINIMUM (wchar_t) + && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) + ? 1 : -1; + /* Detect bug in mingw. */ + int check_WINT: + WINT_MIN == TYPE_MINIMUM (wint_t) + && WINT_MAX == TYPE_MAXIMUM (wint_t) + ? 1 : -1; - if test $gl_func_getloadavg_done = no; then - # There is a commonly available library for RS/6000 AIX. - # Since it is not a standard part of AIX, it might be installed locally. - gl_getloadavg_LIBS=$LIBS - LIBS="-L/usr/local/lib $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 -$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } -if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgetloadavg $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ + int check_UINT8_C: + (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; + int check_UINT16_C: + (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" + /* Detect bugs in OpenBSD 3.9 stdint.h. */ +#ifdef UINT8_MAX + int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif -char getloadavg (); +#ifdef UINT16_MAX + int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; +#endif +#ifdef UINT32_MAX + int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; +#endif +#ifdef UINT64_MAX + int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; +#endif + int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; + int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; + int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; + int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; + int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; + int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; + int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; + int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; + int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; + int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; + int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; +}; + int main () { -return getloadavg (); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_getloadavg_getloadavg=yes -else - ac_cv_lib_getloadavg_getloadavg=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 -$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } -if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : - LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes -else - LIBS=$gl_getloadavg_LIBS -fi - - fi - - # Set up the replacement function if necessary. - if test $gl_func_getloadavg_done = no; then - HAVE_GETLOADAVG=0 +if ac_fn_c_try_compile "$LINENO"; then : + if test "$cross_compiling" = yes; then : + gl_cv_header_working_stdint_h=yes - # Solaris has libkstat which does not require root. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 -$as_echo_n "checking for kstat_open in -lkstat... " >&6; } -if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : - $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkstat $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kstat_open (); -int -main () -{ -return kstat_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_kstat_kstat_open=yes -else - ac_cv_lib_kstat_kstat_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 -$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } -if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBKSTAT 1 -_ACEOF - LIBS="-lkstat $LIBS" +#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include -fi - test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif - # AIX has libperfstat which does not require root - if test $gl_func_getloadavg_done = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 -$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } -if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lperfstat $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#include +#include +#define MVAL(macro) MVAL1(macro) +#define MVAL1(expression) #expression +static const char *macro_values[] = + { +#ifdef INT8_MAX + MVAL (INT8_MAX), #endif -char perfstat_cpu_total (); +#ifdef INT16_MAX + MVAL (INT16_MAX), +#endif +#ifdef INT32_MAX + MVAL (INT32_MAX), +#endif +#ifdef INT64_MAX + MVAL (INT64_MAX), +#endif +#ifdef UINT8_MAX + MVAL (UINT8_MAX), +#endif +#ifdef UINT16_MAX + MVAL (UINT16_MAX), +#endif +#ifdef UINT32_MAX + MVAL (UINT32_MAX), +#endif +#ifdef UINT64_MAX + MVAL (UINT64_MAX), +#endif + NULL + }; + int main () { -return perfstat_cpu_total (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_perfstat_perfstat_cpu_total=yes -else - ac_cv_lib_perfstat_perfstat_cpu_total=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 -$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } -if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPERFSTAT 1 -_ACEOF - LIBS="-lperfstat $LIBS" - -fi - - test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes - fi - - if test $gl_func_getloadavg_done = no; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : - gl_func_getloadavg_done=yes - -$as_echo "#define DGUX 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 -$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } -if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldgc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + const char **mv; + for (mv = macro_values; *mv != NULL; mv++) + { + const char *value = *mv; + /* Test whether it looks like a cast expression. */ + if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 + || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 + || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 + || strncmp (value, "((int)"/*)*/, 6) == 0 + || strncmp (value, "((signed short)"/*)*/, 15) == 0 + || strncmp (value, "((signed char)"/*)*/, 14) == 0) + return mv - macro_values + 1; + } + return 0; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dg_sys_info (); -int -main () -{ -return dg_sys_info (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dgc_dg_sys_info=yes -else - ac_cv_lib_dgc_dg_sys_info=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 -$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } -if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDGC 1 -_ACEOF - - LIBS="-ldgc $LIBS" - +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_header_working_stdint_h=yes fi - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi - fi fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test "x$gl_save_LIBS" = x; then - GETLOADAVG_LIBS=$LIBS -else - GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` fi -LIBS=$gl_save_LIBS - - -# Test whether the system declares getloadavg. Solaris has the function -# but declares it in , not . -for ac_header in sys/loadavg.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 +$as_echo "$gl_cv_header_working_stdint_h" >&6; } + fi + if test "$gl_cv_header_working_stdint_h" = yes; then + STDINT_H= + else + for ac_header in sys/inttypes.h sys/bitypes.h do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_LOADAVG_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -if test $ac_cv_header_sys_loadavg_h = yes; then - HAVE_SYS_LOADAVG_H=1 -else - HAVE_SYS_LOADAVG_H=0 -fi -ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H - # include - #endif - #include -" -if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : - -else - HAVE_DECL_GETLOADAVG=0 -fi - - -if test $HAVE_GETLOADAVG = 0; then - - + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + else + HAVE_SYS_INTTYPES_H=0 + fi + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + else + HAVE_SYS_BITYPES_H=0 + fi + if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" + for gltype in ptrdiff_t size_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 +$as_echo_n "checking for bit size of $gltype... " >&6; } +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif -# Figure out what our getloadavg.c needs. +#include "; then : -# On HPUX9, an unprivileged user can get load averages this way. -if test $gl_func_getloadavg_done = no; then - for ac_func in pstat_getdynamic -do : - ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" -if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PSTAT_GETDYNAMIC 1 -_ACEOF - gl_func_getloadavg_done=yes +else + result=unknown fi -done -fi + eval gl_cv_bitsizeof_${gltype}=\$result -# We cannot check for , because Solaris 2 does not use dwarf (it -# uses stabs), but it is still SVR4. We cannot check for because -# Irix 4.0.5F has the header but not the library. -if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ - && test "$ac_cv_lib_kvm_kvm_open" = yes; then - gl_func_getloadavg_done=yes +fi +eval ac_res=\$gl_cv_bitsizeof_${gltype} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + cat >>confdefs.h <<_ACEOF +#define BITSIZEOF_${GLTYPE} $result +_ACEOF -$as_echo "#define SVR4 1" >>confdefs.h + eval BITSIZEOF_${GLTYPE}=\$result + done -fi -if test $gl_func_getloadavg_done = no; then - ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : - gl_func_getloadavg_done=yes + fi -$as_echo "#define UMAX 1" >>confdefs.h + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 +$as_echo_n "checking for bit size of $gltype... " >&6; } +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif -$as_echo "#define UMAX4_3 1" >>confdefs.h +#include "; then : +else + result=unknown fi + eval gl_cv_bitsizeof_${gltype}=\$result fi +eval ac_res=\$gl_cv_bitsizeof_${gltype} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + cat >>confdefs.h <<_ACEOF +#define BITSIZEOF_${GLTYPE} $result +_ACEOF -if test $gl_func_getloadavg_done = no; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : - gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h + eval BITSIZEOF_${GLTYPE}=\$result + done -fi -fi -if test $gl_func_getloadavg_done = no; then - for ac_header in mach/mach.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_MACH_H 1 -_ACEOF + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 +$as_echo_n "checking whether $gltype is signed... " >&6; } +if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif -done + int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + result=yes +else + result=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval gl_cv_type_${gltype}_signed=\$result -for ac_header in nlist.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" -if test "x$ac_cv_header_nlist_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NLIST_H 1 +fi +eval ac_res=\$gl_cv_type_${gltype}_signed + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_type_${gltype}_signed + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + if test "$result" = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGNED_${GLTYPE} 1 _ACEOF - ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include -" -if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 -_ACEOF + eval HAVE_SIGNED_${GLTYPE}=1 + else + eval HAVE_SIGNED_${GLTYPE}=0 + fi + done -fi + gl_cv_type_ptrdiff_t_signed=yes + gl_cv_type_size_t_signed=no + if test $APPLE_UNIVERSAL_BUILD = 0; then + - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + for gltype in ptrdiff_t size_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 +$as_echo_n "checking for $gltype integer literal suffix... " >&6; } +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval gl_cv_type_${gltype}_suffix=no + eval result=\$gl_cv_type_${gltype}_signed + if test "$result" = yes; then + glsufu= + else + glsufu=u + fi + for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do + case $glsuf in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + extern $gltype foo; + extern $gltype1 foo; int main () { -struct nlist x; - #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME - x.n_un.n_name = ""; - #else - x.n_name = ""; - #endif + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define N_NAME_POINTER 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - +if ac_fn_c_try_compile "$LINENO"; then : + eval gl_cv_type_${gltype}_suffix=\$glsuf fi - -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done fi +eval ac_res=\$gl_cv_type_${gltype}_suffix + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + cat >>confdefs.h <<_ACEOF +#define ${GLTYPE}_SUFFIX $result +_ACEOF + done + fi - GNULIB_GETLOADAVG=1 - - - - - - + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 +$as_echo_n "checking for $gltype integer literal suffix... " >&6; } +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval gl_cv_type_${gltype}_suffix=no + eval result=\$gl_cv_type_${gltype}_signed + if test "$result" = yes; then + glsufu= + else + glsufu=u + fi + for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do + case $glsuf in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + extern $gltype foo; + extern $gltype1 foo; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval gl_cv_type_${gltype}_suffix=\$glsuf +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done +fi +eval ac_res=\$gl_cv_type_${gltype}_suffix + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + cat >>confdefs.h <<_ACEOF +#define ${GLTYPE}_SUFFIX $result +_ACEOF -if test $REPLACE_GETOPT = 1; then + done + STDINT_H=stdint.h + fi + if test -n "$STDINT_H"; then + GL_GENERATE_STDINT_H_TRUE= + GL_GENERATE_STDINT_H_FALSE='#' +else + GL_GENERATE_STDINT_H_TRUE='#' + GL_GENERATE_STDINT_H_FALSE= +fi - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + GNULIB_IMAXABS=0; + GNULIB_IMAXDIV=0; + GNULIB_STRTOIMAX=0; + GNULIB_STRTOUMAX=0; + HAVE_DECL_IMAXABS=1; + HAVE_DECL_IMAXDIV=1; + HAVE_DECL_STRTOIMAX=1; + HAVE_DECL_STRTOUMAX=1; + INT32_MAX_LT_INTMAX_MAX=1; + INT64_MAX_EQ_LONG_MAX='defined _LP64'; + PRI_MACROS_BROKEN=0; + PRIPTR_PREFIX=__PRIPTR_PREFIX; + UINT32_MAX_LT_UINTMAX_MAX=1; + UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; @@ -17250,39 +17800,61 @@ if test $REPLACE_GETOPT = 1; then - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" -fi + if test $gl_cv_have_include_next = yes; then + gl_cv_next_inttypes_h='<'inttypes.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_inttypes_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test $ac_cv_header_inttypes_h = yes; then - REPLACE_GETOPT=0 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - if test -n "$gl_replace_getopt"; then : +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/inttypes.h#{ + s#.*"\(.*/inttypes.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_inttypes_h='<'inttypes.h'>' + fi - REPLACE_GETOPT=1 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 +$as_echo "$gl_cv_next_inttypes_h" >&6; } + fi + NEXT_INTTYPES_H=$gl_cv_next_inttypes_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'inttypes.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_inttypes_h + fi + NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive - if test $REPLACE_GETOPT = 1; then - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - GNULIB_UNISTD_H_GETOPT=1 - fi - -if test $REPLACE_GETOPT = 1; then @@ -17290,579 +17862,638 @@ if test $REPLACE_GETOPT = 1; then +$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + GNULIB_FCHMODAT=0; + GNULIB_FSTATAT=0; + GNULIB_FUTIMENS=0; + GNULIB_LCHMOD=0; + GNULIB_LSTAT=0; + GNULIB_MKDIRAT=0; + GNULIB_MKFIFO=0; + GNULIB_MKFIFOAT=0; + GNULIB_MKNOD=0; + GNULIB_MKNODAT=0; + GNULIB_STAT=0; + GNULIB_UTIMENSAT=0; + HAVE_FCHMODAT=1; + HAVE_FSTATAT=1; + HAVE_FUTIMENS=1; + HAVE_LCHMOD=1; + HAVE_LSTAT=1; + HAVE_MKDIRAT=1; + HAVE_MKFIFO=1; + HAVE_MKFIFOAT=1; + HAVE_MKNOD=1; + HAVE_MKNODAT=1; + HAVE_UTIMENSAT=1; + REPLACE_FSTAT=0; + REPLACE_FSTATAT=0; + REPLACE_FUTIMENS=0; + REPLACE_LSTAT=0; + REPLACE_MKDIR=0; + REPLACE_MKFIFO=0; + REPLACE_MKNOD=0; + REPLACE_STAT=0; + REPLACE_UTIMENSAT=0; - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + rm -f conftest.sym conftest.file + echo >conftest.file + if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then + if test "$cross_compiling" = yes; then : + # When cross-compiling, be pessimistic so we will end up using the + # replacement version of lstat that checks for trailing slashes and + # calls lstat a second time when necessary. + gl_cv_func_lstat_dereferences_slashed_symlink=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +struct stat sbuf; + /* Linux will dereference the symlink and fail, as required by + POSIX. That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_lstat_dereferences_slashed_symlink=yes +else + gl_cv_func_lstat_dereferences_slashed_symlink=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + else + # If the 'ln -s' command failed, then we probably don't even + # have an lstat function. + gl_cv_func_lstat_dereferences_slashed_symlink=no + fi + rm -f conftest.sym conftest.file fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 +$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } + test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && +cat >>confdefs.h <<_ACEOF +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +_ACEOF + GNULIB_MKTIME=0; + GNULIB_NANOSLEEP=0; + GNULIB_STRPTIME=0; + GNULIB_TIMEGM=0; + GNULIB_TIME_R=0; + HAVE_DECL_LOCALTIME_R=1; + HAVE_NANOSLEEP=1; + HAVE_STRPTIME=1; + HAVE_TIMEGM=1; + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; + REPLACE_MKTIME=GNULIB_PORTCHECK; + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; + REPLACE_TIMEGM=GNULIB_PORTCHECK; - if test $ac_cv_func_lstat = yes; then - if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then - REPLACE_LSTAT=1 - fi - else - HAVE_LSTAT=0 - fi -if test $REPLACE_LSTAT = 1; then + GNULIB_PTHREAD_SIGMASK=0; + GNULIB_SIGNAL_H_SIGPIPE=0; + GNULIB_SIGPROCMASK=0; + GNULIB_SIGACTION=0; + HAVE_POSIX_SIGNALBLOCKING=1; + HAVE_PTHREAD_SIGMASK=1; + HAVE_SIGSET_T=1; + HAVE_SIGINFO_T=1; + HAVE_SIGACTION=1; + HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; + HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; + HAVE_SIGHANDLER_T=1; + REPLACE_PTHREAD_SIGMASK=0; - gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " + #include + /* Mingw defines sigset_t not in , but in . */ + #include +" +if test "x$ac_cv_type_sigset_t" = x""yes; then : - : +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGSET_T 1 +_ACEOF +gl_cv_type_sigset_t=yes +else + gl_cv_type_sigset_t=no fi - - - - - GNULIB_LSTAT=1 - - + if test $gl_cv_type_sigset_t != yes; then + HAVE_SIGSET_T=0 + fi + if test $ac_cv_header_sys_socket_h = no; then + for ac_header in ws2tcpip.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" +if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 +_ACEOF +fi +done + fi - if test $APPLE_UNIVERSAL_BUILD = 1; then - # A universal build on Apple MacOS X platforms. - # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. - # But we need a configuration result that is valid in both modes. - gl_cv_func_working_mktime=no - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 -$as_echo_n "checking for working mktime... " >&6; } -if test "${gl_cv_func_working_mktime+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if test "${ac_cv_header_stdbool_h+set}" = set; then : $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_working_mktime=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Test program from Paul Eggert and Tony Leneis. */ -#include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifndef HAVE_ALARM -# define alarm(X) /* empty */ -#endif - -/* Work around redefinition to rpl_putenv by other config tests. */ -#undef putenv - -static time_t time_t_max; -static time_t time_t_min; - -/* Values we'll use to set the TZ environment variable. */ -static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) - -/* Return 0 if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static int -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test. */ - struct tm tm; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - return mktime (&tm) != (time_t) -1; -} - -static int -mktime_test1 (time_t now) -{ - struct tm *lt; - return ! (lt = localtime (&now)) || mktime (lt) == now; -} - -static int -mktime_test (time_t now) -{ - return (mktime_test1 (now) - && mktime_test1 ((time_t) (time_t_max - now)) - && mktime_test1 ((time_t) (time_t_min + now))); -} - -static int -irix_6_4_bug () -{ - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - return tm.tm_mon == 2 && tm.tm_mday == 31; -} - -static int -bigtime_test (int j) -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - return 0; - } - return 1; -} - -static int -year_2050_test () -{ - /* The correct answer for 2050-02-01 00:00:00 in Pacific time, - ignoring leap seconds. */ - unsigned long int answer = 2527315200UL; - - struct tm tm; - time_t t; - tm.tm_year = 2050 - 1900; - tm.tm_mon = 2 - 1; - tm.tm_mday = 1; - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - tm.tm_isdst = -1; - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif - t = mktime (&tm); + struct s { _Bool s: 1; _Bool t; } s; - /* Check that the result is either a failure, or close enough - to the correct answer that we can assume the discrepancy is - due to leap seconds. */ - return (t == (time_t) -1 - || (0 < t && answer - 120 <= t && t <= answer + 120)); -} + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; int main () { - int result = 0; - time_t t, delta; - int i, j; - int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; - int time_t_signed = ! ((time_t) 0 < (time_t) -1); - - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - - time_t_max = (! time_t_signed - ? (time_t) -1 - : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) - * 2 + 1)); - time_t_min = (! time_t_signed - ? (time_t) 0 - : time_t_signed_magnitude - ? ~ (time_t) 0 - : ~ time_t_max); - - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - for (t = 0; t <= time_t_max - delta; t += delta) - if (! mktime_test (t)) - result |= 1; - if (! (mktime_test ((time_t) 1) - && mktime_test ((time_t) (60 * 60)) - && mktime_test ((time_t) (60 * 60 * 24)))) - result |= 2; + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); - for (j = 1; ; j <<= 1) - if (! bigtime_test (j)) - result |= 4; - else if (INT_MAX / 2 < j) - break; - if (! bigtime_test (INT_MAX)) - result |= 8; - } - if (! irix_6_4_bug ()) - result |= 16; - if (! spring_forward_gap ()) - result |= 32; - if (! year_2050_test ()) - result |= 64; - return result; + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_working_mktime=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes else - gl_cv_func_working_mktime=no + ac_cv_header_stdbool_h=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 -$as_echo "$gl_cv_func_working_mktime" >&6; } - if test $gl_cv_func_working_mktime = no; then - REPLACE_MKTIME=1 - else - REPLACE_MKTIME=0 - fi -if test $REPLACE_MKTIME = 1; then + REPLACE_NULL=0; + HAVE_WCHAR_T=1; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +$as_echo_n "checking for wchar_t... " >&6; } +if test "${gt_cv_c_wchar_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wchar_t=yes +else + gt_cv_c_wchar_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +$as_echo "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then +$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + fi - gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" + GNULIB_DPRINTF=0; + GNULIB_FCLOSE=0; + GNULIB_FFLUSH=0; + GNULIB_FGETC=0; + GNULIB_FGETS=0; + GNULIB_FOPEN=0; + GNULIB_FPRINTF=0; + GNULIB_FPRINTF_POSIX=0; + GNULIB_FPURGE=0; + GNULIB_FPUTC=0; + GNULIB_FPUTS=0; + GNULIB_FREAD=0; + GNULIB_FREOPEN=0; + GNULIB_FSCANF=0; + GNULIB_FSEEK=0; + GNULIB_FSEEKO=0; + GNULIB_FTELL=0; + GNULIB_FTELLO=0; + GNULIB_FWRITE=0; + GNULIB_GETC=0; + GNULIB_GETCHAR=0; + GNULIB_GETDELIM=0; + GNULIB_GETLINE=0; + GNULIB_GETS=0; + GNULIB_OBSTACK_PRINTF=0; + GNULIB_OBSTACK_PRINTF_POSIX=0; + GNULIB_PERROR=0; + GNULIB_POPEN=0; + GNULIB_PRINTF=0; + GNULIB_PRINTF_POSIX=0; + GNULIB_PUTC=0; + GNULIB_PUTCHAR=0; + GNULIB_PUTS=0; + GNULIB_REMOVE=0; + GNULIB_RENAME=0; + GNULIB_RENAMEAT=0; + GNULIB_SCANF=0; + GNULIB_SNPRINTF=0; + GNULIB_SPRINTF_POSIX=0; + GNULIB_STDIO_H_NONBLOCKING=0; + GNULIB_STDIO_H_SIGPIPE=0; + GNULIB_TMPFILE=0; + GNULIB_VASPRINTF=0; + GNULIB_VFSCANF=0; + GNULIB_VSCANF=0; + GNULIB_VDPRINTF=0; + GNULIB_VFPRINTF=0; + GNULIB_VFPRINTF_POSIX=0; + GNULIB_VPRINTF=0; + GNULIB_VPRINTF_POSIX=0; + GNULIB_VSNPRINTF=0; + GNULIB_VSPRINTF_POSIX=0; + HAVE_DECL_FPURGE=1; + HAVE_DECL_FSEEKO=1; + HAVE_DECL_FTELLO=1; + HAVE_DECL_GETDELIM=1; + HAVE_DECL_GETLINE=1; + HAVE_DECL_OBSTACK_PRINTF=1; + HAVE_DECL_SNPRINTF=1; + HAVE_DECL_VSNPRINTF=1; + HAVE_DPRINTF=1; + HAVE_FSEEKO=1; + HAVE_FTELLO=1; + HAVE_RENAMEAT=1; + HAVE_VASPRINTF=1; + HAVE_VDPRINTF=1; + REPLACE_DPRINTF=0; + REPLACE_FCLOSE=0; + REPLACE_FFLUSH=0; + REPLACE_FOPEN=0; + REPLACE_FPRINTF=0; + REPLACE_FPURGE=0; + REPLACE_FREOPEN=0; + REPLACE_FSEEK=0; + REPLACE_FSEEKO=0; + REPLACE_FTELL=0; + REPLACE_FTELLO=0; + REPLACE_GETDELIM=0; + REPLACE_GETLINE=0; + REPLACE_OBSTACK_PRINTF=0; + REPLACE_PERROR=0; + REPLACE_POPEN=0; + REPLACE_PRINTF=0; + REPLACE_REMOVE=0; + REPLACE_RENAME=0; + REPLACE_RENAMEAT=0; + REPLACE_SNPRINTF=0; + REPLACE_SPRINTF=0; + REPLACE_STDIO_READ_FUNCS=0; + REPLACE_STDIO_WRITE_FUNCS=0; + REPLACE_TMPFILE=0; + REPLACE_VASPRINTF=0; + REPLACE_VDPRINTF=0; + REPLACE_VFPRINTF=0; + REPLACE_VPRINTF=0; + REPLACE_VSNPRINTF=0; + REPLACE_VSPRINTF=0; + ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include +" +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : +$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h fi +ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi - GNULIB_MKTIME=1 - - - - +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOIMAX $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOUMAX $ac_have_decl +_ACEOF - if test $ac_cv_func_readlink = no; then - HAVE_READLINK=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 -$as_echo_n "checking whether readlink signature is correct... " >&6; } -if test "${gl_cv_decl_readlink_works+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } +if test "${ac_cv_header_stat_broken+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - /* Cause compilation failure if original declaration has wrong type. */ - ssize_t readlink (const char *, char *, size_t); -int -main () -{ +#include +#include + +#if defined S_ISBLK && defined S_IFDIR +extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; +#endif + +#if defined S_ISBLK && defined S_IFCHR +extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; +#endif + +#if defined S_ISLNK && defined S_IFREG +extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; +#endif + +#if defined S_ISSOCK && defined S_IFREG +extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; +#endif - ; - return 0; -} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_readlink_works=yes + ac_cv_header_stat_broken=no else - gl_cv_decl_readlink_works=no + ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 -$as_echo "$gl_cv_decl_readlink_works" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 -$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } -if test "${gl_cv_func_readlink_works+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 +$as_echo "$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then + +$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if test "${ac_cv_c_restrict+set}" = set; then : $as_echo_n "(cached) " >&6 else - # We have readlink, so assume ln -s works. - ln -s conftest.no-such conftest.link - ln -s conftest.link conftest.lnk2 - if test "$cross_compiling" = yes; then : - gl_cv_func_readlink_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } int main () { -char buf[20]; - return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_readlink_works=yes -else - gl_cv_func_readlink_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.link conftest.lnk2 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 -$as_echo "$gl_cv_func_readlink_works" >&6; } - if test "$gl_cv_func_readlink_works" != yes; then - -$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h - - REPLACE_READLINK=1 - elif test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINK=1 - fi - fi - -if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - - - : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac - GNULIB_READLINK=1 - - - - - - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -/* is not needed according to POSIX, but the - in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include -#if HAVE_SYS_SOCKET_H -# include -#elif HAVE_WS2TCPIP_H -# include -#endif - -" -if test "x$ac_cv_type_socklen_t" = x""yes; then : -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 -$as_echo_n "checking for socklen_t equivalent... " >&6; } - if test "${gl_cv_socklen_t_equiv+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - # Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - gl_cv_socklen_t_equiv= - for arg2 in "struct sockaddr" void; do - for t in int size_t "unsigned int" "long int" "unsigned long int"; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include +#include - int getpeername (int, $arg2 *, $t *); int main () { -$t len; - getpeername (0, 0, &len); +static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_socklen_t_equiv="$t" + gl_cv_sys_struct_timespec_in_time_h=yes +else + gl_cv_sys_struct_timespec_in_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$gl_cv_socklen_t_equiv" != "" && break - done - test "$gl_cv_socklen_t_equiv" != "" && break - done - -fi - - if test "$gl_cv_socklen_t_equiv" = ""; then - as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 -$as_echo "$gl_cv_socklen_t_equiv" >&6; } - -cat >>confdefs.h <<_ACEOF -#define socklen_t $gl_cv_socklen_t_equiv -_ACEOF - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 -$as_echo_n "checking for ssize_t... " >&6; } -if test "${gt_cv_ssize_t+set}" = set; then : + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $gl_cv_sys_struct_timespec_in_time_h = yes; then + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + int main () { -int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x; +static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_ssize_t=yes + gl_cv_sys_struct_timespec_in_sys_time_h=yes else - gt_cv_ssize_t=no + gl_cv_sys_struct_timespec_in_sys_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 -$as_echo "$gt_cv_ssize_t" >&6; } - if test $gt_cv_ssize_t = no; then - -$as_echo "#define ssize_t int" >>confdefs.h - - fi - - - STDARG_H='' - NEXT_STDARG_H='' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 -$as_echo_n "checking for va_copy... " >&6; } - if test "${gl_cv_func_va_copy+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + int main () { - -#ifndef va_copy -void (*func) (va_list, va_list) = va_copy; -#endif - +static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_va_copy=yes + gl_cv_sys_struct_timespec_in_pthread_h=yes else - gl_cv_func_va_copy=no + gl_cv_sys_struct_timespec_in_pthread_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + fi + fi + fi + + + + - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 -$as_echo "$gl_cv_func_va_copy" >&6; } - if test $gl_cv_func_va_copy = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined _AIX && !defined __GNUC__ - AIX vaccine - #endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "vaccine" >/dev/null 2>&1; then : - gl_aixcc=yes -else - gl_aixcc=no -fi -rm -f conftest* - if test $gl_aixcc = yes; then - STDARG_H=stdarg.h @@ -17872,26 +18503,26 @@ rm -f conftest* if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdarg_h='<'stdarg.h'>' + gl_cv_next_time_h='<'time.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdarg_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac - gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdarg.h#{ - s#.*"\(.*/stdarg.h\)".*#\1# + gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/time.h#{ + s#.*"\(.*/time.h\)".*#\1# s#^/[^/]#//&# p q @@ -17899,578 +18530,796 @@ _ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 -$as_echo "$gl_cv_next_stdarg_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 +$as_echo "$gl_cv_next_time_h" >&6; } fi - NEXT_STDARG_H=$gl_cv_next_stdarg_h + NEXT_TIME_H=$gl_cv_next_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdarg.h'>' + gl_next_as_first_directive='<'time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdarg_h + gl_next_as_first_directive=$gl_cv_next_time_h fi - NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive - if test "$gl_cv_next_stdarg_h" = '""'; then - gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' - NEXT_STDARG_H="$gl_cv_next_stdarg_h" - fi - else - saved_as_echo_n="$as_echo_n" - as_echo_n=':' - if test "${gl_cv_func___va_copy+set}" = set; then : - $as_echo_n "(cached) " >&6 + +ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" +if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : + ac_have_decl=1 else + ac_have_decl=0 +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LOCALTIME_R $ac_have_decl +_ACEOF -#ifndef __va_copy -error, bail out -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func___va_copy=yes + + + if false; then + GL_COND_LIBTOOL_TRUE= + GL_COND_LIBTOOL_FALSE='#' else - gl_cv_func___va_copy=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + GL_COND_LIBTOOL_TRUE='#' + GL_COND_LIBTOOL_FALSE= fi - as_echo_n="$saved_as_echo_n" + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_m4_base='m4' - if test $gl_cv_func___va_copy = yes; then -$as_echo "#define va_copy __va_copy" >>confdefs.h - else -$as_echo "#define va_copy gl_va_copy" >>confdefs.h - fi - fi + + + + gl_source_base='lib' + + + if test $ac_cv_func_alloca_works = no; then + : fi - if test -n "$STDARG_H"; then - GL_GENERATE_STDARG_H_TRUE= - GL_GENERATE_STDARG_H_FALSE='#' + # Define an additional variable used in the Makefile substitution. + if test $ac_cv_working_alloca_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 +$as_echo_n "checking for alloca as a compiler built-in... " >&6; } +if test "${gl_cv_rpl_alloca+set}" = set; then : + $as_echo_n "(cached) " >&6 else - GL_GENERATE_STDARG_H_TRUE='#' - GL_GENERATE_STDARG_H_FALSE= -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __GNUC__ || defined _AIX || defined _MSC_VER + Need own alloca +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Need own alloca" >/dev/null 2>&1; then : + gl_cv_rpl_alloca=yes +else + gl_cv_rpl_alloca=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 +$as_echo "$gl_cv_rpl_alloca" >&6; } + if test $gl_cv_rpl_alloca = yes; then - # Define two additional variables used in the Makefile substitution. +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' + ALLOCA_H=alloca.h + else + ALLOCA_H= + fi else - STDBOOL_H='stdbool.h' + ALLOCA_H=alloca.h fi - if test -n "$STDBOOL_H"; then - GL_GENERATE_STDBOOL_H_TRUE= - GL_GENERATE_STDBOOL_H_FALSE='#' + if test -n "$ALLOCA_H"; then + GL_GENERATE_ALLOCA_H_TRUE= + GL_GENERATE_ALLOCA_H_FALSE='#' else - GL_GENERATE_STDBOOL_H_TRUE='#' - GL_GENERATE_STDBOOL_H_FALSE= + GL_GENERATE_ALLOCA_H_TRUE='#' + GL_GENERATE_ALLOCA_H_FALSE= fi - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi + : - STDDEF_H= - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test "${gl_cv_decl_null_works+set}" = set; then : + + + + : + + + + + + + + + + + + + + + +$as_echo "#define HAVE_DUP2 1" >>confdefs.h + + + if test $HAVE_DUP2 = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 +$as_echo_n "checking whether dup2 works... " >&6; } +if test "${gl_cv_func_dup2_works+set}" = set; then : $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works=no;; + cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works=no;; + linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a + # closed fd may yield -EBADF instead of -1 / errno=EBADF. + gl_cv_func_dup2_works=no;; + freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. + gl_cv_func_dup2_works=no;; + haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. + gl_cv_func_dup2_works=no;; + *) gl_cv_func_dup2_works=yes;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; + #include +#include +#include int main () { +int result = 0; +#ifdef FD_CLOEXEC + if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) + result |= 1; +#endif + if (dup2 (1, 1) == 0) + result |= 2; +#ifdef FD_CLOEXEC + if (fcntl (1, F_GETFD) != FD_CLOEXEC) + result |= 4; +#endif + close (0); + if (dup2 (0, 0) != -1) + result |= 8; + /* Many gnulib modules require POSIX conformance of EBADF. */ + if (dup2 (2, 1000000) == -1 && errno != EBADF) + result |= 16; + return result; ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_null_works=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_dup2_works=yes else - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + gl_cv_func_dup2_works=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -$as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - - if test -n "$STDDEF_H"; then - GL_GENERATE_STDDEF_H_TRUE= - GL_GENERATE_STDDEF_H_FALSE='#' -else - GL_GENERATE_STDDEF_H_TRUE='#' - GL_GENERATE_STDDEF_H_FALSE= +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test -n "$STDDEF_H"; then - - - - - - +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 +$as_echo "$gl_cv_func_dup2_works" >&6; } + if test "$gl_cv_func_dup2_works" = no; then - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stddef_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + if test $ac_cv_func_dup2 = yes; then + REPLACE_DUP2=1 + fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 -$as_echo "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive - fi + gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + fi + fi + GNULIB_DUP2=1 - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdio_h='<'stdio.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdio_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdio.h#{ - s#.*"\(.*/stdio.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 -$as_echo "$gl_cv_next_stdio_h" >&6; } - fi - NEXT_STDIO_H=$gl_cv_next_stdio_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdio.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdio_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive +# Persuade glibc to declare getloadavg(). +gl_save_LIBS=$LIBS - GNULIB_FSCANF=1 - GNULIB_SCANF=1 - GNULIB_FGETC=1 - GNULIB_GETC=1 - GNULIB_GETCHAR=1 - GNULIB_FGETS=1 - GNULIB_GETS=1 - GNULIB_FREAD=1 +# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, +# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. +HAVE_GETLOADAVG=1 +ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" +if test "x$ac_cv_func_getloadavg" = x""yes; then : +else + gl_func_getloadavg_done=no - GNULIB_FPRINTF=1 - GNULIB_PRINTF=1 - GNULIB_VFPRINTF=1 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 + # Some systems with -lutil have (and need) -lkvm as well, some do not. + # On Solaris, -lkvm requires nlist from -lelf, so check that first + # to get the right answer into the cache. + # For kstat on solaris, we need to test for libelf and libkvm to force the + # definition of SVR4 below. + if test $gl_func_getloadavg_done = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 +$as_echo_n "checking for elf_begin in -lelf... " >&6; } +if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lelf $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char elf_begin (); +int +main () +{ +return elf_begin (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_elf_elf_begin=yes +else + ac_cv_lib_elf_elf_begin=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 +$as_echo "$ac_cv_lib_elf_elf_begin" >&6; } +if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : + LIBS="-lelf $LIBS" +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 +$as_echo_n "checking for kvm_open in -lkvm... " >&6; } +if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkvm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char kvm_open (); +int +main () +{ +return kvm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_kvm_kvm_open=yes +else + ac_cv_lib_kvm_kvm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 +$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } +if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : + LIBS="-lkvm $LIBS" +fi + # Check for the 4.4BSD definition of getloadavg. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 +$as_echo_n "checking for getloadavg in -lutil... " >&6; } +if test "${ac_cv_lib_util_getloadavg+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lutil $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getloadavg (); +int +main () +{ +return getloadavg (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_util_getloadavg=yes +else + ac_cv_lib_util_getloadavg=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 +$as_echo "$ac_cv_lib_util_getloadavg" >&6; } +if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : + LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes +fi + fi + if test $gl_func_getloadavg_done = no; then + # There is a commonly available library for RS/6000 AIX. + # Since it is not a standard part of AIX, it might be installed locally. + gl_getloadavg_LIBS=$LIBS + LIBS="-L/usr/local/lib $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 +$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } +if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgetloadavg $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getloadavg (); +int +main () +{ +return getloadavg (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_getloadavg_getloadavg=yes +else + ac_cv_lib_getloadavg_getloadavg=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 +$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } +if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : + LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes +else + LIBS=$gl_getloadavg_LIBS +fi + fi + # Set up the replacement function if necessary. + if test $gl_func_getloadavg_done = no; then + HAVE_GETLOADAVG=0 + # Solaris has libkstat which does not require root. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 +$as_echo_n "checking for kstat_open in -lkstat... " >&6; } +if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkstat $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char kstat_open (); +int +main () +{ +return kstat_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_kstat_kstat_open=yes +else + ac_cv_lib_kstat_kstat_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 +$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } +if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBKSTAT 1 +_ACEOF + LIBS="-lkstat $LIBS" +fi + test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdlib_h='<'stdlib.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdlib_h+set}" = set; then : + # AIX has libperfstat which does not require root + if test $gl_func_getloadavg_done = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 +$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } +if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lperfstat $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char perfstat_cpu_total (); +int +main () +{ +return perfstat_cpu_total (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_perfstat_perfstat_cpu_total=yes +else + ac_cv_lib_perfstat_perfstat_cpu_total=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 +$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } +if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPERFSTAT 1 _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdlib.h#{ - s#.*"\(.*/stdlib.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + LIBS="-lperfstat $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 -$as_echo "$gl_cv_next_stdlib_h" >&6; } - fi - NEXT_STDLIB_H=$gl_cv_next_stdlib_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdlib.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdlib_h + test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes fi - NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive - - - - - - - - - - # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. - - + if test $gl_func_getloadavg_done = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : + gl_func_getloadavg_done=yes +$as_echo "#define DGUX 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 +$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } +if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldgc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dg_sys_info (); +int +main () +{ +return dg_sys_info (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dgc_dg_sys_info=yes +else + ac_cv_lib_dgc_dg_sys_info=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 +$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } +if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDGC 1 +_ACEOF -$as_echo "#define my_strftime nstrftime" >>confdefs.h + LIBS="-ldgc $LIBS" +fi +fi + fi + fi +fi +if test "x$gl_save_LIBS" = x; then + GETLOADAVG_LIBS=$LIBS +else + GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` +fi +LIBS=$gl_save_LIBS - if test "$ac_cv_have_decl_strtoumax" != yes; then - HAVE_DECL_STRTOUMAX=0 - for ac_func in strtoumax +# Test whether the system declares getloadavg. Solaris has the function +# but declares it in , not . +for ac_header in sys/loadavg.h do : - ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" -if test "x$ac_cv_func_strtoumax" = x""yes; then : + ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOUMAX 1 +#define HAVE_SYS_LOADAVG_H 1 _ACEOF fi -done - - fi - -if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" +done - ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoull" = x""yes; then : - ac_have_decl=1 +if test $ac_cv_header_sys_loadavg_h = yes; then + HAVE_SYS_LOADAVG_H=1 else - ac_have_decl=0 + HAVE_SYS_LOADAVG_H=0 fi +ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H + # include + #endif + #include +" +if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRTOULL $ac_have_decl -_ACEOF - - - +else + HAVE_DECL_GETLOADAVG=0 fi - - - - GNULIB_STRTOUMAX=1 - +if test $HAVE_GETLOADAVG = 0; then - if test $ac_cv_func_symlink = no; then - HAVE_SYMLINK=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 -$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } -if test "${gl_cv_func_symlink_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_symlink_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int result = 0; - if (!symlink ("a", "conftest.link/")) - result |= 1; - if (symlink ("conftest.f", "conftest.lnk2")) - result |= 2; - else if (!symlink ("a", "conftest.lnk2/")) - result |= 4; - return result; - ; - return 0; -} + gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" + + +# Figure out what our getloadavg.c needs. + +# On HPUX9, an unprivileged user can get load averages this way. +if test $gl_func_getloadavg_done = no; then + for ac_func in pstat_getdynamic +do : + ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" +if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PSTAT_GETDYNAMIC 1 _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_symlink_works=yes -else - gl_cv_func_symlink_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_func_getloadavg_done=yes fi +done - rm -f conftest.f conftest.link conftest.lnk2 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 -$as_echo "$gl_cv_func_symlink_works" >&6; } - if test "$gl_cv_func_symlink_works" != yes; then - REPLACE_SYMLINK=1 - fi - fi -if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then +# We cannot check for , because Solaris 2 does not use dwarf (it +# uses stabs), but it is still SVR4. We cannot check for because +# Irix 4.0.5F has the header but not the library. +if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ + && test "$ac_cv_lib_kvm_kvm_open" = yes; then + gl_func_getloadavg_done=yes +$as_echo "#define SVR4 1" >>confdefs.h +fi +if test $gl_func_getloadavg_done = no; then + ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" +if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : + gl_func_getloadavg_done=yes +$as_echo "#define UMAX 1" >>confdefs.h +$as_echo "#define UMAX4_3 1" >>confdefs.h +fi - gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" fi +if test $gl_func_getloadavg_done = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : + gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h +fi +fi - GNULIB_SYMLINK=1 +if test $gl_func_getloadavg_done = no; then + for ac_header in mach/mach.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" +if test "x$ac_cv_header_mach_mach_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MACH_MACH_H 1 +_ACEOF +fi +done +fi +for ac_header in nlist.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" +if test "x$ac_cv_header_nlist_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NLIST_H 1 +_ACEOF + ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include +" +if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 +_ACEOF +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +struct nlist x; + #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME + x.n_un.n_name = ""; + #else + x.n_name = ""; + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : +$as_echo "#define N_NAME_POINTER 1" >>confdefs.h +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +done +fi + GNULIB_GETLOADAVG=1 - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_stat_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_header_sys_stat_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/stat.h#{ - s#.*"\(.*/sys/stat.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 -$as_echo "$gl_cv_next_sys_stat_h" >&6; } - fi - NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/stat.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_stat_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive +if test $REPLACE_GETOPT = 1; then - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include - #include -" -if test "x$ac_cv_type_nlink_t" = x""yes; then : -else -$as_echo "#define nlink_t int" >>confdefs.h -fi + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" @@ -18480,83 +19329,49 @@ fi + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" +fi - if test $ac_cv_have_decl_localtime_r = no; then - HAVE_DECL_LOCALTIME_R=0 - fi - if test $ac_cv_func_localtime_r = yes; then - HAVE_LOCALTIME_R=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 -$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } -if test "${gl_cv_time_r_posix+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -/* We don't need to append 'restrict's to the argument types, - even though the POSIX signature has the 'restrict's, - since C99 says they can't affect type compatibility. */ - struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; - if (ptr) return 0; - /* Check the return type is a pointer. - On HP-UX 10 it is 'int'. */ - *localtime_r (0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_time_r_posix=yes -else - gl_cv_time_r_posix=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + REPLACE_GETOPT=0 + + + if test -n "$gl_replace_getopt"; then : + + REPLACE_GETOPT=1 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 -$as_echo "$gl_cv_time_r_posix" >&6; } - if test $gl_cv_time_r_posix = yes; then - REPLACE_LOCALTIME_R=0 - else - REPLACE_LOCALTIME_R=1 - fi - else - HAVE_LOCALTIME_R=0 - fi -if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then + if test $REPLACE_GETOPT = 1; then + GETOPT_H=getopt.h +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + GNULIB_UNISTD_H_GETOPT=1 + fi +if test $REPLACE_GETOPT = 1; then - gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" - : -fi + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - GNULIB_TIME_R=1 @@ -18565,197 +19380,288 @@ fi + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" +fi + if test $ac_cv_func_lstat = yes; then - if test $gl_cv_have_include_next = yes; then - gl_cv_next_unistd_h='<'unistd.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_unistd_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then + REPLACE_LSTAT=1 + fi + else + HAVE_LSTAT=0 + fi - if test $ac_cv_header_unistd_h = yes; then +if test $REPLACE_LSTAT = 1; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/unistd.h#{ - s#.*"\(.*/unistd.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_unistd_h='<'unistd.h'>' - fi + + + + gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + + + + : + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 -$as_echo "$gl_cv_next_unistd_h" >&6; } - fi - NEXT_UNISTD_H=$gl_cv_next_unistd_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'unistd.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_unistd_h - fi - NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi + GNULIB_LSTAT=1 - gl_gnulib_enabled_dosname=false - gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false - gl_gnulib_enabled_stat=false - gl_gnulib_enabled_strtoull=false - gl_gnulib_enabled_verify=false - func_gl_gnulib_m4code_dosname () - { - if ! $gl_gnulib_enabled_dosname; then - gl_gnulib_enabled_dosname=true - fi - } - func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 () - { - if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then - gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true - fi - } - func_gl_gnulib_m4code_stat () - { - if ! $gl_gnulib_enabled_stat; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 -$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } -if test "${gl_cv_func_stat_dir_slash+set}" = set; then : + + + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple MacOS X platforms. + # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. + # But we need a configuration result that is valid in both modes. + gl_cv_func_working_mktime=no + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 +$as_echo_n "checking for working mktime... " >&6; } +if test "${gl_cv_func_working_mktime+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - case $host_os in - mingw*) gl_cv_func_stat_dir_slash="guessing no";; - *) gl_cv_func_stat_dir_slash="guessing yes";; - esac + gl_cv_func_working_mktime=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +/* Test program from Paul Eggert and Tony Leneis. */ +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifndef HAVE_ALARM +# define alarm(X) /* empty */ +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (time_t now) +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (time_t now) +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (int j) +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} int main () { -struct stat st; return stat (".", &st) != stat ("./", &st); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_dir_slash=yes -else - gl_cv_func_stat_dir_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + int result = 0; + time_t t, delta; + int i, j; + int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; + int time_t_signed = ! ((time_t) 0 < (time_t) -1); -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 -$as_echo "$gl_cv_func_stat_dir_slash" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 -$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } -if test "${gl_cv_func_stat_file_slash+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - touch conftest.tmp - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then : - gl_cv_func_stat_file_slash="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + alarm (60); + + time_t_max = (! time_t_signed + ? (time_t) -1 + : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) + * 2 + 1)); + time_t_min = (! time_t_signed + ? (time_t) 0 + : time_t_signed_magnitude + ? ~ (time_t) 0 + : ~ time_t_max); + + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); -int -main () -{ -int result = 0; - struct stat st; - if (!stat ("conftest.tmp/", &st)) - result |= 1; -#if HAVE_LSTAT - if (!stat ("conftest.lnk/", &st)) + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) + result |= 1; + if (! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) result |= 2; -#endif - return result; - ; - return 0; + for (j = 1; ; j <<= 1) + if (! bigtime_test (j)) + result |= 4; + else if (INT_MAX / 2 < j) + break; + if (! bigtime_test (INT_MAX)) + result |= 8; + } + if (! irix_6_4_bug ()) + result |= 16; + if (! spring_forward_gap ()) + result |= 32; + if (! year_2050_test ()) + result |= 64; + return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_file_slash=yes + gl_cv_func_working_mktime=yes else - gl_cv_func_stat_file_slash=no + gl_cv_func_working_mktime=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -f conftest.tmp conftest.lnk -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 -$as_echo "$gl_cv_func_stat_file_slash" >&6; } - case $gl_cv_func_stat_dir_slash in - *no) REPLACE_STAT=1 -$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h -;; - esac - case $gl_cv_func_stat_file_slash in - *no) REPLACE_STAT=1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 +$as_echo "$gl_cv_func_working_mktime" >&6; } -$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h -;; - esac + if test $gl_cv_func_working_mktime = no; then + REPLACE_MKTIME=1 + else + REPLACE_MKTIME=0 + fi -if test $REPLACE_STAT = 1; then +if test $REPLACE_MKTIME = 1; then @@ -18764,11 +19670,10 @@ if test $REPLACE_STAT = 1; then - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" - : fi @@ -18776,54 +19681,93 @@ fi - GNULIB_STAT=1 + GNULIB_MKTIME=1 - gl_gnulib_enabled_stat=true - if $condition; then - func_gl_gnulib_m4code_dosname - fi - fi - } - func_gl_gnulib_m4code_strtoull () - { - if ! $gl_gnulib_enabled_strtoull; then - if test "$ac_cv_type_unsigned_long_long_int" = yes; then - for ac_func in strtoull -do : - ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" -if test "x$ac_cv_func_strtoull" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOULL 1 -_ACEOF + LIB_PTHREAD_SIGMASK= + if test $ac_cv_func_pthread_sigmask != yes; then + gl_save_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 +$as_echo_n "checking for library containing pthread_sigmask... " >&6; } +if test "${ac_cv_search_pthread_sigmask+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_sigmask (); +int +main () +{ +return pthread_sigmask (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pthread c_r; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_pthread_sigmask=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pthread_sigmask+set}" = set; then : + break fi done +if test "${ac_cv_search_pthread_sigmask+set}" = set; then : - if test $ac_cv_func_strtoull = no; then - HAVE_STRTOULL=0 - fi - fi +else + ac_cv_search_pthread_sigmask=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 +$as_echo "$ac_cv_search_pthread_sigmask" >&6; } +ac_res=$ac_cv_search_pthread_sigmask +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -if test $HAVE_STRTOULL = 0; then +fi + + LIBS=$gl_save_LIBS + if test "$ac_cv_search_pthread_sigmask" = no; then + HAVE_PTHREAD_SIGMASK=0 + elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then + LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask + fi + fi +if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then - gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" - : + gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext" fi @@ -18831,83 +19775,113 @@ fi - GNULIB_STRTOULL=1 + GNULIB_PTHREAD_SIGMASK=1 - gl_gnulib_enabled_strtoull=true - fi - } - func_gl_gnulib_m4code_verify () - { - if ! $gl_gnulib_enabled_verify; then - gl_gnulib_enabled_verify=true - fi - } - if test $REPLACE_GETOPT = 1; then - func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 - fi - if test $REPLACE_LSTAT = 1; then - func_gl_gnulib_m4code_dosname - fi - if test $REPLACE_LSTAT = 1; then - func_gl_gnulib_m4code_stat - fi - if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then - func_gl_gnulib_m4code_stat - fi - if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then - func_gl_gnulib_m4code_verify - fi - if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then - func_gl_gnulib_m4code_strtoull - fi - if $gl_gnulib_enabled_dosname; then - gl_GNULIB_ENABLED_dosname_TRUE= - gl_GNULIB_ENABLED_dosname_FALSE='#' + + + if test $ac_cv_func_readlink = no; then + HAVE_READLINK=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 +$as_echo_n "checking whether readlink signature is correct... " >&6; } +if test "${gl_cv_decl_readlink_works+set}" = set; then : + $as_echo_n "(cached) " >&6 else - gl_GNULIB_ENABLED_dosname_TRUE='#' - gl_GNULIB_ENABLED_dosname_FALSE= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Cause compilation failure if original declaration has wrong type. */ + ssize_t readlink (const char *, char *, size_t); +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_readlink_works=yes +else + gl_cv_decl_readlink_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 +$as_echo "$gl_cv_decl_readlink_works" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 +$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } +if test "${gl_cv_func_readlink_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # We have readlink, so assume ln -s works. + ln -s conftest.no-such conftest.link + ln -s conftest.link conftest.lnk2 + if test "$cross_compiling" = yes; then : + gl_cv_func_readlink_works="guessing no" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +char buf[20]; + return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_readlink_works=yes +else + gl_cv_func_readlink_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm -f conftest.link conftest.lnk2 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 +$as_echo "$gl_cv_func_readlink_works" >&6; } + if test "$gl_cv_func_readlink_works" != yes; then + +$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h + + REPLACE_READLINK=1 + elif test "$gl_cv_decl_readlink_works" != yes; then + REPLACE_READLINK=1 + fi + fi + +if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" + - if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then - gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE= - gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#' -else - gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#' - gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= -fi + : - if $gl_gnulib_enabled_stat; then - gl_GNULIB_ENABLED_stat_TRUE= - gl_GNULIB_ENABLED_stat_FALSE='#' -else - gl_GNULIB_ENABLED_stat_TRUE='#' - gl_GNULIB_ENABLED_stat_FALSE= fi - if $gl_gnulib_enabled_strtoull; then - gl_GNULIB_ENABLED_strtoull_TRUE= - gl_GNULIB_ENABLED_strtoull_FALSE='#' -else - gl_GNULIB_ENABLED_strtoull_TRUE='#' - gl_GNULIB_ENABLED_strtoull_FALSE= -fi - if $gl_gnulib_enabled_verify; then - gl_GNULIB_ENABLED_verify_TRUE= - gl_GNULIB_ENABLED_verify_FALSE='#' -else - gl_GNULIB_ENABLED_verify_TRUE='#' - gl_GNULIB_ENABLED_verify_FALSE= -fi - # End of code from modules + GNULIB_READLINK=1 @@ -18915,8 +19889,6 @@ fi - gltests_libdeps= - gltests_ltlibdeps= @@ -18926,994 +19898,823 @@ fi - gl_source_base='tests' - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS + if test $gl_cv_have_include_next = yes; then + gl_cv_next_signal_h='<'signal.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_signal_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else - gl_module_indicator_condition=$gltests_WITNESS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/signal.h#{ + s#.*"\(.*/signal.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 +$as_echo "$gl_cv_next_signal_h" >&6; } + fi + NEXT_SIGNAL_H=$gl_cv_next_signal_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'signal.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_signal_h + fi + NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive +# AIX declares sig_atomic_t to already include volatile, and C89 compilers +# then choke on 'volatile sig_atomic_t'. C99 requires that it compile. + ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " +#include - LIBGNU_LIBDEPS="$gl_libdeps" +" +if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : - LIBGNU_LTLIBDEPS="$gl_ltlibdeps" +else + HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 +fi -# UNIX98 PTYs. -for ac_func in grantpt -do : - ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" -if test "x$ac_cv_func_grantpt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GRANTPT 1 -_ACEOF -fi -done + ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " +#include -# PTY-related GNU extensions. -for ac_func in getpt -do : - ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" -if test "x$ac_cv_func_getpt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPT 1 -_ACEOF +" +if test "x$ac_cv_type_sighandler_t" = x""yes; then : +else + HAVE_SIGHANDLER_T=0 fi -done -# Check this now, so that we will NOT find the above functions in ncurses. -# That is because we have not set up to link ncurses in lib-src. -# It's better to believe a function is not available -# than to expect to find it in ncurses. -# Also we need tputs and friends to be able to build at all. -have_tputs_et_al=true -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 -$as_echo_n "checking for library containing tputs... " >&6; } -if test "${ac_cv_search_tputs+set}" = set; then : + + + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif + +" +if test "x$ac_cv_type_socklen_t" = x""yes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 +$as_echo_n "checking for socklen_t equivalent... " >&6; } + if test "${gl_cv_socklen_t_equiv+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); + int getpeername (int, $arg2 *, $t *); int main () { -return tputs (); +$t len; + getpeername (0, 0, &len); ; return 0; } _ACEOF -for ac_lib in '' ncurses terminfo termcap; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_tputs=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_tputs+set}" = set; then : - break +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_socklen_t_equiv="$t" fi -done -if test "${ac_cv_search_tputs+set}" = set; then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done -else - ac_cv_search_tputs=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + + if test "$gl_cv_socklen_t_equiv" = ""; then + as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 +$as_echo "$gl_cv_socklen_t_equiv" >&6; } + +cat >>confdefs.h <<_ACEOF +#define socklen_t $gl_cv_socklen_t_equiv +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 -$as_echo "$ac_cv_search_tputs" >&6; } -ac_res=$ac_cv_search_tputs -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 +$as_echo_n "checking for ssize_t... " >&6; } +if test "${gt_cv_ssize_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - have_tputs_et_al=false + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_ssize_t=yes +else + gt_cv_ssize_t=no fi - -if test "$have_tputs_et_al" != true; then - as_fn_error "I couldn't find termcap functions (tputs and friends). -Maybe some development libraries/packages are missing? Try installing -libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -# Must define this when any termcap library is found. - -$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 +$as_echo "$gt_cv_ssize_t" >&6; } + if test $gt_cv_ssize_t = no; then -## FIXME This was the cpp logic, but I am not sure it is right. -## The above test has not necessarily found libncurses. -HAVE_LIBNCURSES=yes +$as_echo "#define ssize_t int" >>confdefs.h -## Use terminfo instead of termcap? -## Note only system files NOT using terminfo are: -## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and -## darwin|gnu without ncurses. -TERMINFO=no -LIBS_TERMCAP= -case "$opsys" in - ## cygwin: Fewer environment variables to go wrong, more terminal types. - ## hpux10-20: Use the system provided termcap(3) library. - ## openbsd: David Mazieres says this - ## is necessary. Otherwise Emacs dumps core when run -nw. - aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; + fi - ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. - ## The ncurses library has been moved out of the System framework in - ## Mac OS X 10.2. So if configure detects it, set the command-line - ## option to use it. - darwin|gnu*) - ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) - if test "x$HAVE_LIBNCURSES" = "xyes"; then - TERMINFO=yes - LIBS_TERMCAP="-lncurses" - fi - ;; - freebsd) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 -$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } - if test "${emacs_cv_freebsd_terminfo+set}" = set; then : + STDARG_H='' + NEXT_STDARG_H='' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 +$as_echo_n "checking for va_copy... " >&6; } + if test "${gl_cv_func_va_copy+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -#if __FreeBSD_version < 400000 -fail; + +#ifndef va_copy +void (*func) (va_list, va_list) = va_copy; #endif ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_freebsd_terminfo=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_va_copy=yes else - emacs_cv_freebsd_terminfo=no + gl_cv_func_va_copy=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 +$as_echo "$gl_cv_func_va_copy" >&6; } + if test $gl_cv_func_va_copy = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined _AIX && !defined __GNUC__ + AIX vaccine + #endif - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 -$as_echo "$emacs_cv_freebsd_terminfo" >&6; } +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "vaccine" >/dev/null 2>&1; then : + gl_aixcc=yes +else + gl_aixcc=no +fi +rm -f conftest* - if test $emacs_cv_freebsd_terminfo = yes; then - TERMINFO=yes - LIBS_TERMCAP="-lncurses" - else - LIBS_TERMCAP="-ltermcap" - fi - ;; + if test $gl_aixcc = yes; then + STDARG_H=stdarg.h - netbsd) - if test $ac_cv_search_tputs = -lterminfo; then - TERMINFO=yes - LIBS_TERMCAP="-lterminfo" - else - LIBS_TERMCAP="-ltermcap" - fi - ;; -esac -case "$opsys" in - ## hpux: Make sure we get select from libc rather than from libcurses - ## because libcurses on HPUX 10.10 has a broken version of select. - ## We used to use -lc -lcurses, but this may be cleaner. - hpux*) LIBS_TERMCAP="-ltermcap" ;; - openbsd) LIBS_TERMCAP="-lncurses" ;; - ## Must use system termcap, if we use any termcap. It does special things. - sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; -esac -TERMCAP_OBJ=tparam.o -if test $TERMINFO = yes; then -$as_echo "#define TERMINFO 1" >>confdefs.h + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdarg_h='<'stdarg.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_stdarg_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdarg.h#{ + s#.*"\(.*/stdarg.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' - ## Default used to be -ltermcap. Add a case above if need something else. - test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" - TERMCAP_OBJ=terminfo.o fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 +$as_echo "$gl_cv_next_stdarg_h" >&6; } + fi + NEXT_STDARG_H=$gl_cv_next_stdarg_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdarg.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdarg_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive -# Do we have res_init, for detecting changes in /etc/resolv.conf? -resolv=no -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -int -main () -{ -return res_init(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_res_init=yes + if test "$gl_cv_next_stdarg_h" = '""'; then + gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' + NEXT_STDARG_H="$gl_cv_next_stdarg_h" + fi + else + + saved_as_echo_n="$as_echo_n" + as_echo_n=':' + if test "${gl_cv_func___va_copy+set}" = set; then : + $as_echo_n "(cached) " >&6 else - have_res_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$have_res_init" = no; then - OLIBS="$LIBS" - LIBS="$LIBS -lresolv" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 -$as_echo_n "checking for res_init with -lresolv... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include +#include int main () { -return res_init(); + +#ifndef __va_copy +error, bail out +#endif + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_res_init=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func___va_copy=yes else - have_res_init=no + gl_cv_func___va_copy=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 -$as_echo "$have_res_init" >&6; } - if test "$have_res_init" = yes ; then - resolv=yes - fi - LIBS="$OLIBS" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -if test "$have_res_init" = yes; then + as_echo_n="$saved_as_echo_n" -$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h + if test $gl_cv_func___va_copy = yes; then -fi +$as_echo "#define va_copy __va_copy" >>confdefs.h -# Do we need the Hesiod library to provide the support routines? -LIBHESIOD= -if test "$with_hesiod" != no ; then - # Don't set $LIBS here -- see comments above. FIXME which comments? - ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" -if test "x$ac_cv_func_res_send" = x""yes; then : + else -else - ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" -if test "x$ac_cv_func___res_send" = x""yes; then : -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 -$as_echo_n "checking for res_send in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_res_send+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +$as_echo "#define va_copy gl_va_copy" >>confdefs.h -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char res_send (); -int -main () -{ -return res_send (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_resolv_res_send=yes + fi + fi + fi + + if test -n "$STDARG_H"; then + GL_GENERATE_STDARG_H_TRUE= + GL_GENERATE_STDARG_H_FALSE='#' else - ac_cv_lib_resolv_res_send=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + GL_GENERATE_STDARG_H_TRUE='#' + GL_GENERATE_STDARG_H_FALSE= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 -$as_echo "$ac_cv_lib_resolv_res_send" >&6; } -if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : - resolv=yes + + + + + + + # Define two additional variables used in the Makefile substitution. + + if test "$ac_cv_header_stdbool_h" = yes; then + STDBOOL_H='' + else + STDBOOL_H='stdbool.h' + fi + + if test -n "$STDBOOL_H"; then + GL_GENERATE_STDBOOL_H_TRUE= + GL_GENERATE_STDBOOL_H_FALSE='#' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 -$as_echo_n "checking for __res_send in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv___res_send+set}" = set; then : + GL_GENERATE_STDBOOL_H_TRUE='#' + GL_GENERATE_STDBOOL_H_FALSE= +fi + + + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi + + + + + + STDDEF_H= + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 +$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } +if test "${gl_cv_decl_null_works+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + int test[2 * (sizeof NULL == sizeof (void *)) -1]; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __res_send (); int main () { -return __res_send (); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_resolv___res_send=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_null_works=yes else - ac_cv_lib_resolv___res_send=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + gl_cv_decl_null_works=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 -$as_echo "$ac_cv_lib_resolv___res_send" >&6; } -if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : - resolv=yes +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 +$as_echo "$gl_cv_decl_null_works" >&6; } + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + if test -n "$STDDEF_H"; then + GL_GENERATE_STDDEF_H_TRUE= + GL_GENERATE_STDDEF_H_FALSE='#' +else + GL_GENERATE_STDDEF_H_TRUE='#' + GL_GENERATE_STDDEF_H_FALSE= fi -fi + if test -n "$STDDEF_H"; then -fi - if test "$resolv" = yes ; then - RESOLVLIB=-lresolv - else - RESOLVLIB= - fi - ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" -if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 -$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } -if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stddef_h='<'stddef.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_stddef_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhesiod $RESOLVLIB $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char hes_getmailhost (); -int -main () -{ -return hes_getmailhost (); - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_hesiod_hes_getmailhost=yes -else - ac_cv_lib_hesiod_hes_getmailhost=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stddef.h#{ + s#.*"\(.*/stddef.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 -$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } -if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : - hesiod=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 +$as_echo "$gl_cv_next_stddef_h" >&6; } + fi + NEXT_STDDEF_H=$gl_cv_next_stddef_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stddef.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stddef_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + + + + + fi + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdio_h='<'stdio.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_stdio_h+set}" = set; then : + $as_echo_n "(cached) " >&6 else - : -fi + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdio.h#{ + s#.*"\(.*/stdio.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 +$as_echo "$gl_cv_next_stdio_h" >&6; } + fi + NEXT_STDIO_H=$gl_cv_next_stdio_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdio.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdio_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive - if test x"$hesiod" = xyes; then -$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h - LIBHESIOD=-lhesiod - fi + + GNULIB_FSCANF=1 + GNULIB_SCANF=1 + GNULIB_FGETC=1 + GNULIB_GETC=1 + GNULIB_GETCHAR=1 + GNULIB_FGETS=1 + GNULIB_GETS=1 + GNULIB_FREAD=1 + + + GNULIB_FPRINTF=1 + GNULIB_PRINTF=1 + GNULIB_VFPRINTF=1 + GNULIB_VPRINTF=1 + GNULIB_FPUTC=1 + GNULIB_PUTC=1 + GNULIB_PUTCHAR=1 + GNULIB_FPUTS=1 + GNULIB_PUTS=1 + GNULIB_FWRITE=1 + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdlib_h='<'stdlib.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_stdlib_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdlib.h#{ + s#.*"\(.*/stdlib.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 +$as_echo "$gl_cv_next_stdlib_h" >&6; } + fi + NEXT_STDLIB_H=$gl_cv_next_stdlib_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdlib.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdlib_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive -# Do we need libresolv (due to res_init or Hesiod)? -if test "$resolv" = yes ; then -$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h - LIBRESOLV=-lresolv -else - LIBRESOLV= -fi -# These tell us which Kerberos-related libraries to use. -COM_ERRLIB= -CRYPTOLIB= -KRB5LIB= -DESLIB= -KRB4LIB= -if test "${with_kerberos}" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 -$as_echo_n "checking for com_err in -lcom_err... " >&6; } -if test "${ac_cv_lib_com_err_com_err+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcom_err $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char com_err (); -int -main () -{ -return com_err (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_com_err_com_err=yes -else - ac_cv_lib_com_err_com_err=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 -$as_echo "$ac_cv_lib_com_err_com_err" >&6; } -if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : - have_com_err=yes -else - have_com_err=no -fi - if test $have_com_err = yes; then - COM_ERRLIB=-lcom_err - LIBS="$COM_ERRLIB $LIBS" -$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h + # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 -$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } -if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mit_des_cbc_encrypt (); -int -main () -{ -return mit_des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_mit_des_cbc_encrypt=yes -else - ac_cv_lib_crypto_mit_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : - have_crypto=yes -else - have_crypto=no -fi - if test $have_crypto = yes; then - CRYPTOLIB=-lcrypto - LIBS="$CRYPTOLIB $LIBS" -$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 -$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } -if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lk5crypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mit_des_cbc_encrypt (); -int -main () -{ -return mit_des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes -else - ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : - have_k5crypto=yes -else - have_k5crypto=no -fi - if test $have_k5crypto = yes; then - CRYPTOLIB=-lk5crypto - LIBS="$CRYPTOLIB $LIBS" +$as_echo "#define my_strftime nstrftime" >>confdefs.h -$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 -$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } -if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb5 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb5_init_context (); -int -main () -{ -return krb5_init_context (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb5_krb5_init_context=yes -else - ac_cv_lib_krb5_krb5_init_context=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 -$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } -if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : - have_krb5=yes -else - have_krb5=no -fi - if test $have_krb5=yes; then - KRB5LIB=-lkrb5 - LIBS="$KRB5LIB $LIBS" -$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h - fi - if test "${with_kerberos5}" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 -$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } -if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldes425 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char des_cbc_encrypt (); -int -main () -{ -return des_cbc_encrypt (); - ; - return 0; -} + if test "$ac_cv_have_decl_strtoimax" != yes; then + HAVE_DECL_STRTOIMAX=0 + + for ac_func in strtoimax +do : + ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" +if test "x$ac_cv_func_strtoimax" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOIMAX 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_des425_des_cbc_encrypt=yes -else - ac_cv_lib_des425_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : - have_des425=yes -else - have_des425=no + fi +done - if test $have_des425 = yes; then - DESLIB=-ldes425 - LIBS="$DESLIB $LIBS" + fi -$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h +if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 -$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } -if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldes $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char des_cbc_encrypt (); -int -main () -{ -return des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_des_des_cbc_encrypt=yes + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext" + + + ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoll" = x""yes; then : + ac_have_decl=1 else - ac_cv_lib_des_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : - have_des=yes -else - have_des=no + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOLL $ac_have_decl +_ACEOF + + + fi - if test $have_des = yes; then - DESLIB=-ldes - LIBS="$DESLIB $LIBS" -$as_echo "#define HAVE_LIBDES 1" >>confdefs.h - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 -$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } -if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb4 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb_get_cred (); -int -main () -{ -return krb_get_cred (); - ; - return 0; -} + + GNULIB_STRTOIMAX=1 + + + + + + + + + if test "$ac_cv_have_decl_strtoumax" != yes; then + HAVE_DECL_STRTOUMAX=0 + + for ac_func in strtoumax +do : + ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" +if test "x$ac_cv_func_strtoumax" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOUMAX 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb4_krb_get_cred=yes -else - ac_cv_lib_krb4_krb_get_cred=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 -$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : - have_krb4=yes +done + + fi + +if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" + + + ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoull" = x""yes; then : + ac_have_decl=1 else - have_krb4=no + ac_have_decl=0 fi - if test $have_krb4 = yes; then - KRB4LIB=-lkrb4 - LIBS="$KRB4LIB $LIBS" +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOULL $ac_have_decl +_ACEOF -$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 -$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } -if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : + +fi + + + + + + GNULIB_STRTOUMAX=1 + + + + + + + + if test $ac_cv_func_symlink = no; then + HAVE_SYMLINK=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 +$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } +if test "${gl_cv_func_symlink_works+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + gl_cv_func_symlink_works="guessing no" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb_get_cred (); int main () { -return krb_get_cred (); +int result = 0; + if (!symlink ("a", "conftest.link/")) + result |= 1; + if (symlink ("conftest.f", "conftest.lnk2")) + result |= 2; + else if (!symlink ("a", "conftest.lnk2/")) + result |= 4; + return result; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb_krb_get_cred=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_symlink_works=yes else - ac_cv_lib_krb_krb_get_cred=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + gl_cv_func_symlink_works=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 -$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : - have_krb=yes -else - have_krb=no +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test $have_krb = yes; then - KRB4LIB=-lkrb - LIBS="$KRB4LIB $LIBS" - -$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h - - fi + rm -f conftest.f conftest.link conftest.lnk2 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 +$as_echo "$gl_cv_func_symlink_works" >&6; } + if test "$gl_cv_func_symlink_works" != yes; then + REPLACE_SYMLINK=1 fi fi - if test "${with_kerberos5}" != no; then - for ac_header in krb5.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" -if test "x$ac_cv_header_krb5_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_H 1 -_ACEOF - ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include -" -if test "x$ac_cv_member_krb5_error_text" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_ERROR_TEXT 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include -" -if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : +if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then -cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_ERROR_E_TEXT 1 -_ACEOF -fi -fi -done - else - for ac_header in des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" -if test "x$ac_cv_header_des_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DES_H 1 -_ACEOF -else - for ac_header in kerberosIV/des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROSIV_DES_H 1 -_ACEOF -else - for ac_header in kerberos/des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROS_DES_H 1 -_ACEOF + gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" fi -done -fi -done -fi -done + GNULIB_SYMLINK=1 - for ac_header in krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_krb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB_H 1 -_ACEOF -else - for ac_header in kerberosIV/krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROSIV_KRB_H 1 -_ACEOF -else - for ac_header in kerberos/krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROS_KRB_H 1 -_ACEOF -fi -done -fi -done -fi -done - fi - for ac_header in com_err.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_com_err_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_COM_ERR_H 1 -_ACEOF -fi -done -fi @@ -19921,570 +20722,460 @@ fi -# Solaris requires -lintl if you want strerror (which calls dgettext) -# to return localized messages. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 -$as_echo_n "checking for dgettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_dgettext+set}" = set; then : + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_sys_stat_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + if test $ac_cv_header_sys_stat_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dgettext (); -int -main () -{ -return dgettext (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_intl_dgettext=yes -else - ac_cv_lib_intl_dgettext=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 -$as_echo "$ac_cv_lib_intl_dgettext" >&6; } -if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBINTL 1 _ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/sys/stat.h#{ + s#.*"\(.*/sys/stat.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + fi - LIBS="-lintl $LIBS" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 +$as_echo "$gl_cv_next_sys_stat_h" >&6; } + fi + NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/stat.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_stat_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 -$as_echo_n "checking whether localtime caches TZ... " >&6; } -if test "${emacs_cv_localtime_cache+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test x$ac_cv_func_tzset = xyes; then -if test "$cross_compiling" = yes; then : - # If we have tzset, assume the worst when cross-compiling. -emacs_cv_localtime_cache=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -char TZ_GMT0[] = "TZ=GMT0"; -char TZ_PST8[] = "TZ=PST8"; -main() -{ - time_t now = time ((time_t *) 0); - int hour_GMT0, hour_unset; - if (putenv (TZ_GMT0) != 0) - exit (1); - hour_GMT0 = localtime (&now)->tm_hour; - unsetenv("TZ"); - hour_unset = localtime (&now)->tm_hour; - if (putenv (TZ_PST8) != 0) - exit (1); - if (localtime (&now)->tm_hour == hour_GMT0) - exit (1); - unsetenv("TZ"); - if (localtime (&now)->tm_hour != hour_unset) - exit (1); - exit (0); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - emacs_cv_localtime_cache=no -else - emacs_cv_localtime_cache=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + + + + + ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include + #include +" +if test "x$ac_cv_type_nlink_t" = x""yes; then : else - # If we lack tzset, report that localtime does not cache TZ, - # since we can't invalidate the cache if we don't have tzset. - emacs_cv_localtime_cache=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 -$as_echo "$emacs_cv_localtime_cache" >&6; } -if test $emacs_cv_localtime_cache = yes; then -$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h +$as_echo "#define nlink_t int" >>confdefs.h fi -if test "x$HAVE_TIMEVAL" = xyes; then - for ac_func in gettimeofday -do : - ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETTIMEOFDAY 1 -_ACEOF -fi -done - if test $ac_cv_func_gettimeofday = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 -$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } -if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else + + + + + + + + + + + + if test $ac_cv_have_decl_localtime_r = no; then + HAVE_DECL_LOCALTIME_R=0 + fi + + + if test $ac_cv_func_localtime_r = yes; then + HAVE_LOCALTIME_R=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 +$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } +if test "${gl_cv_time_r_posix+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include -#endif -#endif int main () { -struct timeval time; - gettimeofday (&time, 0); +/* We don't need to append 'restrict's to the argument types, + even though the POSIX signature has the 'restrict's, + since C99 says they can't affect type compatibility. */ + struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; + if (ptr) return 0; + /* Check the return type is a pointer. + On HP-UX 10 it is 'int'. */ + *localtime_r (0, 0); ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_gettimeofday_two_arguments=yes + gl_cv_time_r_posix=yes else - emacs_cv_gettimeofday_two_arguments=no + gl_cv_time_r_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5 -$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; } - if test $emacs_cv_gettimeofday_two_arguments = no; then - -$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 +$as_echo "$gl_cv_time_r_posix" >&6; } + if test $gl_cv_time_r_posix = yes; then + REPLACE_LOCALTIME_R=0 + else + REPLACE_LOCALTIME_R=1 fi + else + HAVE_LOCALTIME_R=0 fi -fi -ok_so_far=yes -ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = x""yes; then : +if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then -else - ok_so_far=no -fi -if test $ok_so_far = yes; then - ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = x""yes; then : -else - ok_so_far=no -fi -fi -if test $ok_so_far = yes; then - ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : -else - ok_so_far=no -fi -fi -if test $ok_so_far = yes; then + gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" -$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h + + : fi -if test -f /usr/lpp/X11/bin/smt.exp; then -$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 -$as_echo_n "checking whether system supports dynamic ptys... " >&6; } -if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h + GNULIB_TIME_R=1 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : -else -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF -fi -for ac_header in vfork.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VFORK_H 1 -_ACEOF -fi -done -for ac_func in fork vfork -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done -if test "x$ac_cv_func_fork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 -$as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_unistd_h='<'unistd.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_unistd_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - ac_cv_func_fork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - /* By Ruediger Kuhlmann. */ - return fork () < 0; + if test $ac_cv_header_unistd_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - ; - return 0; -} _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_fork_works=yes -else - ac_cv_func_fork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/unistd.h#{ + s#.*"\(.*/unistd.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_unistd_h='<'unistd.h'>' + fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 -$as_echo "$ac_cv_func_fork_works" >&6; } -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 -$as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_vfork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 +$as_echo "$gl_cv_next_unistd_h" >&6; } + fi + NEXT_UNISTD_H=$gl_cv_next_unistd_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'unistd.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_unistd_h + fi + NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + else + HAVE_UNISTD_H=0 + fi + + + + + gl_gnulib_enabled_dosname=false + gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false + gl_gnulib_enabled_sigprocmask=false + gl_gnulib_enabled_stat=false + gl_gnulib_enabled_strtoll=false + gl_gnulib_enabled_strtoull=false + gl_gnulib_enabled_verify=false + func_gl_gnulib_m4code_dosname () + { + if ! $gl_gnulib_enabled_dosname; then + gl_gnulib_enabled_dosname=true + fi } -} + func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 () + { + if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then -int -main () -{ - pid_t parent = getpid (); - pid_t child; - sparc_address_test (0); + gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true + fi + } + func_gl_gnulib_m4code_sigprocmask () + { + if ! $gl_gnulib_enabled_sigprocmask; then - child = vfork (); - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; + if test $gl_cv_type_sigset_t = yes; then + ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" +if test "x$ac_cv_func_sigprocmask" = x""yes; then : + gl_cv_func_sigprocmask=1 +fi - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 + fi + if test -z "$gl_cv_func_sigprocmask"; then + HAVE_POSIX_SIGNALBLOCKING=0 + fi - /* Did the child fail? (This shouldn't happen.) */ - || status +if test $HAVE_POSIX_SIGNALBLOCKING = 0; then - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_vfork_works=yes -else - ac_cv_func_vfork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 -$as_echo "$ac_cv_func_vfork_works" >&6; } -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi -if test "x$ac_cv_func_vfork_works" = xyes; then -$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h -else -$as_echo "#define vfork fork" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext" + : fi -if test "x$ac_cv_func_fork_works" = xyes; then -$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 -$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${emacs_cv_langinfo_codeset+set}" = set; then : + + GNULIB_SIGPROCMASK=1 + + + + + + gl_gnulib_enabled_sigprocmask=true + fi + } + func_gl_gnulib_m4code_stat () + { + if ! $gl_gnulib_enabled_stat; then + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 +$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } +if test "${gl_cv_func_stat_dir_slash+set}" = set; then : $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case $host_os in + mingw*) gl_cv_func_stat_dir_slash="guessing no";; + *) gl_cv_func_stat_dir_slash="guessing yes";; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + int main () { -char* cs = nl_langinfo(CODESET); +struct stat st; return stat (".", &st) != stat ("./", &st); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_langinfo_codeset=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_stat_dir_slash=yes else - emacs_cv_langinfo_codeset=no + gl_cv_func_stat_dir_slash=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 -$as_echo "$emacs_cv_langinfo_codeset" >&6; } -if test $emacs_cv_langinfo_codeset = yes; then - -$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 -$as_echo_n "checking for mbstate_t... " >&6; } -if test "${ac_cv_type_mbstate_t+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 +$as_echo "$gl_cv_func_stat_dir_slash" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 +$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } +if test "${gl_cv_func_stat_file_slash+set}" = set; then : $as_echo_n "(cached) " >&6 +else + touch conftest.tmp + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.tmp conftest.lnk + fi + if test "$cross_compiling" = yes; then : + gl_cv_func_stat_file_slash="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -# include +#include + int main () { -mbstate_t x; return sizeof x; +int result = 0; + struct stat st; + if (!stat ("conftest.tmp/", &st)) + result |= 1; +#if HAVE_LSTAT + if (!stat ("conftest.lnk/", &st)) + result |= 2; +#endif + return result; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_mbstate_t=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_stat_file_slash=yes else - ac_cv_type_mbstate_t=no + gl_cv_func_stat_file_slash=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 -$as_echo "$ac_cv_type_mbstate_t" >&6; } - if test $ac_cv_type_mbstate_t = yes; then -$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h + rm -f conftest.tmp conftest.lnk +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 +$as_echo "$gl_cv_func_stat_file_slash" >&6; } + case $gl_cv_func_stat_dir_slash in + *no) REPLACE_STAT=1 - else +$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h +;; + esac + case $gl_cv_func_stat_file_slash in + *no) REPLACE_STAT=1 -$as_echo "#define mbstate_t int" >>confdefs.h +$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h +;; + esac - fi +if test $REPLACE_STAT = 1; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 -$as_echo_n "checking for C restricted array declarations... " >&6; } -if test "${emacs_cv_c_restrict_arr+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void fred (int x[__restrict]); -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_c_restrict_arr=yes -else - emacs_cv_c_restrict_arr=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 -$as_echo "$emacs_cv_c_restrict_arr" >&6; } -if test "$emacs_cv_c_restrict_arr" = yes; then -$as_echo "#define __restrict_arr __restrict" >>confdefs.h -fi -# Set up the CFLAGS for real compilation, so we can substitute it. -CFLAGS="$REAL_CFLAGS" -CPPFLAGS="$REAL_CPPFLAGS" -## Hack to detect a buggy GCC version. -if test "x$GCC" = xyes \ - && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ - && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ - && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then - as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 + gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" + + + + : + fi -version=$PACKAGE_VERSION -### Specify what sort of things we'll be editing into Makefile and config.h. -### Use configuration here uncanonicalized to avoid exceeding size limits. -## Unused? + GNULIB_STAT=1 + + + + + + gl_gnulib_enabled_stat=true + if $condition; then + func_gl_gnulib_m4code_dosname + fi + if $condition; then + func_gl_gnulib_m4code_verify + fi + fi + } + func_gl_gnulib_m4code_strtoll () + { + if ! $gl_gnulib_enabled_strtoll; then + + + + if test "$ac_cv_type_long_long_int" = yes; then + for ac_func in strtoll +do : + ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" +if test "x$ac_cv_func_strtoll" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOLL 1 +_ACEOF + +fi +done + + if test $ac_cv_func_strtoll = no; then + HAVE_STRTOLL=0 + fi + fi +if test $HAVE_STRTOLL = 0; then @@ -20493,175 +21184,180 @@ version=$PACKAGE_VERSION + gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext" + : +fi + GNULIB_STRTOLL=1 -## FIXME? Nothing uses @LD_SWITCH_X_SITE@. -## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the -## end of LIBX_BASE, but nothing ever set it. + gl_gnulib_enabled_strtoll=true + fi + } + func_gl_gnulib_m4code_strtoull () + { + if ! $gl_gnulib_enabled_strtoull; then -## Used in lwlib/Makefile.in. -if test -n "${machfile}"; then - M_FILE="\$(srcdir)/${machfile}" -else - M_FILE= -fi -S_FILE="\$(srcdir)/${opsysfile}" + if test "$ac_cv_type_unsigned_long_long_int" = yes; then + for ac_func in strtoull +do : + ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOULL 1 +_ACEOF +fi +done + if test $ac_cv_func_strtoull = no; then + HAVE_STRTOULL=0 + fi + fi +if test $HAVE_STRTOULL = 0; then -cat >>confdefs.h <<_ACEOF -#define EMACS_CONFIGURATION "${canonical}" -_ACEOF -cat >>confdefs.h <<_ACEOF -#define EMACS_CONFIG_OPTIONS "${ac_configure_args}" -_ACEOF + gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" -if test -n "$machfile"; then -cat >>confdefs.h <<_ACEOF -#define config_machfile "${machfile}" -_ACEOF + : fi -cat >>confdefs.h <<_ACEOF -#define config_opsysfile "${opsysfile}" -_ACEOF - -XMENU_OBJ= -XOBJ= -FONT_OBJ= -if test "${HAVE_X_WINDOWS}" = "yes" ; then -$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h - XMENU_OBJ=xmenu.o - XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" - FONT_OBJ=xfont.o - if test "$HAVE_XFT" = "yes"; then - FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" - elif test "$HAVE_FREETYPE" = "yes"; then - FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" - fi -fi + GNULIB_STRTOULL=1 -WIDGET_OBJ= -MOTIF_LIBW= -if test "${USE_X_TOOLKIT}" != "none" ; then - WIDGET_OBJ=widget.o -$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h + gl_gnulib_enabled_strtoull=true + fi + } + func_gl_gnulib_m4code_verify () + { + if ! $gl_gnulib_enabled_verify; then + gl_gnulib_enabled_verify=true + fi + } + if test $REPLACE_GETOPT = 1; then + func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 + fi + if test $REPLACE_LSTAT = 1; then + func_gl_gnulib_m4code_dosname + fi + if test $REPLACE_LSTAT = 1; then + func_gl_gnulib_m4code_stat + fi + if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then + func_gl_gnulib_m4code_sigprocmask + fi + if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then + func_gl_gnulib_m4code_stat + fi + if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then + func_gl_gnulib_m4code_verify + fi + if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then + func_gl_gnulib_m4code_strtoll + fi + if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then + func_gl_gnulib_m4code_verify + fi + if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then + func_gl_gnulib_m4code_strtoull + fi - if test "${USE_X_TOOLKIT}" = "LUCID"; then + if $gl_gnulib_enabled_dosname; then + gl_GNULIB_ENABLED_dosname_TRUE= + gl_GNULIB_ENABLED_dosname_FALSE='#' +else + gl_GNULIB_ENABLED_dosname_TRUE='#' + gl_GNULIB_ENABLED_dosname_FALSE= +fi -$as_echo "#define USE_LUCID 1" >>confdefs.h + if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then + gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE= + gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#' +else + gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#' + gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE= +fi - elif test "${USE_X_TOOLKIT}" = "MOTIF"; then + if $gl_gnulib_enabled_sigprocmask; then + gl_GNULIB_ENABLED_sigprocmask_TRUE= + gl_GNULIB_ENABLED_sigprocmask_FALSE='#' +else + gl_GNULIB_ENABLED_sigprocmask_TRUE='#' + gl_GNULIB_ENABLED_sigprocmask_FALSE= +fi -$as_echo "#define USE_MOTIF 1" >>confdefs.h + if $gl_gnulib_enabled_stat; then + gl_GNULIB_ENABLED_stat_TRUE= + gl_GNULIB_ENABLED_stat_FALSE='#' +else + gl_GNULIB_ENABLED_stat_TRUE='#' + gl_GNULIB_ENABLED_stat_FALSE= +fi - MOTIF_LIBW=-lXm - case "$opsys" in - gnu-linux) - ## Paul Abrahams says this is needed. - MOTIF_LIBW="$MOTIF_LIBW -lXpm" - ;; + if $gl_gnulib_enabled_strtoll; then + gl_GNULIB_ENABLED_strtoll_TRUE= + gl_GNULIB_ENABLED_strtoll_FALSE='#' +else + gl_GNULIB_ENABLED_strtoll_TRUE='#' + gl_GNULIB_ENABLED_strtoll_FALSE= +fi - unixware) - ## Richard Anthony Ryan - ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. - MOTIF_LIBW="MOTIF_LIBW -lXimp" - ;; + if $gl_gnulib_enabled_strtoull; then + gl_GNULIB_ENABLED_strtoull_TRUE= + gl_GNULIB_ENABLED_strtoull_FALSE='#' +else + gl_GNULIB_ENABLED_strtoull_TRUE='#' + gl_GNULIB_ENABLED_strtoull_FALSE= +fi - aix4-2) - ## olson@mcs.anl.gov says -li18n is needed by -lXm. - MOTIF_LIBW="$MOTIF_LIBW -li18n" - ;; - esac - MOTIF_LIBW="$MOTIF_LIBW $LIBXP" - fi + if $gl_gnulib_enabled_verify; then + gl_GNULIB_ENABLED_verify_TRUE= + gl_GNULIB_ENABLED_verify_FALSE='#' +else + gl_GNULIB_ENABLED_verify_TRUE='#' + gl_GNULIB_ENABLED_verify_FALSE= fi + # End of code from modules -TOOLKIT_LIBW= -case "$USE_X_TOOLKIT" in - MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; - LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; - none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; -esac -if test "$USE_X_TOOLKIT" = "none"; then - LIBXT_OTHER="\$(LIBXSM)" - OLDXMENU_TARGET="really-oldXMenu" -else - LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" - OLDXMENU_TARGET="really-lwlib" -fi -## The X Menu stuff is present in the X10 distribution, but missing -## from X11. If we have X10, just use the installed library; -## otherwise, use our own copy. -if test "${HAVE_X11}" = "yes" ; then -$as_echo "#define HAVE_X11 1" >>confdefs.h - if test "$USE_X_TOOLKIT" = "none"; then - OLDXMENU="\${oldXMenudir}/libXMenu11.a" - else - OLDXMENU="\${lwlibdir}/liblw.a" - fi - LIBXMENU="\$(OLDXMENU)" - LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" - OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" -else - ## For a syntactically valid Makefile; not actually used for anything. - ## See comments in src/Makefile.in. - OLDXMENU=nothing - ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). - if test "${HAVE_X_WINDOWS}" = "yes"; then - LIBXMENU="-lXMenu" - else - LIBXMENU= - fi - LIBX_OTHER= - OLDXMENU_DEPS= -fi -if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then - OLDXMENU_TARGET= - OLDXMENU=nothing - LIBXMENU= - OLDXMENU_DEPS= -fi + gltests_libdeps= + gltests_ltlibdeps= @@ -20669,40 +21365,25 @@ fi -if test "${HAVE_MENUS}" = "yes" ; then -$as_echo "#define HAVE_MENUS 1" >>confdefs.h -fi + gl_source_base='tests' + gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS + + gl_module_indicator_condition=$gltests_WITNESS -if test "${GNU_MALLOC}" = "yes" ; then -$as_echo "#define GNU_MALLOC 1" >>confdefs.h -fi -RALLOC_OBJ= -if test "${REL_ALLOC}" = "yes" ; then -$as_echo "#define REL_ALLOC 1" >>confdefs.h - test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o -fi -if test "$opsys" = "cygwin"; then - CYGWIN_OBJ="sheap.o" - ## Cygwin differs because of its unexec(). - PRE_ALLOC_OBJ= - POST_ALLOC_OBJ=lastfile.o -else - CYGWIN_OBJ= - PRE_ALLOC_OBJ=lastfile.o - POST_ALLOC_OBJ= -fi + LIBGNU_LIBDEPS="$gl_libdeps" + LIBGNU_LTLIBDEPS="$gl_ltlibdeps" @@ -20721,7 +21402,7 @@ case "$opsys" in libs_nsgui= headerpad_extra=690 fi - LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" + LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" ## This is here because src/Makefile.in did some extra fiddling around ## with LD_SWITCH_SYSTEM. The cpp logic was: @@ -20901,6 +21582,7 @@ echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGI echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" +echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}" echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" @@ -21086,6 +21768,10 @@ if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then + as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. @@ -21111,10 +21797,18 @@ if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then + as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then + as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5