httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: [PATCH] 2.2.x + apreq
Date Tue, 28 Feb 2006 16:42:47 GMT
Joe Schaefer <joe+gmane@sunstarsys.com> writes:

> Here's a patch against the 2.2.x branch of httpd (you need to
> apply the svn:externals properties manually).  With it I can
> build mod_apreq (no 2) statically or dynamically.  Haven't tested
> it at all yet tho.

Here's a better patch against httpd/branches/2.2.x which gives the 
correct linkages on *nix.

Index: server/Makefile.in
===================================================================
--- server/Makefile.in	(revision 380928)
+++ server/Makefile.in	(working copy)
@@ -32,6 +32,7 @@
 
 EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR) $(top_srcdir)/modules/http
 EXPORT_DIRS_APR = $(APR_INCLUDEDIR) $(APU_INCLUDEDIR)
+EXPORT_DIRS_APREQ = $(APREQ_INCLUDEDIR)
 
 # If export_files is a dependency here, but we remove it during this stage,
 # when exports.c is generated, make will not detect that export_files is no
@@ -61,6 +62,9 @@
 	for dir in $(EXPORT_DIRS_APR); do \
 	    (ls $$dir/ap[ru].h $$dir/ap[ru]_*.h >> $$tmp 2>/dev/null); \
 	done; \
+	for dir in $(EXPORT_DIRS_APREQ); do \
+	    (ls $$dir/apreq.h $$dir/apreq_*.h >> $$tmp 2>/dev/null); \
+	done; \
 	sort -u $$tmp > $@; \
 	rm -f $$tmp
 

Property changes on: modules
___________________________________________________________________
Name: svn:externals
   + apreq  https://svn.apache.org/repos/asf/httpd/apreq/branches/apr-build-system/module/apache2



Property changes on: srclib
___________________________________________________________________
Name: svn:externals
   + apreq  https://svn.apache.org/repos/asf/httpd/apreq/branches/apr-build-system


Index: configure.in
===================================================================
--- configure.in	(revision 380928)
+++ configure.in	(working copy)
@@ -16,6 +16,7 @@
 sinclude(build/apr_common.m4)
 sinclude(build/find_apr.m4)
 sinclude(build/find_apu.m4)
+sinclude(build/find_apreq.m4)
 sinclude(acinclude.m4)
 
 dnl XXX we can't just use AC_PREFIX_DEFAULT because that isn't subbed in
@@ -120,6 +121,30 @@
 APU_VERSION=`$apu_config --version`
 APU_CONFIG="$APU_BINDIR/apu-`echo ${APU_VERSION} | sed 's,\..*,,'`-config"
 
