1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([engine.c])
AC_CONFIG_AUX_DIR(aux)
AM_CONFIG_HEADER(config.h)
AM_DISABLE_STATIC
AM_INIT_AUTOMAKE(rlinetd,0.5.9)
AM_WITH_DMALLOC
AC_PROG_MAKE_SET
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_AWK
AM_PROG_LEX
AC_PROG_YACC
AM_PROG_LIBTOOL
AC_CHECK_LIB(dl, dlsym, libsrlinetd="${libsrlinetd} -ldl")
AC_CHECK_LIB(nsl, yp_get_default_domain, libsrlinetd="${libsrlinetd} -lnsl"; LIBS="$LIBS -lnsl")
AC_ARG_WITH(libwrap,dnl
--with-libwrap perform tcp_wrappers access control checks,
libwrap=$withval)
if test x"$libwrap" != x"no"; then
AC_MSG_CHECKING(for hosts_access in -lwrap)
oldLIBS=$LIBS
LIBS="$LIBS -lwrap"
AC_TRY_LINK(int allow_severity; int deny_severity;, hosts_access(0),
AC_MSG_RESULT(yes), AC_MSG_RESULT(no - no tcp_wrappers support included);
libwrap="no")
LIBS=$oldLIBS
if test x"$libwrap" != x"no"; then
AC_CHECK_HEADERS(tcpd.h, libsrlinetd="${libsrlinetd} -lwrap"
AC_DEFINE(HAVE_TCP_WRAPPERS, 1, Define if you have libraries and include files for tcp_wrappers)
AC_MSG_RESULT(including tcp_wrappers support),
AC_MSG_RESULT(no tcp_wrappers support included))
fi
fi
libcap=yes
AC_ARG_WITH(libcap,dnl
--with-libcap include POSIX capability support,
libcap=$withval)
if test x"$libcap" = x"yes"; then
AC_CHECK_LIB(cap, cap_set_proc, LIBS="${LIBS} -lcap", libcap="no")
if test x"$libcap" = x"yes"; then
AC_CHECK_HEADERS(sys/capability.h, AC_DEFINE(HAVE_CAPABILITIES, 1, Define if you have libraries and headers for POSIX capability support))
fi
fi
lsf=yes
AC_ARG_WITH(lsf,dnl
--with-lsf include Linux Socket Filter support,
lsf=$withval)
if test x"$lsf" = x"yes"; then
AC_MSG_CHECKING(for SO_ATTACH_FILTER in <sys/socket.h>)
AC_EGREP_CPP(fishfish,
[
#include <sys/socket.h>
#ifdef SO_ATTACH_FILTER
fishfish
#endif
], AC_MSG_RESULT(yes), lsf=no;
AC_MSG_RESULT(no))
if test x"$lsf" = x"yes"; then
AC_CHECK_HEADERS(net/bpf.h)
fi
fi
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h errno.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h syslog.h unistd.h getopt.h])
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_MSG_CHECKING(for rlim_t in <sys/resource.h>)
AC_EGREP_HEADER(rlim_t, sys/resource.h, AC_DEFINE(HAVE_RLIM_T, 1, Define if you have the rlim_t typedef in <sys/resource.h>)
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_FUNC_WAIT3
nogai="no"
AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), nogai="yes")
if test x"$nogai" = x"yes"; then
AC_CHECK_LIB(inet6, getaddrinfo, LIBS="${LIBS} -linet6"; AC_DEFINE(HAVE_GETADDRINFO))
fi
AC_CHECK_FUNCS(inet_ntop inet_pton vsyslog gai_strerror mallinfo)
AC_CHECK_FUNCS(getopt_long getopt)
AC_CHECK_FUNCS([dup2 endgrent endpwent memmove memset regcomp select socket strerror strtol strtoul])
AC_REPLACE_FUNCS(strdup snprintf vsnprintf)
havesin6=no
AC_MSG_CHECKING(for struct sockaddr_in6 in <netinet/in.h>)
AC_EGREP_HEADER(sockaddr_in6, netinet/in.h, havesin6=yes; AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
if test x"$havesin6" = x"yes"; then
AC_MSG_CHECKING(if ${CC} is lying through its teeth)
AC_TRY_COMPILE([#include <netinet/in.h>], struct sockaddr_in6 sin,
AC_MSG_RESULT(no)
AC_DEFINE(HAVE_SOCKADDR_IN6, 1, Define if struct sockaddr_in6 is pulled in by <netinet/in.h>)
, AC_MSG_RESULT(yes))
fi
AM_MAINTAINER_MODE
AC_SUBST(libsrlinetd)
AC_SUBST(LIBOBJS)
AC_PATH_PROG(perlpath, perl, /usr/bin/perl)
AC_CONFIG_FILES([Makefile port/Makefile scripts/Makefile man/Makefile scripts/inetd2rlinetd scripts/td2lsf])
AC_OUTPUT
|