From: wessels <> Date: Mon, 15 Apr 1996 09:50:47 +0000 (+0000) Subject: use configure test to set HAVE_TM_GMTOFF X-Git-Tag: SQUID_3_0_PRE1~6183 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2060fa9aae92dd5ec13dc943cd33070ea2a8ac3c;p=thirdparty%2Fsquid.git use configure test to set HAVE_TM_GMTOFF --- diff --git a/configure b/configure index 7314f7b78b..cd43940bb1 100755 --- a/configure +++ b/configure @@ -517,7 +517,7 @@ fi -# From configure.in Revision: 1.13 +# From configure.in Revision: 1.14 ac_aux_dir= for ac_dir in aux $srcdir/aux; do if test -f $ac_dir/install-sh; then @@ -696,6 +696,7 @@ if test "`basename $XXXCC`" != "gcc"; then sleep 5 fi + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -711,7 +712,7 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error @@ -725,7 +726,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -1025,7 +1026,7 @@ if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1065,7 +1066,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext < #include @@ -1181,7 +1182,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1199,7 +1200,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1220,7 +1221,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1251,6 +1252,33 @@ EOF fi +echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 +cat > conftest.$ac_ext < +#include +int main() { return 0; } +int t() { +struct tm foo; +foo.tm_gmtoff = 0; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_TM_GMTOFF 1 +EOF + +echo "$ac_t""yes" 1>&6 +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + + for ac_hdr in \ alloca.h \ arpa/inet.h \ @@ -1278,7 +1306,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -1308,7 +1336,7 @@ done cat > conftest.$ac_ext < EOF @@ -1316,9 +1344,6 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "mxfast" >/dev/null 2>&1; then rm -rf conftest* XTRA_CFLAGS="$XTRA_CFLAGS -DLNG_MALLINFO" -else - rm -rf conftest* - XTRA_CFLAGS="$XTRA_CFLAGS" fi rm -f conftest* @@ -1331,7 +1356,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1365,7 +1390,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1399,7 +1424,7 @@ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1431,7 +1456,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext <tm_gmtoff) +AC_TRY_COMPILE([#include +#include ], +[struct tm foo; +foo.tm_gmtoff = 0;], +[AC_DEFINE(HAVE_TM_GMTOFF) +AC_MSG_RESULT(yes)], +AC_MSG_RESULT(no)) + + AC_CHECK_HEADERS( \ alloca.h \ arpa/inet.h \ @@ -116,7 +127,7 @@ AC_CHECK_HEADERS( \ syslog.h \ ) -AC_EGREP_HEADER(mxfast, malloc.h, [XTRA_CFLAGS="$XTRA_CFLAGS -DLNG_MALLINFO"], [XTRA_CFLAGS="$XTRA_CFLAGS"]) +AC_EGREP_HEADER(mxfast, malloc.h, [XTRA_CFLAGS="$XTRA_CFLAGS -DLNG_MALLINFO"]) dnl Check for typedefs AC_CHECK_SIZEOF(int) diff --git a/include/autoconf.h.in b/include/autoconf.h.in index 543e287760..ac614c2621 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -25,6 +25,9 @@ /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Define struct tm has tm_gmtoff member */ +#undef HAVE_TM_GMTOFF + /* The number of bytes in a int. */ #undef SIZEOF_INT