Update changelog
[manu/suphp.git] / configure.ac
index 9c701b0..86b104a 100644 (file)
@@ -1,12 +1,12 @@
 # Process this file with autoconf to produce a configure script.
 
 # Initialize
 # Process this file with autoconf to produce a configure script.
 
 # Initialize
-AC_INIT([suPHP], [0.6.0], [sebastian.marsching@suphp.org], [suphp])
+AC_INIT([suPHP], [0.7.1], [sebastian.marsching@suphp.org], [suphp])
 
 # Auxiliary tools
 AC_CONFIG_AUX_DIR([config])
 
 
 # Auxiliary tools
 AC_CONFIG_AUX_DIR([config])
 
-AM_INIT_AUTOMAKE([suPHP], [0.6.0-pre1])
+AM_INIT_AUTOMAKE([suPHP], [0.7.1])
 # Check for right directory
 AC_CONFIG_SRCDIR([src/Application.cpp])
 # Config headers for automake
 # Check for right directory
 AC_CONFIG_SRCDIR([src/Application.cpp])
 # Config headers for automake
@@ -21,12 +21,16 @@ AC_PROG_INSTALL
 # Look for compiler
 AC_PROG_CC
 AC_PROG_CXX
 # Look for compiler
 AC_PROG_CC
 AC_PROG_CXX
-AC_PROG_LIBTOOL
+AM_PROG_LIBTOOL
 
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
 
 
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
 
+# Find apr-config
+
+APR_FIND_APR([], [], [1])
+
 # Determine Apache version and find apxs
 
 AC_MSG_CHECKING([for dynamic Apache module support (via APXS)])
 # Determine Apache version and find apxs
 
 AC_MSG_CHECKING([for dynamic Apache module support (via APXS)])
@@ -62,7 +66,7 @@ if test -n "$APXS"; then
                     | cut -f2 -d"/" \
                     | cut -f1 -d" "`
     major_version=`echo $APACHE_VERSION|cut -f1,2 -d.`
                     | cut -f2 -d"/" \
                     | cut -f1 -d" "`
     major_version=`echo $APACHE_VERSION|cut -f1,2 -d.`
-    if test "$major_version" = "2.0"; then
+    if test "$major_version" = "2.0" -o "$major_version" = "2.2"; then
       APACHE_VERSION_2=true
       APACHE_VERSION_1_3=false
     else
       APACHE_VERSION_2=true
       APACHE_VERSION_1_3=false
     else
@@ -74,7 +78,7 @@ if test -n "$APXS"; then
     
     APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
     APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR`
     
     APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
     APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR`
-    if test x"{$APACHE_VERSION_2}" = xtrue ; then \
+    if test x"${APACHE_VERSION_2}" = xtrue ; then \
       APXS_EXTRA_CFLAGS=`$APXS -q EXTRA_CFLAGS`
     fi
     if test x"${APACHE_VERSION_1_3}" = xtrue; then \
       APXS_EXTRA_CFLAGS=`$APXS -q EXTRA_CFLAGS`
     fi
     if test x"${APACHE_VERSION_1_3}" = xtrue; then \
@@ -92,6 +96,17 @@ else
     AC_MSG_RESULT(no)
 fi
 
     AC_MSG_RESULT(no)
 fi
 
+if test x"${APACHE_VERSION_2}" = xtrue ; then \
+dnl For Apache 2.x APR is needed
+    if test x"${apr_found}" = xyes ; then \
+        APR_INCLUDEDIR=`${apr_config} --includedir`
+       AC_SUBST([APR_INCLUDEDIR])
+       APR_CPPFLAGS=`${apr_config} --cppflags`
+       AC_SUBST([APR_CPPFLAGS])
+    else
+       AC_MSG_ERROR([APR is needed to build mod_suphp for Apache 2.x but was not found])
+    fi
+fi
 
 # Get uid/gid mode
 
 
 # Get uid/gid mode