source: trunk/third/inetd/configure.in @ 11844

Revision 11844, 1.2 KB checked in by danw, 26 years ago (diff)
from amu: deal with systems that don't have rlim_t
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(inetd.c)
3
4AC_PROG_CC
5AC_PROG_INSTALL
6
7AC_CHECK_HEADERS(rpc/rpcent.h)
8
9dnl This is based on AC_CHECK_TYPE, but checks <sys/resource.h> in addition
10dnl to the usual places.
11
12AC_HEADER_STDC
13AC_MSG_CHECKING(for rlim_t)
14AC_CACHE_VAL(ac_cv_type_rlim_t,
15[AC_EGREP_CPP(dnl
16changequote(<<,>>)dnl
17<<rlim_t[^a-zA-Z_0-9]>>dnl
18changequote([,]), [#include <sys/types.h>
19#include <sys/resource.h>
20#if STDC_HEADERS
21#include <stdlib.h>
22#include <stddef.h>
23#endif], ac_cv_type_rlim_t=yes, ac_cv_type_rlim_t=no)])dnl
24AC_MSG_RESULT($ac_cv_type_rlim_t)
25if test $ac_cv_type_rlim_t = no; then
26  AC_DEFINE(rlim_t, long)
27fi
28
29AC_CHECK_FUNC(gethostbyname, :, AC_CHECK_LIB(nsl, gethostbyname))
30AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket))
31AC_MSG_CHECKING(for libwrap)
32save_LIBS="$LIBS"
33LIBS="-L$ATHTOOLROOT/usr/athena/lib -lwrap $LIBS"
34AC_TRY_LINK(
35    [int allow_severity, deny_severity;],
36    [hosts_access();],
37    [AC_MSG_RESULT(yes)
38     AC_DEFINE(LIBWRAP)
39     WRAP_LIB="-L$ATHTOOLROOT/usr/athena/lib -lwrap"
40     WRAP_INCLUDES=-I$ATHTOOLROOT/usr/athena/include],
41    AC_MSG_RESULT(no))
42LIBS="$save_LIBS"
43AC_SUBST(WRAP_LIB)
44AC_SUBST(WRAP_INCLUDES)
45
46AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.