2 dnl Licensed to the Apache Software Foundation (ASF) under one or more
3 dnl contributor license agreements. See the NOTICE file distributed with
4 dnl this work for additional information regarding copyright ownership.
5 dnl The ASF licenses this file to You under the Apache License, Version 2.0
6 dnl (the "License"); you may not use this file except in compliance with
7 dnl the License. You may obtain a copy of the License at
9 dnl http://www.apache.org/licenses/LICENSE-2.0
11 dnl Unless required by applicable law or agreed to in writing, software
12 dnl distributed under the License is distributed on an "AS IS" BASIS,
13 dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 dnl See the License for the specific language governing permissions and
15 dnl limitations under the License.
18 dnl --------------------------------------------------------------------------
19 dnl Author Henri Gomez <hgomez@apache.org>
21 dnl Inspired by Pier works on webapp m4 macros :)
23 dnl Version $Id: jk_apache_static.m4 466585 2006-10-21 22:16:34Z markt $
24 dnl --------------------------------------------------------------------------
26 dnl Apache-2.0 needs the os subdirectory to include os.h
27 dnl this include is copy from os/config.m4
28 sinclude(os_apache.m4)
30 dnl --------------------------------------------------------------------------
32 dnl Set the APACHE 1.3/2.0 source dir.
33 dnl $1 => apache source dir to detect ("", 2)
34 dnl $2 => apache 1.3 build dir
35 dnl $3 => apache 2.0 build dir
37 dnl --------------------------------------------------------------------------
45 [ --with-apache$1=DIR Location of Apache$2 source dir],
47 if ${TEST} ${use_apxs$1} ; then
48 AC_MSG_ERROR([Sorry cannot use --with-apxs= and --with-apache= together, please choose one])
51 AC_MSG_CHECKING([for Apache source directory (assume static build)])
53 if ${TEST} -n "${withval}" && ${TEST} -d "${withval}" ; then
55 if ${TEST} -d "${withval}/src" ; then
56 # handle the case where people use relative paths to
57 # the apache source directory by pre-pending the current
58 # build directory to the path. there are probably
59 # errors with this if configure is run while in a
60 # different directory than what you are in at the time
61 if ${TEST} -n "`${ECHO} ${withval}|${GREP} \"^\.\.\"`" ; then
62 withval=`pwd`/${withval}
65 APACHE$1_DIR=${withval}
67 AC_MSG_RESULT(${APACHE$1_DIR})
69 AC_MSG_CHECKING(for Apache include directory)
71 if ${TEST} -d "${withval}/src/include" ; then
72 # read osdir from the existing apache.
73 osdir=`${GREP} '^OSDIR=' ${withval}/src/Makefile.config | ${SED} -e 's:^OSDIR=.*/os:os:'`
75 if ${TEST} -z "${osdir}" ; then
79 APACHE$1_DIR=${withval}
80 APACHE$1_HOME=${withval}
81 APACHE$1_INCL="-I${withval}/src/include -I${withval}/src/${osdir}"
84 REPORTED_SERVER="apache-1.3"
88 AC_MSG_RESULT([${APACHE$1_INCL}, version 1.3])
90 AC_MSG_ERROR([Sorry Apache 1.2.x is no longer supported.])
95 if ${TEST} -d "${withval}/include" ; then
97 APACHE$1_DIR=${withval}
98 APACHE$1_HOME=${withval}
99 APACHE$1_INCL="-I${withval}/include -I${withval}/srclib/apr/include -I${withval}/os/${OS_APACHE_DIR} -I${withval}/srclib/apr-util/include"
102 REPORTED_SERVER="apache-2.0"
106 APACHE$1_INCL="-I${withval}/include -I${withval}/srclib/apr/include -I${withval}/os/${OS_APACHE_DIR} -I${withval}/srclib/apr-util/include"
107 AC_MSG_RESULT(${APACHE$1_DIR})
110 JK_CHANNEL_APR_SOCKET="\${JK}jk_channel_apr_socket\${OEXT}"
111 JK_POOL_APR="\${JK}jk_pool_apr\${OEXT}"
117 dnl Make sure we have a result.
118 if ${TEST} -z "$WEBSERVER" ; then
119 AC_MSG_ERROR([Directory $apache_dir is not a valid Apache source distribution])
122 # VT: Now, which one I'm supposed to use? Let's figure it out later
124 configure_apache=true
127 AC_MSG_RESULT([building connector for \"$WEBSERVER\"])
130 AC_MSG_RESULT(no apache$1 dir given)
133 dnl vi:set sts=2 sw=2 autoindent: