hgomez 02/05/24 00:05:07 Added: jk/support jk_apache_static.m4 jk_apr.m4 jk_apxs.m4 jk_java.m4 jk_tchome.m4 jk_ws.m4 Log: autoconf / configure now use modularized m4 macros. Thanks to Pier and JF who show me the ligth ;) Revision Changes Path 1.1 jakarta-tomcat-connectors/jk/support/jk_apache_static.m4 Index: jk_apache_static.m4 =================================================================== 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 Henri Gomez <[EMAIL PROTECTED]> dnl dnl Inspired by Pier works on webapp m4 macros :) dnl dnl Version $Id: jk_apache_static.m4,v 1.1 2002/05/24 07:05:07 hgomez Exp $ dnl -------------------------------------------------------------------------- dnl Apache-2.0 needs the os subdirectory to include os.h dnl this include is copy from os/config.m4 sinclude(../../common/build/os_apache.m4) dnl -------------------------------------------------------------------------- dnl JK_APACHE_STATIC dnl Set the APACHE 1.3/2.0 source dir. dnl $1 => apache source dir to detect ("", 2) dnl $2 => apache 1.3 build dir dnl $3 => apache 2.0 build dir dnl dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_APACHE_STATIC], [ tempval="" AC_ARG_WITH( [apache$1], [ --with-apache$1=DIR Location of Apache$2 source dir], [ if ${TEST} ${use_apxs$1} ; then AC_MSG_ERROR([Sorry cannot use --with-apxs= and --with-apache= together, please choose one]) fi AC_MSG_CHECKING([for Apache source directory (assume static build)]) if ${TEST} -n "${withval}" && ${TEST} -d "${withval}" ; then if ${TEST} -d "${withval}/src" ; then # handle the case where people use relative paths to # the apache source directory by pre-pending the current # build directory to the path. there are probably # errors with this if configure is run while in a # different directory than what you are in at the time if ${TEST} -n "`${ECHO} ${withval}|${GREP} \"^\.\.\"`" ; then withval=`pwd`/${withval} fi APACHE$1_DIR=${withval} use_static="true" AC_MSG_RESULT(${APACHE$1_DIR}) AC_MSG_CHECKING(for Apache include directory) if ${TEST} -d "${withval}/src/include" ; then # read osdir from the existing apache. osdir=`${GREP} '^OSDIR=' ${withval}/src/Makefile.config | ${SED} -e 's:^OSDIR=.*/os:os:'` if ${TEST} -z "${osdir}" ; then osdir=os/unix fi APACHE$1_DIR=${withval} APACHE$1_HOME=${withval} APACHE$1_INCL="-I${withval}/src/include -I${withval}/src/${osdir}" EXTRA_CFLAGS="" EXTRA_CPPFLAGS="" REPORTED_SERVER="apache-1.3" SERVER_DIR="$3" use_static="true" use_apache13="true" AC_MSG_RESULT([${APACHE$1_INCL}, version 1.3]) else AC_MSG_ERROR([Sorry Apache 1.2.x is no longer supported.]) fi else if ${TEST} -d "${withval}/include" ; then # osdir for Apache20. APACHE$1_DIR=${withval} APACHE$1_HOME=${withval} APACHE$1_INCL="-I${withval}/include -I${withval}/srclib/apr/include -I${withval}/os/${OS_APACHE_DIR} -I${withval}/srclib/apr-util/include" EXTRA_CFLAGS="" EXTRA_CPPFLAGS="" REPORTED_SERVER="apache-2.0" SERVER_DIR="$3" use_static="true" use_apache2="true" APACHE$1_INCL="-I${withval}/include -I${withval}/srclib/apr/include -I${withval}/os/${OS_APACHE_DIR} -I${withval}/srclib/apr-util/include" AC_MSG_RESULT(${APACHE$1_DIR}) JK_CHANNEL_APR_SOCKET="\${JK}jk_channel_apr_socket\${OEXT}" JK_POOL_APR="\${JK}jk_pool_apr\${OEXT}" HAS_APR="-DHAS_APR" fi fi fi dnl Make sure we have a result. if ${TEST} -z "$WEBSERVER" ; then AC_MSG_ERROR([Directory $apache_dir is not a valid Apache source distribution]) fi # VT: Now, which one I'm supposed to use? Let's figure it out later configure_apache=true configure_src=true AC_MSG_RESULT([building connector for \"$WEBSERVER\"]) ], [ AC_MSG_RESULT(no apache$1 dir given) ]) dnl vi:set sts=2 sw=2 autoindent: 1.1 jakarta-tomcat-connectors/jk/support/jk_apr.m4 Index: jk_apr.m4 =================================================================== 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 Henri Gomez <[EMAIL PROTECTED]> dnl dnl Inspired by Pier works on webapp m4 macros :) dnl dnl Version $Id: jk_apr.m4,v 1.1 2002/05/24 07:05:07 hgomez Exp $ dnl -------------------------------------------------------------------------- dnl -------------------------------------------------------------------------- dnl JK_APR dnl Set the APR source dir. dnl $1 => File which should be present dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_APR], [ tempval="" AC_ARG_WITH( [apr], [ --with-apr=DIR Location of APR source dir ], [ case "${withval}" in ""|"yes"|"YES"|"true"|"TRUE") ;; "no"|"NO"|"false"|"FALSE") AC_MSG_ERROR(valid apr 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 "$tempval" ; then APR_BUILD="apr-build" APR_CFLAGS="-I ${tempval}/include -DHAS_APR" APR_CLEAN="apr-clean" APR_DIR=${tempval} APR_INCDIR="${tempval}/include" APR_LDFLAGS="${tempval}/.libs/libapr.a" APR_LIBDIR="" COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}" AC_MSG_RESULT(${APR_DIR}) fi ;; esac ]) unset tempval ]) dnl -------------------------------------------------------------------------- dnl JK_APR_INCDIR dnl Set the APR include dir. dnl $1 => File which should be present dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_APR_INCDIR], [ tempval="" AC_ARG_WITH( [apr-include], [ --with-apr-include=DIR Location of APR include dir ], [ case "${withval}" in ""|"yes"|"YES"|"true"|"TRUE") ;; "no"|"NO"|"false"|"FALSE") AC_MSG_ERROR(valid apr include 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 "$tempval" ; then APR_BUILD="" APR_CFLAGS="-I${tempval} -DHAS_APR" APR_CLEAN="" APR_DIR="" APR_INCDIR=${tempval} COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}" AC_MSG_RESULT(${APR_INCDIR}) fi ;; esac ]) unset tempval ]) dnl -------------------------------------------------------------------------- dnl JK_APR_LIBDIR dnl Set the APR library dir. dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_APR_LIBDIR], [ tempval="" AC_ARG_WITH( [apr-lib], [ --with-apr-lib=DIR Location of APR lib dir ], [ case "${withval}" in ""|"yes"|"YES"|"true"|"TRUE") ;; "no"|"NO"|"false"|"FALSE") AC_MSG_ERROR(valid apr lib dir location required) ;; *) tempval="${withval}" if ${TEST} ! -d ${tempval} ; then AC_MSG_ERROR(Not a directory: ${tempval}) fi if ${TEST} ! -z "$tempval" ; then APR_BUILD="" APR_CLEAN="" APR_DIR="" APR_LIBDIR=${tempval} APR_LDFLAGS="-lapr -L${tempval}" COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}" AC_MSG_RESULT(${APR_LIBDIR}) fi ;; esac ]) unset tempval ]) dnl vi:set sts=2 sw=2 autoindent: 1.1 jakarta-tomcat-connectors/jk/support/jk_apxs.m4 Index: jk_apxs.m4 =================================================================== dnl ========================================================================= dnl dnl The Apache Software License, Version 1.1 dnl dnl Copyright (c) 1 -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 Henri Gomez <[EMAIL PROTECTED]> dnl dnl Inspired by Pier works on webapp m4 macros :) dnl dnl Version $Id: jk_apxs.m4,v 1.1 2002/05/24 07:05:07 hgomez Exp $ dnl -------------------------------------------------------------------------- dnl -------------------------------------------------------------------------- dnl JK_APXS dnl dnl Get APXS to be used, determine if Apache 1.3 or 2.0 are target dnl $1 => blank/2 if you want to detect Apache 1.3 & 2.0 dnl $2 => comment for --with-apxs dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_APXS], [ tempval="" AC_ARG_WITH(apxs$1, [ --with-apxs$1[=FILE] $2], [ case "${withval}" in y | yes | true) find_apxs=true ;; n | no | false) find_apxs=false ;; *) find_apxs=false ;; 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 if ${TEST} ${find_apxs} ; then APXS$1=${withval} else AC_PATH_PROG(APXS$1,apxs$1,$PATH)dnl fi use_apxs$1=true; if ${TEST} -n "${APXS$1}" ; then dnl Seems that we have it, but have to check if it is OK first if ${TEST} ! -x "${APXS$1}" ; then AC_MSG_ERROR(Invalid location for apxs: '${APXS$1}') fi ${APXS$1} -q PREFIX >/dev/null 2>/dev/null || apxs_support=false if ${TEST} "${apxs_support}" = "false" ; then AC_MSG_RESULT(could not find ${APXS$1}) AC_MSG_ERROR(You must specify a valid --with-apxs$1 path) fi dnl apache_dir and apache_include are also needed. APACHE$1_HOME=`${APXS$1} -q PREFIX` APACHE$1_INCL="-I`${APXS$1} -q INCLUDEDIR`" APACHE$1_INCDIR="`${APXS$1} -q INCLUDEDIR`" APACHE$1_LIBDIR="`${APXS$1} -q LIBEXECDIR`" dnl test apache version APA=`${GREP} STANDARD20 ${APXS$1}` dnl check if we have an apxs for Apache 1.3 or 2.0 if ${TEST} -z "$APA" ; then WEBSERVERS="${WEBSERVERS} server/apache13" RWEBSERVER="apache-1.3" APXS$1_CFLAGS="`${APXS$1} -q CFLAGS`" APXS$1_CPPFLAGS="" else WEBSERVERS="${WEBSERVERS} server/apache2" RWEBSERVER="apache-2.0" APACHE2_CONFIG_VARS=${apache_dir}/build/config_vars.mk JK_CHANNEL_APR_SOCKET="\${JK}jk_channel_apr_socket\${OEXT}" JK_POOL_APR="\${JK}jk_pool_apr\${OEXT}" HAS_APR="-DHAS_APR" APXS$1_CFLAGS="`${APXS$1} -q EXTRA_CFLAGS`" APXS$1_CPPFLAGS="`${APXS$1} -q EXTRA_CPPFLAGS`" fi AC_MSG_RESULT([building connector for \"$RWEBSERVER\"]) fi fi ], [ AC_MSG_RESULT(no apxs$1 given) ]) unset tempval AC_SUBST(APXS$1) AC_SUBST(APXS$1_CFLAGS) AC_SUBST(APACHE$1_CONFIG_VARS) AC_SUBST(APXS$1_CPPFLAGS) AC_SUBST(APACHE$1_DIR) AC_SUBST(APACHE$1_HOME) AC_SUBST(APACHE$1_INCDIR) AC_SUBST(APACHE$1_INCL) AC_SUBST(APACHE$1_LIBDIR) AC_SUBST(APXS$1_LDFLAGS) ]) dnl vi:set sts=2 sw=2 autoindent: 1.1 jakarta-tomcat-connectors/jk/support/jk_java.m4 Index: jk_java.m4 =================================================================== 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 Henri Gomez <[EMAIL PROTECTED]> dnl dnl Inspired by Pier works on webapp m4 macros :) dnl dnl Version $Id: jk_java.m4,v 1.1 2002/05/24 07:05:07 hgomez Exp $ dnl -------------------------------------------------------------------------- dnl -------------------------------------------------------------------------- dnl JK_JDK dnl dnl Detection of JDK location and Java Platform (1.1, 1.2, 1.3, 1.4) dnl result goes in JAVA_HOME / JAVA_PLATFORM (1 -> 1.1, 2 -> 1.2 and higher) dnl dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_JDK], [ tempval="" AC_MSG_CHECKING([for JDK location (please wait)]) if ${TEST} -n "${JAVA_HOME}" ; then JAVA_HOME_ENV="${JAVA_HOME}" else JAVA_HOME_ENV="" fi JAVA_HOME="" JAVA_PLATFORM="" AC_ARG_WITH( [java-home], [ --with-java-home=DIR Location of JDK directory.], [ # This stuff works if the command line parameter --with-java-home was # specified, so it takes priority rightfully. tempval=${withval} if ${TEST} ! -d "${tempval}" ; then AC_MSG_ERROR(Not a directory: ${tempval}) fi JAVA_HOME=${tempval} AC_MSG_RESULT(${JAVA_HOME}) ], [ # This works if the parameter was NOT specified, so it's a good time # to see what the enviroment says. # Since Sun uses JAVA_HOME a lot, we check it first and ignore the # JAVA_HOME, otherwise just use whatever JAVA_HOME was specified. if ${TEST} -n "${JAVA_HOME_ENV}" ; then JAVA_HOME=${JAVA_HOME_ENV} AC_MSG_RESULT(${JAVA_HOME_ENV} from environment) fi ]) if ${TEST} -z "${JAVA_HOME}" ; then # Oh well, nobody set neither JAVA_HOME nor JAVA_HOME, have to guess # The following code is based on the code submitted by Henner Zeller # for ${srcdir}/src/scripts/package/rpm/ApacheJServ.spec # Two variables will be set as a result: # # JAVA_HOME # JAVA_PLATFORM AC_MSG_CHECKING([Try to guess JDK location]) for JAVA_PREFIX in /usr/local /usr/local/lib /usr /usr/lib /opt /usr/java ; do for JAVA_PLATFORM in 4 3 2 1 ; do for subversion in .9 .8 .7 .6 .5 .4 .3 .2 .1 "" ; do for VARIANT in IBMJava2- java java- jdk jdk-; do GUESS="${JAVA_PREFIX}/${VARIANT}1.${JAVA_PLATFORM}${subversion}" dnl AC_MSG_CHECKING([${GUESS}]) if ${TEST} -d "${GUESS}/bin" & ${TEST} -d "${GUESS}/include" ; then JAVA_HOME="${GUESS}" AC_MSG_RESULT([${GUESS}]) break fi done if ${TEST} -n "${JAVA_HOME}" ; then break; fi done if ${TEST} -n "${JAVA_HOME}" ; then break; fi done if ${TEST} -n "${JAVA_HOME}" ; then break; fi done if ${TEST} ! -n "${JAVA_HOME}" ; then AC_MSG_ERROR(can't locate a valid JDK location) fi fi if ${TEST} -n "${JAVA_PLATFORM}"; then AC_MSG_RESULT(Java Platform detected - 1.${JAVA_PLATFORM}) else AC_MSG_CHECKING(Java platform) fi AC_ARG_WITH(java-platform, [ --with-java-platform[=2] Force the Java platorm (value is 1 for 1.1.x or 2 for 1.2.x or greater)], [ case "${withval}" in "1"|"2") JAVA_PLATFORM=${withval} ;; *) AC_MSG_ERROR(invalid java platform provided) ;; esac ], [ if ${TEST} -n "${JAVA_PLATFORM}"; then AC_MSG_RESULT(Java Platform detected - 1.${JAVA_PLATFORM}) else AC_MSG_CHECKING(Java platform) fi ]) AC_MSG_RESULT(${JAVA_PLATFORM}) unset tempval ]) AC_DEFUN( [JK_JNI], [ tempval="" OS="" AC_ARG_WITH(os-type, [ --with-os-type[=SUBDIR] Location of JDK os-type subdirectory.], [ tempval=${withval} if ${TEST} ! -d "${JAVA_HOME}/${tempval}" ; then AC_MSG_ERROR(Not a directory: ${JAVA_HOME}/${tempval}) fi OS = ${tempval} ], [ AC_MSG_CHECKING(os_type directory) if ${TEST} -f ${JAVA_HOME}/include/jni_md.h; then OS="" else for f in ${JAVA_HOME}/include/*/jni_md.h; do if ${TEST} -f $f; then OS=`dirname ${f}` OS=`basename ${OS}` echo " ${OS}" fi done if ${TEST} -z "${OS}"; then AC_MSG_RESULT(Cannot find jni_md.h in ${JAVA_HOME}/${OS}) AC_MSG_ERROR(You should retry --with-os-type=SUBDIR) fi fi ]) ]) dnl vi:set sts=2 sw=2 autoindent: 1.1 jakarta-tomcat-connectors/jk/support/jk_tchome.m4 Index: jk_tchome.m4 =================================================================== 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 Henri Gomez <[EMAIL PROTECTED]> dnl dnl Inspired by Pier works on webapp m4 macros :) dnl dnl Version $Id: jk_tchome.m4,v 1.1 2002/05/24 07:05:07 hgomez Exp $ dnl -------------------------------------------------------------------------- dnl -------------------------------------------------------------------------- dnl JK_TCHOME dnl Set the Tomcat Home directory. dnl $1 => Tomcat Name dnl $2 => Tomcat VarName dnl $3 => File which should be present dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_TCHOME], [ tempval="" AC_MSG_CHECKING([for $1 location]) AC_ARG_WITH( [$1], [ --with-$1=DIR Location of $1 ], [ case "${withval}" in ""|"yes"|"YES"|"true"|"TRUE") ;; "no"|"NO"|"false"|"FALSE") AC_MSG_ERROR(valid $1 location required) ;; *) tempval="${withval}" if ${TEST} ! -d ${tempval} ; then AC_MSG_ERROR(Not a directory: ${tempval}) fi if ${TEST} ! -f ${tempval}/$3; then AC_MSG_ERROR(can't locate ${tempval}/$3) fi ;; esac ]) if ${TEST} -z "$tempval" ; then AC_MSG_RESULT(not provided) else [$2]=${tempval} AC_MSG_RESULT(${[$2]}) fi unset tempval ]) dnl vi:set sts=2 sw=2 autoindent: 1.1 jakarta-tomcat-connectors/jk/support/jk_ws.m4 Index: jk_ws.m4 =================================================================== 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 Henri Gomez <[EMAIL PROTECTED]> dnl dnl Inspired by Pier works on webapp m4 macros :) dnl dnl Version $Id: jk_ws.m4,v 1.1 2002/05/24 07:05:07 hgomez Exp $ dnl -------------------------------------------------------------------------- dnl -------------------------------------------------------------------------- dnl JK_WS_DIR dnl Set the WebServer source dir. dnl $1 => Webserver name dnl $2 => Webserver vars prefix name dnl $3 => File which should be present dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_WS_DIR], [ tempval="" AC_ARG_WITH( [$1], [ --with-$1=DIR Location of $1 source dir ], [ case "${withval}" in ""|"yes"|"YES"|"true"|"TRUE") ;; "no"|"NO"|"false"|"FALSE") AC_MSG_ERROR(valid apr source dir location required) ;; *) tempval="${withval}" if ${TEST} ! -d ${tempval} ; then AC_MSG_ERROR(Not a directory: ${tempval}) fi if ${TEST} ! -f ${tempval}/$3; then AC_MSG_ERROR(can't locate ${tempval}/$3) fi if ${TEST} ! -z "$tempval" ; then $2_BUILD="true" $2_CFLAGS="-I ${tempval}/include" $2_DIR=${tempval} $2_HOME="${tempval}" $2_INCDIR="${tempval}/include" $2_LDFLAGS="" $2_LIBDIR="" AC_MSG_RESULT($1_DIR) fi ;; esac ]) unset tempval ]) dnl -------------------------------------------------------------------------- dnl JK_WS_INCDIR dnl Set the WebServer include dir. dnl $1 => Webserver name dnl $2 => Webserver vars prefix name dnl $3 => File which should be present dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_WS_INCDIR], [ tempval="" AC_ARG_WITH( [$1-include], [ --with-$1-include=DIR Location of $1 include dir ], [ case "${withval}" in ""|"yes"|"YES"|"true"|"TRUE") ;; "no"|"NO"|"false"|"FALSE") AC_MSG_ERROR(valid apr include dir location required) ;; *) tempval="${withval}" if ${TEST} ! -d ${tempval} ; then AC_MSG_ERROR(Not a directory: ${tempval}) fi if ${TEST} ! -f ${tempval}/$3; then AC_MSG_ERROR(can't locate ${tempval}/$3) fi if ${TEST} ! -z "$tempval" ; then $1_BUILD="" $1_CFLAGS="-I${tempval}" $1_CLEAN="" $1_DIR="" $1_INCDIR=${tempval} AC_MSG_RESULT($1_INCL) fi ;; esac ]) unset tempval ]) dnl -------------------------------------------------------------------------- dnl JK_WS_LIBDIR dnl Set the WebServer library dir. dnl $1 => Webserver name dnl $2 => Webserver vars prefix name dnl -------------------------------------------------------------------------- AC_DEFUN( [JK_WS_LIBDIR], [ tempval="" AC_ARG_WITH( [$1-lib], [ --with-$1-lib=DIR Location of $1 lib dir ], [ case "${withval}" in ""|"yes"|"YES"|"true"|"TRUE") ;; "no"|"NO"|"false"|"FALSE") AC_MSG_ERROR(valid apr lib dir location required) ;; *) tempval="${withval}" if ${TEST} ! -d ${tempval} ; then AC_MSG_ERROR(Not a directory: ${tempval}) fi if ${TEST} ! -z "$tempval" ; then $2_BUILD="" $2_CLEAN="" $2_DIR="" $2_LIBDIR=${tempval} $2_LDFLAGS="" AC_MSG_RESULT($1_LIB) fi ;; esac ]) unset tempval ]) dnl vi:set sts=2 sw=2 autoindent:
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>