]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - configure.in
2.1 branch merge
[thirdparty/squid.git] / configure.in
index 98a809a001c2cddf76a51d21b68bf3b74eaaec7a..8ed846147bdf0c69edfd3c81d6a2992a2fb63c68 100644 (file)
@@ -3,13 +3,13 @@ dnl  Configuration input file for Squid
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.159 1998/10/17 05:08:16 wessels Exp $
+dnl  $Id: configure.in,v 1.160 1998/11/12 06:29:26 wessels Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.159 $)dnl
+AC_REVISION($Revision: 1.160 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(cfgaux)
 
@@ -271,10 +271,20 @@ AC_ARG_ENABLE(async_io,
 [  --enable-async-io       Do ASYNC disk I/O using threads],
 [ if test "$enableval" = "yes" ; then
     echo "Async I/O enabled"
+    async_io=yes
     AC_DEFINE(USE_ASYNC_IO)
     ASYNC_OBJS='$(ASYNC_OBJS)'
     SQUID_PTHREAD_LIB='$(PTHREADLIB)'
     CFLAGS="$CFLAGS -D_REENTRANT"
+    case "$host" in
+    i386-unknown-freebsd*)
+       if test "$GCC" = "yes" ; then
+           if test -z "$PRESET_LDFLAGS"; then
+               LDFLAGS="$LDFLAGS -pthread"
+           fi
+       fi
+       ;;
+    esac
   fi
 ])
 AC_SUBST(ASYNC_OBJS)
@@ -429,19 +439,25 @@ AC_ARG_ENABLE(poll,
                           is broken on some platforms.  If you think you are
                           smarter than the configure script, you may enable
                           poll with this option.
-],
-[ if test "$enableval" = "yes" ; then
+  --disable-poll          Disable the use of poll().],
+[ 
+  case "$enableval" in
+  yes)
     echo "Forcing poll() to be enabled"
     ac_cv_func_poll='yes'
-  fi
+    ;;
+  no)
+    echo "Forcing poll() to be disabled"
+    ac_cv_func_poll='no'
+    ;;
+  esac
 ])
 
 dnl Disable HTTP violations
 AC_ARG_ENABLE(http-violations,
 [  --disable-http-violations
                           This allows you to remove code which is known to
-                          violate the HTTP protocol specification.
-],
+                          violate the HTTP protocol specification.],
 [ if test "$enableval" = "no" ; then
     echo "Disabling HTTP Violations"
     AC_DEFINE(HTTP_VIOLATIONS, 0)
@@ -454,8 +470,7 @@ dnl Enable IP-Filter Transparent Proxy
 AC_ARG_ENABLE(ipf-transparent,
 [  --enable-ipf-transparent
                           Enable Transparent Proxy support for systems
-                          using IP-Filter network address redirection.
-],
+                          using IP-Filter network address redirection.],
 [ if test "$enableval" = "yes" ; then
        echo "IP-Filter Transparent Proxy enabled"
        AC_DEFINE(IPF_TRANSPARENT)
@@ -473,6 +488,13 @@ case "$host" in
                ac_cv_prog_CC="$CC"
        fi
        ;;
+    *-hp-hpux*)
+       if test "$ac_cv_prog_CC" = "cc" ; then
+               echo "adding '-Ae' to cc args for $host"
+               CC="cc -Ae";
+               ac_cv_prog_CC="$CC"
+       fi
+       ;;
 esac
 
 dnl Check for programs
@@ -542,6 +564,7 @@ AC_CHECK_HEADERS( \
        pwd.h \
        regex.h \
        resolv.h \
+       sched.h \
        signal.h \
        stdarg.h \
        stddef.h \
@@ -755,6 +778,15 @@ dnl Please change your configure script.  AIX doesn't need -lbsd.
        *-ibm-aix*)
                echo "Removing -lbsd for AIX..."
                LIBS=`echo $LIBS | sed -e s/-lbsd//`
+dnl From: mlaster@metavillage.com (Mike Laster)
+dnl AIX 4.1.4.x does not have header files for snprintf/vsnprintf
+dnl So using the internal versions generates a load of warnings
+dnl during compile.
+               echo "disabling snprintf/vsnprintf for $host"
+               ac_cv_func_snprintf=no
+               ac_cv_func_vsnprintf=no
+               echo "disabling seteuid for $host"
+               ac_cv_func_seteuid=no
                ;;
        *m88k*)
                CFLAGS="$CFLAGS -D_SQUID_MOTOROLA_"
@@ -800,6 +832,11 @@ if test -z "$ac_cv_func_poll"; then
                        echo "disabling poll for $host..."
                        ac_cv_func_poll='no'
                        ;;
+               [powerpc-ibm-aix4.1.*])
+                       # Mike Laster (mlaster@metavillage.com) 19981021
+                       echo "disabling poll for $host..."
+                       ac_cv_func_poll='no'
+                       ;;
        esac
 fi
 
@@ -823,6 +860,7 @@ AC_CHECK_FUNCS(\
        mktime \
        mstats \
        poll \
+       putenv \
        random \
        regcomp \
        regexec \
@@ -845,6 +883,14 @@ AC_CHECK_FUNCS(\
        vsnprintf \
 )
 
+if test "$async_io" = "yes" ; then
+       AC_CHECK_FUNCS(\
+               pthread_attr_setscope \
+               pthread_setschedparam \
+               pthread_attr_setschedparam \
+       )
+fi
+
 dnl Yay!  Another Linux brokenness.  Its not good enough
 dnl to know that setresuid() exists, because RedHat 5.0 declares
 dnl setresuid() but doesn't implement it.
@@ -1162,6 +1208,77 @@ else
        sleep 10
 fi
 
+if test "$ac_cv_func_statvfs" = "yes" ; then
+AC_MSG_CHECKING(for working statvfs() interface)
+AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/statvfs.h>
+],
+[
+struct statvfs sfs;
+sfs.f_blocks = sfs.f_bfree = sfs.f_frsize = 
+sfs.f_files = sfs.f_ffree = 0;
+statvfs("/tmp", &sfs);
+],
+  ac_cv_func_statvfs=yes,
+  ac_cv_func_statvfs=no)
+AC_MSG_RESULT($ac_cv_func_statvfs)
+fi
+
+AC_CACHE_CHECK(for _res.nsaddr_list, ac_cv_have_res_nsaddr_list,
+AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#if HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#if HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+],
+[_res.nsaddr_list[[0]];],
+ac_cv_have_res_nsaddr_list="yes",
+ac_cv_have_res_nsaddr_list="no"))
+if test $ac_cv_have_res_nsaddr_list = "yes" ; then
+  AC_DEFINE(HAVE_RES_NSADDR_LIST)
+fi
+
+if test $ac_cv_have_res_nsaddr_list = "no" ; then
+AC_CACHE_CHECK(for _res.ns_list, ac_cv_have_res_ns_list,
+AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#if HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#if HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+],
+[_res.ns_list[[0]].addr;],
+ac_cv_have_res_ns_list="yes",
+ac_cv_have_res_ns_list="no"))
+if test $ac_cv_have_res_ns_list = "yes" ; then
+  AC_DEFINE(HAVE_RES_NS_LIST)
+fi
+fi
+
 dnl Need the debugging version of malloc if available
 XTRA_OBJS=''
 if test "$ac_cv_lib_malloc_main" = "yes" ; then