Thanks for committing the changes. I'm still having a problem with jk_exec.m4. After a clean checkout using CVS each line has a ^M at the end. It causes the configure script to crash with:
./configure[2977]: syntax error: `fi' unexpected Here is what the file looks like in vi: dnl ========================================================================^M dnl^M dnl The Apache Software License, Version 1.1^M dnl^M dnl Copyright (c) 1999-2003 The Apache Software Foundation.^M dnl All rights reserved.^M dnl^M dnl ========================================================================^M dnl^M dnl Redistribution and use in source and binary forms, with or without modi-^M dnl fication, are permitted provided that the following conditions are met:^M dnl^M dnl 1. Redistributions of source code must retain the above copyright notice^M dnl notice, this list of conditions and the following disclaimer.^M dnl^M dnl 2. Redistributions in binary form must reproduce the above copyright^M dnl notice, this list of conditions and the following disclaimer in the^M dnl documentation and/or other materials provided with the distribution.^M dnl^M dnl 3. The end-user documentation included with the redistribution, if any,^M dnl must include the following acknowlegement:^M dnl^M dnl "This product includes software developed by the Apache Software^M dnl Foundation <http://www.apache.org/>."^M dnl^M dnl Alternately, this acknowlegement may appear in the software itself, if^M dnl and wherever such third-party acknowlegements normally appear.^M dnl^M dnl 4. The names "The Jakarta Project", "Apache WebApp Module", and "Apache^M dnl Software Foundation" must not be used to endorse or promote products^M dnl derived from this software without prior written permission. For^M dnl written permission, please contact <[EMAIL PROTECTED]>.^M dnl^M dnl 5. Products derived from this software may not be called "Apache" nor may^M dnl "Apache" appear in their names without prior written permission of the^M dnl Apache Software Foundation.^M dnl^M dnl THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES^M dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY^M dnl AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL^M dnl THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY^M dnl DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL^M dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS^M dnl OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)^M dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,^M dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN^M dnl ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE^M dnl POSSIBILITY OF SUCH DAMAGE.^M dnl^M dnl =========================================================================^M dnl^M dnl This software consists of voluntary contributions made by many indivi-^M dnl duals on behalf of the Apache Software Foundation. For more information^M dnl on the Apache Software Foundation, please see <http://www.apache.org/>.^M dnl^M dnl =========================================================================^M ^M dnl ------------------------------------------------------------------------ --^M dnl^M dnl Inspired by Pier works on webapp m4 macros :)^M dnl^M dnl Version $Id:$^M dnl ------------------------------------------------------------------------ --^M ^M dnl ------------------------------------------------------------------------ --^M dnl JK_EXEC^M dnl Execute a program filtering its output (pretty printing).^M dnl^M dnl Parameters:^M dnl $1 => name of the variable containing the return value (error code).^M dnl $2 => name of the binary/script to invoke^M dnl $3 => message used for pretty printing output^M dnl $4 => the directory where the command must be executed^M dnl ------------------------------------------------------------------------ --^M AC_DEFUN(^M [JK_EXEC],^M [^M jk_exec_curdir="`pwd`"^M if test -d "$4" ; then^M cd "$4"^M else^M AC_MSG_ERROR([can't switch to directory $4])^M fi^M ^M echo " invoking \"$2\""^M echo " in directory \"$4\""^M echo "-1" > retvalue.tmp^M ^M set $2^M jk_exec_file=[$]1^M if test ! -x "${jk_exec_file}" ; then^M cd "${jk_exec_curdir}"^M AC_MSG_ERROR([cannot find or execute \"${jk_exec_file}\" in \"$4\"])^M exit 1^M fi^M unset jk_exec_file^M ^M {^M $2^M echo "\njk_exec_retvalue $?"^M } | {^M jk_exec_ret=0^M while true ; do^M read jk_exec_first jk_exec_line^M if test ! "$?" -eq "0" ; then^M break^M else^M if test "${jk_exec_first}" = "jk_exec_retvalue" ; then^M jk_exec_ret="${jk_exec_line}"^M else^M if test -n "${jk_exec_line}" ; then^M echo " $3: ${jk_exec_first} ${jk_exec_line}"^M fi^M fi^M fi^M done^M echo "${jk_exec_ret}" > retvalue.tmp^M unset jk_exec_first^M unset jk_exec_line^M unset jk_exec_ret^M }^M ^M $1="`cat retvalue.tmp`"^M rm -f retvalue.tmp^M echo " execution of \"$2\""^M echo " returned with value \"${$1}\""^M ^M cd "${jk_exec_curdir}"^M unset jk_exec_curdir^M ])^M ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 10, 2003 6:05 AM Subject: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache13 mod_jk2.c Makefile.in > hgomez 2003/11/10 03:05:33 > > Modified: jk/native2 configure.in Makefile.in > jk/support jk_apr.m4 jk_exec.m4 > jk/native2/server/apache13 mod_jk2.c Makefile.in > Log: > Latest jk2/apache 1.3 patch > > > > Obtained from: Kurt Miller > > > Revision Changes Path > 1.14 +14 -11 jakarta-tomcat-connectors/jk/native2/configure.in > > Index: configure.in > =================================================================== > RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/configure.in,v > retrieving revision 1.13 > retrieving revision 1.14 > diff -u -r1.13 -r1.14 > --- configure.in 5 Nov 2003 09:15:19 -0000 1.13 > +++ configure.in 10 Nov 2003 11:05:33 -0000 1.14 > @@ -175,15 +175,10 @@ > > JK_APR_THREADS() > JK_APR([include/apr.h.in]) > +JK_APR_UTIL([include/apu.h.in]) > JK_APR_INCDIR([apr.h]) > JK_APR_LIBDIR() > > -dnl Set these to empty until we know what to do with them > - > -AC_SUBST(APR_UTIL_INCL) > -AC_SUBST(APR_UTIL_LIB) > - > - > dnl Java settings > > JK_JNI() > @@ -205,11 +200,16 @@ > > AC_SUBST(WEBSERVERS) > > +dnl if --with-apr is specified, --with-apr-util must be too > +if ${TEST} ! -z "$APR_BUILD" -a -z "$APR_UTIL_DIR"; then > + AC_MSG_ERROR([--with-apr and --with-apr-util must be used together]) > +fi > + > dnl apache 1.3 consistancy checks > if ! ${TEST} -z "$APACHE_HOME" ; then > dnl check if apache 1.3 was selected without apr sources > if ${TEST} -z "$APR_BUILD"; then > - AC_MSG_ERROR([Apache 1.3 requires apr to built from source, use --with-apr]) > + AC_MSG_ERROR([Apache 1.3 requires apr to built from source, use --with-apr and --with-apr-util]) > fi > dnl make sure compiler matchs apxs > if ${TEST} "$APACHE_CC" != "$CC"; then > @@ -222,9 +222,9 @@ > fi > > dnl apache 2 consistancy checks > -if ! ${TEST} -z "$APACHE2_HOME" ; then > +if ${TEST} ! -z "$APACHE2_HOME" ; then > dnl check if apache 2 was selected with apr sources > - if ${TEST} -z "$APR_BUILD"; then > + if ${TEST} ! -z "$APR_BUILD"; then > AC_MSG_ERROR([Use apr that comes with Apache 2, remove --with-apr]) > fi > dnl make sure compiler matchs apxs > @@ -245,9 +245,12 @@ > AC_SUBST(APR_CFLAGS) > AC_SUBST(APR_CLEAN) > AC_SUBST(APR_DIR) > +AC_SUBST(APR_UTIL_DIR) > AC_SUBST(APR_HOME) > AC_SUBST(APR_INCDIR) > +AC_SUBST(APR_UTIL_INCDIR) > AC_SUBST(APR_LIBDIR) > +AC_SUBST(APR_UTIL_LIBDIR) > AC_SUBST(APR_CONFIGURE_ARGS) > AC_SUBST(APR_LDFLAGS) > AC_SUBST(COMMON_APR_OBJECTS) > > > > 1.4 +2 -2 jakarta-tomcat-connectors/jk/native2/Makefile.in > > Index: Makefile.in > =================================================================== > RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/Makefile.in,v > retrieving revision 1.3 > retrieving revision 1.4 > diff -u -r1.3 -r1.4 > --- Makefile.in 4 Nov 2003 12:48:05 -0000 1.3 > +++ Makefile.in 10 Nov 2003 11:05:33 -0000 1.4 > @@ -41,10 +41,10 @@ > done; > > apr-build: > - ( cd @APR_DIR@ && make ) > + ( cd @APR_DIR@ && make && cd @APR_UTIL_DIR@ && make ) > > apr-clean: > - ( cd @APR_DIR@ && make clean ) > + ( cd @APR_DIR@ && make clean && cd @APR_UTIL_DIR@ && make clean ) > > apidocs: common/*.h > mkdir -p ./docs/api > > > > 1.8 +100 -9 jakarta-tomcat-connectors/jk/support/jk_apr.m4 > > Index: jk_apr.m4 > =================================================================== > RCS file: /home/cvs/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v > retrieving revision 1.7 > retrieving revision 1.8 > diff -u -r1.7 -r1.8 > --- jk_apr.m4 5 Nov 2003 09:14:28 -0000 1.7 > +++ jk_apr.m4 10 Nov 2003 11:05:33 -0000 1.8 > @@ -103,6 +103,7 @@ > [ > case "${withval}" in > ""|"yes"|"YES"|"true"|"TRUE") > + AC_MSG_ERROR(valid apr source dir location required) > ;; > "no"|"NO"|"false"|"FALSE") > AC_MSG_ERROR(valid apr source dir location required) > @@ -120,16 +121,15 @@ > > if ${TEST} ! -z "$tempval" ; then > APR_BUILD="apr-build" > - APR_CFLAGS="-I ${tempval}/include -DHAS_APR" > + APR_CFLAGS="-I ${tempval}/include" > APR_CLEAN="apr-clean" > APR_DIR=${tempval} > APR_INCDIR="${tempval}/include" > AC_MSG_RESULT(configuring apr...) > - APR_CONFIGURE_ARGS="--enable-static --disable-shared ${APR_CONFIGURE_ARGS}" > tempret="0" > JK_EXEC( > [tempret], > - [./configure ${APR_CONFIGURE_ARGS}], > + [./configure --enable-static --disable-shared ${APR_CONFIGURE_ARGS}], > [apr], > [${APR_DIR}]) > if ${TEST} "${tempret}" = "0"; then > @@ -137,8 +137,8 @@ > else > AC_MSG_ERROR(apr configure failed with ${tempret}) > fi > - JK_APR_LIBNAME(APR_LDFLAGS,${APR_DIR}) > - APR_LDFLAGS="${APR_DIR}/.libs/${APR_LDFLAGS}" > + JK_APR_LIBNAME(apr_libname,${APR_DIR}) > + APR_LDFLAGS="${APR_DIR}/.libs/${apr_libname}" > APR_LIBDIR="" > use_apr=true > COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}" > @@ -149,6 +149,73 @@ > > unset tempret > unset tempval > + unset apr_libname > + ]) > + > +dnl ----------------------------------------------------------------------- --- > +dnl JK_APR_UTIL > +dnl Set the APR-UTIL source dir. > +dnl $1 => File which should be present > +dnl ----------------------------------------------------------------------- --- > +AC_DEFUN( > + [JK_APR_UTIL], > + [ > + tempval="" > + AC_ARG_WITH( > + [apr-util], > + [ --with-apr-util=DIR Location of APR-UTIL source dir ], > + [ > + case "${withval}" in > + ""|"yes"|"YES"|"true"|"TRUE") > + AC_MSG_ERROR(valid apr-util source dir location required) > + ;; > + "no"|"NO"|"false"|"FALSE") > + AC_MSG_ERROR(valid apr-util source dir location required) > + ;; > + *) > + tempval="${withval}" > + > + if ${TEST} ! -d ${tempval} ; then > + AC_MSG_ERROR(Not a directory: ${tempval}) > + fi > + > + if ${TEST} ! -f ${tempval}/$1; then > + AC_MSG_ERROR(can't locate ${tempval}/$1) > + fi > + > + if ${TEST} -z "${APR_BUILD}"; then > + AC_MSG_ERROR([--with-apr and --with-apr-util must be used together]) > + fi > + > + if ${TEST} ! -z "$tempval" ; then > + APR_UTIL_DIR=${tempval} > + APR_CFLAGS="${APR_CFLAGS} -I ${APR_UTIL_DIR}/include" > + APR_UTIL_INCDIR="${APR_UTIL_DIR}/include" > + AC_MSG_RESULT(configuring apr-util...) > + tempret="0" > + JK_EXEC( > + [tempret], > + [./configure --with-apr=${APR_DIR}], > + [apr-util], > + [${APR_UTIL_DIR}]) > + if ${TEST} "${tempret}" = "0"; then > + AC_MSG_RESULT(apr-util configure ok) > + else > + AC_MSG_ERROR(apr-util configure failed with ${tempret}) > + fi > + JK_APR_UTIL_LIBNAME(apr_util_libname,${APR_UTIL_DIR}) > + APR_LDFLAGS="${APR_LDFLAGS} ${APR_UTIL_DIR}/.libs/${apr_util_libname}" > + APR_UTIL_LIBDIR="" > + use_apr=true > + COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}" > + fi > + ;; > + esac > + ]) > + > + unset tempret > + unset tempval > + unset apr_util_libname > ]) > > > @@ -183,7 +250,7 @@ > > if ${TEST} ! -z "$tempval" ; then > APR_BUILD="" > - APR_CFLAGS="-I${tempval} -DHAS_APR" > + APR_CFLAGS="-I${tempval}" > APR_CLEAN="" > APR_DIR="" > APR_INCDIR=${tempval} > @@ -252,17 +319,41 @@ > [JK_APR_LIBNAME], > [ > AC_MSG_CHECKING([for apr APR_LIBNAME]) > - if test ! -f "$2/apr-config" ; then > + if ${TEST} ! -f "$2/apr-config" ; then > AC_MSG_ERROR([cannot find apr-config file in $2]) > fi > jk_apr_get_tempval=`$2/apr-config --link-libtool 2> /dev/null` > - if test -z "${jk_apr_get_tempval}" ; then > + if ${TEST} -z "${jk_apr_get_tempval}" ; then > AC_MSG_ERROR([$2/apr-config --link-libtool failed]) > fi > jk_apr_get_tempval=`basename ${jk_apr_get_tempval} | sed 's/\.la/\.a/g'` > $1="${jk_apr_get_tempval}" > AC_MSG_RESULT([${jk_apr_get_tempval}]) > unset jk_apr_get_tempval > + ]) > + > + > +dnl ----------------------------------------------------------------------- --- > +dnl JK_APR_UTIL_LIBNAME > +dnl Retrieve the complete name of the library. > +dnl $1 => Environment variable name for the returned value > +dnl $2 => APR_UTIL sources directory > +dnl ----------------------------------------------------------------------- --- > +AC_DEFUN( > + [JK_APR_UTIL_LIBNAME], > + [ > + AC_MSG_CHECKING([for apr-util APR_UTIL_LIBNAME]) > + if ${TEST} ! -f "$2/apu-config" ; then > + AC_MSG_ERROR([cannot find apu-config file in $2]) > + fi > + jk_apu_get_tempval=`$2/apu-config --link-libtool 2> /dev/null` > + if ${TEST} -z "${jk_apu_get_tempval}" ; then > + AC_MSG_ERROR([$2/apu-config --link-libtool failed]) > + fi > + jk_apu_get_tempval=`basename ${jk_apu_get_tempval} | sed 's/\.la/\.a/g'` > + $1="${jk_apu_get_tempval}" > + AC_MSG_RESULT([${jk_apu_get_tempval}]) > + unset jk_apu_get_tempval > ]) > > dnl vi:set sts=2 sw=2 autoindent: > > > > 1.2 +2 -2 jakarta-tomcat-connectors/jk/support/jk_exec.m4 > > Index: jk_exec.m4 > =================================================================== > RCS file: /home/cvs/jakarta-tomcat-connectors/jk/support/jk_exec.m4,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -u -r1.1 -r1.2 > --- jk_exec.m4 5 Nov 2003 09:14:28 -0000 1.1 > +++ jk_exec.m4 10 Nov 2003 11:05:33 -0000 1.2 > @@ -97,7 +97,7 @@ > > > { > > $2 > > - echo "jk_exec_retvalue $?" > > + echo "\njk_exec_retvalue $?" > > } | { > > jk_exec_ret=0 > > while true ; do > > > > > 1.29 +1 -10 jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c > > Index: mod_jk2.c > =================================================================== > RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c,v > retrieving revision 1.28 > retrieving revision 1.29 > diff -u -r1.28 -r1.29 > --- mod_jk2.c 25 Sep 2003 15:23:23 -0000 1.28 > +++ mod_jk2.c 10 Nov 2003 11:05:33 -0000 1.29 > @@ -299,9 +299,7 @@ > > > > -#ifdef HAS_APR > apr_pool_t *jk_globalPool; > -#endif > > /* Create the initial set of objects. You need to cut&paste this and > adapt to your server. > @@ -312,17 +310,10 @@ > jk_pool_t *globalPool; > jk_bean_t *jkb; > > -#ifdef HAS_APR > apr_initialize(); > apr_pool_create( &jk_globalPool, NULL ); > > jk2_pool_apr_create( NULL, &globalPool, NULL, jk_globalPool ); > -#else > - /** First create a pool. We use the default ( jk ) pool impl, > - * other choices are apr or native. > - */ > - jk2_pool_create( NULL, &globalPool, NULL, 2048 ); > -#endif > > /** Create the global environment. This will register the default > factories, to be overriten later. > > > > 1.8 +3 -6 jakarta-tomcat-connectors/jk/native2/server/apache13/Makefile.in > > Index: Makefile.in > =================================================================== > RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/Makefile.in,v > retrieving revision 1.7 > retrieving revision 1.8 > diff -u -r1.7 -r1.8 > --- Makefile.in 28 Nov 2002 15:54:51 -0000 1.7 > +++ Makefile.in 10 Nov 2003 11:05:33 -0000 1.8 > @@ -23,7 +23,7 @@ > ${APACHE_INCL} > > JK_CFLAGS=-DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 @APR_CFLAGS@ -DHAVE_MMAP ${JAVA_INCL} > -JK_LDFLAGS=-L${APACHE_HOME}/lib -lcrypt @APR_LDFLAGS@ ${JAVA_LIB} > +JK_LDFLAGS=-L${APACHE_HOME}/lib ${JAVA_LIB} > > ###### Based on rules.mk ########################################## > ALL_CFLAGS = $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS) > @@ -36,7 +36,7 @@ > COMPILE = $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES) > > SH_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) $(JK_CFLAGS) > -MOD_LINK = $(LIBTOOL) --mode=link $(CC) -avoid-version -module -rpath $(APACHE_LIBEXEC) $(LT_LDFLAGS) $(ALL_LDFLAGS) $(JK_LDFLAGS) > +MOD_LINK = $(LIBTOOL) --mode=link $(CC) -avoid-version -module -shared -rpath $(APACHE_LIBEXEC) $(LT_LDFLAGS) $(ALL_LDFLAGS) $(JK_LDFLAGS) > MOD_INSTALL = $(LIBTOOL) --mode=install $(CP) > > ############################################################################ # > @@ -76,10 +76,7 @@ > > all: prepare ${BUILD_DIR}/mod_jk2.so > > -${BUILD_DIR}/mod_jk2.so: ${BUILD_DIR}/mod_jk2.la > - $(MOD_INSTALL) cp $^ `pwd`/${BUILD_DIR} > - > -${BUILD_DIR}/mod_jk2.la: ${COMMON_LO_FILES} ${A_LO_FILES} > +${BUILD_DIR}/mod_jk2.so: ${COMMON_LO_FILES} ${A_LO_FILES} > ${MOD_LINK} -o $@ $^ @APR_LDFLAGS@ > > ${COMMON_C_FILES} ${A_C_FILES}: ${H_FILES} > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]