]> granicus.if.org Git - apache/blobdiff - configure.in
add support for bcrypt
[apache] / configure.in
index 112f551816d0f4673f5d1179cd059d4be07d9503..1b0cee14d323574da28ee877935aef93688f3991 100644 (file)
@@ -80,23 +80,33 @@ AC_CANONICAL_SYSTEM
 
 orig_prefix="$prefix"
 
-echo $ac_n "${nl}Configuring Apache Portable Runtime library ...${nl}"
+AC_MSG_NOTICE([])
+AC_MSG_NOTICE([Configuring Apache Portable Runtime library...])
+AC_MSG_NOTICE([])
 
 AC_ARG_WITH(included-apr,
 APACHE_HELP_STRING(--with-included-apr,Use bundled copies of APR/APR-Util))
 
 if test "x$with_included_apr" = "xyes"; then
   apr_found=reconfig
-  if test ! -d srclib/apr; then
   if test ! -d srclib/apr && test ! -d $srcdir/srclib/apr; then
-    AC_MSG_ERROR([Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.])
+    AC_MSG_ERROR([Bundled APR requested but not found at ./srclib/. Please refer to the documentation on APR in the httpd INSTALL file.])
   fi
 else 
-  APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, 1 2)
+  APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, 1 2, [
+    version=`$apr_config --version`
+    case x${version} in
+    x1.[[0-3]].*) 
+      AC_MSG_WARN([APR version 1.4.0 or later is required, found $version])
+      apr_acceptable=no
+      ;;
+    esac
+    unset version
+   ])
 fi
 
 if test "$apr_found" = "no"; then
-  AC_MSG_ERROR([APR not found.  Please read the documentation.])
+  AC_MSG_ERROR([APR not found.  Please refer to the documentation on APR in the httpd INSTALL file.])
 fi
 
 if test "$apr_found" = "reconfig"; then
@@ -131,14 +141,16 @@ APR_VERSION=`$apr_config --version`
 apr_major_version=`echo ${APR_VERSION} | sed 's,\..*,,'`
 APR_CONFIG="$APR_BINDIR/apr-${apr_major_version}-config"
 
-echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
+AC_MSG_NOTICE([])
+AC_MSG_NOTICE([Configuring Apache Portable Runtime Utility library...])
+AC_MSG_NOTICE([])
 
 if test "x${apr_major_version}" = "x2"; then
   apu_found=obsolete
 elif test "x$with_included_apr" = "xyes"; then
   apu_found=reconfig
   if test ! -d srclib/apr-util && test ! -d $srcdir/srclib/apr-util; then
-    AC_MSG_ERROR([Bundled APR-Util requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.])
+    AC_MSG_ERROR([Bundled APR-Util requested but not found at ./srclib/.  Please refer to the documentation on APR in the httpd INSTALL file.])
   fi
 else 
    dnl If httpd is buildconf'ed against an apr 2.x tree, then 1.x
@@ -150,7 +162,7 @@ else
 fi
 
 if test "$apu_found" = "no"; then
-  AC_MSG_ERROR([APR-util not found.  Please read the documentation.])
+  AC_MSG_ERROR([APR-util not found.  Please refer to the documentation on APR in the httpd INSTALL file.])
 fi
 
 # Catch some misconfigurations:
@@ -194,6 +206,14 @@ AC_PROG_CPP
 dnl Try to get c99 support for variadic macros
 ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99])
 
+dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
+dnl we got already CC_FOR_BUILD from environment.
+if test "x${build_alias}" != "x${host_alias}"; then
+  if test "x${CC_FOR_BUILD}" = "x"; then
+    CC_FOR_BUILD=cc
+  fi
+fi
+
 if test "x${cache_file}" = "x/dev/null"; then
   # Likewise, ensure that CC and CPP are passed through to the pcre
   # configure script iff caching is disabled (the autoconf 2.5x default).
@@ -214,6 +234,11 @@ if test "$PCRE_CONFIG" != "false"; then
   if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else
     AC_MSG_ERROR([Did not find pcre-config script at $PCRE_CONFIG])
   fi
