]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
disable poll with environment variable
authorwessels <>
Tue, 18 Aug 1998 03:24:14 +0000 (03:24 +0000)
committerwessels <>
Tue, 18 Aug 1998 03:24:14 +0000 (03:24 +0000)
configure
configure.in

index 5af497569a60c976f083510687cbfe457b3145a8..f3e3bf4d50dd81e63d66412c1e1523d2a9a05eb6 100755 (executable)
--- a/configure
+++ b/configure
@@ -568,7 +568,7 @@ fi
 
 
 
-# From configure.in Revision: 1.137 
+# From configure.in Revision: 1.138 
 ac_aux_dir=
 for ac_dir in cfgaux $srcdir/cfgaux; do
   if test -f $ac_dir/install-sh; then
@@ -3569,6 +3569,30 @@ case "$host" in
                ;;
 esac
 
+# Disable poll() on certain platforms. Override by setting ac_cv_func_poll
+# when running configure.
+if test -z "$ac_cv_func_poll"; then
+       case "$host" in
+               alpha-dec-osf3.*)
+                       # John Kay (jkay@nlanr.net) 19970818
+                       echo "disabling poll for $host..."
+                       ac_cv_func_poll='no'
+                       ;;
+               *-hp-hpux*.*)
+                       # Duane Wessels
+                       echo "disabling poll for $host..."
+                       ac_cv_func_poll='no'
+                       ;;
+               *-linux-*)
+                       # Henrik Nordstrom (hno@hem.passagen.se) 19980606
+                       # poll is emulated using select() on Linux 2.0
+                       if test "`uname -r | cut -d. -f-2 | sed -e 's/\.//'`" -le 20; then
+                           echo "disabling poll for $host `uname -r` < 2.1..."
+                           ac_cv_func_poll='no'
+                       fi
+                       ;;
+       esac
+fi
 
 for ac_func in \
        bcopy \
@@ -3587,6 +3611,7 @@ for ac_func in \
        memset \
        mktime \
        mstats \
+       poll \
        random \
        regcomp \
        regexec \
@@ -3609,12 +3634,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3613: checking for $ac_func" >&5
+echo "configure:3638: checking for $ac_func" >&5
 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 3618 "configure"
+#line 3643 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3637,7 +3662,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3662,78 +3687,8 @@ fi
 done
 
 
-case "$host" in
-       alpha-dec-osf3.*)
-               # John Kay (jkay@nlanr.net) 19970818
-               echo "skipping poll() check for $host..."
-               ac_cv_func_poll='no'
-               ;;
-       *-hp-hpux*.*)
-               # Duane Wessels
-               echo "skipping poll() check for $host..."
-               ac_cv_func_poll='no'
-               ;;
-       *)
-               for ac_func in poll
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3681: checking for $ac_func" >&5
-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 3686 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-               ;;
-esac
-
 echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6
-echo "configure:3737: checking if setresuid is implemented" >&5
+echo "configure:3692: checking if setresuid is implemented" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setresuid'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3741,7 +3696,7 @@ else
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3745 "configure"
+#line 3700 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -3754,7 +3709,7 @@ else
   }
   
 EOF
-if { (eval echo configure:3758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_setresuid="yes"
 else
@@ -3788,13 +3743,13 @@ if test -z "$USE_GNUREGEX" ; then
     esac
 fi
 echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6
-echo "configure:3792: checking if GNUregex needs to be compiled" >&5
+echo "configure:3747: checking if GNUregex needs to be compiled" >&5
 if test -z "$USE_GNUREGEX"; then
 if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
        USE_GNUREGEX="yes"
 else
        cat > conftest.$ac_ext <<EOF
-#line 3798 "configure"
+#line 3753 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <regex.h>
@@ -3802,7 +3757,7 @@ int main() {
 regex_t t; regcomp(&t,"",0);
 ; return 0; }
 EOF
-if { (eval echo configure:3806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   USE_GNUREGEX="no"
 else
@@ -3832,12 +3787,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3836: checking for $ac_func" >&5
+echo "configure:3791: checking for $ac_func" >&5
 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 3841 "configure"
+#line 3796 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3860,7 +3815,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3888,12 +3843,12 @@ done
 
 
 echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6
-echo "configure:3892: checking Default FD_SETSIZE value" >&5
+echo "configure:3847: checking Default FD_SETSIZE value" >&5
 if test "$cross_compiling" = yes; then
   DEFAULT_FD_SETSIZE=256
 else
   cat > conftest.$ac_ext <<EOF
-#line 3897 "configure"
+#line 3852 "configure"
 #include "confdefs.h"
 
 #if HAVE_STDIO_H
@@ -3917,7 +3872,7 @@ main() {
 }
 
 EOF
-if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   DEFAULT_FD_SETSIZE=`cat conftestval`
 else
@@ -3936,12 +3891,12 @@ EOF
 
 
 echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6
-echo "configure:3940: checking Maximum number of filedescriptors we can open" >&5
+echo "configure:3895: checking Maximum number of filedescriptors we can open" >&5
 if test "$cross_compiling" = yes; then
   SQUID_MAXFD=256
 else
   cat > conftest.$ac_ext <<EOF
-#line 3945 "configure"
+#line 3900 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4000,7 +3955,7 @@ main() {
 }
 
 EOF
-if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_MAXFD=`cat conftestval`
 else
@@ -4026,12 +3981,12 @@ if test "$SQUID_MAXFD" -lt 512 ; then
 fi
 
 echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6
-echo "configure:4030: checking Default UDP send buffer size" >&5
+echo "configure:3985: checking Default UDP send buffer size" >&5
 if test "$cross_compiling" = yes; then
   SQUID_UDP_SO_SNDBUF=16384
 else
   cat > conftest.$ac_ext <<EOF
-#line 4035 "configure"
+#line 3990 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4050,7 +4005,7 @@ main ()
 }
 
 EOF
-if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_UDP_SO_SNDBUF=`cat conftestval`
 else
@@ -4069,12 +4024,12 @@ EOF
 
 
 echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6
-echo "configure:4073: checking Default UDP receive buffer size" >&5
+echo "configure:4028: checking Default UDP receive buffer size" >&5
 if test "$cross_compiling" = yes; then
   SQUID_UDP_SO_RCVBUF=16384
 else
   cat > conftest.$ac_ext <<EOF
-#line 4078 "configure"
+#line 4033 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4093,7 +4048,7 @@ main ()
 }
 
 EOF
-if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_UDP_SO_RCVBUF=`cat conftestval`
 else
@@ -4112,12 +4067,12 @@ EOF
 
 
 echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6
-echo "configure:4116: checking Default TCP send buffer size" >&5
+echo "configure:4071: checking Default TCP send buffer size" >&5
 if test "$cross_compiling" = yes; then
   SQUID_TCP_SO_SNDBUF=16384
 else
   cat > conftest.$ac_ext <<EOF
-#line 4121 "configure"
+#line 4076 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4136,7 +4091,7 @@ main ()
 }
 
 EOF
