joes 2004/07/16 09:28:12
Modified: . acinclude.m4
src Makefile.am
Log:
Add --enable-profile configure option, which builds libapreq2 with gcov/gprof
support. It's convenient to do this only for the shared library, because
modules like mod_apreq.so won't dynaload into a normal httpd if profiling is
enabled (for mod_apreq.c only, not sure what happens if httpd has profiling
support compiled into it also).
Revision Changes Path
1.26 +4 -1 httpd-apreq-2/acinclude.m4
Index: acinclude.m4
===================================================================
RCS file: /home/cvs/httpd-apreq-2/acinclude.m4,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- acinclude.m4 14 Jul 2004 23:11:13 -0000 1.25
+++ acinclude.m4 16 Jul 2004 16:28:12 -0000 1.26
@@ -1,5 +1,8 @@
AC_DEFUN([AC_APREQ], [
+ AC_ARG_ENABLE(profile,
+ AC_HELP_STRING([--enable-profile],[compile libapreq2 with
"-fprofile-arcs -ftest-coverage" for gcov/gprof]),
+ [PROFILE=$enableval],[PROFILE="no"])
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"])
@@ -77,7 +80,7 @@
(cd glue/perl && $PERL ../../build/xsbuilder.pl run)],
[PERL=$PERL;PERL_GLUE=$PERL_GLUE;APACHE2_APXS=$APACHE2_APXS])
-
+ AM_CONDITIONAL(ENABLE_PROFILE, test "x$PROFILE" != "xno")
AM_CONDITIONAL(BUILD_PERL_GLUE, test "x$PERL_GLUE" != "xno")
AM_CONDITIONAL(HAVE_APACHE_TEST, test -n "`$prereq_check
Apache::Test`")
AM_CONDITIONAL(BUILD_HTTPD, test -n "$APACHE2_SRC")
1.19 +11 -2 httpd-apreq-2/src/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/httpd-apreq-2/src/Makefile.am,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Makefile.am 23 Jun 2004 02:22:28 -0000 1.18
+++ Makefile.am 16 Jul 2004 16:28:12 -0000 1.19
@@ -11,17 +11,26 @@
pkgincludedir = $(includedir)/@APREQ_LIBNAME@
+if ENABLE_PROFILE
+
+AM_CFLAGS= -fprofile-arcs -ftest-coverage
+
+clean-local:
+ -rm *.bb *.bbg *.da *.gcov
+
+endif
+
if BUILD_APR
@APR_LA@:
- cd [EMAIL PROTECTED]@ --srcdir` && make
+ cd [EMAIL PROTECTED]@ --srcdir` && $(MAKE)
endif
if BUILD_APU
@APU_LA@: @APR_LA@
- cd [EMAIL PROTECTED]@ --srcdir` && make
+ cd [EMAIL PROTECTED]@ --srcdir` && $(MAKE)
endif