You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2005/03/01 09:03:20 UTC

svn commit: r155761 - in httpd/apreq/branches/multi-env-unstable: Makefile.am acinclude.m4 apreq2-config.in configure.ac glue/perl/Makefile.PL include/ include/Makefile.am library/Makefile.am module/Makefile.am module/apache/Makefile.am module/apache2/Makefile.am

Author: joes
Date: Tue Mar  1 00:03:08 2005
New Revision: 155761

URL: http://svn.apache.org/viewcvs?view=rev&rev=155761
Log:
Start integrating apreq2-config into *nix build system.
Drop apxs installer, so DESTDIR option works properly.

Added:
    httpd/apreq/branches/multi-env-unstable/include/Makefile.am
Modified:
    httpd/apreq/branches/multi-env-unstable/Makefile.am
    httpd/apreq/branches/multi-env-unstable/acinclude.m4
    httpd/apreq/branches/multi-env-unstable/apreq2-config.in
    httpd/apreq/branches/multi-env-unstable/configure.ac
    httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL
    httpd/apreq/branches/multi-env-unstable/include/   (props changed)
    httpd/apreq/branches/multi-env-unstable/library/Makefile.am
    httpd/apreq/branches/multi-env-unstable/module/Makefile.am
    httpd/apreq/branches/multi-env-unstable/module/apache/Makefile.am
    httpd/apreq/branches/multi-env-unstable/module/apache2/Makefile.am

Modified: httpd/apreq/branches/multi-env-unstable/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/Makefile.am?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/Makefile.am (original)
+++ httpd/apreq/branches/multi-env-unstable/Makefile.am Tue Mar  1 00:03:08 2005
@@ -1,5 +1,11 @@
+#
+#
+# XXX  Trick the cpan client by listing some EU::MM-ish prereqs here? XXX
+#
+#
+
 AUTOMAKE_OPTIONS = foreign
-SUBDIRS = library module glue
+SUBDIRS = . include library module glue
 EXTRA_DIST = LICENSE NOTICE README INSTALL CHANGES FAQ.pod MANIFEST.SKIP Makefile.PL buildconf build win32 docs
 APU_SRCDIR=`@APU_CONFIG@ --srcdir`
 APR_SRCDIR=`@APR_CONFIG@ --srcdir`

Modified: httpd/apreq/branches/multi-env-unstable/acinclude.m4
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/acinclude.m4?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/acinclude.m4 (original)
+++ httpd/apreq/branches/multi-env-unstable/acinclude.m4 Tue Mar  1 00:03:08 2005
@@ -144,17 +144,17 @@
         dnl Reset the default installation prefix to be the same as apu's
         ac_default_prefix="`$APU_CONFIG --prefix`"
 
-        APR_INCLUDES="`$APR_CONFIG --includes`"
-        APU_INCLUDES="`$APU_CONFIG --includes`"
+        APR_ADDTO([APR_INCLUDES], "`$APR_CONFIG --includes`")
+        APR_ADDTO([APR_INCLUDES], "`$APU_CONFIG --includes`")
         APR_LA="`$APR_CONFIG --apr-la-file`"
         APU_LA="`$APU_CONFIG --apu-la-file`"
-        APR_LTFLAGS="`$APR_CONFIG --link-libtool`"
-        APU_LTFLAGS="`$APU_CONFIG --link-libtool`"
+        APR_ADDTO([APR_LTFLAGS], "`$APR_CONFIG --link-libtool`")
+        APR_ADDTO([APR_LTFLAGS], "`$APU_CONFIG --link-libtool`")
         dnl perl glue/tests do not use libtool: need ld linker flags
-        APR_LIBS="`$APR_CONFIG --libs`"
-        APU_LIBS="`$APU_CONFIG --libs`"
-        APR_LDFLAGS="`$APR_CONFIG --link-ld --ldflags`"
-        APU_LDFLAGS="`$APU_CONFIG --link-ld --ldflags`"
+        APR_ADDTO([APR_LIBS], "`$APU_CONFIG --libs`")
+        APR_ADDTO([APR_LIBS], "`$APR_CONFIG --libs`")
+        APR_ADDTO([APR_LDFLAGS], "`$APU_CONFIG --link-ld --ldflags`")
+        APR_ADDTO([APR_LDFLAGS], "`$APR_CONFIG --link-ld --ldflags`")
 
         dnl Absolute source/build directory
         abs_srcdir=`(cd $srcdir && pwd)`
@@ -185,6 +185,8 @@
 
         # set version data
 
+        APREQ_CONFIG="$top_builddir/apreq2-config"
+
         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`
@@ -198,16 +200,11 @@
         APREQ_LIBTOOL_VERSION="$APREQ_LIBTOOL_CURRENT:$APREQ_LIBTOOL_REVISION:$APREQ_LIBTOOL_AGE"
 
         APREQ_LIBNAME="apreq$APREQ_MAJOR_VERSION"
-        APREQ_INCLUDES=""
-        APREQ_LDFLAGS="$apreq_libs"
-        APREQ_EXPORT_LIBS=""
 
         echo "lib$APREQ_LIBNAME Version: $APREQ_DOTTED_VERSION"
 
+        AC_SUBST(APREQ_CONFIG)
         AC_SUBST(APREQ_LIBNAME)
-        AC_SUBST(APREQ_LDFLAGS)
-        AC_SUBST(APREQ_INCLUDES)
-        AC_SUBST(APREQ_EXPORT_LIBS)
         AC_SUBST(APREQ_LIBTOOL_VERSION)
         AC_SUBST(APREQ_MAJOR_VERSION)
         AC_SUBST(APREQ_DOTTED_VERSION)
@@ -222,15 +219,12 @@
         AC_SUBST(APU_CONFIG)
         AC_SUBST(APR_CONFIG)
         AC_SUBST(APR_INCLUDES)
-        AC_SUBST(APU_INCLUDES)
+        AC_SUBST(APR_LDFLAGS)
         AC_SUBST(APR_LTFLAGS)
-        AC_SUBST(APU_LTFLAGS)
         AC_SUBST(APR_LIBS)
-        AC_SUBST(APU_LIBS)
-        AC_SUBST(APR_LDFLAGS)
-        AC_SUBST(APU_LDFLAGS)
         AC_SUBST(APR_LA)
         AC_SUBST(APU_LA)
+
         AC_SUBST(PERL)
         AC_SUBST(PERL_OPTS)
 ])

Modified: httpd/apreq/branches/multi-env-unstable/apreq2-config.in
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/apreq2-config.in?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/apreq2-config.in (original)
+++ httpd/apreq/branches/multi-env-unstable/apreq2-config.in Tue Mar  1 00:03:08 2005
@@ -28,10 +28,10 @@
 libdir="@libdir@"
 includedir="@includedir@/@APREQ_LIBNAME@"
 
-LIBS="@APR_LIBS@ @APU_LIBS@ @APREQ_LIBS@"
-LDFLAGS="@APR_LDFLAGS@ @APU_LDFLAGS@"
-INCLUDES="@APR_INCLUDES@ @APU_INCLUDES@"
-LDFLAGS="@APR_LDFLAGS@ @APU_LDFLAGS@"
+LIBS="@APR_LIBS@"
+LDFLAGS="@APR_LDFLAGS@"
+INCLUDES="@APR_INCLUDES@"
+LDFLAGS="@APR_LDFLAGS@"
 
 APREQ_LIBNAME="@APREQ_LIBNAME@"
 
@@ -101,7 +101,6 @@
     location=build
 fi
 
-location=installed
 
 if test "$location" = "installed"; then
     LA_FILE="$libdir/lib${APREQ_LIBNAME}.la"

Modified: httpd/apreq/branches/multi-env-unstable/configure.ac
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/configure.ac?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/configure.ac (original)
+++ httpd/apreq/branches/multi-env-unstable/configure.ac Tue Mar  1 00:03:08 2005
@@ -32,7 +32,7 @@
 dnl Checks for library functions.
 
 AC_APREQ
-AC_CONFIG_FILES([Makefile library/Makefile library/t/Makefile module/Makefile module/apache2/Makefile module/apache/Makefile glue/Makefile])
+AC_CONFIG_FILES([Makefile include/Makefile library/Makefile library/t/Makefile module/Makefile module/apache2/Makefile module/apache/Makefile glue/Makefile])
 AC_CONFIG_FILES([build/doxygen.conf include/groups.dox])
 AC_CONFIG_FILES([apreq2-config], [chmod +x apreq2-config])
 AC_OUTPUT

Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL (original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL Tue Mar  1 00:03:08 2005
@@ -67,24 +67,16 @@
     $config =~ /^s,\@APR_INCLUDES\@,([^,]+)/m or
         die "Can't find apache include directory";
     $apache_includes .= " $1";
-    $config =~ /^s,\@APU_INCLUDES\@,([^,]+)/m or
-        die "Can't find apache include directory";
-    $apache_includes .= " $1";
-
-    $config =~ m/^s,\@APR_LDFLAGS\@,([^,]+)/m or
-        die "Can't find apr ldflags";
-    $apr_libs = $1;
-    $config =~ m/^s,\@APU_LDFLAGS\@,([^,]+)/m or
-        die "Can't find apu ldflags";
-    $apr_libs .= " $1";
-
-    # need -laprutil befpre -lapr
-    $config =~ m/^s,\@APU_LIBS\@,([^,]+)/m or
-        die "Can't find apu libraries";
-    $apr_libs = $1;
-    $config =~ m/^s,\@APR_LIBS\@,([^,]+)/m or
-        die "Can't find apr libraries";
-    $apr_libs .= " $1";
+
+#    $config =~ m/^s,\@APR_LDFLAGS\@,([^,]+)/m or
+#        die "Can't find apr ldflags";
+#    $apr_libs = $1;
+
+#    $config =~ m/^s,\@APR_LIBS\@,([^,]+)/m or
+#        die "Can't find apr libraries";
+#    $apr_libs .= " $1";
+
+    $apr_libs ="";
 
     $config =~ m/^s,\@APREQ_LIBNAME\@,([^,]+)/m or
         die "Can't find apreq libname";
@@ -98,7 +90,7 @@
 
 my $apreq_libs = WIN32 ?
     qq{-L$base_dir/win32/libs -llib$apreq_libname } :
-    qq{-L$lib_dir/.libs -l$apreq_libname};
+    qx{$base_dir/apreq2-config --link-ld --ldflags --libs};
 
 my $mp2_typemaps = Apache::Build->new->typemaps;
 

Propchange: httpd/apreq/branches/multi-env-unstable/include/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Mar  1 00:03:08 2005
@@ -3,3 +3,5 @@
 groups.dox
 stamp-h.in
 stamp-h
+Makefile.in
+Makefile

Added: httpd/apreq/branches/multi-env-unstable/include/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/include/Makefile.am?view=auto&rev=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/include/Makefile.am (added)
+++ httpd/apreq/branches/multi-env-unstable/include/Makefile.am Tue Mar  1 00:03:08 2005
@@ -0,0 +1,4 @@
+pkgincludedir = $(includedir)/@APREQ_LIBNAME@
+pkginclude_HEADERS = apreq.h apreq_cookie.h apreq_error.h \
+	             apreq_module.h apreq_param.h apreq_parser.h \
+                     apreq_util.h apreq_version.h

Modified: httpd/apreq/branches/multi-env-unstable/library/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/Makefile.am?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/Makefile.am (original)
+++ httpd/apreq/branches/multi-env-unstable/library/Makefile.am Tue Mar  1 00:03:08 2005
@@ -1,13 +1,10 @@
-INCLUDES =  -I../include @APR_INCLUDES@ @APU_INCLUDES@
-LDFLAGS = @APU_LTFLAGS@ @APR_LTFLAGS@
-BUILT_SOURCES= @APR_LA@ @APU_LA@
+AM_CPPFLAGS = @APR_INCLUDES@
+BUILT_SOURCES = @APR_LA@ @APU_LA@
 lib_LTLIBRARIES = libapreq2.la
 libapreq2_la_SOURCES = util.c version.c cookie.c param.c parser.c \
                        parser_urlencoded.c parser_header.c parser_multipart.c \
 	               module.c module_custom.c module_cgi.c error.c
-libapreq2_la_LDFLAGS = -version-info @APREQ_LIBTOOL_VERSION@
-
-pkgincludedir = $(includedir)/@APREQ_LIBNAME@
+libapreq2_la_LDFLAGS = -version-info @APREQ_LIBTOOL_VERSION@ @APR_LTFLAGS@ @APR_LIBS@
 
 test: all
 	cd t; $(MAKE) test

Modified: httpd/apreq/branches/multi-env-unstable/module/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/module/Makefile.am?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/module/Makefile.am (original)
+++ httpd/apreq/branches/multi-env-unstable/module/Makefile.am Tue Mar  1 00:03:08 2005
@@ -1,11 +1,10 @@
-INCLUDES = -I../src @APACHE2_INCLUDES@ @APR_INCLUDES@ @APU_INCLUDES@
+AM_CPPFLAGS = @APR_INCLUDES@
 SUBDIRS = apache2 apache
-LIBS = ../library/lib@APREQ_LIBNAME@.la @APU_LIBS@ @APR_LIBS@
-LDFLAGS = @APU_LTFLAGS@ @APR_LTFLAGS@
 TEST_CONFIG_SCRIPT = package Apache::TestMM; filter_args(); generate_script("t/TEST")
 EXTRA_DIST = t c-modules
 
 noinst_PROGRAMS = test_cgi
+test_cgi_LDFLAGS = @APR_LTFLAGS@ `@APREQ_CONFIG@ --link-libtool --libs`
 
 run_tests : t/TEST
 	-cp -f test_cgi t/cgi-bin

Modified: httpd/apreq/branches/multi-env-unstable/module/apache/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/module/apache/Makefile.am?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/module/apache/Makefile.am (original)
+++ httpd/apreq/branches/multi-env-unstable/module/apache/Makefile.am Tue Mar  1 00:03:08 2005
@@ -1,24 +1,29 @@
 if MAINTAINER_MODE
+
 APACHE1_INCLUDES = -isystem `@APACHE1_APXS@ -q INCLUDEDIR`
+
 else
-APACHE1_INCLUDES = -I `@APACHE1_APXS@ -q INCLUDEDIR`
+
+APACHE1_INCLUDES = -I`@APACHE1_APXS@ -q INCLUDEDIR`
+
 endif
 
-INCLUDES = $(APACHE1_INCLUDES) @APR_INCLUDES@ @APU_INCLUDES@
-LIBS = ../../library/lib@APREQ_LIBNAME@.la @APU_LIBS@ @APR_LIBS@
-LDFLAGS = @APR_LTFLAGS@ @APU_LTFLAGS@
+
+
+AM_CPPFLAGS = $(APACHE1_INCLUDES) @APR_INCLUDES@
 TEST_CONFIG_SCRIPT = package Apache::TestMM; filter_args(); generate_script("t/TEST")
-pkgincludedir = $(includedir)/@APREQ_LIBNAME@
+
 pkginclude_HEADERS = apreq_module_apache.h
-mod_apreq2_la_LDFLAGS = -export-dynamic -module -avoid-version -rpath `@APACHE1_APXS@ -q LIBEXECDIR`
+mod_apreq2_la_LDFLAGS = -export-dynamic -module -avoid-version @APR_LTFLAGS@ \
+                        `@APREQ_CONFIG@ --link-libtool --libs`
+mod_apreq2_la_SOURCES = apreq_private_apache.h handle.c command.c
 
-if HAVE_APACHE1
 
-noinst_LTLIBRARIES = mod_apreq2.la
-mod_apreq2_la_SOURCES = apreq_private_apache.h handle.c command.c
+if HAVE_APACHE1
 
-install-exec-local: mod_apreq2.la
-	$(LIBTOOL) --mode=install cp mod_apreq2.la `@APACHE1_APXS@ -q LIBEXECDIR`
+pkglibdir = `@APACHE1_APXS@ -q LIBEXECDIR`
+pkgincludedir = `@APACHE1_APXS@ -q INCLUDEDIR`/@APREQ_LIBNAME@
+pkglib_LTLIBRARIES = mod_apreq2.la
 
 run_tests : t/TEST
 	-cp -Rp .libs t
@@ -38,6 +43,5 @@
 	-rm c-modules/Makefile c-modules/*/Makefile c-modules/apache_httpd_test.h
 
 clean-local: test_clean
-
 
 endif

Modified: httpd/apreq/branches/multi-env-unstable/module/apache2/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/module/apache2/Makefile.am?view=diff&r1=155760&r2=155761
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/module/apache2/Makefile.am (original)
+++ httpd/apreq/branches/multi-env-unstable/module/apache2/Makefile.am Tue Mar  1 00:03:08 2005
@@ -1,15 +1,21 @@
-INCLUDES = -I../../include @APACHE2_INCLUDES@ @APR_INCLUDES@ @APU_INCLUDES@
-LIBS = ../../library/lib@APREQ_LIBNAME@.la @APU_LIBS@ @APR_LIBS@
-LDFLAGS = @APU_LTFLAGS@ @APR_LTFLAGS@
 TEST_CONFIG_SCRIPT = package Apache::TestMM; filter_args(); generate_script("t/TEST")
-pkgincludedir = $(includedir)/@APREQ_LIBNAME@
 pkginclude_HEADERS = apreq_module_apache2.h
-mod_apreq2_la_LDFLAGS = -export-dynamic -module -avoid-version -rpath `@APACHE2_APXS@ -q LIBEXECDIR`
+mod_apreq2_la_LDFLAGS = -export-dynamic -module -avoid-version @APR_LTFLAGS@ \
+                        `@APREQ_CONFIG@ --link-libtool --libs`
+mod_apreq2_la_SOURCES = apreq_private_apache2.h handle.c filter.c
+
 
 if MAINTAINER_MODE
-    AM_CPPFLAGS= -DAP_HAVE_DESIGNATED_INITIALIZER
+
+AM_CPPFLAGS = -DAP_HAVE_DESIGNATED_INITIALIZER @APACHE2_INCLUDES@ @APR_INCLUDES@
+
+else
+
+AM_CPPFLAGS = @APACHE2_INCLUDES@ @APR_INCLUDES@
+
 endif
 
+
 if BUILD_HTTPD
 
 # mod_apreq.c needs to be built from httpd-2.X, e.g.
@@ -26,10 +32,8 @@
 
 else
 
-noinst_LTLIBRARIES = mod_apreq2.la
-mod_apreq2_la_SOURCES = apreq_private_apache2.h handle.c filter.c
-
-install-exec-local: mod_apreq.la
-	@APACHE2_APXS@ -i -a -n apreq mod_apreq2.la
+pkgincludedir = `@APACHE2_APXS@ -q INCLUDEDIR`/@APREQ_LIBNAME@
+pkglibdir = `@APACHE2_APXS@ -q LIBEXECDIR`
+pkglib_LTLIBRARIES = mod_apreq2.la
 
 endif