]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
use configure test to set HAVE_TM_GMTOFF
authorwessels <>
Mon, 15 Apr 1996 09:50:47 +0000 (09:50 +0000)
committerwessels <>
Mon, 15 Apr 1996 09:50:47 +0000 (09:50 +0000)
configure
configure.in
include/autoconf.h.in

index 7314f7b78b93b3f52705f29f6aff360b1bde1dee..cd43940bb17dee373ab928a7d352b2a98998dcb3 100755 (executable)
--- 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 <<EOF
-#line 715 "configure"
+#line 716 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
@@ -725,7 +726,7 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 729 "configure"
+#line 730 "configure"
 #include "confdefs.h"
 #include <assert.h>
 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 <<EOF
-#line 1029 "configure"
+#line 1030 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1065,7 +1066,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1069 "configure"
+#line 1070 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1100,7 +1101,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1104 "configure"
+#line 1105 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1137,7 +1138,7 @@ else
   ac_cv_c_cross=yes
 else
 cat > conftest.$ac_ext <<EOF
-#line 1141 "configure"
+#line 1142 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
@@ -1159,7 +1160,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1163 "configure"
+#line 1164 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -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
-#line 1185 "configure"
+#line 1186 "configure"
 #include "confdefs.h"
 #include <string.h>
 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
-#line 1203 "configure"
+#line 1204 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1220,7 +1221,7 @@ if test "$cross_compiling" = yes; then
   :
 else
 cat > conftest.$ac_ext <<EOF
-#line 1224 "configure"
+#line 1225 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #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 <<EOF
+#line 1258 "configure"
+#include "confdefs.h"
+#include <time.h>
+#include <sys/time.h>
+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
-#line 1282 "configure"
+#line 1310 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
@@ -1308,7 +1336,7 @@ done
 
 
 cat > conftest.$ac_ext <<EOF
-#line 1312 "configure"
+#line 1340 "configure"
 #include "confdefs.h"
 #include <malloc.h>
 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 <<EOF
-#line 1335 "configure"
+#line 1360 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 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 <<EOF
-#line 1369 "configure"
+#line 1394 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 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 <<EOF
-#line 1403 "configure"
+#line 1428 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 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 <<EOF
-#line 1435 "configure"
+#line 1460 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1490,7 +1515,7 @@ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1494 "configure"
+#line 1519 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1519,7 +1544,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1523 "configure"
+#line 1548 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1573,7 +1598,7 @@ else
   ac_cv_c_stack_direction=0
 else
 cat > conftest.$ac_ext <<EOF
-#line 1577 "configure"
+#line 1602 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1618,7 +1643,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1622 "configure"
+#line 1647 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1658,7 +1683,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmalloc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1662 "configure"
+#line 1687 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1692,7 +1717,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1696 "configure"
+#line 1721 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1732,7 +1757,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1736 "configure"
+#line 1761 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1772,7 +1797,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1776 "configure"
+#line 1801 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1813,7 +1838,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l44bsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1817 "configure"
+#line 1842 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1847,7 +1872,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1851 "configure"
+#line 1876 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1882,7 +1907,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1886 "configure"
+#line 1911 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -1944,7 +1969,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1948 "configure"
+#line 1973 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
index 9fb2fe37b3e536d4bce8b607e55abf4464a4508b..e0f4a5c48dbe6f9df350c3ac269a5aad5a0560f9 100644 (file)
@@ -3,13 +3,13 @@ dnl  Configuration input file for Squid
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.7)
 dnl
-dnl  $Id: configure.in,v 1.14 1996/04/08 23:25:18 wessels Exp $
+dnl  $Id: configure.in,v 1.15 1996/04/15 03:50:47 wessels Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.14 $)dnl
+AC_REVISION($Revision: 1.15 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(aux)
 
@@ -76,6 +76,7 @@ if test "`basename $XXXCC`" != "gcc"; then
        sleep 5
 fi
 
+
 dnl Check for programs
 AC_PROG_CPP
 AC_PROG_INSTALL
@@ -95,6 +96,16 @@ dnl Check for headers
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 
+AC_MSG_CHECKING(for tm->tm_gmtoff)
+AC_TRY_COMPILE([#include <time.h>
+#include <sys/time.h>],
+[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)
index 543e287760c67f7cad70397d8f158f376fd0fb9c..ac614c2621d1c02088104597107e750e535f1994 100644 (file)
@@ -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