From: wessels <> Date: Sat, 20 Jul 1996 09:39:39 +0000 (+0000) Subject: -Check for libabi (IRIX) and libposix4 (Solaris) for aio_* stuff. X-Git-Tag: SQUID_3_0_PRE1~6018 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13e18812b2d9b17817f858e925b8072a98fe7045;p=thirdparty%2Fsquid.git -Check for libabi (IRIX) and libposix4 (Solaris) for aio_* stuff. -Check for aio_init(). --- diff --git a/configure b/configure index 0486f4c4be..11de7756c1 100755 --- a/configure +++ b/configure @@ -701,14 +701,6 @@ if test -z "$PRESET_CFLAGS"; then 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=":" @@ -741,7 +733,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 @@ -755,7 +747,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -1053,7 +1045,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> @@ -1093,7 +1085,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 @@ -1209,7 +1201,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 @@ -1227,7 +1219,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 @@ -1248,7 +1240,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1331,7 +1323,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 @@ -1362,7 +1354,7 @@ done echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 cat > conftest.$ac_ext < #include @@ -1388,7 +1380,7 @@ rm -f conftest* echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 cat > conftest.$ac_ext < #include @@ -1420,7 +1412,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1454,7 +1446,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1488,7 +1480,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; } @@ -1520,7 +1512,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 +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 <&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 <&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..." @@ -2033,6 +2108,7 @@ EOF esac for ac_func in \ + aio_init \ bcopy \ getdtablesize \ getrusage \ @@ -2065,7 +2141,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 < conftest.$ac_ext < @@ -2183,7 +2259,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=8192 else cat > conftest.$ac_ext < @@ -2219,7 +2295,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=8192 else cat > conftest.$ac_ext < @@ -2255,7 +2331,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=8192 else cat > conftest.$ac_ext < @@ -2291,7 +2367,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=8192 else cat > conftest.$ac_ext < @@ -2324,7 +2400,7 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } @@ -2511,6 +2587,7 @@ s%@LN@%$LN%g 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 diff --git a/configure.in b/configure.in index 9f4c864aee..be5224289c 100644 --- a/configure.in +++ b/configure.in @@ -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.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) @@ -82,14 +82,6 @@ if test -z "$PRESET_CFLAGS"; then 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=":" @@ -213,6 +205,24 @@ dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD) 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 @@ -244,6 +254,7 @@ esac dnl Check for library functions AC_CHECK_FUNCS(\ + aio_init \ bcopy \ getdtablesize \ getrusage \ diff --git a/include/autoconf.h.in b/include/autoconf.h.in index efda163b9f..be80730523 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -61,6 +61,9 @@ /* The number of bytes in a long. */ #undef SIZEOF_LONG +/* Define if you have the aio_init function. */ +#undef HAVE_AIO_INIT + /* Define if you have the bcopy function. */ #undef HAVE_BCOPY