Fix usermodes harder when they are set early during registration.
[ircu2.10.12-pk.git] / configure
index 12bb8114c8d685913d19b1222293693e606426ab..823dc09258a517784b630979831f4a9090a0c45f 100755 (executable)
--- a/configure
+++ b/configure
@@ -849,8 +849,7 @@ Optional Features:
                           it is a system call
   --enable-debug          Turn on debugging mode
   --disable-asserts       Disable assertion checking
-  --disable-symbols       Disable debugging symbols (remove -g from CFLAGS)
-  --enable-profile        Enable profiling support (add -pg to CFLAGS)
+  --enable-profile        Enable profiling support (add -pg to CFLAGS and LDFLAGS)
   --enable-pedantic       Enable pedantic warnings (add -pedantic to CFLAGS)
   --enable-warnings       Enable warnings (add -Wall to CFLAGS)
   --disable-inlines       Disable inlining for a few critical functions
@@ -861,8 +860,6 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-optimization=-O2 Explicitly set the compiler optimization flags
-                          (default: -O3)
   --with-leak-detect          Turn on the leak detector(requires patched boehm)
   --without-ipv6          disable IPv6 support (default is autodetect)
   --with-symlink=name     Name to give the symlink; if name is "no," no
@@ -3092,61 +3089,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
 
 
-# Check whether --with-optimization or --without-optimization was given.
-if test "${with_optimization+set}" = set; then
-  withval="$with_optimization"
-  unet_cv_optimization=$withval
-else
-  unet_cv_optimization='-O3'
-fi;
-echo "$as_me:$LINENO: checking optimization level" >&5
-echo $ECHO_N "checking optimization level... $ECHO_C" >&6
-if test "${unet_cv_optimization+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  unet_cv_optimization='-O3'
-fi
-echo "$as_me:$LINENO: result: $unet_cv_optimization" >&5
-echo "${ECHO_T}$unet_cv_optimization" >&6
-if test "x$unet_cv_optimization" = "xno" ; then
-    unet_cv_optimization=""
-fi
-if test x"$CFLAGS" != x; then
-    CFLAGS=`echo "$CFLAGS" | sed -e s/-O2/$unet_cv_optimization/`
-fi
-if test x"$CFLAGS" != x; then
-    unet_old_cflags=$CFLAGS
-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-g//g'`
-fi
-if test x"$CFLAGS" != x"$unet_old_cflags"; then
-    # If -g was already there, force symbols to be enabled
-    unet_cv_enable_symbols=yes
-fi
-if test x"$CFLAGS" != x; then
-    unet_old_cflags=$CFLAGS
-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-pg//g'`
-fi
-if test x"$CFLAGS" != x"$unet_old_cflags"; then
-    # If -pg was already there, force profiling to be enabled
-    unet_cv_enable_profile=yes
-fi
-if test x"$CFLAGS" != x; then
-    unet_old_cflags=$CFLAGS
-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wall//g'`
-fi
-if test x"$CFLAGS" != x"$unet_old_cflags"; then
-    # If -Wall was already there, force warnings to be enabled
-    unet_cv_enable_warnings=yes
-fi
-if test x"$CFLAGS" != x; then
-    unet_old_cflags=$CFLAGS
-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-pedantic//g'`
-fi
-if test x"$CFLAGS" != x"$unet_old_cflags"; then
-    # If -pedantic was already there, force pedatic to be enabled
-    unet_cv_enable_pedantic=yes
-fi
-
 
 
 echo "$as_me:$LINENO: checking for library containing crypt" >&5
@@ -8441,6 +8383,71 @@ else
 echo "$as_me: error: Cannot find a type with size of 64 bits" >&2;}
    { (exit 1); exit 1; }; }
 fi
+echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
+echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
+if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <netinet/in.h>
+
+int
+main ()
+{
+if ((struct sockaddr_in6 *) 0)
+  return 0;
+if (sizeof (struct sockaddr_in6))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_struct_sockaddr_in6=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_struct_sockaddr_in6=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
+echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
+if test $ac_cv_type_struct_sockaddr_in6 = yes; then
+  unet_have_sockaddr_in6="yes"
+else
+  unet_have_sockaddr_in6="no"
+fi
+
+
 echo "$as_me:$LINENO: checking for socklen_t" >&5
 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
 if test "${ac_cv_type_socklen_t+set}" = set; then
@@ -8452,7 +8459,9 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
+#include <sys/types.h>
+#include<sys/socket.h>
+
 int
 main ()
 {
@@ -8501,33 +8510,29 @@ if test $ac_cv_type_socklen_t = yes; then
   :
 else
 
-cat >>confdefs.h <<_ACEOF
-#define socklen_t unsigned int
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
-echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
-if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
+  echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
+echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6
+  if test "${curl_cv_socklen_t_equiv+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+
+    curl_cv_socklen_t_equiv=
+    for arg2 in "struct sockaddr" void ; do
+      for t in int size_t unsigned long "unsigned long" ; do
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <sys/types.h>
-#include <netinet/in.h>
-
+#include <sys/socket.h>
+int getpeername (int $arg2 *, $t *);
 int
 main ()
 {
-if ((struct sockaddr_in6 *) 0)
-  return 0;
-if (sizeof (struct sockaddr_in6))
-  return 0;
+$t len;
+  getpeername(0, 0, &len);
   ;
   return 0;
 }
@@ -8554,21 +8559,26 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_struct_sockaddr_in6=yes
+  curl_cv_socklen_t_equiv="$t"
+  break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_struct_sockaddr_in6=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+      done
+    done
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
-echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
-if test $ac_cv_type_struct_sockaddr_in6 = yes; then
-  unet_have_sockaddr_in6="yes"
-else
-  unet_have_sockaddr_in6="no"
+
+  echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5
+echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define socklen_t $curl_cv_socklen_t_equiv
+_ACEOF
+
 fi
 
 
@@ -9535,20 +9545,6 @@ echo "$as_me: error: Cannot use $LEX as flex." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-if test -z "$LEXLIB" ; then
-  { { echo "$as_me:$LINENO: error: Cannot find a library with yywrap() in, but flex was found.
-  It's possible the compiler you're using ($CC) is incompatible with the
-  installed library.
-See \`config.log' for more details." >&5
-echo "$as_me: error: Cannot find a library with yywrap() in, but flex was found.
-  It's possible the compiler you're using ($CC) is incompatible with the
-  installed library.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-LIBS="$LEXLIB $LIBS"
-
 for ac_prog in 'bison -y' byacc
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -9907,6 +9903,11 @@ echo "${ECHO_T}Solaris ($host) found." >&6
        else
            unet_poll_syscall=no
        fi
+
+cat >>confdefs.h <<\_ACEOF
+#define IRCU_SOLARIS 1
+_ACEOF
+
        ;;
 
     *-sunos*)
@@ -10086,27 +10087,6 @@ _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking whether to enable debugging symbols" >&5
-echo $ECHO_N "checking whether to enable debugging symbols... $ECHO_C" >&6
-# Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
-  enableval="$enable_symbols"
-  unet_cv_enable_symbols=$enable_symbols
-else
-  if test "${unet_cv_enable_symbols+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  unet_cv_enable_symbols=yes
-fi
-
-fi;
-echo "$as_me:$LINENO: result: $unet_cv_enable_symbols" >&5
-echo "${ECHO_T}$unet_cv_enable_symbols" >&6
-
-if test x"$unet_cv_enable_symbols" = xyes; then
-    CFLAGS="-g $CFLAGS"
-fi
-
 echo "$as_me:$LINENO: checking whether to enable profiling support (gprof)" >&5
 echo $ECHO_N "checking whether to enable profiling support (gprof)... $ECHO_C" >&6
 # Check whether --enable-profile or --disable-profile was given.
 fi;
 
 if test x"$unet_cv_with_maxcon" = xyes -o x"$unet_cv_with_maxcon" = xno; then
+    if test "$unet_maxcon" -lt 32; then
+      { { echo "$as_me:$LINENO: error: Maximum connections (number of open files minus 4) must be at least 32." >&5
+echo "$as_me: error: Maximum connections (number of open files minus 4) must be at least 32." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
     unet_cv_with_maxcon=$unet_maxcon
+elif test "$unet_cv_with_maxcon" -lt 32; then
+    { { echo "$as_me:$LINENO: error: Maximum connections (--with-maxcon) must be at least 32." >&5
+echo "$as_me: error: Maximum connections (--with-maxcon) must be at least 32." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 echo "$as_me:$LINENO: result: $unet_cv_with_maxcon" >&5