pier 01/07/08 16:11:46 Modified: webapp Makedefs.in Makefile.in README.txt configure.in webapp/apache-1.3 .cvsignore Makefile.in webapp/lib .cvsignore Makefile.in Log: Last changes to the new build method for mod_webapp. It works (for me), but it might still create some problems. Revision Changes Path 1.5 +33 -15 jakarta-tomcat-connectors/webapp/Makedefs.in Index: Makedefs.in =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/Makedefs.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makedefs.in 2001/07/02 14:05:59 1.4 +++ Makedefs.in 2001/07/08 23:11:36 1.5 @@ -56,21 +56,39 @@ # ========================================================================= # # @author Pier Fumagalli <mailto:[EMAIL PROTECTED]> -# @version $Id: Makedefs.in,v 1.4 2001/07/02 14:05:59 jfclere Exp $ +# @version $Id: Makedefs.in,v 1.5 2001/07/08 23:11:36 pier Exp $ -CC = @CC@ -AR = @AR@ -APXS = @APXS@ -APXSFLAGS = -I@SRCDIR@/include -I@APRDIR@/include \ - -L@SRCDIR@/lib -lwebapp \ - -L@APRDIR@/lib -lapr \ - -Wc,"-Wall @APXSCFLAGS@" @APXSLDFLAGS@ -RANLIB = @RANLIB@ -CFLAGS = -Wall -Wstrict-prototypes @CFLAGS@ -CPPFLAGS = -I@SRCDIR@/include -I@APRDIR@/include @CPPFLAGS@ -SRCDIR = @SRCDIR@ -TGTDIR = @TGTDIR@ +CC = @CC@ +CPP = @CPP@ +SHELL = @SHELL@ +LIBTOOL = @LIBTOOL@ +CFLAGS = @CFLAGS@ +EXTRA_CFLAGS = @EXTRA_CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +EXTRA_CPPFLAGS = @EXTRA_CPPFLAGS@ + +EXTRA_LDFLAGS = @EXTRA_LDFLAGS@ +EXTRA_LIBS = @EXTRA_LIBS@ +EXTRA_INCLUDES = @EXTRA_INCLUDES@ +LIBTOOL_LIBS = @LIBTOOL_LIBS@ @APRDIR@/libapr.la + +LTFLAGS = --silent + +TGTDIRS = @TGTDIRS@ +TARGET = @TARGET@ +SRCDIR = @SRCDIR@ + +.SUFFIXES: .c .lo .o + .c.o: - @echo - Compiling $< - @$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ + @echo Compiling $< + @$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) $(EXTRA_CPPFLAGS) \ + -c $< -o $@ + +.c.lo: + @echo Compiling $< + @$(SHELL) $(LIBTOOL) --silent --mode=compile \ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) $(EXTRA_CPPFLAGS) \ + -c $< -o $@ + 1.7 +10 -25 jakarta-tomcat-connectors/webapp/Makefile.in Index: Makefile.in =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/Makefile.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile.in 2001/07/04 09:59:30 1.6 +++ Makefile.in 2001/07/08 23:11:37 1.7 @@ -56,11 +56,11 @@ # ========================================================================= # # @author Pier Fumagalli <mailto:[EMAIL PROTECTED]> -# @version $Id: Makefile.in,v 1.6 2001/07/04 09:59:30 jfclere Exp $ +# @version $Id: Makefile.in,v 1.7 2001/07/08 23:11:37 pier Exp $ -include Makedefs +include @SRCDIR@/Makedefs -DIRS = @TGTDIRS@ +DIRS = $(TGTDIRS) $(TARGET) CFGS = config.cache \ config.log \ @@ -72,42 +72,27 @@ all: @for DIR in $(DIRS) ; do \ + echo "" ; \ echo "Compiling sources in $$DIR..." ; \ - (cd $$DIR; $(MAKE) all) ; \ + $(MAKE) -C $$DIR all ; \ RET=$$? ; \ - if ( test "$$RET" != "0" ) ; then \ + if test "$$RET" != "0" ; then \ exit $$RET ; \ fi ; \ done clean: @for DIR in $(DIRS) ; do \ + echo "" ; \ echo "Cleaning up $$DIR..." ; \ - (cd $$DIR; $(MAKE) clean) ; \ + $(MAKE) -C $$DIR clean ; \ RET=$$? ; \ - if ( test "$$RET" != "0" ) ; then \ + if test "$$RET" != "0" ; then \ exit $$RET ; \ fi ; \ done -install: - @for DIR in $(DIRS) ; do \ - echo "Installing $$DIR..." ; \ - (cd $$DIR; $(MAKE) install) ; \ - RET=$$? ; \ - if ( test "$$RET" != "0" ) ; then \ - exit $$RET ; \ - fi ; \ - done - - -apidocs: include/*.h - @echo "Generating API documentation..." - @if ! test -d docs/api ; then mkdir docs/api ; fi - @../scandoc/scandoc.pl -i ../scandoc/template.pl -p ./docs/api/ include/*.h - -dist: all apidocs - distclean: clean @echo Removing configure generated files... @rm -f $(CFGS) + 1.4 +57 -31 jakarta-tomcat-connectors/webapp/README.txt Index: README.txt =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/README.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- README.txt 2001/05/12 04:42:31 1.3 +++ README.txt 2001/07/08 23:11:37 1.4 @@ -1,37 +1,63 @@ README for WebApp Library and Related Modules --------------------------------------------- -Prerequisites: --------------- +How to build the WebApp module from CVS sources: +------------------------------------------------ -1) The Apache Portable Runtime library: - The APR library is an abstraction layer among several operating systems, - and it's used to simplify the porting operation of the WebApp Library and - its related modules to different environments. - - This doesn't mean that WebApp modules will require the Apache Web Server - 2.0 to run, but only that both WebApp and Apache 2.0 are built on the - same OS abstraction layer (if Apache 2.0 can run on your operating system - also WebApp can) - - There is not yet a final release of APR, but you can download the lastest - development snapshot from <http://apr.apache.org/> - -2) The Web Server of your choice: - Even if right now the only implemented web server plug-in is mod_webapp - for Apache 1.3, WebApp Library Modules can be written for any web server. - Currently, for Apache 1.3, you will need a fully installed version of - the web server with DSO (loadable modules) support and APXS, the Apache - modules compilation utility. - -Configuration: --------------- - -If you are building this from CVS, you will need to first execute -./buildconf.sh to build the "configure" script. This assumes that you have -autoconf 2.13 installed on your machine already. +Check out the module sources from CVS using the following commands: -Simply issue a "./configure --help" to see all the supported AutoConf -parameters. Example: + cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic + (Logging in to [EMAIL PROTECTED]) + CVS password: anoncvs + cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic \ + checkout jakarta-tomcat-connectors/webapp -./configure --with-apr=/usr/local --with-apxs +Once CVS downloads the WebApp module sources, we need to download the +APR (Apache Portable Runtime) sources. To do this simply: + + cd ./jakarta-tomcat-connectors/webapp + cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic \ + checkout apr + +When the APR sources are in place, we need to create the configure +script, configure both APR and the WebApp module and compile: + + ./buildconf.sh + ./configure --with-apxs + make + +This will configure and build APR, and build the WebApp module for +Apache 1.3. The available options for the configure script are: + + --with-apxs[=FILE] + Use the APXS Apache 1.3 Extension Tool. If this option is + not specified, the Apache module will not be built (only the + APR and WEBAPP libraries will be build). + The "FILE" parameter specifies the full path for the apxs + executable. If this is not specified apxs will be searched in + the current path. + + --with-apr=DIR + If you already have the APR sources lying around somewhere, and + want to use them instead of checking them out from CVS, you can + specify where these can be found. + +Once built, the DSO module will be built in the webapp/apache-1.3 directory. +To install it copy the mod_webapp.so file in your Apache 1.3 libexec +directory, and add the following lines to httpd.conf: + + LoadModule webapp_module [path to mod_webapp.so] + AddModule mod_webapp.c + +To check out if everything is correctly configured, issue the following: + + apachectl configtest + +If the output of the apachectl command doesn't include "Syntax OK", something +went wrong with the build process. Please report that through our bug tracking +database at <http://nagoya.apache.org/bugzilla> or to the Tomcat developers +mailing list <mailto:[EMAIL PROTECTED]> + +Have fun... + + Pier <[EMAIL PROTECTED]> 1.9 +225 -182 jakarta-tomcat-connectors/webapp/configure.in Index: configure.in =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/configure.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- configure.in 2001/07/08 03:32:07 1.8 +++ configure.in 2001/07/08 23:11:38 1.9 @@ -1,229 +1,272 @@ -dnl # ========================================================================= # -dnl # # -dnl # The Apache Software License, Version 1.1 # -dnl # # -dnl # Copyright (c) 1999-2001 The Apache Software Foundation. # -dnl # All rights reserved. # -dnl # # -dnl # ========================================================================= # -dnl # # -dnl # Redistribution and use in source and binary forms, with or without modi- # -dnl # fication, are permitted provided that the following conditions are met: # -dnl # # -dnl # 1. Redistributions of source code must retain the above copyright notice # -dnl # notice, this list of conditions and the following disclaimer. # -dnl # # -dnl # 2. Redistributions in binary form must reproduce the above copyright # -dnl # notice, this list of conditions and the following disclaimer in the # -dnl # documentation and/or other materials provided with the distribution. # -dnl # # -dnl # 3. The end-user documentation included with the redistribution, if any, # -dnl # must include the following acknowlegement: # -dnl # # -dnl # "This product includes software developed by the Apache Software # -dnl # Foundation <http://www.apache.org/>." # -dnl # # -dnl # Alternately, this acknowlegement may appear in the software itself, if # -dnl # and wherever such third-party acknowlegements normally appear. # -dnl # # -dnl # 4. The names "The Jakarta Project", "WebApp", and "Apache Software # -dnl # Foundation" must not be used to endorse or promote products derived # -dnl # from this software without prior written permission. For written # -dnl # permission, please contact <[EMAIL PROTECTED]>. # -dnl # # -dnl # 5. Products derived from this software may not be called "Apache" nor may # -dnl # "Apache" appear in their names without prior written permission of the # -dnl # Apache Software Foundation. # -dnl # # -dnl # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES # -dnl # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY # -dnl # AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL # -dnl # THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY # -dnl # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # -dnl # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # -dnl # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # -dnl # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # -dnl # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # -dnl # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # -dnl # POSSIBILITY OF SUCH DAMAGE. # -dnl # # -dnl # ========================================================================= # -dnl # # -dnl # This software consists of voluntary contributions made by many indivi- # -dnl # duals on behalf of the Apache Software Foundation. For more information # -dnl # on the Apache Software Foundation, please see <http://www.apache.org/>. # -dnl # # -dnl # ========================================================================= # - -dnl ----------------------------------------------------------------------------- -dnl Author Pier Fumagalli <mailto:[EMAIL PROTECTED]> -dnl Author Jon S. Stevens <mailto:[EMAIL PROTECTED]> -dnl Version $Id: configure.in,v 1.8 2001/07/08 03:32:07 pier Exp $ -dnl ----------------------------------------------------------------------------- - -dnl ----------------------------------------------------------------------------- -dnl Initialize GNU AutoConf -dnl ----------------------------------------------------------------------------- -AC_INIT(Makefile.in) +dnl ========================================================================= +dnl +dnl The Apache Software License, Version 1.1 +dnl +dnl Copyright (c) 1999-2001 The Apache Software Foundation. +dnl All rights reserved. +dnl +dnl ========================================================================= +dnl +dnl Redistribution and use in source and binary forms, with or without modi- +dnl fication, are permitted provided that the following conditions are met: +dnl +dnl 1. Redistributions of source code must retain the above copyright notice +dnl notice, this list of conditions and the following disclaimer. +dnl +dnl 2. Redistributions in binary form must reproduce the above copyright +dnl notice, this list of conditions and the following disclaimer in the +dnl documentation and/or other materials provided with the distribution. +dnl +dnl 3. The end-user documentation included with the redistribution, if any, +dnl must include the following acknowlegement: +dnl +dnl "This product includes software developed by the Apache Software +dnl Foundation <http://www.apache.org/>." +dnl +dnl Alternately, this acknowlegement may appear in the software itself, if +dnl and wherever such third-party acknowlegements normally appear. +dnl +dnl 4. The names "The Jakarta Project", "Apache WebApp Module", and "Apache +dnl Software Foundation" must not be used to endorse or promote products +dnl derived from this software without prior written permission. For +dnl written permission, please contact <[EMAIL PROTECTED]>. +dnl +dnl 5. Products derived from this software may not be called "Apache" nor may +dnl "Apache" appear in their names without prior written permission of the +dnl Apache Software Foundation. +dnl +dnl THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES +dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +dnl AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +dnl THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY +dnl DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +dnl OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +dnl ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +dnl POSSIBILITY OF SUCH DAMAGE. +dnl +dnl ========================================================================= +dnl +dnl This software consists of voluntary contributions made by many indivi- +dnl duals on behalf of the Apache Software Foundation. For more information +dnl on the Apache Software Foundation, please see <http://www.apache.org/>. +dnl +dnl ========================================================================= + +dnl -------------------------------------------------------------------------- +dnl Author Pier Fumagalli <mailto:[EMAIL PROTECTED]> +dnl Author Jon S. Stevens <mailto:[EMAIL PROTECTED]> +dnl Version $Id: configure.in,v 1.9 2001/07/08 23:11:38 pier Exp $ +dnl -------------------------------------------------------------------------- -dnl ----------------------------------------------------------------------------- +dnl -------------------------------------------------------------------------- dnl Define the local functions we're going to use -dnl ----------------------------------------------------------------------------- +dnl -------------------------------------------------------------------------- +AC_DEFUN(LOCAL_INIT,[ + AC_PATH_PROG(test,test,${PATH}) + AC_PATH_PROG(true,true,${PATH}) + AC_PATH_PROG(printf,printf,${PATH}) +]) + AC_DEFUN(LOCAL_HEADER,[ - printf "\n\033\13301;31m%s\033\13300m\n" "$1" 1>&2 - AC_PROVIDE([$0]) + ${printf} "\n\033\13301;31m%s\033\13300m\n" "$1" 1>&2 ]) -AC_DEFUN(LOCAL_FILTEREXEC,[{ +AC_DEFUN(LOCAL_FILTEREXEC,[ + ${printf} "\033\13301mInvoking\033\13300m: %s\n" "$1" + { $1 - echo RETVAL $? -}|{ - RET=0 - while ${TRUE} + echo retvalue $? + }|{ + ret=0 + while ${true} do - read FIRST LINE - if ${TEST} ! "$?" -eq "0" + read first line + if ${test} ! "$?" -eq "0" + then + break + else + if ${test} "${first}" = "retvalue" then - break + ret="${line}" else - if ${TEST} "$FIRST" = "RETVAL" - then - RET="$LINE" - else - printf "\033\13301m%s\033\13300m: %s\n" "$2" "$FIRST $LINE" 1>&2 - fi + ${printf} "\033\13301m%s\033\13300m: %s\n" "$2" "${first} ${line}" fi + fi done - unset FIRST - unset LINE -}]) - -dnl ----------------------------------------------------------------------------- -dnl Check out ranlib and ar -dnl ----------------------------------------------------------------------------- -AC_PROG_RANLIB -AC_PATH_PROG(AR,ar,${PATH}) -AC_PATH_PROG(TEST,test,$PATH) -AC_PATH_PROG(TRUE,true,$PATH) -AC_SUBST(AR) -AC_SUBST(TEST) -AC_SUBST(TRUE) - -dnl ----------------------------------------------------------------------------- -dnl Process the --with-apxs[=FILE]... command line argument -dnl ----------------------------------------------------------------------------- -AC_ARG_WITH(apxs, -[ --with-apxs[=FILE] Build shared Apache module. FILE is the optional - pathname to the apxs tool; defaults to finding - apxs in your PATH.], -[ - case "${withval}" in - y | yes | true) find_apxs=true ;; - n | no | false) find_apxs=false ;; - *) find_apxs=true ;; - esac - - if ${TEST} ${find_apxs} ; then - AC_MSG_RESULT([need to check for Perl first, apxs depends on it...]) - AC_PATH_PROG(PERL,perl,$PATH)dnl - - dnl if the value is an excutable otherwise try the PATH. - if ${TEST} ! -x ${withval} ; then - AC_PATH_PROG(APXS,apxs,$PATH)dnl - else - APXS=${withval} - fi - - if ${TEST} -n "${APXS}" ; then - dnl Seems that we have it, but have to check if it is OK first - if ${TEST} ! -x "${APXS}" ; then - AC_MSG_ERROR(Invalid location for apxs: '${APXS}') - fi - - $APXS -q PREFIX >/dev/null 2>/dev/null || apxs_support=false - - if ${TEST} "${apxs_support}" = "false" ; then - AC_MSG_RESULT(could not find apxs) - AC_MSG_ERROR(You must specify a valid --with-apxs path) - fi - - TGTDIRS="$TGTDIRS apache-1.3" - AC_MSG_RESULT([adding apache-1.3 to target directories: \"$TGTDIRS\"]) - - AC_SUBST(TGTDIRS) - AC_SUBST(APXS) - fi - fi -], -[ - AC_MSG_RESULT(no) + unset first + unset line + } ]) + +dnl -------------------------------------------------------------------------- +dnl Initialize +dnl -------------------------------------------------------------------------- +AC_INIT(Makefile.in) +LOCAL_INIT() + +TARGET="" -dnl ----------------------------------------------------------------------------- +dnl -------------------------------------------------------------------------- dnl Check where sources are -dnl ----------------------------------------------------------------------------- +dnl -------------------------------------------------------------------------- AC_MSG_CHECKING([sources directory]) -SRCDIR=$srcdir -CURDIR=`pwd` -cd $SRCDIR +SRCDIR="${srcdir}" +curdir=`pwd` +cd ${SRCDIR} SRCDIR=`pwd` -cd $CURDIR -AC_MSG_RESULT($SRCDIR) +cd ${curdir} +AC_MSG_RESULT(${SRCDIR}) AC_SUBST(SRCDIR) + +dnl -------------------------------------------------------------------------- +dnl Process the --with-apxs[=FILE] command line argument +dnl -------------------------------------------------------------------------- +AC_ARG_WITH(apxs, + [ --with-apxs[=FILE] build a shared Apache 1.3.x module.], + [ + if ${test} -n "${TARGET}" + then + AC_MSG_ERROR([target already defined as ${TARGET}]) + fi -dnl ----------------------------------------------------------------------------- -dnl Check where targets are -dnl ----------------------------------------------------------------------------- -AC_MSG_CHECKING([targets directory]) -TGTDIR=`pwd` -AC_MSG_RESULT($TGTDIR) -AC_SUBST(TGTDIR) - -dnl ----------------------------------------------------------------------------- -dnl Process the --with-apr=... command line argument (required) -dnl ----------------------------------------------------------------------------- + APXS="${withval}" + + if ${test} -z "${APXS}" ; then APXS="yes" ; fi + if ${test} "${APXS}" = "yes" + then + AC_PATH_PROG(APXS,apxs,${PATH}) + fi + + AC_MSG_CHECKING([if apxs is working]) + ${APXS} -q CC 2>&1 1>/dev/null + if ${test} ! "$?" -eq "0" + then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([apxs is unworkable]) + fi + AC_MSG_RESULT([ok]) + + APXS_CC=`${APXS} -q CC` + APXS_TARGET=`${APXS} -q TARGET` + APXS_CFLAGS=`${APXS} -q CFLAGS` + APXS_SBINDIR=`${APXS} -q SBINDIR` + APXS_CFLAGS_SHLIB=`${APXS} -q CFLAGS_SHLIB` + APXS_INCLUDEDIR=`${APXS} -q INCLUDEDIR` + APXS_LD_SHLIB=`${APXS} -q LD_SHLIB` + APXS_LIBEXECDIR=`${APXS} -q LIBEXECDIR` + APXS_LDFLAGS_SHLIB=`${APXS} -q LDFLAGS_SHLIB` + APXS_SYSCONFDIR=`${APXS} -q SYSCONFDIR` + APXS_LIBS_SHLIB=`${APXS} -q LIBS_SHLIB` + APXS_PREFIX=`${APXS} -q PREFIX` + + AC_SUBST(APXS) + AC_SUBST(APXS_CC) + AC_SUBST(APXS_TARGET) + AC_SUBST(APXS_CFLAGS) + AC_SUBST(APXS_SBINDIR) + AC_SUBST(APXS_CFLAGS_SHLIB) + AC_SUBST(APXS_INCLUDEDIR) + AC_SUBST(APXS_LD_SHLIB) + AC_SUBST(APXS_LIBEXECDIR) + AC_SUBST(APXS_LDFLAGS_SHLIB) + AC_SUBST(APXS_SYSCONFDIR) + AC_SUBST(APXS_LIBS_SHLIB) + AC_SUBST(APXS_PREFIX) + + TARGET="${SRCDIR}/apache-1.3" + makefile="./apache-1.3/Makefile" + AC_MSG_RESULT([setting target module to... ${TARGET}]) + ] +) +AC_SUBST(TARGET) + +dnl -------------------------------------------------------------------------- +dnl Process the --with-apr=... command line argument +dnl -------------------------------------------------------------------------- AC_MSG_CHECKING([APR directory]) AC_ARG_WITH(apr, - [ --with-apr=DIR where the APR sources can be found], - APRDIR=${withval}, + [ --with-apr=DIR where the APR sources can be found.], + APRDIR="${withval}", APRDIR="${srcdir}/apr" ) -if ${TEST} ! -d "${APRDIR}" ; then +if ${test} ! -d "${APRDIR}" ; then AC_MSG_ERROR([Cannot find APR sources directory \"${APRDIR}\"]) fi -if ${TEST} ! -x "${APRDIR}/buildconf" ; then +if ${test} ! -x "${APRDIR}/buildconf" ; then AC_MSG_ERROR([Cannot find APR buildconf program in \"${APRDIR}\"]) fi -CURDIR=`pwd` +curdir=`pwd` cd ${APRDIR} APRDIR=`pwd` AC_MSG_RESULT([${APRDIR}]) -cd ${CURDIR} +cd ${curdir} AC_SUBST(APRDIR) -dnl ----------------------------------------------------------------------------- +dnl -------------------------------------------------------------------------- dnl Build the configure script for APR and run it -dnl ----------------------------------------------------------------------------- +dnl -------------------------------------------------------------------------- +curdir=`pwd` cd ${APRDIR} LOCAL_HEADER([Building APR configure script]) -LOCAL_FILTEREXEC(./buildconf,[ APR buildconf]) -if ${TEST} "${RET}" -ne "0" +LOCAL_FILTEREXEC([./buildconf],[ APR buildconf]) +if ${test} "${ret}" -ne "0" then - AC_MSG_ERROR([APR buildconf terminated with error code ${RET}]) + AC_MSG_ERROR([APR buildconf terminated with error code ${ret}]) fi LOCAL_HEADER([Configuring APR]) -LOCAL_FILTEREXEC(./configure,[ APR configure]) -if ${TEST} "${RET}" -ne "0" +LOCAL_FILTEREXEC([./configure --enable-static --disable-shared --disable-threads], + [ APR configure]) +if ${test} "${ret}" -ne "0" then - AC_MSG_ERROR([APR configure script terminated with error code ${RET}]) + AC_MSG_ERROR([APR configure script terminated with error code ${ret}]) fi LOCAL_HEADER([Done with APR configuration]) -cd ${CURDIR} +cd ${curdir} + +dnl -------------------------------------------------------------------------- +dnl Retrieving APR default values +dnl -------------------------------------------------------------------------- +if ${test} ! -f ${APRDIR}/APRVARS +then + AC_MSG_ERROR([Cannot find APR defaults in ${APRDIR}/APRVARS]) +fi + +if ${test} ! -x ${APRDIR}/libtool +then + AC_MSG_ERROR([Cannot find APR libtool binary]) +else + LIBTOOL="${APRDIR}/libtool" +fi + +eval `cat ${APRDIR}/APRVARS` +AC_SUBST(CC) +AC_SUBST(CPP) +AC_SUBST(SHELL) +AC_SUBST(LIBTOOL) +AC_SUBST(EXTRA_CPPFLAGS) +AC_SUBST(EXTRA_CFLAGS) +AC_SUBST(EXTRA_LDFLAGS) +AC_SUBST(EXTRA_LIBS) +AC_SUBST(EXTRA_INCLUDES) +AC_SUBST(LIBTOOL_LIBS) + +dnl -------------------------------------------------------------------------- +dnl Defining variables used by Make +dnl -------------------------------------------------------------------------- +CFLAGS="-Wall ${CFLAGS}" +CPPFLAGS="-I${SRCDIR}/include -I${APRDIR}/include ${CPPFLAGS}" +TGTDIRS="${APRDIR} ${SRCDIR}/lib" +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(TGTDIRS) -AC_OUTPUT(Makedefs Makefile lib/Makefile apache-1.3/Makefile) +AC_OUTPUT(Makedefs Makefile lib/Makefile ${makefile}) 1.2 +3 -0 jakarta-tomcat-connectors/webapp/apache-1.3/.cvsignore Index: .cvsignore =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-1.3/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .cvsignore 2001/05/12 04:54:52 1.1 +++ .cvsignore 2001/07/08 23:11:41 1.2 @@ -1 +1,4 @@ +.libs Makefile +mod_webapp.lo +mod_webapp.o 1.3 +28 -11 jakarta-tomcat-connectors/webapp/apache-1.3/Makefile.in Index: Makefile.in =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-1.3/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile.in 2001/06/22 09:45:57 1.2 +++ Makefile.in 2001/07/08 23:11:42 1.3 @@ -56,23 +56,40 @@ # ========================================================================= # # @author Pier Fumagalli <mailto:[EMAIL PROTECTED]> -# @version $Id: Makefile.in,v 1.2 2001/06/22 09:45:57 jfclere Exp $ +# @version $Id: Makefile.in,v 1.3 2001/07/08 23:11:42 pier Exp $ -include ../Makedefs +include @SRCDIR@/Makedefs -OBJS = mod_webapp.o +APXS_CC = @APXS_CC@ +APXS_TARGET = @APXS_TARGET@ +APXS_CFLAGS = @APXS_CFLAGS@ +APXS_SBINDIR = @APXS_SBINDIR@ +APXS_CFLAGS_SHLIB = @APXS_CFLAGS_SHLIB@ +APXS_INCLUDEDIR = @APXS_INCLUDEDIR@ +APXS_LD_SHLIB = @APXS_LD_SHLIB@ +APXS_LIBEXECDIR = @APXS_LIBEXECDIR@ +APXS_LDFLAGS_SHLIB = @APXS_LDFLAGS_SHLIB@ +APXS_SYSCONFDIR = @APXS_SYSCONFDIR@ +APXS_LIBS_SHLIB = @APXS_LIBS_SHLIB@ +APXS_PREFIX = @APXS_PREFIX@ MODULE = mod_webapp.so all: $(MODULE) -mod_webapp.so: - @echo Linking Apache 1.3.x module - @$(APXS) -c $(APXSFLAGS) mod_webapp.c -install: mod_webapp.so - @echo Installing Apache 1.3.x module - @$(APXS) -i mod_webapp.so +mod_webapp.lo: mod_webapp.c + @echo Compiling Apache 1.3 WebApp module + @$(SHELL) $(LIBTOOL) $(LTFLAGS) --mode=compile \ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(APXS_CFLAGS) $(APXS_CFLAGS_SHLIB) \ + -I$(APXS_INCLUDEDIR) $(CPPFLAGS) $(EXTRA_CPPFLAGS) \ + -c $< -o $@ + +mod_webapp.so: mod_webapp.lo + @echo Linking Apache 1.3 WebApp Module + @$(SHELL) $(LIBTOOL) $(LTFLAGS) --mode=link \ + $(APXS_LD_SHLIB) $(APXS_LDFLAGS_SHLIB) \ + mod_webapp.lo ../lib/libwebapp.la $(LIBTOOL_LIBS) -o mod_webapp.so clean: - @echo Removing object files $(OBJS) $(MODULE) - @rm -f $(OBJS) $(MODULE) + @echo Removing *.o *.lo $(MODULE) .libs + @rm -rf *.o *.lo $(MODULE) .libs 1.2 +13 -0 jakarta-tomcat-connectors/webapp/lib/.cvsignore Index: .cvsignore =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/lib/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .cvsignore 2001/05/12 04:54:52 1.1 +++ .cvsignore 2001/07/08 23:11:44 1.2 @@ -1 +1,14 @@ +.libs Makefile +libwebapp.la +libwebapp.a +pr_info.lo +pr_info.o +pr_warp.lo +pr_warp.o +wa_config.lo +wa_config.o +wa_main.lo +wa_main.o +wa_request.lo +wa_request.o 1.10 +10 -12 jakarta-tomcat-connectors/webapp/lib/Makefile.in Index: Makefile.in =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/lib/Makefile.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Makefile.in 2001/06/22 09:45:58 1.9 +++ Makefile.in 2001/07/08 23:11:45 1.10 @@ -56,25 +56,23 @@ # ========================================================================= # # @author Pier Fumagalli <mailto:[EMAIL PROTECTED]> -# @version $Id: Makefile.in,v 1.9 2001/06/22 09:45:58 jfclere Exp $ +# @version $Id: Makefile.in,v 1.10 2001/07/08 23:11:45 pier Exp $ -include ../Makedefs +include @SRCDIR@/Makedefs -OBJS = wa_main.o wa_config.o wa_request.o -PROVS = pr_info.o pr_warp.o # pr_jni.o +OBJS = wa_main.lo wa_config.lo wa_request.lo +PROVS = pr_info.lo pr_warp.lo -LIB = libwebapp.a +LIB = libwebapp.la all: $(LIB) $(LIB): $(OBJS) $(PROVS) - @echo - Linking library $(LIB) - @$(AR) -cr $(LIB) $(OBJS) $(PROVS) - @$(RANLIB) $(LIB) + @echo Creating library $(LIB) + @$(LIBTOOL) --silent --mode=link $(CC) -static -o $(LIB) \ + $(OBJS) $(PROVS) 1> /dev/null clean: - @echo Removing object files $(OBJS) $(PROVS) $(LIB) - @rm -f $(OBJS) $(PROVS) $(LIB) - -install: + @echo Removing *.o *.lo $(LIB) .libs + @rm -rf *.o *.lo $(LIB) .libs