summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2005-02-11 14:08:24 +0000
committerJoe Orton <jorton@apache.org>2005-02-11 14:08:24 +0000
commit502606508c5badd612b5783e5f16cb5eb1af924a (patch)
treed521e1daa4a584f4f34456d580e7a5231ae1eacb
parentedb46b1de9584c79abbea96243fe6fee5987f0e0 (diff)
downloadhttpd-502606508c5badd612b5783e5f16cb5eb1af924a.tar.gz
Support use of an external copy of the PCRE library:
* configure.in: Set abs_{builddir,srcdir} higher. Add --with-pcre flag; build against external PCRE library if used. * Makefile.in (install-include): Don't install pcre headers any more. * srclib/Makefile.in (SUBDIRS): Remove. PR: 27550 (part two) Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153400 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--Makefile.in1
-rw-r--r--configure.in47
-rw-r--r--srclib/Makefile.in1
3 files changed, 37 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in
index a64da707ad..304745de94 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -181,7 +181,6 @@ install-include:
@cp -p $(srcdir)/modules/http/mod_core.h $(DESTDIR)$(includedir)
@cp -p $(srcdir)/modules/proxy/mod_proxy.h $(DESTDIR)$(includedir)
@cp -p $(srcdir)/modules/ssl/mod_ssl.h $(DESTDIR)$(includedir)
- @cp -p $(builddir)/srclib/pcre/pcre.h $(DESTDIR)$(includedir)
@cp -p $(srcdir)/os/$(OS_DIR)/*.h $(DESTDIR)$(includedir)
@chmod 644 $(DESTDIR)$(includedir)/*.h
diff --git a/configure.in b/configure.in
index 68da73f74f..cedf21de5f 100644
--- a/configure.in
+++ b/configure.in
@@ -122,16 +122,47 @@ if test "x${cache_file}" = "x/dev/null"; then
export CC; export CPP
fi
-echo $ac_n "${nl}Configuring PCRE regular expression library ...${nl}"
+dnl Absolute source/build directory
+abs_srcdir=`(cd $srcdir && pwd)`
+abs_builddir=`pwd`
-APR_SUBDIR_CONFIG(srclib/pcre,
+AC_ARG_WITH(pcre,
+APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library))
+
+case $with_pcre in
+yes) AC_PATH_PROG(PCRE_CONFIG, pcre-config, false) ;;
+ /*) if test -d "$with_pcre" && test -x "$with_pcre/bin/pcre-config"; then
+ PCRE_CONFIG=$with_pcre/bin/pcre-config
+ elif test -x "$with_pcre"; then
+ PCRE_CONFIG=$with_pcre
+ fi
+
+ if $PCRE_CONFIG --version >&/dev/null; then :; else
+ AC_MSG_ERROR([Did not find pcre-config script at $PCRE_CONFIG])
+ fi
+ ;;
+*) PCRE_CONFIG=false ;;
+esac
+
+if test "$PCRE_CONFIG" != "false"; then
+ AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
+ APR_ADDTO(CFLAGS, [`$PCRE_CONFIG --cflags`])
+ APR_ADDTO(LIBS, [`$PCRE_CONFIG --libs`])
+else
+ # Build the bundled PCRE
+ AC_MSG_NOTICE([Configuring PCRE regular expression library])
+
+ APR_SUBDIR_CONFIG(srclib/pcre,
[--prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir])
-echo $ac_n "${nl}Configuring Apache httpd ...${nl}"
+ APR_ADDTO(AP_LIBS, [$abs_builddir/srclib/pcre/libpcre.la])
+ APR_ADDTO(CPPFLAGS, [-I$abs_builddir/srclib/pcre])
-dnl Absolute source/build directory
-abs_srcdir=`(cd $srcdir && pwd)`
-abs_builddir=`pwd`
+ AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS pcre"
+ AP_CLEAN_SRCLIB_DIRS="$AP_CLEAN_SRCLIB_DIRS pcre"
+fi
+
+echo $ac_n "${nl}Configuring Apache httpd ...${nl}"
dnl If the source dir is not equal to the build dir,
dnl then we are running in VPATH mode.
@@ -510,10 +541,6 @@ AC_ARG_WITH(suexec-umask,
APACHE_HELP_STRING(--with-suexec-umask,umask for suexec'd process),[
AC_DEFINE_UNQUOTED(AP_SUEXEC_UMASK, 0$withval, [umask for suexec'd process] ) ] )
-dnl AP_LIBS specifies the actual libraries. note we have some required libs.
-AP_LIBS="$abs_builddir/srclib/pcre/libpcre.la $AP_LIBS"
-APR_ADDTO(CPPFLAGS, [-I$abs_builddir/srclib/pcre])
-
dnl APR should go after the other libs, so the right symbols can be picked up
AP_LIBS="$AP_LIBS `$apu_config --link-libtool --libs` `$apr_config --link-libtool --libs`"
APACHE_SUBST(AP_LIBS)
diff --git a/srclib/Makefile.in b/srclib/Makefile.in
index 1fb910ad32..e58599f9ec 100644
--- a/srclib/Makefile.in
+++ b/srclib/Makefile.in
@@ -1,5 +1,4 @@
-SUBDIRS = pcre
BUILD_SUBDIRS = $(AP_BUILD_SRCLIB_DIRS)
CLEAN_SUBDIRS = $(AP_CLEAN_SRCLIB_DIRS)