-if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_TCP_SO_SNDBUF=`cat conftestval`
 else
@@ -4155,12 +4110,12 @@ EOF
 
 
 echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6
-echo "configure:4159: checking Default TCP receive buffer size" >&5
+echo "configure:4114: checking Default TCP receive buffer size" >&5
 if test "$cross_compiling" = yes; then
   SQUID_TCP_SO_RCVBUF=16384
 else
   cat > conftest.$ac_ext <<EOF
-#line 4164 "configure"
+#line 4119 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4179,7 +4134,7 @@ main ()
 }
 
 EOF
-if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_TCP_SO_RCVBUF=`cat conftestval`
 else
@@ -4198,19 +4153,19 @@ EOF
 
 
 echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
-echo "configure:4202: checking if sys_errlist is already defined" >&5
+echo "configure:4157: checking if sys_errlist is already defined" >&5
 if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4207 "configure"
+#line 4162 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 char *s = sys_errlist0;
 ; return 0; }
 EOF
-if { (eval echo configure:4214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_needs_sys_errlist="no"
 else
@@ -4232,16 +4187,16 @@ EOF
 fi
 
 echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6
-echo "configure:4236: checking for libresolv _dns_ttl_ hack" >&5
+echo "configure:4191: checking for libresolv _dns_ttl_ hack" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4238 "configure"
+#line 4193 "configure"
 #include "confdefs.h"
 extern int _dns_ttl_;
 int main() {
 return _dns_ttl_;
 ; return 0; }
 EOF
-if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 cat >> confdefs.h <<\EOF
index 8ccc98ce44fcfcf1d95b3318226efcb23d8e1577..1cb5a690cd4c3cb8c8ecea79b8c3a0f00567df8a 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.138 1998/08/17 16:47:59 wessels Exp $
+dnl  $Id: configure.in,v 1.139 1998/08/17 21:24:14 wessels Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.138 $)dnl
+AC_REVISION($Revision: 1.139 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(cfgaux)
 
@@ -693,6 +693,31 @@ case "$host" in
                ;;
 esac
 
+dnl This has to be before AC_CHECK_FUNCS
+# Disable poll() on certain platforms. Override by setting ac_cv_func_poll
+# when running configure.
+if test -z "$ac_cv_func_poll"; then
+       case "$host" in
+               [alpha-dec-osf3.*])
+                       # John Kay (jkay@nlanr.net) 19970818
+                       echo "disabling poll for $host..."
+                       ac_cv_func_poll='no'
+                       ;;
+               [*-hp-hpux*.*])
+                       # Duane Wessels
+                       echo "disabling poll for $host..."
+                       ac_cv_func_poll='no'
+                       ;;
+               [*-linux-*])
+                       # Henrik Nordstrom (hno@hem.passagen.se) 19980606
+                       # poll is emulated using select() on Linux 2.0
+                       if test "`uname -r | cut -d. -f-2 | sed -e 's/\.//'`" -le 20; then
+                           echo "disabling poll for $host `uname -r` < 2.1..."
+                           ac_cv_func_poll='no'
+                       fi
+                       ;;
+       esac
+fi
 
 dnl Check for library functions
 AC_CHECK_FUNCS(\
@@ -712,6 +737,7 @@ AC_CHECK_FUNCS(\
        memset \
        mktime \
        mstats \
+       poll \
        random \
        regcomp \
        regexec \
@@ -733,22 +759,6 @@ AC_CHECK_FUNCS(\
        vsnprintf \
 )
 
-case "$host" in
-       [alpha-dec-osf3.*])
-               # John Kay (jkay@nlanr.net) 19970818
-               echo "skipping poll() check for $host..."
-               ac_cv_func_poll='no'
-               ;;
-       [*-hp-hpux*.*])
-               # Duane Wessels
-               echo "skipping poll() check for $host..."
-               ac_cv_func_poll='no'
-               ;;
-       *)
-               AC_CHECK_FUNCS(poll)
-               ;;
-esac
-
 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.