2
dnl Copyright 1999-2004 The Apache Software Foundation
4
dnl Licensed under the Apache License, Version 2.0 (the "License");
5
dnl you may not use this file except in compliance with the License.
6
dnl You may obtain a copy of the License at
8
dnl http://www.apache.org/licenses/LICENSE-2.0
10
dnl Unless required by applicable law or agreed to in writing, software
11
dnl distributed under the License is distributed on an "AS IS" BASIS,
12
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
dnl See the License for the specific language governing permissions and
14
dnl limitations under the License.
17
dnl --------------------------------------------------------------------------
18
dnl Author Henri Gomez <hgomez@apache.org>
20
dnl Inspired by Pier works on webapp m4 macros :)
22
dnl Version $Id: jk_ws.m4,v 1.9 2004/02/24 13:17:07 truk Exp $
23
dnl --------------------------------------------------------------------------
25
dnl --------------------------------------------------------------------------
27
dnl Set the WebServer source dir.
28
dnl $1 => Webserver name
29
dnl $2 => Webserver vars prefix name
30
dnl $3 => File which should be present
31
dnl $4 => Server specific source directory
32
dnl --------------------------------------------------------------------------
39
[ --with-$1=DIR Location of $1 source dir ],
42
""|"yes"|"YES"|"true"|"TRUE")
43
AC_MSG_ERROR(valid $1 source dir location required)
45
"no"|"NO"|"false"|"FALSE")
46
AC_MSG_ERROR(Don't use with/without $1 if you don't have $1)
51
if ${TEST} ! -d ${tempval} ; then
52
AC_MSG_ERROR(Not a directory: ${tempval})
55
if ${TEST} ! -f ${tempval}/$3; then
56
AC_MSG_ERROR(can't locate ${tempval}/$3)
59
if ${TEST} ! -z "$tempval" ; then
61
$2_CFLAGS="-I ${tempval}/include"
65
if ${TEST} -d ${withval}/include ; then
66
$2_INCL="-I${tempval}/include"
67
$2_INCDIR="${tempval}/include"
69
if ${TEST} -d ${withval}/src/include ; then
70
# read osdir from the existing apache.
71
osdir=`${GREP} '^OSDIR=' ${withval}/src/Makefile.config | ${SED} -e 's:^OSDIR=.*/os:os:'`
72
if ${TEST} -z "${osdir}" ; then
75
$2_INCL="-I${tempval}/src/include -I${withval}/src/${osdir}"
76
$2_INCDIR="${tempval}/src/include"
78
if ${TEST} -d ${tempval}/srclib/apr ; then
79
# Apache 2 contains apr.
80
if ${TEST} ! -f ${tempval}/srclib/apr/config.status ; then
81
AC_MSG_ERROR(configure Apache2 before mod_jk2)
83
osdir=`${GREP} @OSDIR@ ${tempval}/srclib/apr/config.status | sed 's:s,@OSDIR@,::' | sed 's:,;t t::'`
84
$2_INCL="-I${tempval}/include -I${withval}/os/${osdir}"
85
$2_LIBEXEC=`${GREP} "^exp_libexecdir =" ${tempval}/build/config_vars.mk | sed 's:exp_libexecdir = ::'`
86
LIBTOOL=${tempval}/srclib/apr/libtool
87
APR_INCDIR=-I${tempval}/srclib/apr/include
88
APR_CFLAGS=`${tempval}/srclib/apr/apr-config --cflags`
89
APR_UTIL_INCDIR=-I${tempval}/srclib/apr-util/include
90
APR_LIBDIR_LA=`${tempval}/srclib/apr/apr-config --apr-la-file`
91
$2_LIBDIR=${tempval}/lib
96
AC_SUBST(APR_UTIL_INCDIR)
99
WEBSERVERS="${WEBSERVERS} $4"
115
if ${TEST} -z "$tempval" ; then
116
AC_MSG_RESULT(not provided)
118
AC_MSG_RESULT(${tempval})
125
dnl --------------------------------------------------------------------------
127
dnl Set the WebServer include dir.
128
dnl $1 => Webserver name
129
dnl $2 => Webserver vars prefix name
130
dnl $3 => File which should be present
131
dnl --------------------------------------------------------------------------
138
[ --with-$1-include=DIR Location of $1 include dir ],
141
""|"yes"|"YES"|"true"|"TRUE")
143
"no"|"NO"|"false"|"FALSE")
144
AC_MSG_ERROR(valid $1 include dir location required)
148
if ${TEST} ! -d ${tempval} ; then
149
AC_MSG_ERROR(Not a directory: ${tempval})
152
if ${TEST} ! -f ${tempval}/$3; then
153
AC_MSG_ERROR(can't locate ${tempval}/$3)
156
if ${TEST} ! -z "$tempval" ; then
158
$2_CFLAGS="-I${tempval}"
162
AC_MSG_RESULT($2_INCDIR)
178
dnl --------------------------------------------------------------------------
180
dnl Set the WebServer library dir.
181
dnl $1 => Webserver name
182
dnl $2 => Webserver vars prefix name
183
dnl --------------------------------------------------------------------------
190
[ --with-$1-lib=DIR Location of $1 lib dir ],
193
""|"yes"|"YES"|"true"|"TRUE")
195
"no"|"NO"|"false"|"FALSE")
196
AC_MSG_ERROR(valid $1 lib directory location required)
201
if ${TEST} ! -d ${tempval} ; then
202
AC_MSG_ERROR(Not a directory: ${tempval})
205
if ${TEST} ! -z "$tempval" ; then
211
AC_MSG_RESULT($2_LIBDIR)
227
dnl vi:set sts=2 sw=2 autoindent: