Code

Souped up check_procs with different metrics
[nagiosplug.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION ($Revision$)
3 AC_INIT(Helper.pm)
4 VER=1.3.99
5 REL=1
6 AC_SUBST(VER)
7 AC_SUBST(REL)
8 PACKAGE_VERSION="${VER}"
9 AC_SUBST(PACKAGE_VERSION)
10 PACKAGE_RELEASE="${REL}"
11 AC_SUBST(PACKAGE_RELEASE)
12 AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
13 AM_CONFIG_HEADER(plugins/config.h)
14 AC_CANONICAL_HOST
16 AC_PREFIX_DEFAULT(/usr/local/nagios)
18 dnl Figure out how to invoke "install" and what install options to use.
20 AC_PROG_INSTALL
21 AC_SUBST(INSTALL)
23 AC_PROG_CC
24 AC_PROG_CPP
25 AC_PROG_GCC_TRADITIONAL
26 AC_PROG_RANLIB
27 AC_AIX
28 AC_MINIX
30 AC_PROG_MAKE_SET
31 AC_PROG_AWK
33 saved_srcdir=$srcdir
34 srcdir=$srcdir/lib
35 test -f $srcdir/getloadavg.c \
36   || AC_MSG_ERROR([getloadavg.c is not in $srcdir])
37 AC_FUNC_GETLOADAVG
38 srcdir=$saved_srcdir
40 ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AM_FUNC_STRTOD])
41 dnl AM_WITH_REGEX
42 AC_PROG_RANLIB
44 PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'`
45 AC_SUBST(PLUGIN_TEST)dnl
47 SCRIPT_TEST=`echo $srcdir/plugins-scripts/t/*.t|sed -e 's,\.*/plugins-scripts/,,g'`
48 AC_SUBST(SCRIPT_TEST)dnl
50 WARRANTY="The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugins under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n"
51 AC_SUBST(WARRANTY)
53 SUPPORT="Send email to nagios-users@lists.sourceforge.net if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net\nPlease include version information with all correspondence. (when possible, use output from the --version option of the plugin itself)."
54 AC_SUBST(SUPPORT)
56 dnl CGIURL has changed for Nagios with 1.0 beta
57 AC_ARG_WITH(cgiurl,
58         ACX_HELP_STRING([--with-cgiurl=DIR],
59                 [sets URL for cgi programs]),
60         with_cgiurl=$withval,
61         with_cgiurl=/nagios/cgi-bin)
62 CGIURL="$with_cgiurl"
63 AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs])
65 AC_ARG_WITH(nagios_user,
66         ACX_HELP_STRING([--with-nagios-user=USER],
67                 [set user name to run nagios]),
68         with_nagios_user=$withval,
69         with_nagios_user=nagios)
70 AC_ARG_WITH(nagios_group,
71         ACX_HELP_STRING([--with-nagios-group=GROUP],
72                 [set group name to run nagios]),
73         with_nagios_group=$withval,
74         with_nagios_group=nagios)
75 AC_SUBST(with_nagios_user)
76 AC_SUBST(with_nagios_group)
77 INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
78 AC_SUBST(INSTALL_OPTS)
80 AC_ARG_WITH(trusted_path,
81         ACX_HELP_STRING([--with-trusted-path=PATH],
82                 [sets trusted path for executables called by scripts (default=/bin:/sbin:/usr/bin:/usr/sbin)]),
83         with_trusted_path=$withval,
84         with_trusted_path=/bin:/sbin:/usr/bin:/usr/sbin)
85 AC_SUBST(with_trusted_path)
87 EXTRAS=
88 dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
90 LDFLAGS="$LDFLAGS -L."
92 ac_cv_uname_m=`uname -m`
93 ac_cv_uname_s=`uname -s`
94 ac_cv_uname_r=`uname -r`
95 ac_cv_uname_v=`uname -v`
97 PKG_ARCH=`uname -p`
98 REV_DATESTAMP=`date '+%Y.%m.%d.%H.%M'`
99 REV_TIMESTAMP=`date '+%Y%m%d%H%M%S'`
101 AC_SUBST(PKG_ARCH)
102 AC_SUBST(REV_DATESTAMP)
103 AC_SUBST(REV_TIMESTAMP)
105 dnl Checks for programs.
106 AC_PATH_PROG(PYTHON,python)
107 AC_PATH_PROG(PERL,perl)
108 AC_PATH_PROG(SH,sh)
110 AC_PATH_PROG(HOSTNAME,hostname)
111 AC_PATH_PROG(BASENAME,basename)
113 dnl
114 dnl Check for miscellaneous stuff
115 dnl 
117 case $host_vender-$host_os in
118 sun*)
119         AC_DEFINE(__EXTENSIONS__,1,[Sun's netdb.h needs this for getaddrinfo])
120         ;;
121 osf*)
122         AC_DEFINE(_OSF_SOURCE,1,[OSF needs this for getaddrinfo])
123         ;;
124 esac
126 dnl
127 dnl Checks for libraries.
128 dnl
130 AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce")
131 AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
132 AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
133 AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv")
134 AC_SUBST(SOCKETLIBS)
136 dnl Check for PostgreSQL libraries
137 _SAVEDLIBS="$LIBS"
138 _SAVEDCPPFLAGS="$CPPFLAGS"
139 AC_ARG_WITH(pgsql,
140         ACX_HELP_STRING([--with-pgsql=DIR],
141                 [sets path to pgsql installation]),
142         PGSQL=$withval,)
143 AC_CHECK_LIB(crypt,main)
144 if test "$ac_cv_lib_crypt_main" = "yes"; then
145   if test -n "$PGSQL"; then
146     LDFLAGS="$LDFLAGS -L$PGSQL/lib"
147     CPPFLAGS="$CPPFLAGS -I$PGSQL/include"
148   fi
149   AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt)
150   if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then
151     AC_CHECK_HEADERS(pgsql/libpq-fe.h)
152     AC_CHECK_HEADERS(postgresql/libpq-fe.h)
153     AC_CHECK_HEADERS(libpq-fe.h)
154     if [[ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]]; then
155       PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
156       PGINCLUDE="-I$PGSQL/include"
157     elif test  "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
158       PGLIBS="-lpq -lcrypt"
159       PGINCLUDE="-I/usr/include/pgsql"
160     elif test  "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
161       PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
162       PGINCLUDE="-I/usr/include/postgresql"
163     elif test  "$ac_cv_header_libpq_fe_h" = "yes"; then
164       PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
165       PGINCLUDE="-I$PGSQL/include"
166     fi
167     if test -z "$PGINCLUDE"; then
168       AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
169       AC_MSG_WARN([install PostgreSQL headers to compile this plugin (see REQUIREMENTS).])
170     else
171       AC_SUBST(PGLIBS)
172       AC_SUBST(PGINCLUDE)
173       EXTRAS="$EXTRAS check_pgsql"
174     fi
175   else
176     AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
177     AC_MSG_WARN([LIBS="$LIBS" CPPFLAGS="$CPPFLAGS"])
178     AC_MSG_WARN([install PostgreSQL libs to compile this plugin (see REQUIREMENTS).])
179   fi
180 else
181   AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
182   AC_MSG_WARN([install lib crypt and PostgreSQL libs to compile this plugin (see REQUIREMENTS).])
183 fi
184 LIBS="$_SAVEDLIBS"
185 CPPFLAGS="$_SAVEDCPPFLAGS"
187 dnl Check for radius libraries
188 _SAVEDLIBS="$LIBS"
189 AC_CHECK_LIB(radiusclient,rc_read_config)
190 if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
191   EXTRAS="$EXTRAS check_radius"
192         RADIUSLIBS="-lradiusclient"
193   AC_SUBST(RADIUSLIBS)
194 else
195   AC_MSG_WARN([Skipping radius plugin])
196   AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).])
197 fi
198 LIBS="$_SAVEDLIBS"
200 dnl Check for LDAP libraries
201 _SAVEDLIBS="$LIBS"
202 AC_CHECK_LIB(ldap,main,,,-llber)
203 if test "$ac_cv_lib_ldap_main" = "yes"; then
204   LDAPLIBS="-lldap -llber"\
205   LDAPINCLUDE="-I/usr/include/ldap"
206   AC_SUBST(LDAPLIBS)
207   AC_SUBST(LDAPINCLUDE)
208   EXTRAS="$EXTRAS check_ldap"
209 else
210   AC_MSG_WARN([Skipping LDAP plugin])
211   AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).])
212 fi
213 LIBS="$_SAVEDLIBS"
216 dnl Check for mysql libraries
217 _SAVEDLIBS="$LIBS"
218 _SAVEDCPPFLAGS="$CPPFLAGS"
219 AC_ARG_WITH(mysql,
220         ACX_HELP_STRING([--with-mysql=DIR],
221                 [sets path to mysql installation (assumes lib/mysql and include subdirs]),
222         MYSQL=$withval,)
223 if test -n "$MYSQL"; then
224   MYSQLLIBDIR=$MYSQL/lib/mysql
225   CPPFLAGS="-I$MYSQL/include"
226   AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR ",,-L$MYSQLLIBDIR -lz)
227   AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
228 elif test -f /usr/lib/libmysqlclient.so; then
229   AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
230   AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
231 elif test -f /usr/lib/libmysqlclient.a; then
232   AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
233   AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
234 elif test -f /usr/lib/mysql/libmysqlclient.so; then
235   AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz)
236   AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
237 elif test -f /usr/lib/mysql/libmysqlclient.a; then
238   AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz)
239   AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
240 fi
241 if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
242   AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h, MYSQLINCLUDE="-I$MYSQL/include" )
243   if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
244     EXTRAS="$EXTRAS check_mysql"
245     AC_SUBST(MYSQLINCLUDE)
246     AC_SUBST(MYSQLLIBS)
247     AC_SUBST(check_mysql_LDFLAGS)
248   else
249     AC_MSG_WARN([Skipping mysql plugin])
250     AC_MSG_WARN([install mysql client headers to compile this plugin (see REQUIREMENTS).])
251   fi
252 else
253   AC_MSG_WARN([Skipping mysql plugin])
254   AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).])
255 fi
256 CPPFLAGS="$_SAVEDCPPFLAGS"
257 LIBS="$_SAVEDLIBS"
259 dnl Check for OpenSSL location
260 AC_PATH_PROG(OPENSSL,openssl)
261 if test "$OPENSSL" = "/usr/bin/openssl"; then
262   OPENSSL=/usr
263 elif test "$OPENSSL" = "/usr/sbin/openssl"; then
264   OPENSSL=/usr
265 elif test "$OPENSSL" = "/opt/bin/openssl"; then
266   OPENSSL=/opt
267 elif test "$OPENSSL" = "/opt/openssl/bin/openssl"; then
268   OPENSSL=/opt/openssl
269 elif test "$OPENSSL" = "/usr/slocal/bin/openssl"; then
270   OPENSSL=/usr/slocal
271 elif test "$OPENSSL" = "/usr/local/bin/openssl"; then
272   OPENSSL=/usr/local
273 elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then
274   OPENSSL=/usr/local/ssl
275 fi
276 AC_ARG_WITH(openssl,
277         ACX_HELP_STRING([--with-openssl=DIR],
278                 [sets path to openssl installation]),
279         OPENSSL=$withval,)
281 AC_CHECK_HEADERS(unistd.h)
283 dnl Check for AF_INET6 support - unistd.h required for Darwin
284 AC_CACHE_CHECK([for IPv6 support], with_ipv6, [
285         AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H
286                         #include <unistd.h>
287                         #endif
288                         #include <netinet/in.h>
289                         #include <sys/socket.h>],
290                         [struct sockaddr_in6 sin6;
291                         void *p;
293                         sin6.sin6_family = AF_INET6;
294                         sin6.sin6_port = 587;
295                         p = &sin6.sin6_addr;],
296                         [with_ipv6=yes], 
297                         [with_ipv6=no])
298         ])
300 if test x"$with_ipv6" != xno ; then
301         AC_DEFINE(USE_IPV6,1,[Enable IPv6 support])
302 fi
304 dnl #########################################################################
305 dnl Check if Posix getaddrinfo() is available.  It is also possible to use
306 dnl the version from the lwres library distributed with BIND.
307 dnl #########################################################################
308 AC_ARG_ENABLE([emulate-getaddrinfo],
309               ACX_HELP_STRING([--enable-emulate-getaddrinfo],
310                              [enable getaddrinfo emulation (default=no)]),
311               ,
312               enable_emulate_getaddrinfo=no)
314 AC_ARG_WITH(lwres,
315             ACX_HELP_STRING([--with-lwres=DIR],
316                            [use lwres library for getaddrinfo (default=no)]),
317             ,
318             with_lwres=no)
320 dnl ## enable force to test getaddrinfo.c
321 if test x$enable_emulate_getaddrinfo = xforce ; then
322         enable_emulate_getaddrinfo=yes
323         have_getaddrinfo=no
324 else
326 have_getaddrinfo=no
327 if test x$with_lwres != xno ; then
328         if test "$with_lwres" != yes ; then
329                    CPPFLAGS="-I${with_lwres}/include $CPPFLAGS"
330                    LDFLAGS="-L${with_lwres}/lib $LDFLAGS"
331         fi
332         AC_CHECK_HEADERS(lwres/netdb.h, ,
333                         [AC_MSG_ERROR([cannot find <lwres/netdb.h>])])
334         AC_CHECK_LIB(lwres, lwres_getaddrinfo, ,
335                      [AC_MSG_ERROR([cannot find the lwres library])],
336                      -lnsl -lpthread)
337         have_getaddrinfo=yes
338 fi
340 if test x$have_getaddrinfo != xyes ; then
341         AC_SEARCH_LIBS(getaddrinfo, socket resolv bind nsl c_r cr, have_getaddrinfo=yes)
342 fi
344 dnl # Special nonsense for systems that actually have getaddrinfo but
345 dnl # redefine the name to something else, e.g. OSF
346 if test x$have_getaddrinfo != xyes ; then
347         AC_MSG_CHECKING(if getaddrinfo is redefined in netdb.h)
348         AC_TRY_LINK([
349 #               include <netdb.h>
350         ], [
351                 struct addrinfo hints, *res;
352                 int err;
354                 err = getaddrinfo ("host", "service", &hints, &res);
355         ], [
356                 have_getaddrinfo=yes
357                 AC_MSG_RESULT(yes)
358         ], [AC_MSG_RESULT(no)])
359 fi
361 fi
363 if test x$have_getaddrinfo != xno ; then
364         if test x$enable_emulate_getaddrinfo != xno ; then
365                 AC_MSG_ERROR([getaddrinfo found but emulate-getaddrinfo was enabled])
366         fi
367         AC_DEFINE(HAVE_GETADDRINFO, 1,
368                   [Does system provide RFC 2553/Posix getaddrinfo?])
369 else
370         if test x$enable_emulate_getaddrinfo != xyes ; then
371 dnl                AC_MSG_ERROR([getaddrinfo not found: try --with-lwres or --enable-emulate-getaddrinfo])
372                enable_emulate_getaddrinfo=yes
373                AC_MSG_WARN([enabling getaddrinfo emulation])
374         fi
375         EXTRA_NETOBJS="$EXTRA_NETOBJS getaddrinfo.o"
376 fi
378 if test x"$enable_emulate_getaddrinfo" != xno ; then
379     have_resolver=no
381   dnl  Try for getipnodebyname
382     AC_SEARCH_LIBS(getipnodebyname, resolv bind nsl c_r cr, have_resolver=yes)
383     if test x"$have_resolver" != xno ; then
384          AC_DEFINE(HAVE_GETIPNODEBYNAME, 1,
385                    [Set when getipnodebyname is available])
386     fi
388   dnl  Try for gethostbyname_r
389     if test x"$have_resolver" = xno ; then
390         AC_SEARCH_LIBS(gethostbyname_r, resolv bind nsl c_r cr,
391                        [have_resolver=yes
392                         ACX_WHICH_GETHOSTBYNAME_R])
393     fi
395   dnl  Try for gethostbyname
396     if test x"$have_resolver" = xno ; then
397         if test x"$enable_pthreads" != xno ; then
398             AC_MSG_WARN([using threads but cannot find gethostbyname_r or getipnodebyname])
399         fi
400         AC_SEARCH_LIBS(gethostbyname, resolv bind nsl, ,
401                        [AC_MSG_ERROR([cannot find gethostbyname])])
402     fi
403     EXTRA_NETOBJS="$EXTRA_NETOBJS gethostbyname.o"
405 fi
407 AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no)
408 if test "$FOUNDINCLUDE" = "no"; then
409   _SAVEDCPPFLAGS="$CPPFLAGS"
410   CPPFLAGS="$_SAVEDCPPFLAGS -I/usr/kerberos/include"
411   unset ac_cv_header_krb5_h
412   AC_CHECK_HEADERS(krb5.h,
413                    KRB5INCLUDE="-I/usr/kerberos/include"
414                    FOUNDINCLUDE=yes,
415                    FOUNDINCLUDE=no)
416 fi
417 AC_SUBST(KRBINCLUDE)
418 if test "$FOUNDINCLUDE" = "no"; then
419   CPPFLAGS="$_SAVEDCPPFLAGS"
420 fi
422 dnl Check for OpenSSL header files
423 unset FOUNDINCLUDE
424 _SAVEDCPPFLAGS="$CPPFLAGS"
425 CPPFLAGS="$CPPFLAGS -I$OPENSSL/include"
426 AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.h,
427                  SSLINCLUDE="-I$OPENSSL/include"
428                  FOUNDINCLUDE=yes,
429                  FOUNDINCLUDE=no)
430 if test "$FOUNDINCLUDE" = "no"; then
431   AC_CHECK_HEADERS(ssl.h x509.h rsa.h pem.h crypto.h err.h,
432                    SSLINCLUDE="-I$OPENSSL/include"
433                    FOUNDINCLUDE=yes,
434                    FOUNDINCLUDE=no)
435 fi
436 AC_SUBST(SSLINCLUDE)
437 if test "$FOUNDINCLUDE" = "no"; then
438   CPPFLAGS="$_SAVEDCPPFLAGS"
439 fi
441 dnl Check for crypto lib
442 _SAVEDLIBS="$LIBS"
443 AC_CHECK_LIB(crypto,CRYPTO_lock,,,-L$OPENSSL/lib)
444 if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then
445   dnl Check for SSL lib
446   AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto",AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto"),-L$OPENSSL/lib -lcrypto)
447 fi
448 LIBS="$_SAVEDLIBS"
450 dnl test headers and libs to decide whether check_http should use SSL
451 if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then
452   if test "$ac_cv_lib_ssl_main" = "yes"; then
453     if test "$FOUNDINCLUDE" = "yes"; then
454       AC_SUBST(SSLLIBS)
455       AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found])
456     fi
457   fi
458 fi
459 CPPFLAGS="$_SAVEDCPPFLAGS"
461 dnl
462 dnl Checks for header files.
463 dnl
465 AC_HEADER_STDC
466 AC_HEADER_TIME
467 AC_HEADER_SYS_WAIT
468 AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h)
469 AC_CHECK_HEADERS(stdarg.h sys/unistd.h ctype.h stdlib.h)
470 AC_CHECK_HEADERS(limits.h sys/param.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h fcntl.h sys/statfs.h sys/dustat.h sys/statvfs.h)
472 # Define HAVE_INTTYPES_H if <inttypes.h> exists,
473 # doesn't clash with <sys/types.h>, and declares uintmax_t.
475 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
476 [AC_TRY_COMPILE(
477   [#include <sys/types.h>
478 #include <inttypes.h>],
479   [uintmax_t i = (uintmax_t) -1;],
480   jm_ac_cv_header_inttypes_h=yes,
481   jm_ac_cv_header_inttypes_h=no)])
483 if test $jm_ac_cv_header_inttypes_h = yes; then
484   AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
485 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
486    and declares uintmax_t. ])
487 fi
489 # Check for SunOS statfs brokenness wrt partitions 2GB and larger.
490 # If <sys/vfs.h> exists and struct statfs has a member named f_spare,
491 # enable the work-around code in fsusage.c.
492 AC_MSG_CHECKING([for statfs that truncates block counts])
493 AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
494 [AC_TRY_COMPILE([
495 #if !defined(sun) && !defined(__sun)
496 choke -- this is a workaround for a Sun-specific problem
497 #endif
498 #include <sys/types.h>
499 #include <sys/vfs.h>],
500 [struct statfs t; long c = *(t.f_spare);],
501 fu_cv_sys_truncating_statfs=yes
502 AC_MSG_RESULT(yes),
503 fu_cv_sys_truncating_statfs=no
504 AC_MSG_RESULT(no),
505 )])
506 if test $fu_cv_sys_truncating_statfs = yes; then
507   AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1,
508 [  Define if the block counts reported by statfs may be truncated to 2GB
509    and the correct values may be stored in the f_spare array.
510    (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem.
511    SunOS 4.1.1 seems not to be affected.)])
512 fi
514 dnl Checks for typedefs, structures, and compiler characteristics.
515 AC_C_CONST
516 AC_STRUCT_TM
517 AC_TYPE_PID_T
518 AC_TYPE_SIZE_T
519 AC_TYPE_SIGNAL
521 AC_CHECK_SIZEOF(int,cross)
522 AC_CHECK_SIZEOF(long,cross)
523 AC_CHECK_SIZEOF(short,cross)
525 AC_CACHE_CHECK([for long long],ac_cv_have_longlong,[
526 AC_TRY_RUN([#include <stdio.h>
527 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }],
528 ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)])
529 if test x"$ac_cv_have_longlong" = x"yes"; then
530     AC_DEFINE(HAVE_LONGLONG,1,[Define if system has long long type])
531 fi
534 # Check if the compiler supports the LL prefix on long long integers.
535 # AIX needs this.
537 AC_CACHE_CHECK([for LL suffix on long long integers],ac_cv_compiler_supports_ll, [
538     AC_TRY_COMPILE([#include <stdio.h>],[long long i = 0x8000000000LL],
539         ac_cv_compiler_supports_ll=yes,ac_cv_compiler_supports_ll=no)])
540 if test x"$ac_cv_compiler_supports_ll" = x"yes"; then
541    AC_DEFINE(COMPILER_SUPPORTS_LL,1,[Define if compiler support long long])
542 fi
544 AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE_VA_COPY,[
545 AC_TRY_LINK([#include <stdarg.h>
546 va_list ap1,ap2;], [__va_copy(ap1,ap2);],
547 ac_cv_HAVE_VA_COPY=yes,ac_cv_HAVE_VA_COPY=no)])
548 if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then
549     AC_DEFINE(HAVE_VA_COPY,1,[Define if system has va_copy])
550 fi
552 AC_CHECK_FUNCS(vsnprintf snprintf asprintf vasprintf)
553 AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[
554 AC_TRY_RUN([
555 #include <sys/types.h>
556 #include <stdarg.h>
557 void foo(const char *format, ...) { 
558        va_list ap;
559        int len;
560        char buf[5];
562        va_start(ap, format);
563        len = vsnprintf(buf, 0, format, ap);
564        va_end(ap);
565        if (len != 5) exit(1);
567        va_start(ap, format);
568        len = vsnprintf(0, 0, format, ap);
569        va_end(ap);
570        if (len != 5) exit(1);
572        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
574        exit(0);
576 main() { foo("hello"); }
577 ],
578 ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)])
579 if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
580     AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf])
581 fi
583 AC_TRY_COMPILE([#include <sys/time.h>],
584                [struct timeval *tv;
585                 struct timezone *tz;],
586                AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
587                AC_TRY_COMPILE([#include <sys/time.h>],
588                               [struct timeval *tv;
589                                struct timezone *tz;
590                                gettimeofday(tv, tz);],
591                               AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
592                               AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed])))
594 dnl Checks for library functions.
595 AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul)
597 AC_MSG_CHECKING(return type of socket size)
598 AC_TRY_COMPILE([#include <stdlib.h>
599                 #include <sys/types.h>
600                 #include <sys/socket.h>],
601                [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);],
602                ac_cv_socket_size_type=["size_t"]
603                 AC_MSG_RESULT(size_t),
604                ac_cv_socket_size_type=["int"]
605                 AC_MSG_RESULT(int))
607 AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type ,
608         [Define type of socket size])
610 if test -f "/proc/loadavg"
611 then
612   AC_DEFINE(HAVE_PROC_LOADAVG,1,[Define if /proc/loadavg or similar exists])
613   AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg",[Location of /proc/loadavg])
614 fi
616 dnl #### Process table test
618 AC_PATH_PROG(PATH_TO_PS,ps)
620 AC_MSG_CHECKING(for ps syntax)
621 dnl  STAT UCOMM              VSZ   RSS USER       UID  PPID COMMAND
622 if ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
623         egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
624 then
625         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
626         ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid ppid vsz rss pcpu comm args'"
627         ac_cv_ps_format="%s %d %d %s %n"
628         EXTRAS="$EXTRAS check_nagios"
629         AC_MSG_RESULT([$ac_cv_ps_command])
631 dnl FreeBSD
632 elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | \
633         egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null
634 then
635         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
636         ac_cv_ps_command="$PATH_TO_PS waxco 'state uid ppid vsz rss pcpu command command'"
637         ac_cv_ps_format="%s %d %d %s %n"
638         EXTRAS="$EXTRAS check_nagios"
639         AC_MSG_RESULT([$ac_cv_ps_command])
641 dnl BSD-like mode in RH 6.1
642 elif ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | \
643         egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
644 then
645         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
646         ac_cv_ps_command="$PATH_TO_PS waxno 'state uid ppid vsz rss pcpu comm args'"
647         ac_cv_ps_format="%s %d %d %s %n"
648         EXTRAS="$EXTRAS check_nagios"
649         AC_MSG_RESULT([$ac_cv_ps_command])
651 dnl SunOS 4.1.3:
652 dnl  F  UID  PID  PPID  CP  PRI  NI  SZ  RSS  WCHAN  STAT  TT  TIME  COMMAND
653 elif ps -laxnwww 2>/dev/null | \
654         egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null
655 then
656         ac_cv_ps_varlist="[&procuid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
657         ac_cv_ps_command="$PATH_TO_PS -laxnwww"
658         ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %d %d %*s %s %*s %*s %n%s"
659         EXTRAS="$EXTRAS check_nagios"
660         AC_MSG_RESULT([$ac_cv_ps_command])
662 dnl Debian Linux / procps v1.2.9:
663 dnl  FLAGS   UID   PID  PPID PRI  NI   SIZE   RSS WCHAN       STA TTY TIME COMMAND
664 dnl    100     0     1     0   0   0    776    76  c0131c8c   S  ffff  0:11 init [2]
665 dnl
666 elif ps laxnwww 2>/dev/null | \
667         egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null
668 then
669         ac_cv_ps_varlist="[&procuid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]"
670         ac_cv_ps_command="$PATH_TO_PS laxnwww"
671         ac_cv_ps_format="%*s %d %*s %d %*s %*s %d %d %*s %s %*s %*s %n%s"
672         EXTRAS="$EXTRAS check_nagios"
673         AC_MSG_RESULT([$ac_cv_ps_command])
675 dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
676 elif ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
677         egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
678 then
679         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
680         ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid ppid vsz rss pcpu comm args'"
681         ac_cv_ps_format="%s %d %d %s %n"
682         EXTRAS="$EXTRAS check_nagios"
683         AC_MSG_RESULT([$ac_cv_ps_command])
685 dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT
686 elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
687         egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
688 then
689         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
690         ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid ppid vsz rss pcpu comm args'"
691         ac_cv_ps_format="[["%s%*[ +] %d %d %s %n"]]"
692         EXTRAS="$EXTRAS check_nagios"
693         AC_MSG_RESULT([$ac_cv_ps_command])
695 elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \
696         egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
697 then
698         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
699         ac_cv_ps_command="$PATH_TO_PS -eo 's uid ppid vsz rss pcpu comm args'"
700         ac_cv_ps_format="%s %d %d %s %n"
701         EXTRAS="$EXTRAS check_nagios"
702         AC_MSG_RESULT([$ac_cv_ps_command])
704 elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \
705         egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
706 then
707         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
708         ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid vsz rss pcpu comm args'"
709         ac_cv_ps_format="%s %d %d %s %n"
710         EXTRAS="$EXTRAS check_nagios"
711         AC_MSG_RESULT([$ac_cv_ps_command])
713 elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \
714         egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
715 then
716         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
717         ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid ppid vsz rss pcpu comm args'"
718         ac_cv_ps_format="%s %d %d %s %n"
719         EXTRAS="$EXTRAS check_nagios"
720         AC_MSG_RESULT([$ac_cv_ps_command])
722 elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \
723         egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
724 then
725         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
726         ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid ppid vsz rss pcpu comm args'"
727         ac_cv_ps_format="%s %d %d %s %n"
728         EXTRAS="$EXTRAS check_nagios"
729         AC_MSG_RESULT([$ac_cv_ps_command])
731 dnl wonder who takes state instead of stat
732 elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | \
733         egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
734 then
735         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
736         ac_cv_ps_command="$PATH_TO_PS -ao 'state uid ppid vsz rss pcpu command args'"
737         ac_cv_ps_format="%s %d %d %s %n"
738         EXTRAS="$EXTRAS check_nagios"
739         AC_MSG_RESULT([$ac_cv_ps_command])
741 dnl IRIX 53
742 elif ps -el 2>/dev/null | \
743         egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
744 then
745         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&pos,procprog]"
746         ac_cv_ps_command="$PATH_TO_PS -el"
747         ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %d %d %*s %*s %*s %n%s"
748         AC_MSG_RESULT([$ac_cv_ps_command])
750 dnl IRIX 63
751 elif ps -el 2>/dev/null | \
752         egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
753 then
754         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
755         ac_cv_ps_command="$PATH_TO_PS -el"
756         ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
757         AC_MSG_RESULT([$ac_cv_ps_command])
759 dnl AIX 4.1:
760 dnl     F S      UID   PID  PPID   C PRI NI ADDR  SZ  RSS   WCHAN    TTY  TIME CMD
761 dnl    303 A        0     0     0 120  16 -- 1c07  20   24              -  0:45 swapper
762 elif ps -el 2>/dev/null | \
763         egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
764 then
765         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
766         ac_cv_ps_command="$PATH_TO_PS -el"
767         ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
768         AC_MSG_RESULT([$ac_cv_ps_command])
770 dnl AIX?
771 elif ps glaxen 2>/dev/null | \
772         egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
773 then
774         ac_cv_ps_varlist="[&procuid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
775         ac_cv_ps_command="$PATH_TO_PS glaxen"
776         ac_cv_ps_format="%*s %d %*s %d %*s %*s %d %d %*s %s %*s %*s %n%s"
777         AC_MSG_RESULT([$ac_cv_ps_command])
779 dnl MacOSX / Darwin
780 dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT
781 dnl Some truncation will happen in UCOMM column
782 dnl STAT      VSZ    RSS   UID  PPID %CPU UCOMM            COMMAND
783 dnl Ss      52756  22496   501     1   6.9 Window Manager   /System/Library/CoreServices/WindowServer -daemon
784 elif ps wwaxo 'state vsz rss uid ppid pcpu ucomm command' 2>/dev/null | \
785         egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null
786 then
787         ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid ppid pcpu ucomm command'"
788         ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procppid,&procpcpu,procprog,&pos]"
789         ac_cv_ps_format="%s %d %d %d %d %f %s %n"
790         EXTRAS="$EXTRAS check_nagios"
791         AC_MSG_RESULT([$ac_cv_ps_command])
793 dnl UnixWare 
794 elif ps -Al 2>/dev/null | \
795         egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null
796 then
797         ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
798         ac_cv_ps_command="$PATH_TO_PS -Al"
799         ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
800         #if ps -Ao 'vsz comm' 2>/dev/null | \
801         #       egrep -i ["^ *VSZ +COMMAND"] >/dev/null
802         #then
803         #       ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'"
804         #       ac_cv_vsz_format="%*s %d"
805         #fi
806         AC_MSG_RESULT([$ac_cv_ps_command])
808 else
809         AC_MSG_WARN([unable to find usable ps syntax])
810 fi
812 AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist,
813         [Variable list for sscanf of 'ps' output])
814 AC_DEFINE_UNQUOTED(PS_COMMAND,"$ac_cv_ps_command",
815         [Verbatim command to execute for ps in check_procs])
816 AC_DEFINE_UNQUOTED(PS_FORMAT,"$ac_cv_ps_format",
817         [Format string for scanning ps output in check_procs])
819 AC_PATH_PROG(PATH_TO_DF,df)
820 AC_PATH_PROG(PATH_TO_BDF,bdf)
822 AC_ARG_WITH(df_command,
823         ACX_HELP_STRING([--with-df-command=SYNTAX],
824                 [sets syntax for df]),
825         with_df_command=$withval,)
827 AC_MSG_CHECKING(for df syntax)
828 if test -n "$with_df_command"
829 then
830         AC_MSG_RESULT([$with_df_command])
832 elif df -Pk 2>/dev/null | egrep -i ["^(/dev/|[a-zA-Z]:)[a-z0-9/\\]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/\\]*"] >/dev/null
833 then
834         with_df_command="$PATH_TO_DF -Pk"
835         AC_MSG_RESULT([$with_df_command])
837 elif df -k 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null
838 then
839         with_df_command="$PATH_TO_DF -k"
840         AC_MSG_RESULT([$with_df_command])
842 elif df 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null
843 then
844         with_df_command="$PATH_TO_DF"
845         AC_MSG_RESULT([$with_df_command])
847 elif bdf 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null
848 then
849         with_df_command="$PATH_TO_BDF"
850         AC_MSG_RESULT([$with_df_command])
852 else
853         AC_MSG_WARN([unable to find usable df syntax])
854 fi
856 AC_DEFINE_UNQUOTED(DF_COMMAND,"$with_df_command",[path and args for df command])
858 dnl jm_AFS
859 jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no])
860 jm_FSTYPENAME
861 jm_FILE_SYSTEM_USAGE([space=yes], [space=no])
863 AC_PATH_PROG(PATH_TO_PING,ping)
864 AC_PATH_PROG(PATH_TO_PING6,ping6)
866 AC_ARG_WITH(ping_command,
867         ACX_HELP_STRING([--with-ping-command=SYNTAX],
868                 [sets syntax for ICMP ping]),
869         with_ping_command=$withval,)
871 AC_MSG_CHECKING(for ICMP ping syntax)
872 ac_cv_ping_packets_first=no
873 if test -n "$with_ping_command"
874 then
875         AC_MSG_RESULT([(command-line) $with_ping_command])
876         if test -n "$ac_cv_ping_packets_first"
877         then
878                 ac_cv_ping_packets_first=yes
879         fi
881 elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
882         $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
883         egrep -i "^round-trip|^rtt" >/dev/null
884 then
885         with_ping_command="$PATH_TO_PING -n -U -c %d %s"
886         ac_cv_ping_packets_first=yes
887         AC_MSG_RESULT([$with_ping_command])
889 elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \
890         egrep -i "^round-trip|^rtt" >/dev/null
891 then
892         with_ping_command="$PATH_TO_PING -n -U -c %d %s"
893         ac_cv_ping_packets_first=yes
894         AC_MSG_RESULT([$with_ping_command])
896 elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
897         egrep -i "^round-trip|^rtt" >/dev/null
898 then
899         with_ping_command="$PATH_TO_PING -n -c %d %s"
900         ac_cv_ping_packets_first=yes
901         AC_MSG_RESULT([$with_ping_command])
903 elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \
904         egrep -i "^round-trip|^rtt" >/dev/null
905 then
906         with_ping_command="$PATH_TO_PING -n %s -c %d"
907         AC_MSG_RESULT([$with_ping_command])
909 elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \
910         egrep -i "^round-trip|^rtt" >/dev/null
911 then
912         with_ping_command="$PATH_TO_PING %s -n %d"
913         AC_MSG_RESULT([$with_ping_command])
915 elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
916         egrep -i "^round-trip|^rtt" >/dev/null
917 then
918         with_ping_command="$PATH_TO_PING -n -s %s 56 %d"
919         AC_MSG_RESULT([$with_ping_command])
921 elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \
922         egrep -i "^round-trip|^rtt" >/dev/null
923 then
924         with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d"
925         AC_MSG_RESULT([$with_ping_command])
927 elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \
928         egrep -i "^round-trip|^rtt" >/dev/null
929 then
930         with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s"
931         ac_cv_ping_packets_first=yes
932         AC_MSG_RESULT([$with_ping_command])
934 elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
935         egrep -i "^round-trip|^rtt" >/dev/null
936 then
937         with_ping_command="$PATH_TO_PING -n -c %d %s"
938         ac_cv_ping_packets_first=yes
939         AC_MSG_RESULT([$with_ping_command])
941 else
942         AC_MSG_WARN([unable to find usable ping syntax])
943 fi
945 AC_DEFINE_UNQUOTED(PING_COMMAND,"$with_ping_command",
946         [path and args for ICMP ping command])
948 if test "x$ac_cv_ping_packets_first" != "xno"
949 then
950         AC_DEFINE(PING_PACKETS_FIRST,1,
951                 [Define if packet count must precede host])
952 fi
954 AC_ARG_WITH(ping6_command,
955         ACX_HELP_STRING([--with-ping6-command=SYNTAX],
956                 [sets syntax for ICMPv6 ping]),
957         with_ping6_command=$withval,)
959 if test x"$with_ipv6" != xno ; then
960 AC_MSG_CHECKING(for ICMPv6 ping syntax)
961 ac_cv_ping6_packets_first=no
962 if test -n "$with_ping6_command"
963 then
964         AC_MSG_RESULT([(command-line) $with_ping6_command])
965         if test -n "$ac_cv_ping6_packets_first"
966         then
967                 ac_cv_ping6_packets_first=yes
968         fi
970 elif test "x$PATH_TO_PING6" != "x"; then
971         if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
972                 $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
973                 egrep -i "^round-trip|^rtt" >/dev/null
974         then
975                 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
976                 ac_cv_ping6_packets_first=yes
977                 AC_MSG_RESULT([$with_ping6_command])
979         elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \
980                 egrep -i "^round-trip|^rtt" >/dev/null
981         then
982                 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
983                 ac_cv_ping6_packets_first=yes
984                 AC_MSG_RESULT([$with_ping6_command])
986         elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
987                 egrep -i "^round-trip|^rtt" >/dev/null
988         then
989                 with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
990                 ac_cv_ping6_packets_first=yes
991                 AC_MSG_RESULT([$with_ping6_command])
993         elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \
994                 egrep -i "^round-trip|^rtt" >/dev/null
995         then
996                 with_ping6_command="$PATH_TO_PING6 -n %s -c %d"
997                 AC_MSG_RESULT([$with_ping6_command])
999         elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \
1000                 egrep -i "^round-trip|^rtt" >/dev/null
1001         then
1002                 with_ping6_command="$PATH_TO_PING6 %s -n %d"
1003                 AC_MSG_RESULT([$with_ping6_command])
1005         elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
1006                 egrep -i "^round-trip|^rtt" >/dev/null
1007         then
1008                 with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d"
1009                 AC_MSG_RESULT([$with_ping6_command])
1011         elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
1012                 egrep -i "^round-trip|^rtt" >/dev/null
1013         then
1014                 with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d"
1015                 AC_MSG_RESULT([$with_ping6_command])
1017         elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \
1018                 egrep -i "^round-trip|^rtt" >/dev/null
1019         then
1020                 with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s"
1021                 ac_cv_ping6_packets_first=yes
1022                 AC_MSG_RESULT([$with_ping_command])
1024         elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
1025                 egrep -i "^round-trip|^rtt" >/dev/null
1026         then
1027                 with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
1028                 ac_cv_ping6_packets_first=yes
1029                 AC_MSG_RESULT([$with_ping6_command])
1031         fi
1033 elif test "x$PATH_TO_PING" != "x"; then
1034         if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
1035                 $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
1036                 egrep -i "^round-trip|^rtt" >/dev/null
1037         then
1038                 with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
1039                 ac_cv_ping6_packets_first=yes
1040                 AC_MSG_RESULT([$with_ping6_command])
1042         elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \
1043                 egrep -i "^round-trip|^rtt" >/dev/null
1044         then
1045                 with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
1046                 ac_cv_ping6_packets_first=yes
1047                 AC_MSG_RESULT([$with_ping6_command])
1049         elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
1050                 egrep -i "^round-trip|^rtt" >/dev/null
1051         then
1052                 with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
1053                 ac_cv_ping6_packets_first=yes
1054                 AC_MSG_RESULT([$with_ping6_command])
1056         elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \
1057                 egrep -i "^round-trip|^rtt" >/dev/null
1058         then
1059                 with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d"
1060                 AC_MSG_RESULT([$with_ping6_command])
1062         elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \
1063                 egrep -i "^round-trip|^rtt" >/dev/null
1064         then
1065                 with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d"
1066                 AC_MSG_RESULT([$with_ping6_command])
1068         elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
1069                 egrep -i "^round-trip|^rtt" >/dev/null
1070         then
1071                 with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d"
1072                 AC_MSG_RESULT([$with_ping6_command])
1074         elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
1075                 egrep -i "^round-trip|^rtt" >/dev/null
1076         then
1077                 with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d"
1078                 AC_MSG_RESULT([$with_ping6_command])
1080         elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \
1081                 egrep -i "^round-trip|^rtt" >/dev/null
1082         then
1083                 with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s"
1084                 ac_cv_ping6_packets_first=yes
1085                 AC_MSG_RESULT([$with_ping_command])
1087         elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
1088                 egrep -i "^round-trip|^rtt" >/dev/null
1089         then
1090                 with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
1091                 ac_cv_ping6_packets_first=yes
1092                 AC_MSG_RESULT([$with_ping6_command])
1094         fi
1096 fi
1098 if test "x$with_ping6_command" != "x"; then
1099         AC_DEFINE_UNQUOTED(PING6_COMMAND,"$with_ping6_command",
1100                 [path and args for ICMPv6 ping command])
1101 else
1102         AC_MSG_RESULT([none])
1103 fi
1105 if test "x$ac_cv_ping6_packets_first" != "xno"; then
1106         AC_DEFINE(PING6_PACKETS_FIRST,1,
1107                 [Define if packet count must precede host])
1108 fi
1109 fi
1111 AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)
1113 AC_MSG_CHECKING(for nslookup syntax)
1114 if test -n "$PATH_TO_NSLOOKUP"
1115 then
1116         if $PATH_TO_NSLOOKUP -sil 127.0.0.1 2>&1 | grep ["Invalid option: sil"] >/dev/null
1117         then
1118                 ac_cv_nslookup_command="$PATH_TO_NSLOOKUP"
1119                 AC_MSG_RESULT([$ac_cv_nslookup_command])
1121         else
1122                 ac_cv_nslookup_command="$PATH_TO_NSLOOKUP -sil"
1123                 AC_MSG_RESULT([$ac_cv_nslookup_command])
1125         fi
1126         EXTRAS="$EXTRAS check_dns"
1128 else
1129         AC_MSG_WARN([nslookup command not found])
1130 fi
1132 AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command",
1133         [path and args for nslookup])
1135 AC_PATH_PROG(PATH_TO_HOST,host)
1136 if test -n "$ac_cv_path_PATH_TO_HOST"
1137 then
1138         EXTRAS="$EXTRAS check_dns"
1139 fi
1141 AC_PATH_PROG(PATH_TO_UPTIME,uptime)
1142 AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary])
1144 AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo)
1145 AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary])
1147 AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate)
1148 AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc)
1149 AC_PATH_PROGS(PATH_TO_NTPQ,ntpq)
1150 if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPQ")
1151 then
1152         AC_DEFINE_UNQUOTED(PATH_TO_NTPQ,"$PATH_TO_NTPQ",[path to ntpq binary])
1153         AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE",[path to ntpdate binary])
1154 else
1155         AC_MSG_WARN([Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization])
1156 fi
1158 AC_PATH_PROG(PATH_TO_LMSTAT,lmstat)
1159 if test -x "$PATH_TO_LMSTAT"
1160 then
1161         AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat])
1162 else
1163         AC_MSG_WARN([Get lmstat from Globetrotter Software to monitor flexlm licenses])
1164 fi
1166 AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient)
1167 if test -x "$PATH_TO_SMBCLIENT"
1168 then
1169         AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary])
1170 else
1171         AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares])
1172 fi
1175 AC_PATH_PROG(PATH_TO_WHO,who)
1177 if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null]
1178 then
1179         ac_cv_path_to_who="$PATH_TO_WHO -q"
1180 else
1181         ac_cv_path_to_who="$PATH_TO_WHO"
1182 fi
1184 AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who",
1185         [path and arguments for invoking 'who'])
1187 AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
1188 if test -x "$PATH_TO_SNMPGET"
1189 then
1190         AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary])
1191         EXTRAS="$EXTRAS check_hpjd check_snmp"
1192 else
1193         AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins])
1194 fi
1196 AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
1197 if test -x "$PATH_TO_SNMPGETNEXT"
1198 then
1199         AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary])
1200 fi
1202 if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null  )
1203 then
1204         AC_MSG_CHECKING(for Net::SNMP perl module)
1205         AC_MSG_RESULT([found])
1206 else
1207         AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins])
1208 fi
1210 AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
1211 AC_PATH_PROG(PATH_TO_QSTAT,qstat)
1213 if test -x "$PATH_TO_QUAKESTAT"
1214 then
1215         ac_cv_path_to_qstat="$PATH_TO_QUAKESTAT"
1216         EXTRAS="$EXTRAS check_game"
1218 elif test -x "$PATH_TO_QSTAT"
1219 then
1220         ac_cv_path_to_qstat="$PATH_TO_QSTAT"
1221         EXTRAS="$EXTRAS check_game"
1222 else
1223         AC_MSG_WARN([Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin])
1224 fi
1226 if test $ac_cv_path_to_qstat 
1227 then
1228         AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat",
1229                 [path to qstat/quakestat])
1230 fi
1232 AC_PATH_PROG(PATH_TO_FPING,fping)
1233 if test -x "$PATH_TO_FPING"
1234 then
1235         AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping])
1236         EXTRAS="$EXTRAS check_fping"
1237 else
1238         AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin])
1239 fi
1241 AC_PATH_PROG(PATH_TO_SSH,ssh)
1243 if test -x "$PATH_TO_SSH"
1244 then
1245         AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary])
1246         EXTRAS="$EXTRAS check_by_ssh"
1247 else
1248         AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin])
1249 fi
1252 AC_PATH_PROG(PATH_TO_MAILQ,mailq)
1253 if test -x "$PATH_TO_MAILQ"
1254 then
1255         AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq])
1256 else
1257         AC_MSG_WARN([Could not find mailq or eqivalent])
1258 fi
1260 dnl SWAP info required is amount allocated/available and amount free
1261 dnl The plugin works through all the swap devices and adds up the total swap
1262 dnl available.
1264 dnl dunno why this does not work below - use hack (kbd)
1265 dnl fine on linux, broken on solaris
1266 dnl if /bin/test -e "/proc/meminfo"
1268 AC_PATH_PROG(PATH_TO_SWAP,swap)
1269 AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo)
1271 AC_MSG_CHECKING(for how to check memory)
1272 if [cat /proc/meminfo > /dev/null 2>&1]
1273 then
1274         AC_MSG_RESULT([found /proc/meminfo])
1275         AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo])
1276         AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes])
1277         EXTRAS="$EXTRAS check_swap"
1279 elif [$PATH_TO_SWAP -l 2>&1 >/dev/null]
1280 then
1281         ac_cv_have_swap=yes
1282         ac_cv_swap_command="$PATH_TO_SWAP -l"
1283         if [$PATH_TO_SWAP -l 2>/dev/null | \
1284                 egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \
1285                 >/dev/null]
1286         then
1287                 ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %d %d"]
1288                 AC_MSG_RESULT([using IRIX format swap])
1290         elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^swapfile +dev +swaplo +blocks +free" >/dev/null]
1291         then
1292                 ac_cv_swap_format=["%*s %*[[0-9,-]] %*d %d %d"]
1293                 AC_MSG_RESULT([using Solaris format swap])
1295         elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null]
1296         then
1297                 ac_cv_swap_format=["%*s %*[[0-9,-]] %*d %d %d"]
1298                 AC_MSG_RESULT([using Unixware format swap])
1300         fi
1301         EXTRAS="$EXTRAS check_swap"
1303 elif [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null]
1304 then
1305         ac_cv_have_swap=yes
1306         ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
1308         if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
1309         then
1310                 ac_cv_swap_format=["%*s %d %*d %d"]
1311                 AC_MSG_RESULT([using FreeBSD format swapinfo])
1312         fi
1313         EXTRAS="$EXTRAS check_swap"
1315 elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null]
1316 then
1317         ac_cv_have_swap=yes
1318         ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM",
1319         ac_cv_swap_format=["%*s %d %*d %d"]
1320         AC_MSG_RESULT([using HP-UX format swapinfo])
1321 fi
1323 if test x$ac_cv_have_swap != x 
1324 then
1325         AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])
1326 fi
1327 AC_DEFINE_UNQUOTED(SWAP_FORMAT,"$ac_cv_swap_format",
1328         [Format string for parsing swap output])
1329 if test "x$ac_cv_swap_command" != "x" 
1330 then
1331         AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$ac_cv_swap_command",
1332                 [Path to swap/swapinfo binary, with any args])
1333 fi
1335 AC_PATH_PROG(PATH_TO_DIG,dig)
1336 AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present])
1337 if test -n "$PATH_TO_DIG"; then
1338         EXTRAS="$EXTRAS check_dig"
1339 fi
1341 if test -f plugins/check_nt.c ; then
1342   EXTRAS="$EXTRAS check_nt"
1343 elif test -f ../plugins/check_nt.c ; then
1344   EXTRAS="$EXTRAS check_nt"
1345 fi
1347 AC_MSG_CHECKING(for va_list)
1348 AC_TRY_COMPILE([#ifdef __STDC__
1349                 #include <stdio.h>
1350                 #include <stdlib.h>
1351                 #include <stdarg.h>
1352                 #else
1353                 #include <sys/types.h>
1354                 #include <stdio.h>
1355                 #include <varargs.h>
1356                 #endif],
1357                 [va_list args;],
1358                 [AC_MSG_RESULT(yes)],
1359                 [NEED_VA_LIST=-DNEED_VA_LIST AC_SUBST(NEED_VA_LIST) AC_MSG_RESULT(no)])
1361 AC_SUBST(EXTRAS)
1362 AC_SUBST(EXTRA_NETOBJS)
1363 AC_SUBST(DEPLIBS)
1365 AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"${VERSION}",[package version])
1367 AC_OUTPUT(Makefile lib/Makefile plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl pkg/solaris/pkginfo)
1369 ACX_FEATURE([with],[cgiurl])
1370 ACX_FEATURE([with],[nagios-user])
1371 ACX_FEATURE([with],[nagios-group])
1372 ACX_FEATURE([with],[trusted-path])
1373 ACX_FEATURE([with],[df-command])
1374 ACX_FEATURE([with],[ping-command])
1375 ACX_FEATURE([with],[ping6-command])
1376 ACX_FEATURE([with],[lwres])
1377 ACX_FEATURE([with],[ipv6])
1378 ACX_FEATURE([enable],[emulate-getaddrinfo])