joes 2003/10/16 23:27:20
Modified: . CHANGES Makefile.PL Makefile.am acinclude.m4
configure.ac
build xsbuilder.pl
env Makefile.am
glue/perl/t TEST.PL
Added: glue Makefile.am
Log:
Add --enable-perl-glue option.
Revision Changes Path
1.11 +7 -1 httpd-apreq-2/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-apreq-2/CHANGES,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CHANGES 15 Oct 2003 06:22:53 -0000 1.10
+++ CHANGES 17 Oct 2003 06:27:20 -0000 1.11
@@ -2,6 +2,12 @@
@section 2.0.0-dev Changes with libapreq2-2.0.0-dev
+- October 17, 2003 - configure: --enable-perl-glue [joes]
+
+The --enable-perl-glue option integrates the perl glue into the
+normal Unix build cycle. It is disabled by default, but is silently
+reenabled if the user configures the source tree via Makefile.PL.
+
- October 14, 2003 - C API [joes]
Added apreq_header_attribute() and fixed mfd parser to allow
@@ -14,7 +20,7 @@
apreq_env renamed apreq_env_name, and apreq_env_magic_number added
to provide versioning for environments (modules). The header files
are now installed to "include/apreq2", and the library is renamed
-"libapreq2".
+"libapreq2". Also added an apreq2-config script based on apu-config.
- October 8, 2003 - configure: static mod_apreq.c [Bojan Smojver, joes]
1.4 +8 -10 httpd-apreq-2/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/httpd-apreq-2/Makefile.PL,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.PL 23 Jul 2003 05:07:11 -0000 1.3
+++ Makefile.PL 17 Oct 2003 06:27:20 -0000 1.4
@@ -16,21 +16,19 @@
system(@args) == 0 or die "system @args failed: $?";
}
else {
- my @opts = qw(with-apache2-apxs with-perl);
+ my @opts = qw(with-apache2-apxs with-perl with-apache2-src
+ with-apr-config with-apu-config);
my %opts;
# grab from @ARGV only the options that we expect
- GetOptions(\%opts, (map "$_=s", @opts));
+ GetOptions(\%opts, (map "$_=s", @opts),
+ qw/enable-maintainer-mode enable-perl-glue
disable-perl-glue/);
$opts{"with-perl"} = PERL_PATH;
+ $opts{"enable-perl-glue"} = "on" unless
+ exists $opts{"disable-perl-glue"} or exists
$opts{"enable-perl-glue"};
- my $opts = join " ", map {"--$_=$opts{$_}"} @opts;
-
- qx{./configure $opts};
-
- push @ARGV, ('-apxs', $opts{"with-apache2-apxs"})
- if exists $opts{"with-apache2-apxs"};
-
- qx{cd "glue/perl" && $opts{"with-perl"} Makefile.PL @ARGV};
+ my $opts = join " ", map {"--$_=$opts{$_}"} keys %opts;
+ exec "./configure --enable-perl-glue $opts";
}
1.15 +18 -5 httpd-apreq-2/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/httpd-apreq-2/Makefile.am,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Makefile.am 15 Oct 2003 06:22:53 -0000 1.14
+++ Makefile.am 17 Oct 2003 06:27:20 -0000 1.15
@@ -1,33 +1,44 @@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src env t
-EXTRA_DIST = INSTALL
+SUBDIRS = src env glue t
+EXTRA_DIST = INSTALL CHANGES build
[EMAIL PROTECTED]@ --srcdir`
[EMAIL PROTECTED]@ --srcdir`
APU_DOX = (cd $(APU_SRCDIR); cat - docs/doxygen.conf | doxygen -)
APR_DOX = (cd $(APR_SRCDIR); cat - docs/doxygen.conf | doxygen -)
COOKIE_POD=glue/perl/blib/lib/Apache/Cookie.pod
REQUEST_POD=glue/perl/blib/lib/Apache/Request.pod
+SED_BODY_TAG= s(^[\S\s]+<body.+|</body>[\S\s]+$$)()gi
bin_SCRIPTS = apreq2_config
+if BUILD_PERL_GLUE
+PERL_TEST = perl_test
+else
+PERL_TEST =
+endif
+
apreq2_config:
+dist-hook:
+ rm -rf `find $(distdir)/build -name CVS`
+ rm -rf `find $(distdir)/build -name '*~'`
+
docs: src env glue build/doxygen.conf
doxygen build/doxygen.conf
pod2html: Request.html Cookie.html
Cookie.html: Makefile.am $(COOKIE_POD)
- pod2html <$(COOKIE_POD) | perl -0777 -pe
's(^[\S\s]+<body.+|</body>[\S\s]+$$)()gi' > Cookie.html
+ pod2html <$(COOKIE_POD) | perl -0777 -pe '$(SED_BODY_TAG)' > Cookie.html
Request.html: Makefile.am $(REQUEST_POD)
- pod2html <$(REQUEST_POD)| perl -0777 -pe
's(^[\S\s]+<body.+|</body>[\S\s]+$$)()gi' > Request.html
+ pod2html <$(REQUEST_POD)| perl -0777 -pe '$(SED_BODY_TAG)' >
Request.html
apr_tags:
-mkdir docs
echo GENERATE_TAGFILE=`pwd`/docs/apu.tag | $(APU_DOX)
echo GENERATE_TAGFILE=`pwd`/docs/apr.tag | $(APR_DOX)
-test: lib_test env_test
+test: lib_test env_test $(PERL_TEST)
env_test:
cd env; make test
@@ -47,6 +58,8 @@
cd glue/perl; make
if BUILD_HTTPD
+
+install-exec-local: httpd_install
httpd_install:
cd @APACHE2_SRC@; make install
1.11 +9 -0 httpd-apreq-2/acinclude.m4
Index: acinclude.m4
===================================================================
RCS file: /home/cvs/httpd-apreq-2/acinclude.m4,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- acinclude.m4 13 Oct 2003 18:24:46 -0000 1.10
+++ acinclude.m4 17 Oct 2003 06:27:20 -0000 1.11
@@ -1,4 +1,7 @@
AC_DEFUN(AC_APREQ, [
+ AC_ARG_ENABLE(perl_glue,
+ AC_HELP_STRING([--enable-perl-glue],[build perl modules
Apache::Request and Apache::Cookie]),
+ [PERL_GLUE=$enableval],[PERL_GLUE="no"])
AC_ARG_WITH(perl,
AC_HELP_STRING([--with-perl],[path to perl executable]),
[PERL=$withval],[PERL="perl"])
@@ -37,6 +40,12 @@
AC_CHECK_FILE([$APU_CONFIG],,
AC_MSG_ERROR([invalid apu-config location- did you forget to
configure apr-util?]))
+ AC_CONFIG_COMMANDS_POST([test "x$PERL_GLUE" != "xno" &&
+ (cd glue/perl && $PERL ../../build/xsbuilder.pl run)],
+ [PERL=$PERL;PERL_GLUE=$PERL_GLUE;APACHE2_APXS=$APACHE2_APXS])
+
+
+ AM_CONDITIONAL(BUILD_PERL_GLUE, test "x$PERL_GLUE" != "xno")
AM_CONDITIONAL(BUILD_HTTPD, test -n "$APACHE2_SRC")
AM_CONDITIONAL(BUILD_APR, test "x$APR_CONFIG" = x`$APR_CONFIG
--srcdir`/apr-config)
AM_CONDITIONAL(BUILD_APU, test "x$APU_CONFIG" = x`$APU_CONFIG
--srcdir`/apu-config)
1.8 +2 -2 httpd-apreq-2/configure.ac
Index: configure.ac
===================================================================
RCS file: /home/cvs/httpd-apreq-2/configure.ac,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure.ac 15 Oct 2003 06:22:53 -0000 1.7
+++ configure.ac 17 Oct 2003 06:27:20 -0000 1.8
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
-AC_INIT(libapreq - Apache Request Library, 2.0, [EMAIL PROTECTED], libapreq2)
+AC_INIT(libapreq - Apache Request Library, 2.0-dev, [EMAIL PROTECTED],
libapreq2)
dnl this:
dnl AC_CONFIG_AUX_DIR(build)
@@ -28,6 +28,6 @@
dnl Checks for library functions.
AC_APREQ
-AC_CONFIG_FILES([Makefile src/Makefile env/Makefile t/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile env/Makefile glue/Makefile
t/Makefile])
AC_CONFIG_FILES([apreq2-config], [chmod +x apreq2-config])
AC_OUTPUT
1.11 +8 -5 httpd-apreq-2/build/xsbuilder.pl
Index: xsbuilder.pl
===================================================================
RCS file: /home/cvs/httpd-apreq-2/build/xsbuilder.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- xsbuilder.pl 13 Oct 2003 18:24:46 -0000 1.10
+++ xsbuilder.pl 17 Oct 2003 06:27:20 -0000 1.11
@@ -100,6 +100,9 @@
my @dirs = ("$base_dir/src", "$base_dir/glue/perl/xsbuilder");
use base qw/ExtUtils::XSBuilder::ParseSource/;
__PACKAGE__->$_ for shift || ();
+system("touch $base_dir/glue/perl/xsbuilder") == 0
+ or die "touch $base_dir/glue/perl/xsbuilder failed: $!"
+ unless Apache::Build::WIN32;
sub package {'Apache::libapreq2'}
sub unwanted_includes {["apreq_tables.h"]}
@@ -234,11 +237,11 @@
ModPerl::MM::WriteMakefile(
- 'NAME' => '$class',
- 'VERSION' => '0.01',
- 'TYPEMAPS' => [qw(@$mp2_typemaps $typemap)],
- 'INC' => "-I.. -I../.. -I../../.. -I$src_dir -I$xs_dir
$apache_includes",
- 'LIBS' => "$apreq_lib_flags $apr_lib_flags",
+ 'NAME' => '$class',
+ 'VERSION' => '0.01',
+ 'TYPEMAPS' => [qw(@$mp2_typemaps $typemap)],
+ 'INC' => "-I.. -I../.. -I../../.. -I$src_dir -I$xs_dir
$apache_includes",
+ 'LIBS' => "$apreq_lib_flags $apr_lib_flags",
} ;
$txt .= "'depend' => $deps,\n" if ($deps) ;
$txt .= qq{
1.14 +3 -2 httpd-apreq-2/env/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/httpd-apreq-2/env/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Makefile.am 13 Oct 2003 18:24:46 -0000 1.13
+++ Makefile.am 17 Oct 2003 06:27:20 -0000 1.14
@@ -1,10 +1,11 @@
INCLUDES = -I../src @APACHE2_INCLUDES@ @APR_INCLUDES@ @APU_INCLUDES@
LIBS = ../src/[EMAIL PROTECTED]@.la @APR_LTLIBS@ @APU_LTLIBS@
TEST_CONFIG_SCRIPT = package Apache::TestMM; filter_args();
generate_script("t/TEST")
+EXTRA_DIST = t c-modules
# XXX: should name libapreq2_cgi.a w/ source file libapreq2_cgi.c
-# lib_LIBRARIES = [EMAIL PROTECTED]@_cgi.a
-# [EMAIL PROTECTED]@_cgi_a_SOURCES = [EMAIL PROTECTED]@_cgi.c
+lib_LIBRARIES = [EMAIL PROTECTED]@_cgi.a
[EMAIL PROTECTED]@_cgi_a_SOURCES = libapreq_cgi.c
#
#check_PROGRAMS = test_cgi
#test_cgi_LDADD = [EMAIL PROTECTED]@_cgi.a
1.1 httpd-apreq-2/glue/Makefile.am
Index: Makefile.am
===================================================================
EXTRA_DIST = perl
dist-hook:
rm -rf `find $(distdir)/glue -name CVS`
rm -rf `find $(distdir)/glue -name '*~'`
perl_config:
cd perl; @PERL@ ../../build/xsbuilder.pl run
perl/Makefile: perl/xsbuilder perl/Makefile.PL
cd perl; @PERL@ Makefile.PL -apxs @APACHE2_APXS@
perl_glue: perl/Makefile
cd perl; make
perl_test: perl/Makefile
cd perl; make test
perl_install:
cd perl; make install
if BUILD_PERL_GLUE
all-local: perl_glue
install-exec-local: perl_install
test: perl_test
endif
1.6 +1 -1 httpd-apreq-2/glue/perl/t/TEST.PL
Index: TEST.PL
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/TEST.PL,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TEST.PL 20 Jul 2003 19:46:33 -0000 1.5
+++ TEST.PL 17 Oct 2003 06:27:20 -0000 1.6
@@ -12,7 +12,7 @@
use Cwd;
my $cwd = Apache::Build::WIN32 ?
Win32::GetLongPathName(cwd) : cwd;
-$cwd =~ m{^(.+httpd-apreq-2)} or die "Can't find base cvs directory";
+$cwd =~ m{^(.+)/glue/perl$} or die "Can't find base cvs directory";
my $base_dir = $1;
my $env_dir = "$base_dir/env";
my $env_dir_libs = Apache::Build::WIN32 ?