summaryrefslogtreecommitdiff
blob: f18bc31ac4e132627d40504a019a19220666f44d (plain)
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
--- nrpe-2.14.orig/configure.in
+++ nrpe-2.14/configure.in
@@ -1,12 +1,8 @@
 dnl Process this -*-m4-*- file with autoconf to produce a configure script.
 
-dnl Disable caching
-define([AC_CACHE_LOAD],)
-define([AC_CACHE_SAVE],)
-
-2.14([nrpe],[2.13],[nagios-users@lists.sourceforge.net],[nrpe],[http://www.nagios.org])
+AC_INIT([nrpe],[2.14],[nagios-users@lists.sourceforge.net],[nrpe],[http://www.nagios.org])
 AC_CONFIG_SRCDIR([src/nrpe.c])
-AC_CONFIG_HEADERS([include/config.h])
+
 AC_CONFIG_FILES([Makefile
 	subst
 	src/Makefile
@@ -16,7 +12,8 @@
 	init-script.suse
 	nrpe.spec
 	sample-config/nrpe.cfg
-	sample-config/nrpe.xinetd])
+	sample-config/nrpe.xinetd
+	include/config.h])
 AC_PREFIX_DEFAULT(/usr/local/nagios)
 
 PKG_NAME=nrpe
@@ -45,7 +42,7 @@
 AC_HEADER_STDC
 AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h tcpd.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h)
+AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h unistd.h arpa/inet.h netinet/in.h socket.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
@@ -164,11 +161,20 @@
 AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
 AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
 AC_SUBST(SOCKETLIBS)
-AC_CHECK_LIB(wrap,main,[
-	LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
+
+AC_ARG_ENABLE([tcp-wrapper],
+    AS_HELP_STRING([--disable-tcp-wrapper], [Disable building with TCP wrappers. *** DISABLING IS A SECURITY RISK! *** Read the SECURITY file before using this option! @<:@default=enable@:>@]))
+
+LIBWRAPLIBS=""
+AS_IF([test "x$enable_tcp_wrapper" != "xno"], [
+    AC_CHECK_LIB([wrap],[hosts_access],[
+        LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
 	AC_DEFINE(HAVE_LIBWRAP,[1],[Have the TCP wrappers library])
-	])
+	AC_DEFINE(HAVE_TCPD_H,[1],[Have the TCP wrappers library])
+    ])
+])
 AC_SUBST(LIBWRAPLIBS)
+
 AC_CHECK_FUNCS(strdup strstr strtoul initgroups closesocket)
 
 dnl socklen_t check - from curl
@@ -438,8 +444,11 @@
 AC_SUBST(TARGET_PLATFORM)
 
 AC_ARG_ENABLE([command-args],
-	AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments.  *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!]),
-	AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments]))
+	AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments.  *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!]))
+
+AS_IF([test "x$enable_command_args" = "xyes"], [
+	AC_DEFINE(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments])
+])
 
 AC_ARG_ENABLE([bash-command-substitution],
 	AS_HELP_STRING([--enable-bash-command-substitution],[allows clients to pass bash command substitutions of the form $(command).  *** THIS IS A HIGH SECURITY RISK! *** Read the SECURITY file before using this option!]),