Re: jk2/apr patch v2
Kurt Miller wrote: Thanks to jean-frederic clere for input on this. Ok, here goes again... ;-) Attached is a patch that makes the following changes for building jk2 via configure and make: 1) Introduces a new configure argument called --enable-apr-threads=val for use with --with-apr. This argument allows for threading to be configured for apr because apr doesn't always guess threading the same way apache is configured. 2) Changes --with-apr to configure apr while configuring jk2. This allows for the correct naming of the apr library name instead of hard coding it and compiler consistency with apache13 (I copied stuff from the webapp connector for this) 3) Added compiler consistency checks for apache13 and apache2. The same compiler must be used for jk2 as was used for apache. For apache13 a side effect is that apr is also configured to use the same compiler (picked up via the environment). 4) Added checks to force the use of --with-apr for apache13 and disallow use of --with-apr for apache2. Please review and consider for committing if there are no issues or objections. +++ +APR_LDFLAGS=${APR_DIR}/.libs/${APR_LDFLAGS} +++ That is still weird... --apr-la-file gives the path to the apr library when installed. (better than --link-libtool). I think we should install the library something like: +++ $(LIBTOOL) --mode=install \ cp $(APR_DIR)/$(APR_LIBNAME) $(LIB_DIR)/$(APR_LIBNAME) $(LIBTOOL) --mode=finish $(LIB_DIR) +++ Anyway the proposed patch is already much better than the actual code. -Kurt - 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]
Re: jk2/apr patch v2
jean-frederic clere a écrit : Kurt Miller wrote: Thanks to jean-frederic clere for input on this. Ok, here goes again... ;-) Attached is a patch that makes the following changes for building jk2 via configure and make: 1) Introduces a new configure argument called --enable-apr-threads=val for use with --with-apr. This argument allows for threading to be configured for apr because apr doesn't always guess threading the same way apache is configured. 2) Changes --with-apr to configure apr while configuring jk2. This allows for the correct naming of the apr library name instead of hard coding it and compiler consistency with apache13 (I copied stuff from the webapp connector for this) 3) Added compiler consistency checks for apache13 and apache2. The same compiler must be used for jk2 as was used for apache. For apache13 a side effect is that apr is also configured to use the same compiler (picked up via the environment). 4) Added checks to force the use of --with-apr for apache13 and disallow use of --with-apr for apache2. Please review and consider for committing if there are no issues or objections. +++ +APR_LDFLAGS=${APR_DIR}/.libs/${APR_LDFLAGS} +++ That is still weird... --apr-la-file gives the path to the apr library when installed. (better than --link-libtool). I think we should install the library something like: +++ $(LIBTOOL) --mode=install \ cp $(APR_DIR)/$(APR_LIBNAME) $(LIB_DIR)/$(APR_LIBNAME) $(LIBTOOL) --mode=finish $(LIB_DIR) +++ Anyway the proposed patch is already much better than the actual code. Ok, I'll commit it asap - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk2/apr patch v2
From: jean-frederic clere [EMAIL PROTECTED] Kurt Miller wrote: Thanks to jean-frederic clere for input on this. Ok, here goes again... ;-) Attached is a patch that makes the following changes for building jk2 via configure and make: 1) Introduces a new configure argument called --enable-apr-threads=val for use with --with-apr. This argument allows for threading to be configured for apr because apr doesn't always guess threading the same way apache is configured. 2) Changes --with-apr to configure apr while configuring jk2. This allows for the correct naming of the apr library name instead of hard coding it and compiler consistency with apache13 (I copied stuff from the webapp connector for this) 3) Added compiler consistency checks for apache13 and apache2. The same compiler must be used for jk2 as was used for apache. For apache13 a side effect is that apr is also configured to use the same compiler (picked up via the environment). 4) Added checks to force the use of --with-apr for apache13 and disallow use of --with-apr for apache2. Please review and consider for committing if there are no issues or objections. +++ +APR_LDFLAGS=${APR_DIR}/.libs/${APR_LDFLAGS} +++ That is still weird... Yea. I was hoping that apr-config would let me know where the .a file was, but it only tells you where the .la file is and there not in the same place. --apr-la-file gives the path to the apr library when installed. (better than --link-libtool). I think we should install the library something like: +++ $(LIBTOOL) --mode=install \ cp $(APR_DIR)/$(APR_LIBNAME) $(LIB_DIR)/$(APR_LIBNAME) $(LIBTOOL) --mode=finish $(LIB_DIR) +++ Humm. I kinda like not having apr installed since we're staticly linking it in. For apache13 we're forcing them to build from source but I'm not sure that an install of apr should be forced too. I guess it conceivable that apr could already be installed and used by other applications (subversion maybe?), but be configured differently then is needed for jk2/apache13. Anyway the proposed patch is already much better than the actual code. Thanks. :) On another thread I noted that jk_md5 is now depending on apr-util. Since I'm familiar with the m4 macros now would it be worthwhile for me to make a patch to add configure support for apr-util following the same pattern as apr? I'd be focusing on the apache13 case only (--with-apr-util) since that is what I can test easily now. -Kurt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk2/apr patch v2
Thanks to jean-frederic clere for input on this. Ok, here goes again... ;-) Attached is a patch that makes the following changes for building jk2 via configure and make: 1) Introduces a new configure argument called --enable-apr-threads=val for use with --with-apr. This argument allows for threading to be configured for apr because apr doesn't always guess threading the same way apache is configured. 2) Changes --with-apr to configure apr while configuring jk2. This allows for the correct naming of the apr library name instead of hard coding it and compiler consistency with apache13 (I copied stuff from the webapp connector for this) 3) Added compiler consistency checks for apache13 and apache2. The same compiler must be used for jk2 as was used for apache. For apache13 a side effect is that apr is also configured to use the same compiler (picked up via the environment). 4) Added checks to force the use of --with-apr for apache13 and disallow use of --with-apr for apache2. Please review and consider for committing if there are no issues or objections. -Kurt Index: native2/Makefile.in === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native2/Makefile.in,v retrieving revision 1.2 diff -u -r1.2 Makefile.in --- native2/Makefile.in 24 May 2002 07:14:08 - 1.2 +++ native2/Makefile.in 3 Nov 2003 19:15:44 - @@ -41,7 +41,7 @@ done; apr-build: - ( cd @APR_DIR@ ./configure make ) + ( cd @APR_DIR@ make ) apr-clean: ( cd @APR_DIR@ make clean ) Index: native2/configure.in === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native2/configure.in,v retrieving revision 1.11 diff -u -r1.11 configure.in --- native2/configure.in3 Nov 2003 09:49:58 - 1.11 +++ native2/configure.in3 Nov 2003 19:15:44 - @@ -64,6 +64,7 @@ dnl sinclude(../support/jk_apache_static.m4) sinclude(../support/jk_apxs.m4) sinclude(../support/jk_ws.m4) +sinclude(../support/jk_exec.m4) sinclude(../support/jk_apr.m4) sinclude(../support/jk_tchome.m4) sinclude(../support/jk_java.m4) @@ -172,6 +173,7 @@ dnl APR settings +JK_APR_THREADS() JK_APR([include/apr.h.in]) JK_APR_INCDIR([apr.h]) JK_APR_LIBDIR() @@ -203,16 +205,37 @@ AC_SUBST(WEBSERVERS) -dnl check if apache 1.3 selected with jni support +dnl apache 1.3 consistancy checks if ! ${TEST} -z $APACHE_HOME ; then -dnl check jni wanted - if ${TEST} ${use_jni} = true; then - if ! ${TEST} ${use_apr} = true; then - AC_MSG_ERROR(Apache 1.3 need apr to use jni) - fi - fi +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]) +fi +dnl make sure compiler matchs apxs +if ${TEST} $APACHE_CC != $CC; then +AC_MSG_RESULT([error]) +AC_MSG_RESULT([compiler discovered by configure: ${CC}]) +AC_MSG_RESULT([compiler used by apache: ${APACHE_CC}]) +AC_MSG_RESULT([delete config.cache and try CC=${APACHE_CC} ./configure]) +AC_MSG_ERROR([jk2 and apache compilers must be the same]) +fi fi +dnl apache 2 consistancy checks +if ! ${TEST} -z $APACHE2_HOME ; then +dnl check if apache 2 was selected with apr sources +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 +if ${TEST} $APACHE2_CC != $CC; then +AC_MSG_RESULT([error]) +AC_MSG_RESULT([compiler discovered by configure: ${CC}]) +AC_MSG_RESULT([compiler used by apache: ${APACHE2_CC}]) +AC_MSG_RESULT([delete config.cache and try CC=${APACHE2_CC} ./configure]) +AC_MSG_ERROR([jk2 and apache compilers must be the same]) +fi +fi AC_SUBST(APACHE20_OEXT) AC_SUBST(LIB_JK_TYPE) AC_SUBST(INSTALL_TYPE) @@ -225,6 +248,7 @@ AC_SUBST(APR_HOME) AC_SUBST(APR_INCDIR) AC_SUBST(APR_LIBDIR) +AC_SUBST(APR_CONFIGURE_ARGS) AC_SUBST(APR_LDFLAGS) AC_SUBST(COMMON_APR_OBJECTS) Index: support/jk_apr.m4 === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v retrieving revision 1.5 diff -u -r1.5 jk_apr.m4 --- support/jk_apr.m4 3 Nov 2003 09:59:45 - 1.5 +++ support/jk_apr.m4 3 Nov 2003 19:15:44 - @@ -64,6 +64,31 @@ dnl -- dnl -- +dnl JK_APR_THREADS +dnl Configure APR threading for use with --with-apr. +dnl Result goes into APR_CONFIGURE_ARGS +dnl