bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / support / jk_dominohome.m4
1 dnl
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
8 dnl
9 dnl     http://www.apache.org/licenses/LICENSE-2.0
10 dnl
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.
16 dnl
17
18 dnl --------------------------------------------------------------------------
19 dnl Author Andy Armstrong <andy@tagish.com>
20 dnl Shamelessly cribbed from  Henri Gomez <hgomez@apache.org>
21 dnl
22 dnl He was inspired by Pier works on webapp m4 macros :)
23 dnl 
24 dnl Version $Id: jk_dominohome.m4 466585 2006-10-21 22:16:34Z markt $
25 dnl --------------------------------------------------------------------------
26
27 dnl --------------------------------------------------------------------------
28 dnl JK_DOMHOME
29 dnl   Set the Domino Home directory.
30 dnl   $1 => Domino Name
31 dnl   $2 => Domino VarName
32 dnl   $3 => File which should be present
33 dnl --------------------------------------------------------------------------
34 AC_DEFUN(
35   [JK_DOMHOME],
36   [
37     tempval=""
38
39     AC_MSG_CHECKING([for $1 location])
40     AC_ARG_WITH(
41       [$1],
42       [  --with-$1=DIR      Location of $1 ],
43       [ 
44         case "${withval}" in
45         ""|"yes"|"YES"|"true"|"TRUE")
46           ;;
47         "no"|"NO"|"false"|"FALSE")
48           AC_MSG_ERROR(valid $1 location required)
49           ;;
50         *)
51           tempval="${withval}"
52
53           if ${TEST} ! -d ${tempval} ; then
54             AC_MSG_ERROR(Not a directory: ${tempval})
55           fi
56
57           if ${TEST} ! -f ${tempval}/$3; then
58             AC_MSG_ERROR(can't locate ${tempval}/$3)
59           fi
60           ;;
61         esac
62       ])  
63
64       if ${TEST} -z "$tempval" ; then
65         AC_MSG_RESULT(not provided)
66       else
67         [$2]=${tempval}
68         AC_MSG_RESULT(${[$2]})
69       fi
70
71       unset tempval
72   ])
73
74 dnl vi:set sts=2 sw=2 autoindent: