]> granicus.if.org Git - apache/blobdiff - configure.in
Silence compiler warnings:
[apache] / configure.in
index 7e62596fcd4dd171125b87753f4399d34d399e7c..55e5e32060693dfd1e8c92b0955012f69f90e595 100644 (file)
@@ -236,12 +236,16 @@ if test "$PCRE_CONFIG" != "false"; then
   fi
   case `$PCRE_CONFIG --version` in
   [[1-5].*])
-    AC_MSG_ERROR([Need at least pcre version 6.0])
+    AC_MSG_ERROR([Need at least pcre version 6.7])
+    ;;
+  [6.[0-6]*])
+    AC_MSG_ERROR([Need at least pcre version 6.7])
     ;;
   esac
   AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
   APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`])
   APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`])
+  APR_ADDTO(HTTPD_LIBS, [\$(PCRE_LIBS)])
 else
   AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/])
 fi
@@ -271,6 +275,20 @@ APR_ADDTO(INCLUDES, $APU_INCLUDES)
 dnl Add in path to PCRE includes
 APR_ADDTO(INCLUDES, $PCRE_INCLUDES)
 
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PCRE_INCLUDES"
+AC_EGREP_CPP(yes,
+[
+#include <pcre.h>
+#ifdef PCRE_DUPNAMES
+yes
+#endif
+],pcre_have_dupnames=yes,pcre_have_dupnames=no)
+if test "$pcre_have_dupnames" != "yes"; then
+    AC_MSG_ERROR([pcre version does not support PCRE_DUPNAMES])
+fi
+CPPFLAGS="$save_CPPFLAGS"
+
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Applying OS-specific hints for httpd...])
 AC_MSG_NOTICE([])
@@ -323,10 +341,11 @@ case $host in
       ;;
   *-linux-*)
       case `uname -r` in
-        2.[[2-9]]* ) 
-            APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
+        # Unserialized accept() was not recommended until Linux 2.2.
+        [[01]].* | 2.[[01]]* )
             ;;
         * )
+            APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
             ;;
       esac
       ;;
@@ -512,6 +531,8 @@ if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
     AC_DEFINE(HAVE_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field])
 fi
 
+APACHE_CHECK_SYSTEMD
+
 dnl ## Set up any appropriate OS-specific environment variables for apachectl
 
 case $host in
@@ -616,6 +637,10 @@ AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn o
       LOAD_ALL_MODULES=yes
       AC_MSG_NOTICE([Maintainer mode setting "LOAD_ALL_MODULES" to $LOAD_ALL_MODULES])
     fi
+    if test "x$enable_bucketeer" = "x"; then
+      enable_bucketeer=yes
+      AC_MSG_NOTICE([Maintainer mode setting "enable_bucketeer" to yes])
+    fi
   fi
 ])dnl
 
@@ -659,6 +684,22 @@ fi
 APACHE_SUBST(PICFLAGS)
 APACHE_SUBST(PILDFLAGS)
 
+AC_ARG_WITH(valgrind,
+  [  --with-valgrind[[=DIR]]   Enable code to reduce valgrind false positives
+                          (optionally: set path to valgrind headers) ],
+  [ if test "$withval" != no; then
+      if test "$withval" = yes; then
+        withval=/usr/include/valgrind
+      fi
+      APR_ADDTO(CPPFLAGS, -I$withval)
+      AC_CHECK_HEADERS(valgrind.h memcheck.h)
+      APR_IFALLYES(header:valgrind.h header:memcheck.h,
+        [AC_DEFINE(HAVE_VALGRIND, 1, [Compile in valgrind support]) ],
+        [AC_MSG_ERROR(valgrind headers not found) ]
+      )
+    fi ]
+)
+
 prefix="$orig_prefix"
 APACHE_ENABLE_MODULES
 
@@ -671,6 +712,7 @@ APACHE_SUBST(OS_DIR)
 APACHE_SUBST(BUILTIN_LIBS)
 APACHE_SUBST(SHLIBPATH_VAR)
 APACHE_SUBST(OS_SPECIFIC_VARS)
+APACHE_SUBST(HTTPD_LIBS)
 
 PRE_SHARED_CMDS='echo ""'
 POST_SHARED_CMDS='echo ""'
@@ -808,7 +850,10 @@ AC_ARG_ENABLE(v4-mapped,APACHE_HELP_STRING(--enable-v4-mapped,Allow IPv6 sockets
 ],
 [
     case $host in
-    *freebsd5*|*netbsd*|*openbsd*)
+    *freebsd[1234].*)
+        v4mapped=yes
+        ;;
+    *freebsd*|*netbsd*|*openbsd*)
         v4mapped=no
         ;;
     *)
@@ -826,6 +871,15 @@ if test $v4mapped = "yes" -a $ac_cv_define_APR_HAVE_IPV6 = "yes"; then
               [Allow IPv4 connections on IPv6 listening sockets])
 fi
 
+AC_ARG_ENABLE(bsd-makefiles,APACHE_HELP_STRING(--enable-bsd-makefiles,use BSD Makefile syntax),
+[
+  FORCE_BSD_MAKEFILE=$enableval
+  AC_MSG_NOTICE([Setting "FORCE_BSD_MAKEFILE" to $FORCE_BSD_MAKEFILE])
+],
+[
+  FORCE_BSD_MAKEFILE="auto"
+])
+
 APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) 
 APACHE_FAST_OUTPUT(os/Makefile server/Makefile)
 APACHE_FAST_OUTPUT(support/Makefile)
@@ -870,24 +924,45 @@ if test "x$perlbin" = "x"; then
 fi
 AC_SUBST(perlbin)
 
-dnl If we are running on BSD/OS, we need to use the BSD .include syntax.
+dnl If we are running on a BSD variant, see if we need to use the BSD .include syntax.
 
-BSD_MAKEFILE=no
 ap_make_include=include
+ap_make_ifdef=ifdef
+ap_make_else=else
+ap_make_endif=endif
 ap_make_delimiter=' '
-case $host in
-*bsdi*)
-    # Check whether they've installed GNU make
-    if make --version > /dev/null 2>&1; then
-        true
-    else
-        BSD_MAKEFILE=yes
-        ap_make_include=.include
-        ap_make_delimiter='"'
-    fi
-    ;;
-esac
+if test "x$FORCE_BSD_MAKEFILE" = "xno"; then
+  BSD_MAKEFILE=no
+elif test "x$FORCE_BSD_MAKEFILE" = "xyes"; then
+  BSD_MAKEFILE=yes
+else
+  case $host in
+  *bsd*)
+      # Check whether they've installed GNU make
+      if make --version > /dev/null 2>&1; then
+          BSD_MAKEFILE=no
+      else
+          BSD_MAKEFILE=yes
+      fi
+      ;;
+  *)
+      BSD_MAKEFILE=no
+      ;;
+  esac
+fi
+if test "x$BSD_MAKEFILE" = "xyes"; then
+  ap_make_include=.include
+  ap_make_ifdef=.ifdef
+  ap_make_else=.else
+  ap_make_endif=.endif
+  ap_make_delimiter='"'
+fi
+AC_MSG_NOTICE([using BSD Makefile syntax... $BSD_MAKEFILE])
+
 AC_SUBST(ap_make_include)
+AC_SUBST(ap_make_ifdef)
+AC_SUBST(ap_make_else)
+AC_SUBST(ap_make_endif)
 AC_SUBST(ap_make_delimiter)
 
 dnl Ensure that docs/conf is created.