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_tchome.m4 466585 2006-10-21 22:16:34Z markt $
24 dnl --------------------------------------------------------------------------
26 dnl --------------------------------------------------------------------------
28 dnl Set the Tomcat Home directory.
30 dnl $2 => Tomcat VarName
31 dnl $3 => File which should be present
32 dnl --------------------------------------------------------------------------
38 AC_MSG_CHECKING([for $1 location])
41 [ --with-$1=DIR Location of $1 ],
44 ""|"yes"|"YES"|"true"|"TRUE")
46 "no"|"NO"|"false"|"FALSE")
47 AC_MSG_ERROR(valid $1 location required)
52 if ${TEST} ! -d ${tempval} ; then
53 AC_MSG_ERROR(Not a directory: ${tempval})
56 if ${TEST} ! -f ${tempval}/$3; then
57 AC_MSG_ERROR(can't locate ${tempval}/$3)
63 if ${TEST} -z "$tempval" ; then
64 AC_MSG_RESULT(not provided)
67 AC_MSG_RESULT(${[$2]})
73 dnl vi:set sts=2 sw=2 autoindent: