~ubuntu-branches/ubuntu/oneiric/libapache-mod-jk/oneiric

« back to all changes in this revision

Viewing changes to support/jk_dominohome.m4

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2006-08-05 16:30:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060805163053-myf66gm6j1a21ps6
Tags: 1:1.2.18-1ubuntu1
Merge from Debian unstable.

Show diffs side-by-side

added added

removed removed

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