From 5376b7c9d12f5c47c7d0d56df3eeaa39855aec3b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 28 Mar 2014 10:17:32 +0300 Subject: Improvements in both configure.ac files. --- ChangeLog | 5 ++ configure | 67 ++++------------ configure.ac | 9 +-- extension/ChangeLog | 5 ++ extension/configh.in | 20 ++++- extension/configure | 211 ++++++++++++++++++++++++++++++++++++++++++++++--- extension/configure.ac | 4 +- 7 files changed, 251 insertions(+), 70 deletions(-) diff --git a/ChangeLog b/ChangeLog index bea3720c..a3fa36ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-03-28 Arnold D. Robbins + + * configure.ac: Remove duplicate AC_HEADER_TIME and rearrange + order of macros some. May help on older systems. + 2014-03-23 Arnold D. Robbins * dfa.c: Move include of dfa.h around for correct building diff --git a/configure b/configure index a99a924a..d4a7d484 100755 --- a/configure +++ b/configure @@ -8102,6 +8102,22 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi +for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \ + netdb.h netinet/in.h stdarg.h stddef.h string.h \ + sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \ + termios.h stropts.h wchar.h wctype.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" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +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 ${ac_cv_header_stdc+:} false; then : @@ -8383,22 +8399,6 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi -for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \ - netdb.h netinet/in.h stdarg.h stddef.h string.h \ - sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \ - termios.h stropts.h wchar.h wctype.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" -if eval test \"x\$"$as_ac_Header"\" = 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_string_h" = yes then @@ -10614,41 +10614,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -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 ${ac_cv_header_time+:} false; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 diff --git a/configure.ac b/configure.ac index 8e823796..85f0497b 100644 --- a/configure.ac +++ b/configure.ac @@ -137,14 +137,14 @@ AM_LANGINFO_CODESET gt_LC_MESSAGES dnl checks for header files -AC_HEADER_STDC -AC_HEADER_STDBOOL -AC_HEADER_SYS_WAIT -AC_HEADER_TIME AC_CHECK_HEADERS(arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \ netdb.h netinet/in.h stdarg.h stddef.h string.h \ sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \ termios.h stropts.h wchar.h wctype.h) +AC_HEADER_STDC +AC_HEADER_STDBOOL +AC_HEADER_SYS_WAIT +AC_HEADER_TIME if test "$ac_cv_header_string_h" = yes then @@ -378,7 +378,6 @@ GNUPG_CHECK_MPFR dnl checks for structure members AC_CHECK_MEMBERS([struct stat.st_blksize]) -AC_HEADER_TIME AC_STRUCT_TM AC_STRUCT_TIMEZONE diff --git a/extension/ChangeLog b/extension/ChangeLog index 02c26f3d..a07b667e 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2014-03-28 Arnold D. Robbins + + * configure.ac: Add AC_HEADER_TIME and AC_HEADER_DIRENT, and + rearrange order of macros some. May help on older systems. + 2014-03-27 Arnold D. Robbins * readfile.c: Add an input parser that works off of diff --git a/extension/configh.in b/extension/configh.in index 8add211a..5842f2f4 100644 --- a/extension/configh.in +++ b/extension/configh.in @@ -30,7 +30,8 @@ */ #undef HAVE_DECL_DIRFD -/* Define to 1 if you have the header file. */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ #undef HAVE_DIRENT_H /* Define to 1 if you have the `dirfd' function. */ @@ -75,6 +76,9 @@ /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT @@ -93,6 +97,14 @@ /* Define to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -108,9 +120,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -149,6 +158,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE diff --git a/extension/configure b/extension/configure index 025e2723..1b7b33d6 100755 --- a/extension/configure +++ b/extension/configure @@ -14052,6 +14052,177 @@ else $as_echo "no" >&6; } fi +for ac_header in fnmatch.h limits.h sys/time.h sys/select.h sys/param.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" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if eval \${$as_ac_Header+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" +else + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; 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 opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; 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_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; 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 opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; 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_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; } if ${ac_cv_header_sys_types_h_makedev+:} false; then : @@ -14102,18 +14273,40 @@ fi fi fi -for ac_header in dirent.h fnmatch.h limits.h time.h sys/time.h sys/select.h sys/param.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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +{ $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 ${ac_cv_header_time+:} false; 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 -done +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi for ac_func in fdopendir fnmatch gettimeofday \ diff --git a/extension/configure.ac b/extension/configure.ac index 412fec09..7be50b34 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -66,8 +66,10 @@ else AC_MSG_RESULT([no]) fi +AC_CHECK_HEADERS(fnmatch.h limits.h sys/time.h sys/select.h sys/param.h) +AC_HEADER_DIRENT AC_HEADER_MAJOR -AC_CHECK_HEADERS(dirent.h fnmatch.h limits.h time.h sys/time.h sys/select.h sys/param.h) +AC_HEADER_TIME AC_CHECK_FUNCS(fdopendir fnmatch gettimeofday \ getdtablesize nanosleep select GetSystemTimeAsFileTime) -- cgit v1.2.1