Permalink
Browse files

A stab at libapreq build integration, still disabled by default.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200715 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 7186ccf commit ed7c2de398e15ba54568786030c6ad7fcab53144 @notroj notroj committed Nov 11, 2011
Showing with 43 additions and 271 deletions.
  1. +2 −0 acinclude.m4
  2. +0 −8 buildconf
  3. +17 −6 configure.in
  4. +9 −88 srclib/libapreq/Makefile.in
  5. +0 −169 srclib/libapreq/configure.in
  6. +15 −0 srclib/libapreq/library/Makefile.in
View
@@ -99,6 +99,8 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
APACHE_SUBST(APU_INCLUDEDIR)
APACHE_SUBST(APU_VERSION)
APACHE_SUBST(APU_CONFIG)
+ APACHE_SUBST(APREQ_MAJOR_VERSION)
+ APACHE_SUBST(APREQ_LIBTOOL_VERSION)
abs_srcdir="`(cd $srcdir && pwd)`"
View
@@ -163,14 +163,6 @@ fi
apr_src_dir=`cd $apr_src_dir && pwd`
-#apreq_configure="srclib/libapreq"
-#echo
-#echo rebuilding $apreq_configure
-#(cd srclib/libapreq && ./buildconf --with-apr="$apr_src_dir") || {
-# echo "./buildconf failed for apreq"
-# exit 1
-#}
-
if [ $apr_major_version -lt 2 ] ; then
if [ "$apu_src_dir" = "srclib/apr-util" ]; then
echo rebuilding $aprutil_configure
View
@@ -92,8 +92,6 @@ if test "$apr_found" = "reconfig"; then
[$apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir],
[--enable-layout=*|\'--enable-layout=*])
dnl We must be the first to build and the last to be cleaned
-dnl AP_BUILD_SRCLIB_DIRS="apr libapreq $AP_BUILD_SRCLIB_DIRS"
-dnl AP_CLEAN_SRCLIB_DIRS="$AP_CLEAN_SRCLIB_DIRS libapreq apr"
AP_BUILD_SRCLIB_DIRS="apr $AP_BUILD_SRCLIB_DIRS"
AP_CLEAN_SRCLIB_DIRS="$AP_CLEAN_SRCLIB_DIRS apr"
@@ -121,10 +119,6 @@ APR_VERSION=`$apr_config --version`
apr_major_version=`echo ${APR_VERSION} | sed 's,\..*,,'`
APR_CONFIG="$APR_BINDIR/apr-${apr_major_version}-config"
-dnl echo $ac_n "${nl}Configuring Apache Request Library...${nl}"
-dnl APR_SUBDIR_CONFIG(srclib/libapreq, [--with-apr=../apr/apr-2-config --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir])
-dnl APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/srclib/libapreq/include])
-
echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
if test "x${apr_major_version}" = "x2"; then
@@ -744,6 +738,23 @@ AC_ARG_ENABLE(load-all-modules,APACHE_HELP_STRING(--enable-load-all-modules,Load
LOAD_ALL_MODULES="no"
])
+### libapreq build integration.
+if test -d $abs_srcdir/srclib/libapreq && false; then
+ get_version="$abs_srcdir/build/get-version.sh"
+ version_hdr="$abs_srcdir/srclib/libapreq/include/apreq_version.h"
+ APREQ_MAJOR_VERSION="`$get_version major $version_hdr APREQ`"
+ APREQ_LIBTOOL_VERSION="`$get_version libtool $version_hdr APREQ`"
+
+ APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/srclib/libapreq/include])
+ AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS libapreq"
+ AP_CLEAN_SRCLIB_DIRS="libapreq $AP_BUILD_SRCLIB_DIRS"
+
+ APACHE_FAST_OUTPUT(srclib/libapreq/Makefile srclib/libapreq/library/Makefile)
+
+ AC_CONFIG_FILES([srclib/libapreq/apreq2-config])
+ AC_CONFIG_COMMANDS([apreq], [chmod 755 srclib/libapreq/apreq2-config])
+fi
+
APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile)
APACHE_FAST_OUTPUT(os/Makefile server/Makefile)
APACHE_FAST_OUTPUT(support/Makefile)
@@ -1,94 +1,15 @@
-#
-# Top-level Makefile for APREQ
-#
-CPP = @CPP@
-# gets substituted into some targets
-APREQ_MAJOR_VERSION=@APREQ_MAJOR_VERSION@
-APREQ_MINOR_VERSION=@APREQ_MINOR_VERSION@
-APREQ_PATCH_VERSION=@APREQ_PATCH_VERSION@
-APREQ_DOTTED_VERSION=@APREQ_DOTTED_VERSION@
-APREQ_LIBTOOL_VERSION=@APREQ_LIBTOOL_VERSION@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-INCLUDES = @APREQ_INCLUDES@ @APREQ_PRIV_INCLUDES@ @APR_INCLUDES@
-APREQ_LDFLAGS = @APREQ_LDFLAGS@
-APREQ_LIBS = @APREQ_LIBS@
-
-TARGET_LIB = lib@APREQ_LIBNAME@.la
-INSTALL_SUBDIRS =
-EXTRA_SOURCE_DIRS =
-APRUTIL_PCFILE = apr-util-$(APRUTIL_MAJOR_VERSION).pc
+INSTALL_TARGETS = install-apreq-config
+BUILD_SUBDIRS = library
+CLEAN_SUBDIRS = library
APREQ_CONFIG = apreq2-config
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-
-TARGETS = $(TARGET_LIB) apreq.exp
-
-# bring in rules.mk for standard functionality
-@INCLUDE_RULES@
-@INCLUDE_OUTPUTS@
-
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) -version-info $(APREQ_LIBTOOL_VERSION) $(ALL_LDFLAGS) -o $@
-
-CLEAN_SUBDIRS = test
-CLEAN_TARGETS = exports.c export_vars.c apreq.exp .make.dirs apreq2-config.out
-DISTCLEAN_TARGETS = config.cache config.log config.status libtool \
- export_vars.sh $(APREQ_CONFIG) build/rules.mk \
- apr-util.pc build/pkg/pkginfo
-EXTRACLEAN_TARGETS = configure aclocal.m4 \
- exports.c build-outputs.mk \
- build/apr_common.m4 build/find_apr.m4 build/install.sh \
- build/config.guess build/config.sub
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-libdir=@libdir@
-includedir=@includedir@
-top_srcdir=@abs_srcdir@
-top_blddir=@abs_builddir@
+include $(top_builddir)/build/rules.mk
# Create apu-config script suitable for the install tree
-apreq2-config.out: $(APREQ_CONFIG)
- sed 's,^\(location=\).*$$,\1installed,' < $(APREQ_CONFIG) > $@
-
-install: $(TARGET_LIB) apreq2-config.out
- $(APR_MKDIR) $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/pkgconfig \
- $(DESTDIR)$(libdir) $(DESTDIR)$(bindir)
- for f in $(top_srcdir)/include/*.h $(top_blddir)/include/*.h; do \
- $(INSTALL_DATA) $${f} $(DESTDIR)$(includedir); \
- done
- echo $(INSTALL_DATA) apr-util.pc $(DESTDIR)$(libdir)/pkgconfig/$(APRUTIL_PCFILE)
- list='$(INSTALL_SUBDIRS)'; for i in $$list; do \
- ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \
- done
- $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir)
- $(INSTALL_DATA) apreq.exp $(DESTDIR)$(libdir)
- $(INSTALL) -m 755 apreq2-config.out $(DESTDIR)$(bindir)/$(APREQ_CONFIG)
-
-$(TARGET_LIB): $(OBJECTS)
- $(LINK) @lib_target@ $(ALL_LIBS) $(APREQ_LDFLAGS) $(APREQ_LIBS)
-
-exports.c: $(HEADERS)
- $(APR_MKEXPORT) $(HEADERS) > $@
-
-export_vars.c: $(HEADERS)
- $(APR_MKVAREXPORT) $(HEADERS) > $@
-
-apreq.exp: exports.c export_vars.c
- @echo "#! lib@APREQ_LIBNAME@.so" > $@
- @echo "* This file was AUTOGENERATED at build time." >> $@
- @echo "* Please do not edit by hand." >> $@
- $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
- $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
-
-dox:
- doxygen $(top_srcdir)/docs/doxygen.conf
+$(APREQ_CONFIG).out: $(APREQ_CONFIG)
+ sed 's,^\(location=\).*$$,\1installed,' < $(APREQ_CONFIG).in > $(APREQ_CONFIG)
-test: check
-check: $(TARGET_LIB)
- cd test && $(MAKE) check
+install-apreq-config: $(APREQ_CONFIG)
+ @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 $(APREQ_CONFIG) $(DESTDIR)$(bindir)/$(APREQ_CONFIG)
@@ -1,169 +0,0 @@
-dnl
-dnl Process this file with autoconf to produce a configure script
-dnl
-
-AC_PREREQ(2.50)
-AC_INIT(export_vars.sh.in)
-
-VERSION=2.08
-AC_SUBST(VERSION)
-
-AC_CONFIG_HEADER(include/apreq_config.h)
-AC_CONFIG_AUX_DIR(build)
-
-sinclude(build/apreq-conf.m4)
-sinclude(build/apreq-hints.m4)
-sinclude(build/apr_common.m4)
-sinclude(build/find_apr.m4)
-
-dnl Generate ./config.nice for reproducing runs of configure
-dnl
-APR_CONFIG_NICE(config.nice)
-
-dnl # Some initial steps for configuration. We setup the default directory
-dnl # and which files are to be configured.
-
-dnl Absolute source/build directory
-abs_srcdir=`(cd $srcdir && pwd)`
-abs_builddir=`pwd`
-
-if test "$abs_builddir" != "$abs_srcdir"; then
- USE_VPATH=1
- APREQ_CONFIG_LOCATION=build
-else
- APREQ_CONFIG_LOCATION=source
-fi
-
-AC_SUBST(APREQ_CONFIG_LOCATION)
-
-AC_CANONICAL_SYSTEM
-
-AC_PROG_INSTALL
-
-dnl
-dnl compute the top directory of the build
-dnl note: this is needed for LIBTOOL and exporting the bundled Expat
-dnl
-top_builddir="$abs_builddir"
-AC_SUBST(top_builddir)
-AC_SUBST(abs_srcdir)
-AC_SUBST(abs_builddir)
-
-dnl Initialize mkdir -p functionality.
-APR_MKDIR_P_CHECK($abs_srcdir/build/mkdir.sh)
-
-
-dnl Enable the layout handling code, then reparse the prefix-style
-dnl arguments due to autoconf being a PITA.
-APR_ENABLE_LAYOUT(apreq)
-APR_PARSE_ARGUMENTS
-
-dnl load os-specific hints for apr-util
-APREQ_PRELOAD
-
-dnl
-dnl set up the compilation flags and stuff
-dnl
-
-APREQ_INCLUDES=""
-APREQ_PRIV_INCLUDES="-I$top_builddir/include -I$top_builddir/include/private"
-if test -n "$USE_VPATH"; then
- APREQ_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES -I$abs_srcdir/include/private -I$abs_srcdir/include"
-fi
-
-dnl
-dnl Find the APR includes directory and (possibly) the source (base) dir.
-dnl
-APREQ_FIND_APR
-
-dnl
-dnl even though we use apr_rules.mk for building apr-util, we need
-dnl to grab CC and CPP ahead of time so that apr-util config tests
-dnl use the same compiler as APR; we need the same compiler options
-dnl and feature test macros as well
-dnl
-APR_SETIFNULL(CC, `$apr_config --cc`)
-APR_SETIFNULL(CPP, `$apr_config --cpp`)
-APR_ADDTO(CFLAGS, `$apr_config --cflags`)
-APR_ADDTO(CPPFLAGS, `$apr_config --cppflags`)
-
-AC_SUBST(CPP)
-
-dnl get our version information
-get_version="$abs_srcdir/build/get-version.sh"
-version_hdr="$abs_srcdir/include/apreq_version.h"
-APREQ_MAJOR_VERSION="`$get_version major $version_hdr APREQ`"
-APREQ_MINOR_VERSION="`$get_version minor $version_hdr APREQ`"
-APREQ_PATCH_VERSION="`$get_version patch $version_hdr APREQ`"
-APREQ_DOTTED_VERSION="`$get_version all $version_hdr APREQ`"
-
-APR_MAJOR_VERSION="`$apr_config --version | cut -f1 -d.`"
-APREQ_LIBTOOL_VERSION="`expr $APREQ_MAJOR_VERSION + $APREQ_MINOR_VERSION + $APR_MAJOR_VERSION`:$APREQ_PATCH_VERSION:$APREQ_MINOR_VERSION"
-
-AC_SUBST(APREQ_DOTTED_VERSION)
-AC_SUBST(APREQ_LIBTOOL_VERSION)
-AC_SUBST(APREQ_MAJOR_VERSION)
-AC_SUBST(APREQ_MINOR_VERSION)
-AC_SUBST(APREQ_PATCH_VERSION)
-
-echo "APREQ Version: ${APREQ_DOTTED_VERSION}"
-
-
-
-so_ext=$APR_SO_EXT
-lib_target=$APR_LIB_TARGET
-AC_SUBST(so_ext)
-AC_SUBST(lib_target)
-
-APREQ_LIBNAME="apreq2"
-AC_SUBST(APREQ_LIBNAME)
-
-dnl
-dnl Prep all the flags and stuff for compilation and export to other builds
-dnl
-APR_ADDTO(APREQ_LIBS, [$APR_LIBS])
-
-AC_SUBST(APREQ_EXPORT_LIBS)
-AC_SUBST(APREQ_PRIV_INCLUDES)
-AC_SUBST(APREQ_INCLUDES)
-AC_SUBST(APREQ_LDFLAGS)
-AC_SUBST(APREQ_LIBS)
-AC_SUBST(LDFLAGS)
-
-dnl copy apr's rules.mk into our build directory.
-if test ! -d ./build; then
- $mkdir_p build
-fi
-cp $APR_BUILD_DIR/apr_rules.mk $abs_builddir/build/rules.mk
-
-dnl
-dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles
-dnl
-case "$host_alias" in
-*bsdi* | BSD/OS)
- # Check whether they've installed GNU make
- if make --version > /dev/null 2>&1; then
- INCLUDE_RULES="include $abs_builddir/build/rules.mk"
- INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
- else
- INCLUDE_RULES=".include \"$abs_builddir/build/rules.mk\""
- INCLUDE_OUTPUTS=".include \"$abs_srcdir/build-outputs.mk\""
- fi
- ;;
-*)
- INCLUDE_RULES="include $abs_builddir/build/rules.mk"
- INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
- ;;
-esac
-AC_SUBST(INCLUDE_RULES)
-AC_SUBST(INCLUDE_OUTPUTS)
-
-for d in include include/private; do
- test -d $top_builddir/$d || mkdir $top_builddir/$d
-done
-
-AC_CONFIG_FILES([Makefile export_vars.sh apreq2-config])
-
-AC_CONFIG_COMMANDS([default], [chmod +x apreq2-config])
-
-AC_OUTPUT
@@ -0,0 +1,15 @@
+TARGETS = $(LIBRARY)
+OBJECTS = cookie.lo error.lo module.lo module_cgi.lo module_custom.lo \
+ param.lo parser.lo parser_header.lo parser_multipart.lo \
+ parser_urlencoded.lo util.lo version.lo
+LIBRARY = libapreq-2.la
+INSTALL_TARGETS = install-library
+
+include $(top_builddir)/build/rules.mk
+
+$(LIBRARY): $(OBJECTS)
+ $(LINK) -shared $(APREQ_LIBTOOL_VERSION) -rpath $(libdir) $(OBJECTS) $(EXTRA_LIBS) $(AP_LIBS)
+
+install-library: $(LIBRARY)
+ @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+ $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)

0 comments on commit ed7c2de

Please sign in to comment.