| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- dnl Process this file with autoconf to produce a configure script.
- dnl Disable caching
- define([AC_CACHE_LOAD],)
- define([AC_CACHE_SAVE],)
- AC_INIT(src/nrpe.c)
- AC_CONFIG_HEADER(common/config.h)
- AC_PREFIX_DEFAULT(/usr/local/nagios)
- PKG_NAME=nrpe
- PKG_VERSION="1.7"
- PKG_HOME_URL="http://www.nagios.org/"
- PKG_REL_DATE="01-08-2003"
- dnl Figure out how to invoke "install" and what install options to use.
- AC_PROG_INSTALL
- AC_SUBST(INSTALL)
- dnl Checks for programs.
- AC_PROG_CC
- AC_PROG_MAKE_SET
- dnl Checks for header files.
- AC_HEADER_STDC
- AC_HEADER_TIME
- AC_HEADER_SYS_WAIT
- AC_CHECK_HEADERS(ctype.h errno.h fcntl.h grp.h netdb.h pwd.h signal.h strings.h string.h syslog.h unistd.h arpa/inet.h netinet/in.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h)
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_STRUCT_TM
- AC_TYPE_MODE_T
- AC_TYPE_PID_T
- AC_TYPE_SIZE_T
- AC_TYPE_SIGNAL
- AC_TYPE_GETGROUPS
- dnl Checks for library functions.
- AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
- AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
- AC_SUBST(SOCKETLIBS)
- AC_CHECK_FUNCS(strdup strstr strtoul initgroups)
- AC_MSG_CHECKING(for type of socket size)
- AC_TRY_COMPILE([#include <stdlib.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- ],
- [int a = send(1, (const void *)0, (size_t *) 0, (int *) 0);],
- [AC_DEFINE(SOCKET_SIZE_TYPE, size_t) AC_MSG_RESULT(size_t)],
- [AC_DEFINE(SOCKET_SIZE_TYPE, int) AC_MSG_RESULT(int)])
- AC_ARG_WITH(nrpe_user,--with-nrpe-user=<user> sets user name to run NRPE,nrpe_user=$withval,nrpe_user=nagios)
- AC_ARG_WITH(nrpe_grp,--with-nrpe-grp=<grp> sets group name to run NRPE,nrpe_grp=$withval,nrpe_grp=nagios)
- AC_ARG_WITH(nrpe_port,--with-nrpe-port=<port> sets port number for NRPE to listen on,nrpe_port=$withval,nrpe_port=5666)
- AC_SUBST(nrpe_user)
- AC_SUBST(nrpe_grp)
- AC_SUBST(nrpe_port)
- AC_DEFINE_UNQUOTED(DEFAULT_SERVER_PORT,$nrpe_port)
- AC_PATH_PROG(PERL,perl)
- AC_OUTPUT(Makefile src/Makefile subst)
- perl subst nrpe.cfg
- perl subst init-script
- perl subst init-script.debian
- perl subst init-script.freebsd
- perl subst nrpe.xinetd
- dnl Review options
- echo ""
- echo ""
- AC_MSG_RESULT([*** Configuration summary for $PKG_NAME $PKG_VERSION $PKG_REL_DATE ***:])
- echo ""
- echo " General Options:"
- echo " -------------------------"
- AC_MSG_RESULT([ NRPE port: $nrpe_port])
- AC_MSG_RESULT([ NRPE user: $nrpe_user])
- AC_MSG_RESULT([ NRPE group: $nrpe_grp])
- echo ""
- echo ""
- echo "Review the options above for accuracy. If they look okay,"
- echo "type 'make all' to compile the NRPE daemon and client."
- echo ""
|