From 927b7e900c8ad907d176b2c864f398b78c040472 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 17 Apr 2007 12:35:58 +0000 Subject: update for apache 2.2 git-svn-id: file:///home/lennart/svn/public/mod_mime_xattr/trunk@32 f01872de-66d6-0310-9185-fc3b30f50adc --- configure.ac | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index df981ca..99d501f 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ # permissions and limitations under the License. AC_PREREQ(2.57) -AC_INIT([mod_mime_xattr],[0.3],[mzzvzrkngge (at) 0pointer (dot) net]) +AC_INIT([mod_mime_xattr],[0.4],[mzzvzrkngge (at) 0pointer (dot) net]) AC_CONFIG_SRCDIR([src/mod_mime_xattr.c]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign 1.9 -Wall]) @@ -77,6 +77,12 @@ if test "x$GCC" = "xyes" ; then done fi +PKG_PROG_PKG_CONFIG + +PKG_CHECK_MODULES(APR, [ apr-1]) +CFLAGS="$APR_CFLAGS $CFLAGS" +LIBS="$APR_LIBS $LIBS" + AC_ARG_WITH(apxs, AS_HELP_STRING(--with-apxs=PATH,/path/to/apxs), [ AC_PATH_PROGS(APXS, [apxs2 apxs], "notfound", "$withval:$PATH") ], @@ -91,6 +97,34 @@ AC_ARG_WITH(apachectl, [ AC_PATH_PROGS(APACHECTL, [apache2ctl apachectl], "notfound", "$withval:$PATH") ], [ AC_PATH_PROGS(APACHECTL, [apache2ctl apachectl], "notfound", "/usr/local/apache/bin:/usr/local/bin:/usr/sbin:$PATH")]) +# +# Checking that we have Apache version 2 +# + +# saving current CFLAGS +CFLAGS_SAVED=$CFLAGS +CFLAGS="$CFLAGS -I`${APXS} -q INCLUDEDIR`" + +AC_MSG_CHECKING([for Apache 2]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +]], [[ + char *version = AP_SERVER_BASEREVISION; +]])],[ + APACHE_2="yes" +],[ + APACHE_2="no" +]) + +AC_MSG_RESULT($APACHE_2) + +if test "x$APACHE_2" = "xno" ; then + AC_MSG_ERROR([*** Sorry, you need apache 2 ***]) +fi + +# restoring CFLAGS +CFLAGS=$CFLAGS_SAVED + # Check for libattr AC_CHECK_LIB([attr], [getxattr],, [AC_MSG_ERROR([*** Sorry, you have to install libattr ***])]) AC_CHECK_HEADER([attr/xattr.h],, [AC_MSG_ERROR([*** Sorry, you have to install the libattr headers ***])]) -- cgit