1 | dnl Copyright 1996 by the Massachusetts Institute of Technology. |
---|
2 | dnl |
---|
3 | dnl Permission to use, copy, modify, and distribute this |
---|
4 | dnl software and its documentation for any purpose and without |
---|
5 | dnl fee is hereby granted, provided that the above copyright |
---|
6 | dnl notice appear in all copies and that both that copyright |
---|
7 | dnl notice and this permission notice appear in supporting |
---|
8 | dnl documentation, and that the name of M.I.T. not be used in |
---|
9 | dnl advertising or publicity pertaining to distribution of the |
---|
10 | dnl software without specific, written prior permission. |
---|
11 | dnl M.I.T. makes no representations about the suitability of |
---|
12 | dnl this software for any purpose. It is provided "as is" |
---|
13 | dnl without express or implied warranty. |
---|
14 | |
---|
15 | dnl This file provides local macros for packages which use Zephyr. |
---|
16 | dnl The public macros are: |
---|
17 | dnl ATHENA_ZEPHYR |
---|
18 | dnl Sets ZEPHYR_LIBS and defines HAVE_ZEPHYR if zephyr |
---|
19 | dnl used. |
---|
20 | dnl ATHENA_ZEPHYR_REQUIRED |
---|
21 | dnl Generates error if zephyr not found. |
---|
22 | dnl |
---|
23 | dnl All of the macros may extend CPPFLAGS and LDFLAGS to let the |
---|
24 | dnl compiler find the requested libraries. Put ATHENA_UTIL_COM_ERR |
---|
25 | dnl and ATHENA_UTIL_SS before ATHENA_AFS or ATHENA_AFS_REQUIRED; there |
---|
26 | dnl is a com_err library in the AFS libraries which requires -lutil. |
---|
27 | |
---|
28 | dnl ----- zephyr ----- |
---|
29 | |
---|
30 | AC_DEFUN([ATHENA_ZEPHYR_CHECK], |
---|
31 | [if test "$zephyr" != yes; then |
---|
32 | CPPFLAGS="$CPPFLAGS -I$zephyr/include" |
---|
33 | LDFLAGS="$LDFLAGS -L$zephyr/lib" |
---|
34 | fi |
---|
35 | AC_SEARCH_LIBS(ZFreeNotice, zephyr, :, [AC_MSG_ERROR(zephyr not found)])]) |
---|
36 | |
---|
37 | AC_DEFUN([ATHENA_ZEPHYR], |
---|
38 | [AC_ARG_WITH(zephyr, |
---|
39 | [ --with-zephyr=PREFIX Use zephyr], |
---|
40 | [zephyr="$withval"], [zephyr=no]) |
---|
41 | if test "$zephyr" != no; then |
---|
42 | ATHENA_ZEPHYR_CHECK |
---|
43 | ZEPHYR_LIBS="-lzephyr" |
---|
44 | AC_DEFINE(HAVE_ZEPHYR) |
---|
45 | fi |
---|
46 | AC_SUBST(ZEPHYR_LIBS)]) |
---|
47 | |
---|
48 | AC_DEFUN([ATHENA_ZEPHYR_REQUIRED], |
---|
49 | [AC_ARG_WITH(zephyr, |
---|
50 | [ --with-zephyr=PREFIX Specify location of zephyr], |
---|
51 | [zephyr="$withval"], [zephyr=yes]) |
---|
52 | if test "$zephyr" != no; then |
---|
53 | ATHENA_ZEPHYR_CHECK |
---|
54 | else |
---|
55 | AC_MSG_ERROR(This package requires zephyr.) |
---|
56 | fi]) |
---|