diff --git a/apache2/Makefile.in b/apache2/Makefile.in index 2da68979..4acb2531 100644 --- a/apache2/Makefile.in +++ b/apache2/Makefile.in @@ -26,6 +26,7 @@ MODSEC_APXS_EXTRA_CFLAGS = @MODSEC_APXS_EXTRA_CFLAGS@ APXS = @APXS@ APXS_WRAPPER = @APXS_WRAPPER@ +APXS_INCLUDEDIR = @APXS_INCLUDEDIR@ APXS_INCLUDES = @APXS_INCLUDES@ APXS_CFLAGS = @APXS_CFLAGS@ APXS_LDFLAGS = @APXS_LDFLAGS@ diff --git a/apache2/configure.in b/apache2/configure.in index e8cb24e0..4490d733 100644 --- a/apache2/configure.in +++ b/apache2/configure.in @@ -89,10 +89,22 @@ VERSION_OK [AC_MSG_NOTICE(httpd is recent enough)], [AC_MSG_ERROR(apache is too old, mmn must be at least $HTTPD_WANTED_MMN)]) fi - APXS_INCLUDES="`$APXS -q INCLUDES` `$APXS -q EXTRA_INCLUDES`" + APXS_INCLUDEDIR="`$APXS -q INCLUDEDIR`" + # Make sure the include dir is used + if test -n "$APXS_INCLUDEDIR"; then + APXS_INCLUDES="-I${APXS_INCLUDEDIR} `$APXS -q INCLUDES` `$APXS -q EXTRA_INCLUDES`" + else + APXS_INCLUDES="`$APXS -q INCLUDES` `$APXS -q EXTRA_INCLUDES`" + fi APXS_CFLAGS="`$APXS -q CFLAGS` `$APXS -q EXTRA_CFLAGS`" APXS_LDFLAGS="`$APXS -q LDFLAGS` `$APXS -q EXTRA_LDFLAGS`" - APXS_LIBS="`$APXS -q LIBS` `$APXS -q EXTRA_LIBS`" + APXS_LIBDIR="`$APXS -q LIBDIR`" + # Make sure the lib dir is used + if test -n "$APXS_LIBDIR"; then + APXS_LIBS="-L{$APXS_LIBDIR} `$APXS -q LIBS` `$APXS -q EXTRA_LIBS`" + else + APXS_LIBS="`$APXS -q LIBS` `$APXS -q EXTRA_LIBS`" + fi APXS_LIBTOOL="`$APXS -q LIBTOOL`" APXS_CC="`$APXS -q CC`" else @@ -242,6 +254,7 @@ AC_SUBST(EXTRA_CFLAGS) AC_SUBST(MODSEC_EXTRA_CFLAGS) AC_SUBST(APXS) AC_SUBST(APXS_WRAPPER) +AC_SUBST(APXS_INCLUDEDIR) AC_SUBST(APXS_INCLUDES) AC_SUBST(APXS_EXTRA_CFLAGS) AC_SUBST(MODSEC_APXS_EXTRA_CFLAGS)