+echo $ac_n "${nl}Configuring Apache HTTP Server Request library ...${nl}"
+
+APR_FIND_APREQ("$srcdir/srclib/apreq", "./srclib/apreq", 1, 1)
+
+if test "$apreq_found" = "no"; then
+  AC_MSG_ERROR([APREQ not found.  Please read the documentation.])
+fi
+
+if test "$apreq_found" = "reconfig"; then
+  APR_SUBDIR_CONFIG(srclib/apreq,
+                    [--with-apr=$apr_config --with-apr-util=$apu_config --prefix=$prefix
--exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir],
+                    [--enable-layout=*|\'--enable-layout=*])
+  dnl We must be the last to build and the first to be cleaned
+  AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS apreq"
+  AP_CLEAN_SRCLIB_DIRS="apreq $AP_CLEAN_SRCLIB_DIRS"
+fi
+
+APR_ADDTO(LDFLAGS, `$apreq_config --ldflags`)
+APREQ_BINDIR=`$apreq_config --bindir`
+APREQ_INCLUDEDIR=`$apreq_config --includedir`
+APREQ_VERSION=`$apreq_config --library-version`
+APREQ_CONFIG="$APREQ_BINDIR/apreq`echo ${APREQ_VERSION} | sed 's,\..*,,'`-config"
+
+
 dnl In case we picked up CC and CPP from APR, get that info into the
 dnl config cache so that PCRE uses it.  Otherwise, CC and CPP used for
 dnl PCRE and for our config tests will be whatever PCRE determines.
@@ -190,6 +215,7 @@
 # directories.
 APR_ADDTO(INCLUDES, `$apr_config --includes`)
 APR_ADDTO(INCLUDES, `$apu_config --includes`)
+APR_ADDTO(INCLUDES, `$apreq_config --includes`)
 
 echo $ac_n "${nl}Applying OS-specific hints for httpd ...${nl}"
 
@@ -564,7 +590,7 @@
   AC_DEFINE_UNQUOTED(AP_SUEXEC_UMASK, 0$withval, [umask for suexec'd process] ) ] )
 
 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`"
+AP_LIBS="$AP_LIBS `$apu_config --link-libtool --libs` `$apr_config --link-libtool --libs`
`$apreq_config --link-libtool --libs`"
 APACHE_SUBST(AP_LIBS)
 APACHE_SUBST(AP_BUILD_SRCLIB_DIRS)
 APACHE_SUBST(AP_CLEAN_SRCLIB_DIRS)
Index: build/make_nw_export.awk
===================================================================
--- build/make_nw_export.awk	(revision 380928)
+++ build/make_nw_export.awk	(working copy)
@@ -37,8 +37,8 @@
 	}
 }
 
-/^[ \t]*AP([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
-    sub("[ \t]*AP([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
+/^[ \t]*AP([RU]|_CORE|REQ)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
+    sub("[ \t]*AP([RU]|_CORE|REQ)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
     sub("[(].*", "")
     sub("([^ ]* (^([ \t]*[(])))+", "")
 
@@ -79,7 +79,7 @@
     next
 }
 
-/^[ \t]*(extern[ \t]+)?AP[RU]?_DECLARE_DATA .*;$/ {
+/^[ \t]*(extern[ \t]+)?AP([RU]|REQ)?_DECLARE_DATA .*;$/ {
        varname = $NF;
        gsub( /[*;]/, "", varname);
        gsub( /\[.*\]/, "", varname);
Index: build/make_exports.awk
===================================================================
--- build/make_exports.awk	(revision 380928)
+++ build/make_exports.awk	(working copy)
@@ -90,8 +90,8 @@
     }
 }
 
-/^[ \t]*AP[RU]?_(CORE_)?DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
-    sub("[ \t]*AP[RU]?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "")
+/^[ \t]*AP([RU]|REQ)?_(CORE_)?DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
+    sub("[ \t]*AP([RU]|REQ)?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "")
     sub("[(].*", "")
     sub("([^ ]* (^([ \t]*[(])))+", "")
 
Index: build/make_var_export.awk
===================================================================
--- build/make_var_export.awk	(revision 380928)
+++ build/make_var_export.awk	(working copy)
@@ -17,7 +17,7 @@
 # Based on apr's make_export.awk, which is
 # based on Ryan Bloom's make_export.pl
 
-/^#[ \t]*if(def)? (AP[RU]?_|!?defined).*/ {
+/^#[ \t]*if(def)? (AP([RU]|REQ)?_|!?defined).*/ {
 	if (old_filename != FILENAME) {
 		if (old_filename != "") printf("%s", line)
 		macro_no = 0
@@ -63,7 +63,7 @@
 	}
 }
 
-/^[ \t]*(extern[ \t]+)?AP[RU]?_DECLARE_DATA .*;$/ {
+/^[ \t]*(extern[ \t]+)?AP([RU]|REQ)?_DECLARE_DATA .*;$/ {
        varname = $NF;
        gsub( /[*;]/, "", varname);
        gsub( /\[.*\]/, "", varname);
Index: build/config_vars.sh.in
===================================================================
--- build/config_vars.sh.in	(revision 380928)
+++ build/config_vars.sh.in	(working copy)
@@ -30,14 +30,17 @@
 if test -f ${DESTDIR}@APR_CONFIG@; then
    APR_CONFIG=${DESTDIR}@APR_CONFIG@
    APU_CONFIG=${DESTDIR}@APU_CONFIG@
+   APREQ_CONFIG=${DESTDIR}@APREQ_CONFIG@
 else
    APR_CONFIG=@APR_CONFIG@
    APU_CONFIG=@APU_CONFIG@
+   APREQ_CONFIG=@APREQ_CONFIG@
 fi
 
 APR_LIBTOOL="`${APR_CONFIG} --apr-libtool`"
 APR_INCLUDEDIR="`${APR_CONFIG} --includedir`"
 APU_INCLUDEDIR="`${APU_CONFIG} --includedir`"
+APREQ_INCLUDEDIR="`${APREQ_CONFIG} --includedir`"
 
 installbuilddir="@exp_installbuilddir@"
 
@@ -71,5 +74,6 @@
 /^UTIL_LDFLAGS/d
 /^APR_INCLUDEDIR.*$/s,.*,APR_INCLUDEDIR = ${APR_INCLUDEDIR},
 /^APU_INCLUDEDIR.*$/s,.*,APU_INCLUDEDIR = ${APU_INCLUDEDIR},
+/^APREQ_INCLUDEDIR.*$/s,.*,APREQ_INCLUDEDIR = ${APREQ_INCLUDEDIR},
 /^LIBTOOL.*$/s,/[^ ]*/libtool \(.*\),${APR_LIBTOOL} @LTFLAGS@,
 "
Index: buildconf
===================================================================
--- buildconf	(revision 380928)
+++ buildconf	(working copy)
@@ -24,6 +24,7 @@
 
 apr_src_dir="srclib/apr ../apr"
 apu_src_dir="srclib/apr-util ../apr-util"
+apreq_src_dir="srclib/apreq ../apreq"
 
 while test $# -gt 0 
 do
@@ -45,6 +46,12 @@
   ;;
   esac
 
+  case "$1" in
+  --with-apreq=*)
+  apreq_src_dir=$optarg
+  ;;
+  esac
+
   shift
 done
 
@@ -100,6 +107,28 @@
     should_exit=1
 fi
 
+for dir in $apreq_src_dir
+do
+    if [ -f "${dir}/Makefile.in" ]; then
+        echo "found apreq source: ${dir}"
+        apreq_src_dir=$dir
+        apreq_found=1
+        break
+    fi
+done
+
+if [ $apreq_found -lt 1 ]; then
+    echo ""
+    echo "You don't have a copy of the apreq source in srclib/apreq. "
+    echo "Please get one the source using the following instructions, "
+    echo "or specify the location of the source with "
+    echo "--with-apreq=[path to apreq]:"
+    echo ""
+    echo "   svn co http://svn.apache.org/repos/asf/httpd/apreq/branches/2.x srclib/apreq"
+    echo ""
+    should_exit=1
+fi
+
 if [ $should_exit -gt 0 ]; then
     exit 1
 fi
@@ -124,6 +153,7 @@
 apr_configure="$apr_src_dir/configure"
 aprutil_configure="$apu_src_dir/configure"
 pcre_configure="srclib/pcre/configure"
+apreq_configure="$apreq_src_dir/configure"
 config_h_in="include/ap_config_auto.h.in"
 
 cross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
@@ -150,10 +180,22 @@
 
 apu_src_dir=`cd $apu_src_dir && pwd` 
 
+if [ "$apreq_src_dir" = "srclib/apreq" ]; then
+    echo rebuilding $apreq_configure
+    (cd srclib/apreq && ./buildconf --with-apr=$apr_src_dir --with-apr-util=$apu_src_dir)
|| {
+        echo "./buildconf failed for apreq" 
+        exit 1
+    }
+    rm -f srclib/apreq/apreq.spec
+fi
+
+apreq_src_dir=`cd $apreq_src_dir && pwd`
+
 echo copying build files
 cp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
    $apr_src_dir/build/PrintPath $apr_src_dir/build/apr_common.m4 \
-   $apr_src_dir/build/find_apr.m4 $apu_src_dir/build/find_apu.m4 build
+   $apr_src_dir/build/find_apr.m4 $apu_src_dir/build/find_apu.m4 \
+   $apreq_src_dir/build/find_apreq.m4 build
 
 # Remove any libtool files so one can switch between libtool 1.3
 # and libtool 1.4 by simply rerunning the buildconf script.
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 380928)
+++ acinclude.m4	(working copy)
@@ -97,7 +97,12 @@
   APACHE_SUBST(APU_INCLUDEDIR)
   APACHE_SUBST(APU_VERSION)
   APACHE_SUBST(APU_CONFIG)
+  APACHE_SUBST(APREQ_BINDIR)
+  APACHE_SUBST(APREQ_INCLUDEDIR)
+  APACHE_SUBST(APREQ_VERSION)
+  APACHE_SUBST(APREQ_CONFIG)
 
+
   abs_srcdir="`(cd $srcdir && pwd)`"
 
   echo creating config_vars.mk


-- 
Joe Schaefer


Mime
View raw message