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

Revision 24361, 1.9 KB checked in by broder, 14 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 ss.
16dnl The public macros are:
17dnl     ATHENA_UTIL_SS
18dnl             Generates error if ss not found.
19dnl
20dnl All of the macros may extend CPPFLAGS and LDFLAGS to let the
21dnl compiler find the requested libraries.  Put ATHENA_UTIL_COM_ERR
22dnl and ATHENA_UTIL_SS before ATHENA_AFS or ATHENA_AFS_REQUIRED; there
23dnl is a com_err library in the AFS libraries which requires -lutil.
24dnl
25dnl All of the macros may extend CPPFLAGS and LDFLAGS to let the
26dnl compiler find the requested libraries.  Put ATHENA_UTIL_COM_ERR
27dnl and ATHENA_UTIL_SS before ATHENA_AFS or ATHENA_AFS_REQUIRED; there
28dnl is a com_err library in the AFS libraries which requires -lutil.
29
30dnl ----- ss -----
31
32AC_DEFUN([ATHENA_UTIL_SS],
33[AC_ARG_WITH(ss,
34        [  --with-ss=PREFIX        Specify location of ss (requires com_err)],
35        [ss="$withval"], [ss=yes])
36if test "$ss" != no; then
37        if test "$ss" != yes; then
38                CPPFLAGS="$CPPFLAGS -I$ss/include"
39                LDFLAGS="$LDFLAGS -L$ss/lib"
40        fi
41        AC_SEARCH_LIBS(initscr, curses)
42        AC_SEARCH_LIBS(readline, readline)
43        AC_SEARCH_LIBS(ss_perror, ss, ,
44                       [AC_MSG_ERROR(ss library not found)], -lcom_err)
45else
46        AC_MSG_ERROR(This package requires ss.)
47fi])
Note: See TracBrowser for help on using the repository browser.