fi
case "$host" in
- *-sgi-irix*)
- echo "Adding ANSI compile flags for IRIX..."
- if test "$GCC" = "yes"; then
- CFLAGS="$CFLAGS -ansi"
- else
- CFLAGS="$CFLAGS -D__STRICT_ANSI__"
- fi
- ;;
*-hp-hpux*)
echo "Disabling 'ranlib' for HP-UX..."
RANLIB=":"
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 745 "configure"
+#line 737 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
+#line 751 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1057 "configure"
+#line 1049 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1097 "configure"
+#line 1089 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1132 "configure"
+#line 1124 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
-#line 1169 "configure"
+#line 1161 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1191 "configure"
+#line 1183 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
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 1213 "configure"
+#line 1205 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 1231 "configure"
+#line 1223 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1252 "configure"
+#line 1244 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1335 "configure"
+#line 1327 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 1366 "configure"
+#line 1358 "configure"
#include "confdefs.h"
#include <time.h>
#include <sys/time.h>
echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 1392 "configure"
+#line 1384 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <malloc.h>
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1424 "configure"
+#line 1416 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1458 "configure"
+#line 1450 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1492 "configure"
+#line 1484 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() { return 0; }
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1524 "configure"
+#line 1516 "configure"
#include "confdefs.h"
#ifdef __GNUC__
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1583 "configure"
+#line 1575 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1612 "configure"
+#line 1604 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1666 "configure"
+#line 1658 "configure"
#include "confdefs.h"
find_stack_direction ()
{
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1711 "configure"
+#line 1703 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1751 "configure"
+#line 1743 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1791 "configure"
+#line 1783 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1825 "configure"
+#line 1817 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1865 "configure"
+#line 1857 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-l44bsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1906 "configure"
+#line 1898 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1940 "configure"
+#line 1932 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1975 "configure"
+#line 1967 "configure"
#include "confdefs.h"
int main() { return 0; }
+AIO_LIBS=""
+echo $ac_n "checking for -labi""... $ac_c" 1>&6
+ac_lib_var=`echo abi | tr '.-/+' '___p'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-labi $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2004 "configure"
+#include "confdefs.h"
+
+int main() { return 0; }
+int t() {
+main()
+; return 0; }
+EOF
+if eval $ac_link; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ HAVE_LIBABI="yes"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for -lposix4""... $ac_c" 1>&6
+ac_lib_var=`echo posix4 | tr '.-/+' '___p'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lposix4 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2038 "configure"
+#include "confdefs.h"
+
+int main() { return 0; }
+int t() {
+main()
+; return 0; }
+EOF
+if eval $ac_link; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ HAVE_LIBPOSIX4="yes"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+case "$host" in
+ *-sgi-irix*)
+ if test "$HAVE_LIBABI" = "yes"; then
+ AIO_LIBS="-labi"
+ fi
+ ;;
+ *-*-solaris*)
+ if test "$HAVE_LIBPOSIX4" = "yes"; then
+ AIO_LIBS="-lposix4"
+ fi
+ ;;
+esac
+
+
case "$host" in
*-sun-solaris*)
echo "Removing -lmalloc for Solaris..."
esac
for ac_func in \
+ aio_init \
bcopy \
getdtablesize \
getrusage \
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2069 "configure"
+#line 2145 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
SQUID_FD_SETSIZE=256
else
cat > conftest.$ac_ext <<EOF
-#line 2119 "configure"
+#line 2195 "configure"
#include "confdefs.h"
#include <unistd.h>
SQUID_UDP_SO_SNDBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2187 "configure"
+#line 2263 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_UDP_SO_RCVBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2223 "configure"
+#line 2299 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_TCP_SO_SNDBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2259 "configure"
+#line 2335 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_TCP_SO_RCVBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2295 "configure"
+#line 2371 "configure"
#include "confdefs.h"
#include <sys/types.h>
echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 2328 "configure"
+#line 2404 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() { return 0; }
s%@PERL@%$PERL%g
s%@ALLOCA@%$ALLOCA%g
s%@CRYPT_LIB@%$CRYPT_LIB%g
+s%@AIO_LIBS@%$AIO_LIBS%g
s%@XTRA_OBJS@%$XTRA_OBJS%g
s%@XTRA_LIBS@%$XTRA_LIBS%g
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.23 1996/07/16 01:47:16 wessels Exp $
+dnl $Id: configure.in,v 1.24 1996/07/20 03:39:39 wessels Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.23 $)dnl
+AC_REVISION($Revision: 1.24 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AC_CONFIG_AUX_DIR(aux)
dnl Check if ANSI compile options are needed
dnl
case "$host" in
- *-sgi-irix*)
- echo "Adding ANSI compile flags for IRIX..."
- if test "$GCC" = "yes"; then
- [CFLAGS="$CFLAGS -ansi"]
- else
- [CFLAGS="$CFLAGS -D__STRICT_ANSI__"]
- fi
- ;;
*-hp-hpux*)
echo "Disabling 'ranlib' for HP-UX..."
RANLIB=":"
AC_CHECK_LIB(crypt, crypt, [CRYPT_LIB="-lcrypt"])
AC_SUBST(CRYPT_LIB)
+dnl Check for libs needed for aio_read()/aio_write()
+AIO_LIBS=""
+AC_CHECK_LIB(abi, main, [HAVE_LIBABI="yes"])
+AC_CHECK_LIB(posix4, main, [HAVE_LIBPOSIX4="yes"])
+case "$host" in
+ *-sgi-irix*)
+ if test "$HAVE_LIBABI" = "yes"; then
+ AIO_LIBS="-labi"
+ fi
+ ;;
+ *-*-solaris*)
+ if test "$HAVE_LIBPOSIX4" = "yes"; then
+ AIO_LIBS="-lposix4"
+ fi
+ ;;
+esac
+AC_SUBST(AIO_LIBS)
+
dnl System-specific library modifications
dnl
case "$host" in
dnl Check for library functions
AC_CHECK_FUNCS(\
+ aio_init \
bcopy \
getdtablesize \
getrusage \