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)
[ --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)
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)
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)
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
pwd.h \
regex.h \
resolv.h \
+ sched.h \
signal.h \
stdarg.h \
stddef.h \
*-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_"
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
mktime \
mstats \
poll \
+ putenv \
random \
regcomp \
regexec \
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.
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