+  case `$PCRE_CONFIG --version` in
+  [[1-5].*])
+    AC_MSG_ERROR([Need at least pcre version 6.0])
+    ;;
+  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`])
@@ -222,7 +247,9 @@ else
 fi
 APACHE_SUBST(PCRE_LIBS)
 
-echo $ac_n "${nl}Configuring Apache httpd ...${nl}"
+AC_MSG_NOTICE([])
+AC_MSG_NOTICE([Configuring Apache httpd...])
+AC_MSG_NOTICE([])
 
 dnl If the source dir is not equal to the build dir, 
 dnl then we are running in VPATH mode.
@@ -244,7 +271,9 @@ APR_ADDTO(INCLUDES, $APU_INCLUDES)
 dnl Add in path to PCRE includes
 APR_ADDTO(INCLUDES, $PCRE_INCLUDES)
 
-echo $ac_n "${nl}Applying OS-specific hints for httpd ...${nl}"
+AC_MSG_NOTICE([])
+AC_MSG_NOTICE([Applying OS-specific hints for httpd...])
+AC_MSG_NOTICE([])
 
 case $host in
   *os2*)
@@ -322,6 +351,7 @@ case $host in
       ;;
   *mingw32*)
       APR_ADDTO(INTERNAL_CPPFLAGS, [-DAP_DECLARE_EXPORT])
+      APR_ADDTO(INTERNAL_CPPFLAGS, [-DAPREQ_DECLARE_EXPORT])
       APR_SETIFNULL(ac_cv_func_times, [no])
       APR_SETIFNULL(ac_cv_func_getpwnam, [no])
       APR_SETIFNULL(ac_cv_func_getgrnam, [no])
@@ -453,7 +483,8 @@ bindprocessor \
 prctl \
 timegm \
 getpgid \
-fopen64
+fopen64 \
+getloadavg
 )
 
 dnl confirm that a void pointer is large enough to store a long integer
@@ -614,8 +645,8 @@ if test "$enable_pie" = "yes"; then
      AC_ERROR([--enable-pie requested but $CC failed using PIE flags])
    fi
 fi
-AC_SUBST(PICFLAGS)
-AC_SUBST(PILDFLAGS)
+APACHE_SUBST(PICFLAGS)
+APACHE_SUBST(PILDFLAGS)
 
 prefix="$orig_prefix"
 APACHE_ENABLE_MODULES
@@ -696,7 +727,26 @@ APACHE_HELP_STRING(--with-suexec-gidmin,Minimal allowed GID),[
 
 AC_ARG_WITH(suexec-logfile,
 APACHE_HELP_STRING(--with-suexec-logfile,Set the logfile),[
-  AC_DEFINE_UNQUOTED(AP_LOG_EXEC, "$withval", [SuExec log file] ) ] )
+  if test "x$withval" = "xyes"; then
+    AC_MSG_ERROR([log filename required for --with-suexec-logfile option])
+  elif test "x$withval" != "xno"; then
+    AC_DEFINE_UNQUOTED(AP_LOG_EXEC, "$withval", [SuExec log file])
+  fi
+])
+
+AC_ARG_WITH(suexec-syslog,
+APACHE_HELP_STRING(--with-suexec-syslog,Set the logfile),[
+  if test $withval = "yes"; then
+    if test "x${with_suexec_logfile}" != "xno"; then
+      AC_MSG_NOTICE([hint: use "--without-suexec-logfile --with-suexec-syslog"])
+      AC_MSG_ERROR([suexec does not support both logging to file and syslog])
+    fi
+    AC_CHECK_FUNCS([vsyslog], [], [
+       AC_MSG_ERROR([cannot support syslog from suexec without vsyslog()])])
+    AC_DEFINE(AP_LOG_SYSLOG, 1, [SuExec log to syslog])
+  fi    
+])
+
 
 AC_ARG_WITH(suexec-safepath,
 APACHE_HELP_STRING(--with-suexec-safepath,Set the safepath),[
@@ -706,6 +756,15 @@ AC_ARG_WITH(suexec-umask,
 APACHE_HELP_STRING(--with-suexec-umask,umask for suexec'd process),[
   AC_DEFINE_UNQUOTED(AP_SUEXEC_UMASK, 0$withval, [umask for suexec'd process] ) ] )
 
+INSTALL_SUEXEC=setuid
+AC_ARG_ENABLE([suexec-capabilities], 
+APACHE_HELP_STRING(--enable-suexec-capabilities,Use Linux capability bits not setuid root suexec), [
+INSTALL_SUEXEC=caps
+AC_DEFINE(AP_SUEXEC_CAPABILITIES, 1, 
+          [Enable if suexec is installed with Linux capabilities, not setuid])
+])
+APACHE_SUBST(INSTALL_SUEXEC)
+
 dnl APR should go after the other libs, so the right symbols can be picked up
 if test x${apu_found} != xobsolete; then
   AP_LIBS="$AP_LIBS `$apu_config --avoid-ldap --link-libtool --libs`"
@@ -763,7 +822,9 @@ if test -d ./test; then
 fi
 
 dnl ## Finalize the variables
-echo $ac_n "${nl}Restore user-defined environment settings...${nl}"
+AC_MSG_NOTICE([])
+AC_MSG_NOTICE([Restore user-defined environment settings...])
+AC_MSG_NOTICE([])
 
 APR_RESTORE_THE_ENVIRONMENT(CPPFLAGS, EXTRA_)
 APR_RESTORE_THE_ENVIRONMENT(CFLAGS, EXTRA_)
@@ -772,7 +833,9 @@ APR_RESTORE_THE_ENVIRONMENT(LDFLAGS, EXTRA_)
 APR_RESTORE_THE_ENVIRONMENT(LIBS, EXTRA_)
 APR_RESTORE_THE_ENVIRONMENT(INCLUDES, EXTRA_)
 
-echo $ac_n "${nl}Construct makefiles and header files...${nl}"
+AC_MSG_NOTICE([])
+AC_MSG_NOTICE([Construct makefiles and header files...])
+AC_MSG_NOTICE([])
 
 APACHE_GEN_CONFIG_VARS