1 dnl Process this file with autoconf to produce a configure script.
3 AC_REVISION ($Revision$)
5 VERSION=`cat $srcdir/package.def|sed -e 's/PACKAGE_RELEASE= *"//;s/"//'`
7 dnl AM_INIT_AUTOMAKE(nagios-plugins,$VERSION)
8 AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
10 AC_PREFIX_DEFAULT(/usr/local/nagios)
12 dnl Figure out how to invoke "install" and what install options to use.
19 AC_PATH_PROG(ACLOCAL,aclocal)
20 AC_PATH_PROG(AUTOMAKE,automake)
21 AC_PATH_PROG(AUTOCONF,autoconf)
22 AC_PATH_PROG(AUTOHEADER,autoheader)
24 PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'`
25 AC_SUBST(PLUGIN_TEST)dnl
27 SCRIPT_TEST=`echo $srcdir/plugins-scripts/t/*.t|sed -e 's,\.*/plugins-scripts/,,g'`
28 AC_SUBST(SCRIPT_TEST)dnl
30 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"
33 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\n"
38 dnl AC_ARG_WITH(nonposix_state_defs,--with-nonposix-state-defs uses POSIXLY incorrect states for netsaint < 0.0.7b2,,AC_DEFINE(POSIX_STATE_DEFS))
40 AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/cgi-bin/nagios)
42 AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL")
44 AC_ARG_WITH(nagios_user,--with-nagios-user=<user> sets user name to run nagios,nagios_usr=$withval,nagios_usr=nagios)
45 AC_ARG_WITH(nagios_group,--with-nagios-group=<group> sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios)
48 INSTALL_OPTS="-o $nagios_usr -g $nagios_grp"
49 AC_SUBST(INSTALL_OPTS)
51 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)
52 AC_SUBST(trusted_path)
55 PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
57 LDFLAGS="$LDFLAGS -L."
59 dnl Checks for programs.
64 AC_PATH_PROG(PYTHON,python)
65 AC_PATH_PROG(PERL,perl)
68 AC_PATH_PROG(HOSTNAME,hostname)
69 AC_PATH_PROG(BASENAME,basename)
73 dnl Checks for libraries.
78 AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce")
79 AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
80 AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
81 AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv")
84 dnl Check for PostgreSQL libraries
86 _SAVEDCPPFLAGS="$CPPFLAGS"
87 AC_ARG_WITH(pgsql,--with-pgsql=<dir> sets path to pgsql installation,[PGSQL=$withval])
88 AC_CHECK_LIB(crypt,main)
89 if test "$ac_cv_lib_crypt_main" = "yes"; then
90 if test -n "$PGSQL"; then
91 LIBS="$LIBS -L$PGSQL/lib"
92 CPPFLAGS="$CPPFLAGS -I$PGSQL/include"
94 AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt)
95 if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then
96 AC_CHECK_HEADERS(pgsql/libpq-fe.h)
97 AC_CHECK_HEADERS(postgresql/libpq-fe.h)
98 AC_CHECK_HEADERS(libpq-fe.h)
99 if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
100 PGLIBS="-lpq -lcrypt"
101 PGINCLUDE="-I/usr/include/pgsql"
102 elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
103 PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
104 PGINCLUDE="-I/usr/include/postgresql"
105 elif test "$ac_cv_header_libpq_fe_h" = "yes"; then
106 PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
107 PGINCLUDE="-I$PGSQL/include"
109 if test -z "$PGINCLUDE"; then
110 AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
111 AC_MSG_WARN([install PostgreSQL headers to compile this plugin (see Requirements).])
115 EXTRAS="$EXTRAS check_pgsql"
118 AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
119 AC_MSG_WARN([LIBS="$LIBS" CPPFLAGS="$CPPFLAGS"])
120 AC_MSG_WARN([install PostgreSQL libs to compile this plugin (see Requirements).])
123 AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
124 AC_MSG_WARN([install lib crypt and PostgreSQL libs to compile this plugin (see Requirements).])
127 CPPFLAGS="$_SAVEDCPPFLAGS"
129 dnl Check for radius libraries
131 AC_CHECK_LIB(radiusclient,rc_read_config)
132 if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
133 EXTRAS="$EXTRAS check_radius"
134 RADIUSLIBS="-lradiusclient"
137 AC_MSG_WARN([Skipping radius plugin])
138 AC_MSG_WARN([install radius libs to compile this plugin (see Requirements).])
142 dnl Check for LDAP libraries
144 AC_CHECK_LIB(ldap,main,,,-llber)
145 if test "$ac_cv_lib_ldap_main" = "yes"; then
146 LDAPLIBS="-lldap -llber"\
147 LDAPINCLUDE="-I/usr/include/ldap"
149 AC_SUBST(LDAPINCLUDE)
150 EXTRAS="$EXTRAS check_ldap"
152 AC_MSG_WARN([Skipping LDAP plugin])
153 AC_MSG_WARN([install LDAP libs to compile this plugin (see Requirements).])
157 dnl Check for mysql libraries
159 _SAVEDCPPFLAGS="$CPPFLAGS"
160 CPPFLAGS="-I/usr/include"
161 AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval])
162 if test -n "$MYSQLLIBS"; then
163 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
164 elif test -f /usr/lib/libmysqlclient.so; then
165 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
166 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
167 elif test -f /usr/lib/libmysqlclient.a; then
168 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
169 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
170 elif test -f /usr/lib/mysql/libmysqlclient.so; then
171 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz)
172 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
173 elif test -f /usr/lib/mysql/libmysqlclient.a; then
174 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz)
175 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
177 if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
178 AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h)
179 if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
180 EXTRAS="$EXTRAS check_mysql"
182 AC_SUBST(check_mysql_LDFLAGS)
184 AC_MSG_WARN([Skipping mysql plugin])
185 AC_MSG_WARN([install mysql client headers to compile this plugin (see Requirements).])
188 AC_MSG_WARN([Skipping mysql plugin])
189 AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
192 CPPFLAGS="$_SAVEDCPPFLAGS"
194 dnl Check for OpenSSL location
195 AC_PATH_PROG(OPENSSL,openssl)
196 if test "$OPENSSL" = "/usr/bin/openssl"; then
198 elif test "$OPENSSL" = "/usr/sbin/openssl"; then
200 elif test "$OPENSSL" = "/opt/bin/openssl"; then
202 elif test "$OPENSSL" = "/opt/openssl/bin/openssl"; then
204 elif test "$OPENSSL" = "/usr/slocal/bin/openssl"; then
206 elif test "$OPENSSL" = "/usr/local/bin/openssl"; then
208 elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then
209 OPENSSL=/usr/local/ssl
211 AC_ARG_WITH(openssl,--with-openssl=<dir> sets path to openssl installation,[OPENSSL=$withval])
213 dnl Check for OpenSSL header files
214 _SAVEDCPPFLAGS="$CPPFLAGS"
216 CPPFLAGS="-I$OPENSSL/include"
217 AC_CHECK_HEADERS(openssl/x509.h openssl/ssl.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.h,SSLINCLUDE="-I$OPENSSL/include",FOUNDINCLUDE=no)
218 if test "$FOUNDINCLUDE" = "no"; then
220 AC_CHECK_HEADERS(x509.h ssl.h rsa.h pem.h crypto.h err.h,SSLINCLUDE="-I$OPENSSL/include",FOUNDINCLUDE=no)
223 CPPFLAGS="$_SAVEDCPPFLAGS $SSLINCLUDE"
225 dnl Check for crypto lib
227 AC_CHECK_LIB(crypto,CRYPTO_lock,,,-L$OPENSSL/lib)
228 if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then
229 dnl Check for SSL lib
230 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)
234 dnl test headers and libs to decide whether check_http should use SSL
235 if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then
236 if test "$ac_cv_lib_ssl_main" = "yes"; then
237 if test "$FOUNDINCLUDE" = "yes"; then
243 CPPFLAGS="$_SAVEDCPPFLAGS"
246 dnl Checks for header files.
252 AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h unistd.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h)
254 dnl Checks for typedefs, structures, and compiler characteristics.
261 dnl EXTRA_LIBRARIES="libgetopt.a libsnprintf.a"
262 dnl noinst_LIBRARIES="libgetopt.a libsnprintf.a"
263 dnl libgetopt_a_SOURCES="getopt.c getopt1.c"
264 dnl libgetopt_a_DEPENDENCIES=getopt.h
265 dnl libsnprintf_a_SOURCES=snprintf.c
266 dnl AC_SUBST(noinst_LIBRARIES)
267 dnl AC_SUBST(libgetopt_a_SOURCES)
268 dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
269 dnl AC_SUBST(libsnprintf_a_SOURCES)
271 AC_MSG_CHECKING(for getopt_long)
272 AC_TRY_COMPILE([#include <getopt.h>
273 #include <stdlib.h>],
275 static struct option *long_options;
276 getopt_long(0,NULL,"+h",long_options,&option_index);],
277 [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
278 [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
280 AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
282 AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
284 dnl Checks for library functions.
285 AC_CHECK_FUNCS(select socket strdup strstr strtod strtol strtoul)
287 AC_MSG_CHECKING(for type of socket size)
288 AC_TRY_COMPILE([#include <stdlib.h>
289 #include <sys/types.h>
290 #include <sys/socket.h>
292 [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);],
293 [AC_DEFINE(SOCKET_SIZE_TYPE, size_t) AC_MSG_RESULT(size_t)],
294 [AC_DEFINE(SOCKET_SIZE_TYPE, int) AC_MSG_RESULT(int)])
296 if test -f "/proc/loadavg"
298 AC_DEFINE(HAVE_PROC_LOADAVG)
299 AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg")
302 AC_PATH_PROG(PATH_TO_PS,ps)
303 dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
304 dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
305 if [ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null]
307 AC_DEFINE(USE_PS_VARS)
308 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
309 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axo 'stat user ppid args'")
310 EXTRAS="$EXTRAS check_nagios"
311 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axo 'stat uid ppid comm args'")
312 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
313 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axo 'vsz comm'")
314 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
315 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'")
316 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
317 echo " ps syntax... $PATH_TO_PS -eo 'stat comm vsz rss user ppid args'"
318 elif [ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null]
320 AC_DEFINE(USE_PS_VARS)
321 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
322 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -eo 's user ppid args'")
323 EXTRAS="$EXTRAS check_nagios"
324 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -eo 's uid ppid comm args'")
325 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
326 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -eo 'vsz comm'")
327 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
328 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
329 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
330 echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
331 elif [ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
333 AC_DEFINE(USE_PS_VARS)
334 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
335 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 's user ppid args'")
336 EXTRAS="$EXTRAS check_nagios"
337 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 's uid ppid comm args'")
338 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
339 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'")
340 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
341 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'")
342 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
343 echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'"
344 elif [ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
346 AC_DEFINE(USE_PS_VARS)
347 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
348 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'status user ppid args'")
349 EXTRAS="$EXTRAS check_nagios"
350 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'status uid ppid comm args'")
351 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
352 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'")
353 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
354 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'")
355 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
356 echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'"
357 elif [ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
359 AC_DEFINE(USE_PS_VARS)
360 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
361 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'state user ppid args'")
362 EXTRAS="$EXTRAS check_nagios"
363 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'state uid ppid comm args'")
364 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
365 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'")
366 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
367 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'")
368 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
369 echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
370 elif [ps -ao 'state command vsz rss user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
372 AC_DEFINE(USE_PS_VARS)
373 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
374 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'state user ppid args'")
375 EXTRAS="$EXTRAS check_nagios"
376 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'state uid ppid command args'")
377 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
378 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz command'")
379 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
380 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'")
381 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
382 echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
384 elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null]
386 AC_DEFINE(USE_PS_VARS)
387 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
388 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
389 EXTRAS="$EXTRAS check_nagios"
390 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'")
391 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
392 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'")
393 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
394 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'")
395 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
396 echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
397 dnl BSD-like mode in RH 6.1
398 elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
400 AC_DEFINE(USE_PS_VARS)
401 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
402 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'")
403 EXTRAS="$EXTRAS check_nagios"
404 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'")
405 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
406 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'")
407 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
408 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
409 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
410 echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
412 elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
414 AC_DEFINE(USE_PS_VARS)
415 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog])
416 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el")
417 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s")
418 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el")
419 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d")
420 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el")
421 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d")
422 echo " ps syntax... $PATH_TO_PS -el"
424 elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
426 AC_DEFINE(USE_PS_VARS)
427 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog])
428 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el")
429 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s")
430 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el")
431 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d")
432 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el")
433 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d")
434 echo " ps syntax... $PATH_TO_PS -el"
436 dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
438 elif [ps -laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND" >/dev/null]
440 AC_DEFINE(USE_PS_VARS)
441 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww")
442 EXTRAS="$EXTRAS check_nagios"
443 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog])
444 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww")
445 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s")
446 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww")
447 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d")
448 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww")
449 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d")
450 echo " ps syntax... $PATH_TO_PS laxnwww"
451 dnl Debian Linux / procps v1.2.9:
452 dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
453 dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2]
455 elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null]
457 AC_DEFINE(USE_PS_VARS)
458 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww")
459 EXTRAS="$EXTRAS check_nagios"
460 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog])
461 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww")
462 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s")
463 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww")
464 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d")
465 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww")
466 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d")
467 echo " ps syntax... $PATH_TO_PS laxnwww"
470 dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD
471 dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper
472 elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
474 AC_DEFINE(USE_PS_VARS)
475 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog])
476 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el")
477 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s")
478 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el")
479 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d")
480 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el")
481 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d")
482 echo " ps syntax... $PATH_TO_PS -el"
484 elif [ps glaxen 2>/dev/null | egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null]
486 AC_DEFINE(USE_PS_VARS)
487 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog])
488 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS glaxen")
489 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s")
490 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS glaxen")
491 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d")
492 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen")
493 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d")
494 echo " ps syntax... $PATH_TO_PS glaxen"
496 dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND *$" >/dev/null]
498 dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun")
499 dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s")
500 dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun")
501 dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d")
502 dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun")
503 dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d")
504 dnl echo " ps syntax... $PATH_TO_PS axun"
506 dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND" >/dev/null]
508 dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun")
509 dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s")
510 dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun")
511 dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d")
512 dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun")
513 dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d")
514 dnl echo " ps syntax... $PATH_TO_PS axun"
516 echo "** Unable to find usable ps syntax"
519 AC_ARG_WITH(df_command,--with-df-command=<syntax> sets syntax for df,DF_COMMAND=$withval)
520 if test -n "$DF_COMMAND"
522 AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND")
523 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]
525 AC_PATH_PROG(PATH_TO_DF,df)
526 AC_MSG_RESULT(" df syntax... $PATH_TO_DF -Pk")
527 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk")
528 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]
530 AC_PATH_PROG(PATH_TO_DF,df)
531 AC_MSG_RESULT(" df syntax... $PATH_TO_DF -k")
532 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k")
533 elif [df 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null]
535 AC_PATH_PROG(PATH_TO_DF,df)
536 AC_MSG_RESULT(" df syntax... $PATH_TO_DF")
537 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF")
538 elif [bdf 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null]
540 AC_PATH_PROG(PATH_TO_DF,bdf)
541 AC_MSG_RESULT(" df syntax... $PATH_TO_DF")
542 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF")
544 AC_MSG_WARN("unable to find usable df syntax")
547 AC_PATH_PROG(PATH_TO_PING,ping)
549 AC_ARG_WITH(ping_command,--with-ping-command=<syntax> sets syntax for ping,PING_COMMAND=$withval)
550 if test -n "$PING_COMMAND"
552 echo " ping syntax... (command-line) $PING_COMMAND"
553 if test -n "$PING_PACKETS_FIRST"
555 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND")
557 elif [ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip" >/dev/null]
559 PING_COMMAND="$PATH_TO_PING -n -U -c %d %s"
560 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND")
561 echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>"
562 elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip" >/dev/null]
564 PING_COMMAND="$PATH_TO_PING -n -c %d %s"
565 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND")
566 echo " ping syntax... $PATH_TO_PING -n -c <count> <host>"
567 elif [ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip" >/dev/null]
569 PING_COMMAND="$PATH_TO_PING -n %s -c %d"
570 echo " ping syntax... $PATH_TO_PING -n <host> -c <count>"
571 elif [ping 127.0.0.1 -n 1 2>/dev/null | egrep -i "^round-trip" >/dev/null]
573 PING_COMMAND="$PATH_TO_PING %s -n %d"
574 echo " ping syntax... $PATH_TO_PING <host> -n <count>"
575 elif [ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip" >/dev/null]
577 PING_COMMAND="$PATH_TO_PING -n -s %s 56 %d"
578 echo " ping syntax... $PATH_TO_PING -n -s <host> 56 <count>"
579 elif [ping -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | egrep -i "^round-trip" >/dev/null]
581 PING_COMMAND="$PATH_TO_PING -n -h %s -s 56 -c %d"
582 echo " ping syntax... $PATH_TO_PING -n -h <host> -s 56 -c <count>"
583 elif [ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip" >/dev/null]
585 PING_COMMAND="$PATH_TO_PING -n -s 56 -c %d %s"
586 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND")
587 echo " ping syntax... $PATH_TO_PING -n -s 56 -c <count> <host>"
588 elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip" >/dev/null]
590 PING_COMMAND="$PATH_TO_PING -n -c %d %s"
591 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND")
592 echo " ping syntax... $PATH_TO_PING -n -c <count> <host>"
594 AC_MSG_WARN("unable to find usable ping syntax")
596 AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND")
598 AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)
599 if test -n "$ac_cv_path_PATH_TO_NSLOOKUP"
601 AC_MSG_CHECKING("nslookup syntax")
602 if [nslookup -sil 127.0.0.1 2>&1 | grep "*** Invalid option: sil" >/dev/null]
604 AC_MSG_RESULT("$PATH_TO_NSLOOKUP")
605 AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP")
607 AC_MSG_RESULT("$PATH_TO_NSLOOKUP -sil")
608 AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil")
610 EXTRAS="$EXTRAS check_dns"
612 AC_MSG_WARN("nslookup command not found")
615 AC_PATH_PROG(PATH_TO_UPTIME,uptime)
616 AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME")
618 AC_PATH_PROG(PATH_TO_WHO,who)
619 if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null]
621 AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO -q")
623 AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
626 AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
627 if test -f "$PATH_TO_SNMPGET"
629 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET")
630 EXTRAS="$EXTRAS check_hpjd check_snmp"
632 echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
635 AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
636 if test -f "$PATH_TO_SNMPGETNEXT"
638 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT")
641 AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
642 AC_PATH_PROG(PATH_TO_QSTAT,qstat)
643 if test -n "$PATH_TO_QUAKESTAT"
645 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT")
646 EXTRAS="$EXTRAS check_game"
647 elif test -n "$PATH_TO_QSTAT"
649 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT")
650 EXTRAS="$EXTRAS check_game"
652 echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
655 AC_PATH_PROG(PATH_TO_FPING,fping)
656 if test -n "$PATH_TO_FPING"
658 AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING")
659 EXTRAS="$EXTRAS check_fping"
661 echo "** Get fping from http://www.stanford.edu/~schemers/docs/fping/fping.html in order to make check_fping plugin"
664 AC_PATH_PROG(PATH_TO_SSH,ssh)
665 if test -f "$PATH_TO_SSH"
667 AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH")
668 EXTRAS="$EXTRAS check_by_ssh"
670 echo "** Get ssh in order to make check_by_ssh plugin"
673 dnl dunno why this does not work below - use hack (kbd)
674 dnl fine on linux, broken on solaris
675 dnl if /bin/test -e "/proc/meminfo"
677 if [cat /proc/meminfo > /dev/null 2>&1]
679 echo "found /proc/meminfo"
680 AC_DEFINE(HAVE_PROC_MEMINFO)
681 AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo")
682 EXTRAS="$EXTRAS check_swap"
683 elif [swap -l 2>&1 | egrep -i "swapfile" >/dev/null]
685 echo "found swap command"
687 AC_PATH_PROG(PATH_TO_SWAP,swap)
688 AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -l")
689 if [swap -l 2>/dev/null | egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" >/dev/null]
691 AC_DEFINE_UNQUOTED(SWAP_FORMAT,[" %*d %*s %*d,%*d %*d %*d %d %d"])
692 echo " using IRIX format"
693 elif [swap -l 2>/dev/null | egrep -i "^swapfile +dev +swaplo +blocks +free" >/dev/null]
695 AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %*[[0-9,-]] %*d %d %d"])
696 echo " using Solaris format"
698 EXTRAS="$EXTRAS check_swap"
699 elif [swapinfo -k 2>&1 | egrep -i "Device" >/dev/null]
701 echo "found swapinfo command"
703 AC_PATH_PROG(PATH_TO_SWAP,swapinfo)
704 AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -k")
705 if [swapinfo -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
707 AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"])
708 echo " using FreeBSD format"
710 EXTRAS="$EXTRAS check_swap"
713 AC_PATH_PROG(PATH_TO_DIG,dig)
714 AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG")
715 if test -n "$PATH_TO_DIG"; then
716 EXTRAS="$EXTRAS check_dig"
719 if test -f plugins/check_nt.c ; then
720 EXTRAS="$EXTRAS check_nt"
721 elif test -f ../plugins/check_nt.c ; then
722 EXTRAS="$EXTRAS check_nt"
725 dnl AC_EGREP_HEADER (PATTERN, HEADER-FILE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
726 AC_TRY_COMPILE([#ifdef __STDC__
731 #include <sys/types.h>
736 [AC_MSG_RESULT(yes)],
737 [NEED_VA_LIST=-DNEED_VA_LIST AC_SUBST(NEED_VA_LIST) AC_MSG_RESULT(no)])
744 AC_DEFINE_UNQUOTED(PACKAGE,"${PACKAGE}")
745 AC_DEFINE_UNQUOTED(VERSION,"${VERSION}")
746 AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"${VERSION}")
748 AC_OUTPUT(Makefile subst plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl,echo timestamp > plugins/stamp-h1;echo timestamp > plugins/stamp-h2;echo timestamp > plugins/stamp-h3;echo timestamp > plugins/stamp-h4;echo timestamp > plugins/stamp-h5;echo timestamp > plugins/stamp-h6;PATH=.:..:$PATH subst.sh command.cfg)