[Modcplusplus-devel] (johnksterling) mod_cplusplus configure.in
Brought to you by:
gr84b8,
johnksterling
|
From: Mod C. C. L. <mod...@so...> - 2004-11-27 03:36:29
|
Mod Cplusplus CVS committal
Author : johnksterling
Module : mod_cplusplus
Dir : mod_cplusplus
Modified Files:
configure.in
Log Message:
ok, finally clean up the other things in the configure script and derive everything from apxs.
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/configure.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- configure.in 26 Nov 2004 18:53:46 -0000 1.21
+++ configure.in 27 Nov 2004 03:36:18 -0000 1.22
@@ -12,93 +12,43 @@
AC_MSG_RESULT($SHLIB_EXT)
AC_SUBST(SHLIB_EXT)
-AC_MSG_CHECKING(for httpd)
-AC_ARG_WITH(httpd, [ --with-httpd Specify path to httpd source directory ],
-[
- if test ! -f $withval/build/config_vars.mk; then
- AC_MSG_ERROR($withval not a valid source or shadow dir)
- fi
-
- if grep AP_DEBUG "$withval/build/config_vars.mk" > /dev/null; then
- CPPFLAGS="$CPPFLAGS -DAP_DEBUG"
- fi
- if grep AP_HAVE_DESIGNATED_INITIALIZER "$withval/build/config_vars.mk" > /dev/null; then
- CPPFLAGS="$CPPFLAGS -DAP_HAVE_DESIGNATED_INITIALIZER"
- fi
-
- AC_MSG_CHECKING(for standard packaging)
- searchfile="$withval/include/httpd.h"
- if test -f $searchfile ; then
- AC_MSG_RESULT(found $searchfile)
- HTTPD_DIR=`cd $withval; pwd`
- CPPFLAGS="$CPPFLAGS -I$HTTPD_DIR/include"
- else
- AC_MSG_RESULT($searchfile not found)
- AC_MSG_CHECKING(for alternative default packaging)
- searchfile="$withval/include/apache2/httpd.h"
- if test -f $searchfile ; then
- AC_MSG_RESULT(found $searchfile)
- HTTPD_DIR="$withval"
- CPPFLAGS="$CPPFLAGS -I$withval/include/apache2"
- else
- AC_MSG_RESULT($searchfile not found)
- searchfile="/usr/include/apache2/httpd.h"
- if test -f $searchfile ; then
- AC_MSG_RESULT(found $searchfile)
- HTTPD_DIR="/usr"
- CPPFLAGS="$CPPFLAGS -I/usr/include/apache2"
- else
- AC_MSG_ERROR($searchfile not found. Apache2 installation cannot be located!)
- fi
- fi
- fi
- AC_MSG_CHECKING(for apr.h)
- AC_ARG_WITH(apr_path, [ --with-apr_path Specify path to apr include directory ],
- [
- if test -f $withval/apr.h; then
- CPPFLAGS="$CPPFLAGS -I$withval"
- AC_MSG_RESULT(found $withval/apr.h)
- else
- AC_MSG_RESULT($withval not found)
- withval="/usr/include/apr-0/apr.h"
- if test -f $withval ; then
- AC_MSG_RESULT(found $withval)
- CPPFLAGS="$CPPFLAGS -I/usr/include/apr-0"
- else
- AC_MSG_ERROR($withval not found. APR installation cannot be located!)
- fi
- fi
- ],)
- AC_MSG_RESULT(found $HTTPD_DIR)
-],)
AC_MSG_CHECKING(for apxs)
AC_ARG_WITH(apxs, [ --with-apxs Specify path to apxs ],
[
if test -f $withval; then
- INCLUDE_DIR=`$withval -q INCLUDEDIR`
+ apache_inc=`$withval -q INCLUDEDIR`
+ apr_inc=`$withval -q APR_INCLUDEDIR`
+ apu_inc=`$withval -q APU_INCLUDEDIR`
+ INCLUDES="-I$apache_inc -I$apr_inc -I$apu_inc"
HTTPD_DIR=`$withval -q PREFIX`
CONF_DIR=`$withval -q SYSCONFDIR`
MODULES_DIR=`$withval -q LIBEXECDIR`
APXS=$withval
- CPPFLAGS="$CPPFLAGS -I$INCLUDE_DIR"
+ CPPFLAGS="$CPPFLAGS $INCLUDES"
AC_MSG_RESULT(found $withval)
else
AC_MSG_RESULT($withval not found)
withval="$withval/apxs"
if test -f $withval ; then
AC_MSG_RESULT(found $withval)
+ apache_inc=`$withval -q INCLUDEDIR`
+ apr_inc=`$withval -q APR_INCLUDEDIR`
+ apu_inc=`$withval -q APU_INCLUDEDIR`
+ INCLUDES="-I$apache_inc -I$apr_inc -I$apu_inc"
HTTPD_DIR=`$withval -q PREFIX`
CONF_DIR=`$withval -q SYSCONFDIR`
MODULES_DIR=`$withval -q LIBEXECDIR`
APXS=$withval
- INCLUDE_DIR=`$withval -q INCLUDEDIR`
- CPPFLAGS="$CPPFLAGS -I$INCLUDE_DIR"
+ CPPFLAGS="$CPPFLAGS $INCLUDES"
else
AC_MSG_ERROR($withval not found. APXS installation cannot be located!)
fi
fi
],)
+if test "$INCLUDES" == "" ; then
+ AC_MSG_ERROR(could not generate includes with apxs set to "$APXS" - you must specify a valid path to apxs using the --with-apxs flag)
+fi
AC_CHECK_LIB(stdc++, __gxx_personality_v0, LIB_STDCPP="-lstdc++")
if test "$LIB_STDCPP" == "" ; then
@@ -109,7 +59,7 @@
AC_SUBST(CPLUSPLUS_BUILDDIR)
AC_SUBST(MODULES_DIR)
-AC_SUBST(INCLUDE_DIR)
+AC_SUBST(INCLUDES)
AC_SUBST(CONF_DIR)
AC_SUBST(APXS)
AC_SUBST(CFLAGS)
|