source: trunk/debathena/debathena/aclocal/aclocal/athena_zephyr.m4 @ 24361

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