aboutsummaryrefslogtreecommitdiffstats
path: root/net/nagios-plugins/files/patch-configure.in
blob: 784da9ef03fd94c7fe7ecc1ff8c5d6543e4bf8b8 (plain) (blame)
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
--- configure.in.orig   Fri Jul 11 08:12:23 2003
+++ configure.in    Sun Jul 13 13:13:37 2003
@@ -12,7 +12,7 @@
 AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
 AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
 
-AC_PREFIX_DEFAULT(/usr/local/nagios)
+dnl AC_PREFIX_DEFAULT(/usr/local/nagios)
 
 dnl Figure out how to invoke "install" and what install options to use.
 
@@ -60,7 +60,6 @@
 AC_ARG_WITH(nagios_group,--with-nagios-group=<group> sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios)
 AC_SUBST(nagios_usr)
 AC_SUBST(nagios_grp)
-INSTALL_OPTS="-o $nagios_usr -g $nagios_grp"
 AC_SUBST(INSTALL_OPTS)
 
 AC_ARG_WITH(trusted_path,--with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin sets trusted path for executables called by scripts,trusted_path=$withval,trusted_path=/bin:/sbin:/usr/bin:/usr/sbin)
@@ -143,25 +142,37 @@
 LIBS="$_SAVEDLIBS"
 CPPFLAGS="$_SAVEDCPPFLAGS"
 
+AC_ARG_ENABLE(radius,--enable-radius compile check_radius)
+if test x$enable_radius = xyes; then
+dnl Check for radiusclient header file
+_SAVEDCPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LOCALBASE}/include"
+AC_CHECK_HEADERS(radiusclient.h,RADIUSINCLUDE="-I${LOCALBASE}/include")
+AC_SUBST(RADIUSINCLUDE)
+CPPFLAGS="$_SAVEDCPPFLAGS $RADIUSINCLUDE"
+
 dnl Check for radius libraries
 _SAVEDLIBS="$LIBS"
-AC_CHECK_LIB(radiusclient,rc_read_config)
+AC_CHECK_LIB(radiusclient,rc_read_config,,,-L${LOCALBASE}/lib)
 if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
   EXTRAS="$EXTRAS check_radius"
-   RADIUSLIBS="-lradiusclient"
+  RADIUSLIBS="-L${LOCALBASE}/lib -lradiusclient"
   AC_SUBST(RADIUSLIBS)
 else
   AC_MSG_WARN([Skipping radius plugin])
   AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).])
 fi
 LIBS="$_SAVEDLIBS"
+fi
 
+AC_ARG_ENABLE(ldap,--enable-ldap compile check_ldap)
+if test x$enable_ldap = xyes; then
 dnl Check for LDAP libraries
 _SAVEDLIBS="$LIBS"
-AC_CHECK_LIB(ldap,main,,,-llber)
-if test "$ac_cv_lib_ldap_main" = "yes"; then
-  LDAPLIBS="-lldap -llber"\
-  LDAPINCLUDE="-I/usr/include/ldap"
+AC_CHECK_LIB(ldap,ldap_simple_bind,,,-L${LOCALBASE}/lib -llber)
+if test "$ac_cv_lib_ldap_ldap_simple_bind" = "yes"; then
+  LDAPLIBS="-L${LOCALBASE}/lib -lldap -llber"\
+  LDAPINCLUDE="-I${LOCALBASE}/include"
   AC_SUBST(LDAPLIBS)
   AC_SUBST(LDAPINCLUDE)
   EXTRAS="$EXTRAS check_ldap"
@@ -170,7 +181,7 @@
   AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).])
 fi
 LIBS="$_SAVEDLIBS"
-
+fi
 
 dnl Check for mysql libraries
 _SAVEDLIBS="$LIBS"
@@ -209,7 +220,7 @@
   AC_MSG_WARN([Skipping mysql plugin])
   AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).])
 fi
-CPPFLAGS="$_SAVEDCPPFLAGS"
+CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE"
 LIBS="$_SAVEDLIBS"
 
 dnl Check for OpenSSL location
@@ -841,6 +852,8 @@
    AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO",[path and arguments for invoking 'who'])
 fi
 
+AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp)
+if test x$enable_snmp = xyes; then
 AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
 if test -x "$PATH_TO_SNMPGET"
 then
@@ -863,7 +876,10 @@
    echo "** Tried $PERL - install Net::SNMP perl module if you want to"
    echo "        use the perl snmp plugins"
 fi
+fi
 
+AC_ARG_ENABLE(qstat,--enable-qstat compile check_game)
+if test x$enable_qstat = xyes; then
 AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
 AC_PATH_PROG(PATH_TO_QSTAT,qstat)
 if test -x "$PATH_TO_QUAKESTAT"
@@ -877,7 +893,10 @@
 else
    echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
 fi
+fi
 
+AC_ARG_ENABLE(fping,--enable-fping compile check_fping)
+if test x$enable_fping = xyes; then
 AC_PATH_PROG(PATH_TO_FPING,fping)
 if test -x "$PATH_TO_FPING"
 then
@@ -885,6 +904,7 @@
    EXTRAS="$EXTRAS check_fping"
 else
    echo "** Get fping from http://www.fping.com in order to make check_fping plugin"
+fi
 fi
 
 AC_PATH_PROG(PATH_TO_SSH,ssh)