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 [PATCH] 2.2.x + apreq Re: [RT] what's the roadmap?
Date Sat, 25 Feb 2006 13:48:29 GMT
Joe Schaefer <joe+gmane@sunstarsys.com> writes:

> Then checkout 
>
>   https://svn.apache.org/repos/asf/httpd/apreq/branches/apr-build-system/
>
>   ./buildconf --with-apr=... --with-apr-util=...
>   ./configure --with-apr=... --with-apr-util=...
>   make
>
> should build a shared libapreq.  The so-version numbers are wrong,
> but the build should more or less go thru to that point.  It'd be
> cool if someone could clean it up to get make install working, and
> then add a build system for module/apache2 (based on httpd of course).

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.


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 --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: 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.


-- 
Joe Schaefer


Mime
View raw message