-else
- # guess we're not doing Apache 2.0
- AC_MSG_RESULT(no)
- WANT_APACHE_20="no"
-fi
-fi
-
-if test "$WANT_APACHE_20" = "yes"; then
- AC_ARG_WITH(apreq2,
- AC_HELP_STRING([--with-apreq2=PATH], [where http-apreq-2 is installed]),
- [if test x_$with_apreq2 != x_/usr; then
- LDFLAGS="-L${with_apreq2}/lib $LDFLAGS"
- CPPFLAGS="-I${with_apreq2}/include $CPPFLAGS"
- fi])
-
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-I$APXS2_INCLUDE $APXS2_CFLAGS $CPPFLAGS"
- AC_TRY_COMPILE([#include <apreq.h>],
- [int i=0],
- test_apreq2="yes",test_apreq2="no")
- if test "$test_apreq2" = "no"; then
- CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
- APXS2_CFLAGS="$APXS2_CFLAGS -U_XOPEN_SOURCE"
- AC_CHECK_HEADER([apreq.h],,
- AC_MSG_ERROR([unable to find a usable libapreq2 header]))
+# Apache 2.2 (mod_shib_22)
+# --enable-apache-22
+# --with-apxs22 (DSO build, the normal way, uses apxs to derive build flags)
+# --with-apr1 (DSO build, APR development package installed separately)
+# --with-apu1 (DSO build, APR-UTIL development package installed separately)
+
+AC_ARG_ENABLE(apache-22,
+ AC_HELP_STRING([--enable-apache-22], [enable the Apache 2.2 module]),
+ [ if test "x$enableval" = "x" ; then
+ WANT_APACHE_22=yes
+ else
+ WANT_APACHE_22="$enableval"
+ fi
+ ],[ WANT_APACHE_22=no ])
+AC_MSG_CHECKING(whether to build Apache 2.2 module)
+if test "$WANT_APACHE_22" != yes && test "$WANT_APACHE_22" != no ; then
+ WANT_APACHE_22=yes
+fi
+AC_MSG_RESULT($WANT_APACHE_22)
+
+if test "$WANT_APACHE_22" = "yes" ; then
+ AC_ARG_WITH(apxs22,
+ AC_HELP_STRING([--with-apxs22=FILE], [Specifies where to find the Apache 2.2 apxs script.]),
+ [
+ AC_MSG_CHECKING(for user-specified Apache2.2 apxs name/location)
+ if test "$withval" != "no" ; then
+ if test "$withval" != "yes"; then
+ APXS22=$withval
+ AC_MSG_RESULT("$withval")
+ fi
+ fi
+ ],
+ [
+ AC_PATH_PROG(APXS22, apxs2, no)
+ if test "$APXS22" = "no" ; then
+ AC_PATH_PROG(APXS22, apxs, no)
+ fi
+ if test "$APXS22" = "no" ; then
+ for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
+ if test "$APXS22" = "no" && test -f "$i/apxs2" ; then
+ APXS22="$i/apxs2"
+ fi
+ done
+ if test "$APXS22" = "no" ; then
+ for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
+ if test "$APXS22" = "no" && test -f "$i/apxs" ; then
+ APXS22="$i/apxs"
+ fi
+ done
+ fi
+ fi
+ ])
+
+ AC_MSG_CHECKING([to see if Apache2.2 apxs was located])
+ if test ! -f "$APXS22" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([Unable to locate Apache2.2 apxs script. An Apache development package may be missing from your server, or you may need to use the --with-apxs22 option.])
+ fi
+ AC_MSG_RESULT($APXS22)
+ AC_SUBST(APXS22)
+
+ # APR1 settings
+ AC_ARG_WITH(apr1,
+ AC_HELP_STRING([--with-apr1=PATH], [where apr-1-config is installed]),
+ [
+ AC_MSG_CHECKING(for user-specified apr-1-config name/location)
+ if test "$withval" != "no" ; then
+ if test "$withval" != "yes"; then
+ APR1_CONFIG=$withval
+ AC_MSG_RESULT("$withval")
+ fi
+ fi
+ ],
+ [
+ AC_PATH_PROG(APR1_CONFIG, apr-1-config,,[`$APXS22 -q SBINDIR`]:[$PATH])
+ ])
+ if test -f "${APR1_CONFIG}"; then
+ APR1_CFLAGS="`${APR1_CONFIG} --cflags` `${APR1_CONFIG} --cppflags` `${APR1_CONFIG} --includes`"
+ else
+ AC_MSG_ERROR([Unable to locate apr-1-config, may need --with-apr1 option.])