configure.in 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_REVISION ($Revision$)
  3. AC_PREREQ(2.58)
  4. AC_INIT(nagios-plugins,1.4.3)
  5. AC_CONFIG_SRCDIR(NPTest.pm)
  6. AM_INIT_AUTOMAKE([1.8.3])
  7. AM_CONFIG_HEADER(config.h)
  8. AC_CANONICAL_HOST
  9. RELEASE=1
  10. AC_SUBST(RELEASE)
  11. AC_PREFIX_DEFAULT(/usr/local/nagios)
  12. dnl Deprecated configure options
  13. dnl Figure out how to invoke "install" and what install options to use.
  14. AC_PROG_INSTALL
  15. AC_SUBST(INSTALL)
  16. dnl Must come very early on due to coreutils requirement
  17. dnl Takes care of AC_GNU_SOURCE, AC_AIX and AC_MINIX
  18. gl_USE_SYSTEM_EXTENSIONS
  19. AC_PROG_CC
  20. AC_PROG_CPP
  21. AC_PROG_GCC_TRADITIONAL
  22. AC_PROG_LIBTOOL
  23. AC_PROG_MAKE_SET
  24. AC_PROG_AWK
  25. AC_FUNC_MALLOC
  26. AC_FUNC_REALLOC
  27. AC_FUNC_ERROR_AT_LINE
  28. AC_CONFIG_LIBOBJ_DIR(lib)
  29. AC_FUNC_GETLOADAVG([lib])
  30. ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AM_FUNC_STRTOD])
  31. PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'`
  32. AC_SUBST(PLUGIN_TEST)dnl
  33. SCRIPT_TEST=`echo $srcdir/plugins-scripts/t/*.t|sed -e 's,\.*/plugins-scripts/,,g'`
  34. AC_SUBST(SCRIPT_TEST)dnl
  35. 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"
  36. AC_SUBST(WARRANTY)
  37. 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,\nuse output from the --version option of the plugin itself).\n"
  38. AC_SUBST(SUPPORT)
  39. dnl CGIURL has changed for Nagios with 1.0 beta
  40. AC_ARG_WITH(cgiurl,
  41. ACX_HELP_STRING([--with-cgiurl=DIR],
  42. [sets URL for cgi programs]),
  43. with_cgiurl=$withval,
  44. with_cgiurl=/nagios/cgi-bin)
  45. CGIURL="$with_cgiurl"
  46. AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs])
  47. AC_ARG_WITH(nagios_user,
  48. ACX_HELP_STRING([--with-nagios-user=USER],
  49. [set user name to run nagios]),
  50. with_nagios_user=$withval,
  51. with_nagios_user=nagios)
  52. AC_ARG_WITH(nagios_group,
  53. ACX_HELP_STRING([--with-nagios-group=GROUP],
  54. [set group name to run nagios]),
  55. with_nagios_group=$withval,
  56. with_nagios_group=nagios)
  57. AC_SUBST(with_nagios_user)
  58. AC_SUBST(with_nagios_group)
  59. INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
  60. AC_SUBST(INSTALL_OPTS)
  61. AC_ARG_WITH(trusted_path,
  62. ACX_HELP_STRING([--with-trusted-path=PATH],
  63. [sets trusted path for executables called by scripts (default=/bin:/sbin:/usr/bin:/usr/sbin)]),
  64. with_trusted_path=$withval,
  65. with_trusted_path=/bin:/sbin:/usr/bin:/usr/sbin)
  66. AC_SUBST(with_trusted_path)
  67. EXTRAS=
  68. EXTRAS_ROOT=
  69. dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
  70. LDFLAGS="$LDFLAGS -L."
  71. ac_cv_uname_m=`uname -m`
  72. ac_cv_uname_s=`uname -s`
  73. ac_cv_uname_r=`uname -r`
  74. ac_cv_uname_v=`uname -v`
  75. PKG_ARCH=`uname -p`
  76. REV_DATESTAMP=`date '+%Y.%m.%d.%H.%M'`
  77. REV_TIMESTAMP=`date '+%Y%m%d%H%M%S'`
  78. AC_SUBST(PKG_ARCH)
  79. AC_SUBST(REV_DATESTAMP)
  80. AC_SUBST(REV_TIMESTAMP)
  81. dnl Checks for programs.
  82. AC_PATH_PROG(PYTHON,python)
  83. AC_PATH_PROG(SH,sh)
  84. AC_PATH_PROG(PERL,perl)
  85. AC_PATH_PROG(LIBGNUTLS_CONFIG,libgnutls-config)
  86. AC_PATH_PROG(HOSTNAME,hostname)
  87. AC_PATH_PROG(BASENAME,basename)
  88. dnl allow them to override the path of perl
  89. AC_ARG_WITH(perl,
  90. ACX_HELP_STRING([--with-perl=PATH],
  91. [sets path to perl executable]),
  92. with_perl=$withval,with_perl=$PERL)
  93. AC_SUBST(PERL, $with_perl)
  94. dnl openssl/gnutls
  95. AC_ARG_WITH(openssl,
  96. AC_HELP_STRING([--with-openssl=DIR],
  97. [path to openssl installation]),)
  98. AC_ARG_WITH(gnutls,
  99. ACX_HELP_STRING([--with-gnutls=PATH],
  100. [path to gnutls installation root]),)
  101. dnl you can only have one or the other
  102. if test ! "$with_openssl" = "" && test ! "$with_openssl" = "no"; then
  103. with_gnutls="no"
  104. fi
  105. if test ! "$with_gnutls" = "" && test ! "$with_gnutls" = "no"; then
  106. with_openssl="no"
  107. fi
  108. dnl list of possible dirs to try to autodetect openssl
  109. dnl if $dir/include exists, we consider it found
  110. dnl the order should allow locally installed versions to override distros' ones
  111. OPENSSL_DIRS="/usr /usr/local /usr/slocal /usr/local/openssl /usr/local/ssl \
  112. /opt /opt/openssl"
  113. dnl
  114. dnl Check for miscellaneous stuff
  115. dnl
  116. case $host_vender-$host_os in
  117. osf*)
  118. AC_DEFINE(_OSF_SOURCE,1,[OSF needs this for getaddrinfo])
  119. ;;
  120. esac
  121. dnl
  122. dnl Checks for libraries.
  123. dnl
  124. AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce")
  125. AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
  126. AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
  127. AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv")
  128. AC_SUBST(SOCKETLIBS)
  129. dnl
  130. dnl check for math-related functions needing -lm
  131. AC_CHECK_HEADERS(math.h)
  132. AC_CHECK_LIB(m,floor,MATHLIBS="-lm")
  133. AC_SUBST(MATHLIBS)
  134. dnl Check for libtap, to run perl-like tests
  135. AC_CHECK_LIB(tap, plan_tests,
  136. EXTRA_TEST=test_utils
  137. AC_SUBST(EXTRA_TEST)
  138. )
  139. dnl Check for PostgreSQL libraries
  140. _SAVEDLIBS="$LIBS"
  141. _SAVEDCPPFLAGS="$CPPFLAGS"
  142. AC_ARG_WITH(pgsql,
  143. ACX_HELP_STRING([--with-pgsql=DIR],
  144. [sets path to pgsql installation]),
  145. PGSQL=$withval,)
  146. AC_CHECK_LIB(crypt,main)
  147. if test "$ac_cv_lib_crypt_main" = "yes"; then
  148. if test -n "$PGSQL"; then
  149. LDFLAGS="$LDFLAGS -L$PGSQL/lib"
  150. CPPFLAGS="$CPPFLAGS -I$PGSQL/include"
  151. fi
  152. AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt)
  153. if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then
  154. AC_CHECK_HEADERS(pgsql/libpq-fe.h)
  155. AC_CHECK_HEADERS(postgresql/libpq-fe.h)
  156. AC_CHECK_HEADERS(libpq-fe.h)
  157. if [[ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]]; then
  158. PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
  159. PGINCLUDE="-I$PGSQL/include"
  160. elif test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
  161. PGLIBS="-lpq -lcrypt"
  162. PGINCLUDE="-I/usr/include/pgsql"
  163. elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
  164. PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
  165. PGINCLUDE="-I/usr/include/postgresql"
  166. elif test "$ac_cv_header_libpq_fe_h" = "yes"; then
  167. PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
  168. PGINCLUDE="-I$PGSQL/include"
  169. fi
  170. if test -z "$PGINCLUDE"; then
  171. AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
  172. AC_MSG_WARN([install PostgreSQL headers to compile this plugin (see REQUIREMENTS).])
  173. else
  174. AC_SUBST(PGLIBS)
  175. AC_SUBST(PGINCLUDE)
  176. EXTRAS="$EXTRAS check_pgsql"
  177. fi
  178. else
  179. AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
  180. AC_MSG_WARN([LIBS="$LIBS" CPPFLAGS="$CPPFLAGS"])
  181. AC_MSG_WARN([install PostgreSQL libs to compile this plugin (see REQUIREMENTS).])
  182. fi
  183. else
  184. AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
  185. AC_MSG_WARN([install lib crypt and PostgreSQL libs to compile this plugin (see REQUIREMENTS).])
  186. fi
  187. LIBS="$_SAVEDLIBS"
  188. CPPFLAGS="$_SAVEDCPPFLAGS"
  189. dnl Check for radius libraries
  190. _SAVEDLIBS="$LIBS"
  191. AC_CHECK_LIB(radiusclient,rc_read_config)
  192. if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
  193. EXTRAS="$EXTRAS check_radius"
  194. RADIUSLIBS="-lradiusclient"
  195. AC_SUBST(RADIUSLIBS)
  196. else
  197. AC_MSG_WARN([Skipping radius plugin])
  198. AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).])
  199. fi
  200. LIBS="$_SAVEDLIBS"
  201. dnl Check for LDAP libraries
  202. _SAVEDLIBS="$LIBS"
  203. AC_CHECK_LIB(ldap,main,,,-llber)
  204. if test "$ac_cv_lib_ldap_main" = "yes"; then
  205. LDAPLIBS="-lldap -llber"\
  206. LDAPINCLUDE="-I/usr/include/ldap"
  207. AC_SUBST(LDAPLIBS)
  208. AC_SUBST(LDAPINCLUDE)
  209. AC_CHECK_FUNCS(ldap_set_option)
  210. EXTRAS="$EXTRAS check_ldap"
  211. AC_CHECK_FUNCS(ldap_init ldap_set_option ldap_get_option ldap_start_tls_s)
  212. else
  213. AC_MSG_WARN([Skipping LDAP plugin])
  214. AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).])
  215. fi
  216. LIBS="$_SAVEDLIBS"
  217. dnl Check for mysql libraries
  218. dnl Default is to search path for mysql_config
  219. AC_ARG_WITH(mysql,
  220. ACX_HELP_STRING([--with-mysql=DIR],
  221. [Compiles mysql plugins. Expects DIR/bin/mysql_config]),
  222. with_mysql=$withval,
  223. with_mysql=yes)
  224. if test $with_mysql != "no" ; then
  225. if test -x $with_mysql/bin/mysql_config ; then
  226. MYSQLCONFIG="$with_mysql/bin/mysql_config"
  227. else
  228. AC_PATH_PROG(MYSQLCONFIG, mysql_config)
  229. fi
  230. if test -z "$MYSQLCONFIG"; then
  231. with_mysql="not found"
  232. AC_MSG_WARN([Skipping mysql plugin])
  233. AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).])
  234. else
  235. with_mysql=$MYSQLCONFIG
  236. EXTRAS="$EXTRAS check_mysql check_mysql_query"
  237. MYSQLINCLUDE=`$MYSQLCONFIG --include`
  238. # Mysql 3 does not support --include. --cflags should be sufficient
  239. if test $? -ne 0 ; then
  240. MYSQLINCLUDE=""
  241. fi
  242. MYSQLLIBS=`$MYSQLCONFIG --libs`
  243. MYSQLCFLAGS=`$MYSQLCONFIG --cflags`
  244. AC_SUBST(MYSQLINCLUDE)
  245. AC_SUBST(MYSQLLIBS)
  246. AC_SUBST(MYSQLCFLAGS)
  247. fi
  248. fi
  249. AC_CHECK_HEADERS(unistd.h)
  250. dnl Check for AF_INET6 support - unistd.h required for Darwin
  251. AC_CACHE_CHECK([for IPv6 support], with_ipv6, [
  252. AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H
  253. #include <unistd.h>
  254. #endif
  255. #include <netinet/in.h>
  256. #include <sys/socket.h>],
  257. [struct sockaddr_in6 sin6;
  258. void *p;
  259. sin6.sin6_family = AF_INET6;
  260. sin6.sin6_port = 587;
  261. p = &sin6.sin6_addr;],
  262. [with_ipv6=yes],
  263. [with_ipv6=no])
  264. ])
  265. if test x"$with_ipv6" != xno ; then
  266. AC_DEFINE(USE_IPV6,1,[Enable IPv6 support])
  267. fi
  268. dnl #########################################################################
  269. dnl Check if Posix getaddrinfo() is available. It is also possible to use
  270. dnl the version from the lwres library distributed with BIND.
  271. dnl #########################################################################
  272. AC_ARG_ENABLE([emulate-getaddrinfo],
  273. ACX_HELP_STRING([--enable-emulate-getaddrinfo],
  274. [enable getaddrinfo emulation (default=no)]),
  275. ,
  276. enable_emulate_getaddrinfo=no)
  277. AC_ARG_WITH(lwres,
  278. ACX_HELP_STRING([--with-lwres=DIR],
  279. [use lwres library for getaddrinfo (default=no)]),
  280. ,
  281. with_lwres=no)
  282. dnl ## enable force to test getaddrinfo.c
  283. if test x$enable_emulate_getaddrinfo = xforce ; then
  284. enable_emulate_getaddrinfo=yes
  285. have_getaddrinfo=no
  286. else
  287. have_getaddrinfo=no
  288. if test x$with_lwres != xno ; then
  289. if test "$with_lwres" != yes ; then
  290. CPPFLAGS="-I${with_lwres}/include $CPPFLAGS"
  291. LDFLAGS="-L${with_lwres}/lib $LDFLAGS"
  292. fi
  293. AC_CHECK_HEADERS(lwres/netdb.h, ,
  294. [AC_MSG_ERROR([cannot find <lwres/netdb.h>])])
  295. AC_CHECK_LIB(lwres, lwres_getaddrinfo, ,
  296. [AC_MSG_ERROR([cannot find the lwres library])],
  297. -lnsl -lpthread)
  298. have_getaddrinfo=yes
  299. fi
  300. if test x$have_getaddrinfo != xyes ; then
  301. AC_SEARCH_LIBS(getaddrinfo, socket resolv bind nsl c_r cr, have_getaddrinfo=yes)
  302. fi
  303. dnl # Special nonsense for systems that actually have getaddrinfo but
  304. dnl # redefine the name to something else, e.g. OSF
  305. if test x$have_getaddrinfo != xyes ; then
  306. AC_MSG_CHECKING(if getaddrinfo is redefined in netdb.h)
  307. AC_TRY_LINK([
  308. # include <netdb.h>
  309. ], [
  310. struct addrinfo hints, *res;
  311. int err;
  312. err = getaddrinfo ("host", "service", &hints, &res);
  313. ], [
  314. have_getaddrinfo=yes
  315. AC_MSG_RESULT(yes)
  316. ], [AC_MSG_RESULT(no)])
  317. fi
  318. fi
  319. if test x$have_getaddrinfo != xno ; then
  320. if test x$enable_emulate_getaddrinfo != xno ; then
  321. AC_MSG_ERROR([getaddrinfo found but emulate-getaddrinfo was enabled])
  322. fi
  323. AC_DEFINE(HAVE_GETADDRINFO, 1,
  324. [Does system provide RFC 2553/Posix getaddrinfo?])
  325. else
  326. if test x$enable_emulate_getaddrinfo != xyes ; then
  327. dnl AC_MSG_ERROR([getaddrinfo not found: try --with-lwres or --enable-emulate-getaddrinfo])
  328. enable_emulate_getaddrinfo=yes
  329. AC_MSG_WARN([enabling getaddrinfo emulation])
  330. fi
  331. EXTRA_NETOBJS="$EXTRA_NETOBJS getaddrinfo.o"
  332. fi
  333. if test x"$enable_emulate_getaddrinfo" != xno ; then
  334. have_resolver=no
  335. dnl Try for getipnodebyname
  336. AC_SEARCH_LIBS(getipnodebyname, resolv bind nsl c_r cr, have_resolver=yes)
  337. if test x"$have_resolver" != xno ; then
  338. AC_DEFINE(HAVE_GETIPNODEBYNAME, 1,
  339. [Set when getipnodebyname is available])
  340. fi
  341. dnl Try for gethostbyname_r
  342. if test x"$have_resolver" = xno ; then
  343. AC_SEARCH_LIBS(gethostbyname_r, resolv bind nsl c_r cr,
  344. [have_resolver=yes
  345. ACX_WHICH_GETHOSTBYNAME_R])
  346. fi
  347. dnl Try for gethostbyname
  348. if test x"$have_resolver" = xno ; then
  349. if test x"$enable_pthreads" != xno ; then
  350. AC_MSG_WARN([using threads but cannot find gethostbyname_r or getipnodebyname])
  351. fi
  352. AC_SEARCH_LIBS(gethostbyname, resolv bind nsl, ,
  353. [AC_MSG_ERROR([cannot find gethostbyname])])
  354. fi
  355. EXTRA_NETOBJS="$EXTRA_NETOBJS gethostbyname.o"
  356. fi
  357. dnl Checks for Kerberos. Must come before openssl checks for Redhat EL 3
  358. AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no)
  359. if test "$FOUNDINCLUDE" = "no"; then
  360. _SAVEDCPPFLAGS="$CPPFLAGS"
  361. CPPFLAGS="$_SAVEDCPPFLAGS -I/usr/kerberos/include"
  362. unset ac_cv_header_krb5_h
  363. AC_CHECK_HEADERS(krb5.h,
  364. KRB5INCLUDE="-I/usr/kerberos/include"
  365. FOUNDINCLUDE=yes,
  366. FOUNDINCLUDE=no)
  367. fi
  368. AC_SUBST(KRBINCLUDE)
  369. if test "$FOUNDINCLUDE" = "no"; then
  370. CPPFLAGS="$_SAVEDCPPFLAGS"
  371. fi
  372. dnl openssl detection/configuration
  373. if ! test x"$with_openssl" = x"no"; then
  374. dnl Check for OpenSSL location if it wasn't already specified
  375. if ! test -d "$with_openssl"; then
  376. for d in $OPENSSL_DIRS; do
  377. if test -x ${d}/bin/openssl || test -x ${d}/sbin/openssl ; then
  378. with_openssl=$d
  379. fi
  380. done
  381. fi
  382. _SAVEDCPPFLAGS="$CPPFLAGS"
  383. _SAVEDLDFLAGS="$LDFLAGS"
  384. dnl Check for OpenSSL header files
  385. unset FOUNDINCLUDE
  386. if test x"$with_openssl" != x"/usr" ; then
  387. CPPFLAGS="$CPPFLAGS -I$with_openssl/include"
  388. LDFLAGS="$LDFLAGS -L$with_openssl/lib"
  389. fi
  390. dnl check for openssl in $dir/include/openssl
  391. AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.h,
  392. SSLINCLUDE="-I$with_openssl/include"
  393. FOUNDINCLUDE=yes,
  394. FOUNDINCLUDE=no)
  395. dnl else check to see if $dir/include has it
  396. if test "$FOUNDINCLUDE" = "no"; then
  397. AC_CHECK_HEADERS(ssl.h x509.h rsa.h pem.h crypto.h err.h,
  398. SSLINCLUDE="-I$with_openssl/include"
  399. FOUNDINCLUDE=yes,
  400. FOUNDINCLUDE=no)
  401. fi
  402. AC_SUBST(SSLINCLUDE)
  403. dnl if we didn't find it, reset CPPFLAGS
  404. if test "$FOUNDINCLUDE" = "no"; then
  405. CPPFLAGS="$_SAVEDCPPFLAGS"
  406. LDFLAGS="$_SAVEDLDFLAGS"
  407. fi
  408. dnl Check for crypto lib
  409. _SAVEDLIBS="$LIBS"
  410. LIBS="-L${with_openssl}/lib"
  411. AC_CHECK_LIB(crypto,CRYPTO_lock)
  412. if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then
  413. dnl Check for SSL lib
  414. AC_CHECK_LIB(ssl,main, SSLLIBS="-lssl -lcrypto",,-lcrypto)
  415. fi
  416. LIBS="$_SAVEDLIBS"
  417. dnl test headers and libs to decide whether check_http should use SSL
  418. if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then
  419. if test "$ac_cv_lib_ssl_main" = "yes"; then
  420. if test "$FOUNDINCLUDE" = "yes"; then
  421. FOUNDOPENSSL="yes"
  422. fi
  423. fi
  424. fi
  425. fi
  426. dnl check for gnutls if openssl isn't found (or is disabled)
  427. if test ! "$FOUNDOPENSSL" = "yes" && test ! "$with_gnutls" = "no"; then
  428. if test ! "$with_gnutls" = ""; then
  429. CPPFLAGS="$CPPFLAGS -I${with_gnutls}/include"
  430. elif test ! "$LIBGNUTLS_CONFIG" = ""; then
  431. CPPFLAGS="$CPPFLAGS -I`$LIBGNUTLS_CONFIG --prefix`"
  432. fi
  433. AC_CHECK_HEADERS([gnutls/openssl.h],FOUNDGNUTLS="yes",)
  434. if test "$FOUNDGNUTLS" = "yes"; then
  435. AC_CHECK_LIB(gnutls-openssl,main,SSLLIBS="-lgnutls-openssl")
  436. fi
  437. fi
  438. dnl end check for gnutls
  439. if test "$FOUNDOPENSSL" = "yes" || test "$FOUNDGNUTLS" = "yes"; then
  440. check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp"
  441. AC_SUBST(check_tcp_ssl)
  442. AC_SUBST(SSLLIBS)
  443. AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found])
  444. if test "$FOUNDOPENSSL" = "yes"; then
  445. AC_DEFINE(USE_OPENSSL,1,[Define if using OpenSSL libraries])
  446. with_openssl="yes"
  447. with_gnutls="no"
  448. else
  449. AC_DEFINE(USE_GNUTLS,1,[Define if using gnutls libraries])
  450. with_gnutls="yes"
  451. with_openssl="no"
  452. fi
  453. else
  454. dnl else deliberately disabled or no ssl support available
  455. AC_MSG_WARN([OpenSSL or GnuTLS libs could not be found or were disabled])
  456. with_openssl="no"
  457. with_gnutls="no"
  458. fi
  459. dnl
  460. dnl Checks for header files.
  461. dnl
  462. AC_HEADER_STDC
  463. AC_HEADER_TIME
  464. AC_HEADER_SYS_WAIT
  465. AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h sys/un.h sys/poll.h)
  466. AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h)
  467. dnl Checks for typedefs, structures, and compiler characteristics.
  468. AC_C_CONST
  469. AC_STRUCT_TM
  470. AC_TYPE_PID_T
  471. AC_TYPE_SIZE_T
  472. AC_TYPE_SIGNAL
  473. AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[
  474. AC_TRY_LINK([#include <stdarg.h>
  475. va_list ap1,ap2;], [va_copy(ap1,ap2);],
  476. ac_cv_HAVE_VA_COPY=yes,
  477. ac_cv_HAVE_VA_COPY=no)])
  478. if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then
  479. AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
  480. else
  481. AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE___VA_COPY,[
  482. AC_TRY_LINK([#include <stdarg.h>
  483. va_list ap1,ap2;], [__va_copy(ap1,ap2);],
  484. ac_cv_HAVE___VA_COPY=yes,
  485. ac_cv_HAVE___VA_COPY=no)])
  486. if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then
  487. AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
  488. fi
  489. fi
  490. AC_CHECK_FUNCS(vsnprintf snprintf asprintf vasprintf)
  491. AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[
  492. AC_TRY_RUN([
  493. #include <sys/types.h>
  494. #include <stdarg.h>
  495. void foo(const char *format, ...) {
  496. va_list ap;
  497. int len;
  498. char buf[5];
  499. va_start(ap, format);
  500. len = vsnprintf(buf, 0, format, ap);
  501. va_end(ap);
  502. if (len != 5) exit(1);
  503. va_start(ap, format);
  504. len = vsnprintf(0, 0, format, ap);
  505. va_end(ap);
  506. if (len != 5) exit(1);
  507. if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
  508. exit(0);
  509. }
  510. main() { foo("hello"); }
  511. ],
  512. ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)])
  513. if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
  514. AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf])
  515. fi
  516. AC_TRY_COMPILE([#include <sys/time.h>],
  517. [struct timeval *tv;
  518. struct timezone *tz;],
  519. AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
  520. AC_TRY_COMPILE([#include <sys/time.h>],
  521. [struct timeval *tv;
  522. struct timezone *tz;
  523. gettimeofday(tv, tz);],
  524. AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
  525. AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed])))
  526. dnl Checks for library functions.
  527. AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul floor)
  528. AC_CHECK_FUNCS(basename poll)
  529. AC_MSG_CHECKING(return type of socket size)
  530. AC_TRY_COMPILE([#include <stdlib.h>
  531. #include <sys/types.h>
  532. #include <sys/socket.h>],
  533. [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);],
  534. ac_cv_socket_size_type=["size_t"]
  535. AC_MSG_RESULT(size_t),
  536. ac_cv_socket_size_type=["int"]
  537. AC_MSG_RESULT(int))
  538. AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type ,
  539. [Define type of socket size])
  540. AC_ARG_WITH(proc-loadavg,
  541. ACX_HELP_STRING([--with-proc-loadavg=PATH],
  542. [path to /proc/loadavg or equivalent]),
  543. ac_cv_proc_loadavg=$withval)
  544. AC_MSG_CHECKING([for /proc/loadavg])
  545. if test -n "$ac_cv_proc_loadavg"; then
  546. AC_MSG_RESULT([(command line) $ac_cv_proc_loadavg])
  547. elif test -f "/proc/loadavg"; then
  548. AC_MSG_RESULT([found /proc/loadavg])
  549. ac_cv_proc_loadavg="/proc/loadavg"
  550. else
  551. AC_MSG_RESULT([no])
  552. fi
  553. if test -n "$ac_cv_proc_loadavg"; then
  554. AC_DEFINE(HAVE_PROC_LOADAVG,1,[Define if /proc/loadavg or similar exists])
  555. AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg",[Location of /proc/loadavg])
  556. fi
  557. dnl #### Process table test
  558. AC_PATH_PROG(PATH_TO_PS,ps)
  559. AC_MSG_CHECKING(for ps syntax)
  560. AC_ARG_WITH(ps_command,
  561. ACX_HELP_STRING([--with-ps-command=PATH],
  562. [Verbatim command to execute for ps]),
  563. PS_COMMAND=$withval)
  564. AC_ARG_WITH(ps_format,
  565. ACX_HELP_STRING([--with-ps-format=FORMAT],
  566. [Format string for scanning ps output]),
  567. PS_FORMAT=$withval)
  568. AC_ARG_WITH(ps_cols,
  569. ACX_HELP_STRING([--with-ps-cols=NUM],
  570. [Number of columns in ps command]),
  571. PS_COLS=$withval)
  572. AC_ARG_WITH(ps_varlist,
  573. ACX_HELP_STRING([--with-ps-varlist=LIST],
  574. [Variable list for sscanf of 'ps' output]),
  575. PS_VARLIST=$withval)
  576. if test -n "$PS_COMMAND" && test -n "$PS_FORMAT" && test -n "$PS_COLS" && test -n "$PS_VARLIST"; then
  577. ac_cv_ps_command="$PS_COMMAND"
  578. ac_cv_ps_format="$PS_FORMAT"
  579. ac_cv_ps_varlist="$PS_VARLIST"
  580. ac_cv_ps_cols="$PS_COLS"
  581. AC_MSG_RESULT([(command-line) $ac_cv_ps_command])
  582. dnl Now using the pst3/kmem hack for solaris systems to avoid truncation
  583. elif test "$ac_cv_uname_s" = "SunOS"; then
  584. #
  585. # this is a very, very ugly hack, to hardcode the location for plugins
  586. #
  587. if test "$libexecdir" = '${exec_prefix}/libexec'; then
  588. if test "$exec_prefix" = "NONE"; then
  589. if test "$prefix" = "NONE"; then
  590. pst3="$ac_default_prefix/libexec/pst3"
  591. else
  592. pst3="$prefix/libexec/pst3"
  593. fi
  594. else
  595. pst3="$exec_prefix/libexec/pst3"
  596. fi
  597. else
  598. pst3="$libexecdir/pst3"
  599. fi
  600. ac_cv_ps_command="$pst3"
  601. ac_cv_ps_format="%s %d %d %d %d %f %s %n"
  602. ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  603. ac_cv_ps_cols=8
  604. AC_MSG_RESULT([using nagios-plugins internal ps for solaris])
  605. EXTRAS_ROOT="$EXTRAS_ROOT pst3"
  606. dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo.
  607. dnl so test for this first...
  608. elif ps axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
  609. egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
  610. then
  611. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  612. ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'"
  613. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  614. ac_cv_ps_cols=9
  615. AC_MSG_RESULT([$ac_cv_ps_command])
  616. dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo
  617. dnl Should also work for FreeBSD 5.2.1 and 5.3
  618. dnl STAT UCOMM VSZ RSS USER PPID COMMAND
  619. elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
  620. egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
  621. then
  622. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  623. ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'"
  624. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  625. ac_cv_ps_cols=9
  626. AC_MSG_RESULT([$ac_cv_ps_command])
  627. dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4.
  628. dnl Limitation: Only first 16 chars returned for ucomm field
  629. dnl Must come before ps -weo
  630. elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \
  631. egrep -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null
  632. then
  633. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  634. ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'"
  635. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  636. ac_cv_ps_cols=9
  637. AC_MSG_RESULT([$ac_cv_ps_command])
  638. dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
  639. elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \
  640. egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null
  641. then
  642. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]"
  643. ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'"
  644. ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n"
  645. ac_cv_ps_cols=10
  646. AC_MSG_RESULT([$ac_cv_ps_command])
  647. dnl FreeBSD
  648. elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \
  649. egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null
  650. then
  651. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  652. ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'"
  653. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  654. ac_cv_ps_cols=9
  655. AC_MSG_RESULT([$ac_cv_ps_command])
  656. dnl BSD-like mode in RH 6.1
  657. elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \
  658. egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
  659. then
  660. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  661. ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'"
  662. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  663. ac_cv_ps_cols=9
  664. AC_MSG_RESULT([$ac_cv_ps_command])
  665. dnl SunOS 4.1.3:
  666. dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
  667. dnl Need the head -1 otherwise test will work because arguments are found
  668. elif ps -laxnwww 2>/dev/null | head -1 | \
  669. egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null
  670. then
  671. ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
  672. ac_cv_ps_command="$PATH_TO_PS -laxnwww"
  673. ac_cv_ps_format="%*s %d %d %d %*s %*s %*s %d %d %*s %s %*s %*s %n%s"
  674. ac_cv_ps_cols=9
  675. AC_MSG_RESULT([$ac_cv_ps_command])
  676. dnl Debian Linux / procps v1.2.9:
  677. dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
  678. dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2]
  679. dnl
  680. elif ps laxnwww 2>/dev/null | \
  681. egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null
  682. then
  683. ac_cv_ps_varlist="[&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]"
  684. ac_cv_ps_command="$PATH_TO_PS laxnwww"
  685. ac_cv_ps_format="%*s %d %d %d %*s %*s %d %d %*s %s %*s %*s %n%s"
  686. ac_cv_ps_cols=9
  687. AC_MSG_RESULT([$ac_cv_ps_command])
  688. dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
  689. elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
  690. egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
  691. then
  692. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  693. ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'"
  694. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  695. ac_cv_ps_cols=9
  696. AC_MSG_RESULT([$ac_cv_ps_command])
  697. dnl Tru64 - needs %*[ +<>] in PS_FORMAT.
  698. dnl Has /usr/bin/ps and /sbin/ps - force sbin version
  699. dnl Can't use vsize and rssize because comes back with text (eg, 1.5M instead
  700. dnl of 1500). Will need big changes to check_procs to support
  701. elif /sbin/ps -eo 'stat uid pid ppid pcpu etime comm args' 2>/dev/null | \
  702. egrep -i ["^ *S +[UID]+ +[PID]+ +[PID]+ +[%CPU]+ +[ELAPSD]+ +[COMMAND]+ +[COMMAND]+"] > /dev/null
  703. then
  704. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procpcpu,procetime,procprog,&pos]"
  705. ac_cv_ps_command="/sbin/ps -eo 'stat uid pid ppid pcpu etime comm args'"
  706. ac_cv_ps_format=["%s%*[ +<>] %d %d %d %f %s %s %n"]
  707. ac_cv_ps_cols=8
  708. AC_MSG_RESULT([$ac_cv_ps_command])
  709. elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \
  710. egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
  711. then
  712. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  713. ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'"
  714. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  715. ac_cv_ps_cols=9
  716. AC_MSG_RESULT([$ac_cv_ps_command])
  717. dnl AIX 4.3.3 and 5.1 do not have an rss field
  718. elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \
  719. egrep -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
  720. then
  721. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]"
  722. ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'"
  723. ac_cv_ps_format="%s %d %d %d %d %f %s %n"
  724. ac_cv_ps_cols=8
  725. AC_MSG_RESULT([$ac_cv_ps_command - with no RSS])
  726. dnl Solaris 2.6
  727. elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \
  728. egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
  729. then
  730. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  731. ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'"
  732. # There must be no space between the %s and %n due to a wierd problem in sscanf where
  733. # it will return %n as longer than the line length
  734. ac_cv_ps_format="%s %d %d %d %d %d %f %s%n"
  735. ac_cv_ps_cols=9
  736. AC_MSG_RESULT([$ac_cv_ps_command])
  737. elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \
  738. egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
  739. then
  740. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  741. ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'"
  742. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  743. ac_cv_ps_cols=9
  744. AC_MSG_RESULT([$ac_cv_ps_command])
  745. elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \
  746. egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
  747. then
  748. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  749. ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'"
  750. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  751. ac_cv_ps_cols=9
  752. AC_MSG_RESULT([$ac_cv_ps_command])
  753. dnl wonder who takes state instead of stat
  754. elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \
  755. egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
  756. then
  757. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  758. ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'"
  759. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  760. ac_cv_ps_cols=8
  761. AC_MSG_RESULT([$ac_cv_ps_command])
  762. dnl IRIX 53
  763. elif ps -el 2>/dev/null | \
  764. egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
  765. then
  766. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&pos,procprog]"
  767. ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)"
  768. ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %d %d %*s %*s %*s %n%s"
  769. ac_cv_ps_cols=8
  770. AC_MSG_RESULT([$ac_cv_ps_command])
  771. dnl IRIX 63
  772. elif ps -el 2>/dev/null | \
  773. egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
  774. then
  775. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
  776. ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)"
  777. ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
  778. ac_cv_ps_cols=6
  779. AC_MSG_RESULT([$ac_cv_ps_command])
  780. dnl AIX 4.1:
  781. dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD
  782. dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper
  783. elif ps -el 2>/dev/null | \
  784. egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
  785. then
  786. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
  787. ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)"
  788. ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
  789. ac_cv_ps_cols=6
  790. AC_MSG_RESULT([$ac_cv_ps_command])
  791. dnl AIX?
  792. elif ps glaxen 2>/dev/null | \
  793. egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
  794. then
  795. ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
  796. ac_cv_ps_command="$PATH_TO_PS glaxen"
  797. ac_cv_ps_format="%*s %d %d %d %*s %*s %d %d %*s %s %*s %*s %n%s"
  798. ac_cv_ps_cols=8
  799. AC_MSG_RESULT([$ac_cv_ps_command])
  800. dnl MacOSX / Darwin
  801. dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT
  802. dnl Some truncation will happen in UCOMM column
  803. dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND
  804. dnl Ss 52756 22496 501 1 6.9 Window Manager /System/Library/CoreServices/WindowServer -daemon
  805. elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \
  806. egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null
  807. then
  808. ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'"
  809. ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procpid,&procppid,&procpcpu,procprog,&pos]"
  810. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  811. ac_cv_ps_cols=8
  812. AC_MSG_RESULT([$ac_cv_ps_command])
  813. dnl UnixWare
  814. elif ps -Al 2>/dev/null | \
  815. egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null
  816. then
  817. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
  818. ac_cv_ps_command="$PATH_TO_PS -Al"
  819. ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
  820. ac_cv_ps_cols=8
  821. AC_MSG_RESULT([$ac_cv_ps_command])
  822. else
  823. AC_MSG_WARN([unable to find usable ps syntax - check_procs and check_nagios will not be compiled])
  824. fi
  825. if test -n "$ac_cv_ps_varlist" ; then
  826. AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist,
  827. [Variable list for sscanf of 'ps' output])
  828. AC_DEFINE_UNQUOTED(PS_COMMAND,"$ac_cv_ps_command",
  829. [Verbatim command to execute for ps in check_procs])
  830. AC_DEFINE_UNQUOTED(PS_FORMAT,"$ac_cv_ps_format",
  831. [Format string for scanning ps output in check_procs])
  832. AC_DEFINE_UNQUOTED(PS_COLS,$ac_cv_ps_cols,
  833. [Number of columns in ps command])
  834. EXTRAS="$EXTRAS check_procs check_nagios"
  835. if echo "$ac_cv_ps_varlist" | grep -q "procetime"; then
  836. AC_DEFINE(PS_USES_PROCETIME,"yes",
  837. [Whether the ps utility uses the "procetime" field])
  838. fi
  839. fi
  840. AC_PATH_PROG(PATH_TO_PING,ping)
  841. AC_PATH_PROG(PATH_TO_PING6,ping6)
  842. AC_ARG_WITH(ping_command,
  843. ACX_HELP_STRING([--with-ping-command=SYNTAX],
  844. [sets syntax for ICMP ping]),
  845. with_ping_command=$withval,)
  846. AC_MSG_CHECKING(for ICMP ping syntax)
  847. ac_cv_ping_packets_first=no
  848. ac_cv_ping_has_timeout=no
  849. if test -n "$with_ping_command"
  850. then
  851. AC_MSG_RESULT([(command-line) $with_ping_command])
  852. if test -n "$ac_cv_ping_packets_first"
  853. then
  854. ac_cv_ping_packets_first=yes
  855. ac_cv_ping_has_timeout=yes
  856. fi
  857. elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
  858. $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
  859. egrep -i "^round-trip|^rtt" >/dev/null
  860. then
  861. with_ping_command="$PATH_TO_PING -n -U -c %d %s"
  862. ac_cv_ping_packets_first=yes
  863. AC_MSG_RESULT([$with_ping_command])
  864. elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
  865. egrep -i "^round-trip|^rtt" >/dev/null
  866. then
  867. with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s"
  868. ac_cv_ping_packets_first=yes
  869. ac_cv_ping_has_timeout=yes
  870. AC_MSG_RESULT([$with_ping_command])
  871. elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \
  872. egrep -i "^round-trip|^rtt" >/dev/null
  873. then
  874. with_ping_command="$PATH_TO_PING -n -U -c %d %s"
  875. ac_cv_ping_packets_first=yes
  876. AC_MSG_RESULT([$with_ping_command])
  877. elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
  878. egrep -i "^round-trip|^rtt" >/dev/null
  879. then
  880. with_ping_command="$PATH_TO_PING -n -c %d %s"
  881. ac_cv_ping_packets_first=yes
  882. AC_MSG_RESULT([$with_ping_command])
  883. elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \
  884. egrep -i "^round-trip|^rtt" >/dev/null
  885. then
  886. with_ping_command="$PATH_TO_PING -n %s -c %d"
  887. AC_MSG_RESULT([$with_ping_command])
  888. elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \
  889. egrep -i "^round-trip|^rtt" >/dev/null
  890. then
  891. with_ping_command="$PATH_TO_PING %s -n %d"
  892. AC_MSG_RESULT([$with_ping_command])
  893. elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
  894. egrep -i "^round-trip|^rtt" >/dev/null
  895. then
  896. with_ping_command="$PATH_TO_PING -n -s %s 56 %d"
  897. AC_MSG_RESULT([$with_ping_command])
  898. elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \
  899. egrep -i "^round-trip|^rtt" >/dev/null
  900. then
  901. with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d"
  902. AC_MSG_RESULT([$with_ping_command])
  903. elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \
  904. egrep -i "^round-trip|^rtt" >/dev/null
  905. then
  906. with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s"
  907. ac_cv_ping_packets_first=yes
  908. AC_MSG_RESULT([$with_ping_command])
  909. elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
  910. egrep -i "^round-trip|^rtt" >/dev/null
  911. then
  912. with_ping_command="$PATH_TO_PING -n -c %d %s"
  913. ac_cv_ping_packets_first=yes
  914. AC_MSG_RESULT([$with_ping_command])
  915. else
  916. AC_MSG_WARN([unable to find usable ping syntax])
  917. fi
  918. AC_DEFINE_UNQUOTED(PING_COMMAND,"$with_ping_command",
  919. [path and args for ICMP ping command])
  920. if test "x$ac_cv_ping_packets_first" != "xno"
  921. then
  922. AC_DEFINE(PING_PACKETS_FIRST,1,
  923. [Define if packet count must precede host])
  924. fi
  925. if test "x$ac_cv_ping_has_timeout" != "xno"
  926. then
  927. AC_DEFINE(PING_HAS_TIMEOUT,1,
  928. [Define if ping has its own timeout option that should be set])
  929. fi
  930. AC_ARG_WITH(ping6_command,
  931. ACX_HELP_STRING([--with-ping6-command=SYNTAX],
  932. [sets syntax for ICMPv6 ping]),
  933. with_ping6_command=$withval,)
  934. if test x"$with_ipv6" != xno ; then
  935. AC_MSG_CHECKING(for ICMPv6 ping syntax)
  936. ac_cv_ping6_packets_first=no
  937. if test -n "$with_ping6_command"
  938. then
  939. AC_MSG_RESULT([(command-line) $with_ping6_command])
  940. if test -n "$ac_cv_ping6_packets_first"
  941. then
  942. ac_cv_ping6_packets_first=yes
  943. fi
  944. elif test "x$PATH_TO_PING6" != "x"; then
  945. if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
  946. $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
  947. egrep -i "^round-trip|^rtt" >/dev/null
  948. then
  949. with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
  950. ac_cv_ping6_packets_first=yes
  951. AC_MSG_RESULT([$with_ping6_command])
  952. elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \
  953. egrep -i "^round-trip|^rtt" >/dev/null
  954. then
  955. with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s"
  956. ac_cv_ping6_packets_first=yes
  957. ac_cv_ping_has_timeout=yes
  958. AC_MSG_RESULT([$with_ping6_command])
  959. elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \
  960. egrep -i "^round-trip|^rtt" >/dev/null
  961. then
  962. with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
  963. ac_cv_ping6_packets_first=yes
  964. AC_MSG_RESULT([$with_ping6_command])
  965. elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
  966. egrep -i "^round-trip|^rtt" >/dev/null
  967. then
  968. with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
  969. ac_cv_ping6_packets_first=yes
  970. AC_MSG_RESULT([$with_ping6_command])
  971. elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \
  972. egrep -i "^round-trip|^rtt" >/dev/null
  973. then
  974. with_ping6_command="$PATH_TO_PING6 -n %s -c %d"
  975. AC_MSG_RESULT([$with_ping6_command])
  976. elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \
  977. egrep -i "^round-trip|^rtt" >/dev/null
  978. then
  979. with_ping6_command="$PATH_TO_PING6 %s -n %d"
  980. AC_MSG_RESULT([$with_ping6_command])
  981. elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
  982. egrep -i "^round-trip|^rtt" >/dev/null
  983. then
  984. with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d"
  985. AC_MSG_RESULT([$with_ping6_command])
  986. elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
  987. egrep -i "^round-trip|^rtt" >/dev/null
  988. then
  989. with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d"
  990. AC_MSG_RESULT([$with_ping6_command])
  991. elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \
  992. egrep -i "^round-trip|^rtt" >/dev/null
  993. then
  994. with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s"
  995. ac_cv_ping6_packets_first=yes
  996. AC_MSG_RESULT([$with_ping_command])
  997. elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
  998. egrep -i "^round-trip|^rtt" >/dev/null
  999. then
  1000. with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
  1001. ac_cv_ping6_packets_first=yes
  1002. AC_MSG_RESULT([$with_ping6_command])
  1003. fi
  1004. elif test "x$PATH_TO_PING" != "x"; then
  1005. if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
  1006. $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
  1007. egrep -i "^round-trip|^rtt" >/dev/null
  1008. then
  1009. with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
  1010. ac_cv_ping6_packets_first=yes
  1011. AC_MSG_RESULT([$with_ping6_command])
  1012. elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \
  1013. egrep -i "^round-trip|^rtt" >/dev/null
  1014. then
  1015. with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
  1016. ac_cv_ping6_packets_first=yes
  1017. AC_MSG_RESULT([$with_ping6_command])
  1018. elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
  1019. egrep -i "^round-trip|^rtt" >/dev/null
  1020. then
  1021. with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
  1022. ac_cv_ping6_packets_first=yes
  1023. AC_MSG_RESULT([$with_ping6_command])
  1024. elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \
  1025. egrep -i "^round-trip|^rtt" >/dev/null
  1026. then
  1027. with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d"
  1028. AC_MSG_RESULT([$with_ping6_command])
  1029. elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \
  1030. egrep -i "^round-trip|^rtt" >/dev/null
  1031. then
  1032. with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d"
  1033. AC_MSG_RESULT([$with_ping6_command])
  1034. elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
  1035. egrep -i "^round-trip|^rtt" >/dev/null
  1036. then
  1037. with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d"
  1038. AC_MSG_RESULT([$with_ping6_command])
  1039. elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
  1040. egrep -i "^round-trip|^rtt" >/dev/null
  1041. then
  1042. with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d"
  1043. AC_MSG_RESULT([$with_ping6_command])
  1044. elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \
  1045. egrep -i "^round-trip|^rtt" >/dev/null
  1046. then
  1047. with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s"
  1048. ac_cv_ping6_packets_first=yes
  1049. AC_MSG_RESULT([$with_ping_command])
  1050. elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
  1051. egrep -i "^round-trip|^rtt" >/dev/null
  1052. then
  1053. with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
  1054. ac_cv_ping6_packets_first=yes
  1055. AC_MSG_RESULT([$with_ping6_command])
  1056. fi
  1057. fi
  1058. if test "x$with_ping6_command" != "x"; then
  1059. AC_DEFINE_UNQUOTED(PING6_COMMAND,"$with_ping6_command",
  1060. [path and args for ICMPv6 ping command])
  1061. else
  1062. AC_MSG_RESULT([none])
  1063. fi
  1064. if test "x$ac_cv_ping6_packets_first" != "xno"; then
  1065. AC_DEFINE(PING6_PACKETS_FIRST,1,
  1066. [Define if packet count must precede host])
  1067. fi
  1068. fi
  1069. AC_ARG_WITH(nslookup_command,
  1070. ACX_HELP_STRING([--with-nslookup-command=PATH],
  1071. [sets path to nslookup executable]),
  1072. ac_cv_nslookup_command=$withval)
  1073. if test -n "$ac_cv_nslookup_command"; then
  1074. AC_MSG_NOTICE([Using specific nslookup at $ac_cv_nslookup_command])
  1075. else
  1076. AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)
  1077. if test -n "$PATH_TO_NSLOOKUP"
  1078. then
  1079. AC_MSG_CHECKING(for nslookup syntax)
  1080. if $PATH_TO_NSLOOKUP -sil 127.0.0.1 2>&1 | grep ["Invalid option: sil"] >/dev/null
  1081. then
  1082. ac_cv_nslookup_command="$PATH_TO_NSLOOKUP"
  1083. AC_MSG_RESULT([$ac_cv_nslookup_command])
  1084. else
  1085. ac_cv_nslookup_command="$PATH_TO_NSLOOKUP -sil"
  1086. AC_MSG_RESULT([$ac_cv_nslookup_command])
  1087. fi
  1088. else
  1089. AC_MSG_WARN([nslookup command not found])
  1090. fi
  1091. fi
  1092. if test -n "$ac_cv_nslookup_command"; then
  1093. EXTRAS="$EXTRAS check_dns"
  1094. AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command", [path and args for nslookup])
  1095. fi
  1096. AC_PATH_PROG(PATH_TO_UPTIME,uptime)
  1097. AC_ARG_WITH(uptime_command,
  1098. ACX_HELP_STRING([--with-uptime-command=PATH],
  1099. [sets path to uptime]), PATH_TO_UPTIME=$withval)
  1100. AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary])
  1101. AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo)
  1102. AC_ARG_WITH(rpcinfo_command,
  1103. ACX_HELP_STRING([--with-rpcinfo-command=PATH],
  1104. [sets path to rpcinfo]), PATH_TO_RPCINFO=$withval)
  1105. AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary])
  1106. AC_PATH_PROG(PATH_TO_LMSTAT,lmstat)
  1107. if test -x "$PATH_TO_LMSTAT"
  1108. then
  1109. AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat])
  1110. else
  1111. AC_MSG_WARN([Get lmstat from Globetrotter Software to monitor flexlm licenses])
  1112. fi
  1113. AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient)
  1114. AC_ARG_WITH(smbclient_command,
  1115. ACX_HELP_STRING([--with-smbclient-command=PATH],
  1116. [sets path to smbclient]),
  1117. PATH_TO_SMBCLIENT=$withval)
  1118. if test -n "$PATH_TO_SMBCLIENT"
  1119. then
  1120. AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary])
  1121. else
  1122. AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares])
  1123. fi
  1124. AC_PATH_PROG(PATH_TO_WHO,who)
  1125. if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null]
  1126. then
  1127. ac_cv_path_to_who="$PATH_TO_WHO -q"
  1128. else
  1129. ac_cv_path_to_who="$PATH_TO_WHO"
  1130. fi
  1131. AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who",
  1132. [path and arguments for invoking 'who'])
  1133. AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
  1134. AC_ARG_WITH(snmpget_command,
  1135. ACX_HELP_STRING([--with-snmpget-command=PATH],
  1136. [Path to snmpget command]),
  1137. PATH_TO_SNMPGET=$withval)
  1138. if test -n "$PATH_TO_SNMPGET"
  1139. then
  1140. AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary])
  1141. EXTRAS="$EXTRAS check_hpjd check_snmp"
  1142. else
  1143. AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins])
  1144. fi
  1145. AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
  1146. AC_ARG_WITH(snmpgetnext_command,
  1147. ACX_HELP_STRING([--with-snmpgetnext-command=PATH],
  1148. [Path to snmpgetnext command]),
  1149. PATH_TO_SNMPGETNEXT=$withval)
  1150. if test -n "$PATH_TO_SNMPGETNEXT"
  1151. then
  1152. AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary])
  1153. fi
  1154. if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null )
  1155. then
  1156. AC_MSG_CHECKING(for Net::SNMP perl module)
  1157. AC_MSG_RESULT([found])
  1158. else
  1159. AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins])
  1160. fi
  1161. AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
  1162. AC_PATH_PROG(PATH_TO_QSTAT,qstat)
  1163. AC_ARG_WITH(qstat_command,
  1164. ACX_HELP_STRING([--with-qstat-command=PATH],
  1165. [Path to qstat command]), PATH_TO_QSTAT=$withval)
  1166. if test -x "$PATH_TO_QUAKESTAT"
  1167. then
  1168. ac_cv_path_to_qstat="$PATH_TO_QUAKESTAT"
  1169. EXTRAS="$EXTRAS check_game"
  1170. elif test -n "$PATH_TO_QSTAT"
  1171. then
  1172. ac_cv_path_to_qstat="$PATH_TO_QSTAT"
  1173. EXTRAS="$EXTRAS check_game"
  1174. else
  1175. AC_MSG_WARN([Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin])
  1176. fi
  1177. if test $ac_cv_path_to_qstat
  1178. then
  1179. AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat",
  1180. [path to qstat/quakestat])
  1181. fi
  1182. AC_PATH_PROG(PATH_TO_FPING,fping)
  1183. AC_ARG_WITH(fping_command,
  1184. ACX_HELP_STRING([--with-fping-command=PATH],
  1185. [Path to fping command]), PATH_TO_FPING=$withval)
  1186. if test -n "$PATH_TO_FPING"
  1187. then
  1188. AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping])
  1189. EXTRAS="$EXTRAS check_fping"
  1190. else
  1191. AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin])
  1192. fi
  1193. AC_PATH_PROG(PATH_TO_SSH,ssh)
  1194. AC_ARG_WITH(ssh_command,
  1195. ACX_HELP_STRING([--with-ssh-command=PATH],
  1196. [sets path for ssh]), PATH_TO_SSH=$withval)
  1197. if test -n "$PATH_TO_SSH"
  1198. then
  1199. AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary])
  1200. EXTRAS="$EXTRAS check_by_ssh"
  1201. else
  1202. AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin])
  1203. fi
  1204. AC_PATH_PROG(PATH_TO_MAILQ,mailq)
  1205. AC_ARG_WITH(mailq_command,
  1206. ACX_HELP_STRING([--with-mailq-command=PATH],
  1207. [sets path to mailq]), PATH_TO_MAILQ=$withval)
  1208. if test -n "$PATH_TO_MAILQ"
  1209. then
  1210. AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq])
  1211. else
  1212. AC_MSG_WARN([Could not find mailq or eqivalent])
  1213. fi
  1214. AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat)
  1215. if test -x "$PATH_TO_QMAIL_QSTAT"
  1216. then
  1217. AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat])
  1218. else
  1219. AC_MSG_WARN([Could not find qmail-qstat or eqivalent])
  1220. fi
  1221. dnl SWAP info required is amount allocated/available and amount free
  1222. dnl The plugin works through all the swap devices and adds up the total swap
  1223. dnl available.
  1224. AC_PATH_PROG(PATH_TO_SWAP,swap)
  1225. if (test -n "$PATH_TO_SWAP")
  1226. then
  1227. AC_MSG_CHECKING([for $PATH_TO_SWAP format])
  1228. if [$PATH_TO_SWAP -l 2>&1 >/dev/null]
  1229. then
  1230. ac_cv_have_swap=yes
  1231. ac_cv_swap_command="$PATH_TO_SWAP -l"
  1232. if [$PATH_TO_SWAP -l 2>/dev/null | \
  1233. egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \
  1234. >/dev/null]
  1235. then
  1236. ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %f %f"]
  1237. ac_cv_swap_conv=2048
  1238. AC_MSG_RESULT([using IRIX format swap])
  1239. elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null]
  1240. then
  1241. ac_cv_swap_format=["%*s %*[0-9,-] %*d %f %f"]
  1242. ac_cv_swap_conv=2048
  1243. AC_MSG_RESULT([using Unixware format swap])
  1244. else
  1245. dnl if we don't know what format swap's output is
  1246. dnl we might as well pretend we didn't see it
  1247. ac_cv_have_swap=""
  1248. ac_cv_swap_command=""
  1249. fi
  1250. fi
  1251. dnl end if for PATH_TO_SWAP
  1252. fi
  1253. AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo)
  1254. if (test -n "$PATH_TO_SWAPINFO")
  1255. then
  1256. AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format])
  1257. if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null]
  1258. then
  1259. ac_cv_have_swap=yes
  1260. ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
  1261. if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
  1262. then
  1263. ac_cv_swap_format=["%*s %f %*d %f"]
  1264. ac_cv_swap_conv=1024
  1265. AC_MSG_RESULT([using FreeBSD format swapinfo])
  1266. fi
  1267. elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null]
  1268. then
  1269. ac_cv_have_swap=yes
  1270. ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM",
  1271. ac_cv_swap_format=["%*s %f %*d %f"]
  1272. ac_cv_swap_conv=1024
  1273. AC_MSG_RESULT([using HP-UX format swapinfo])
  1274. fi
  1275. dnl end if for PATH_TO_SWAPINFO
  1276. fi
  1277. AC_PATH_PROG(PATH_TO_LSPS,lsps)
  1278. if (test -n "$PATH_TO_LSPS")
  1279. then
  1280. AC_MSG_CHECKING([for $PATH_TO_LSPS format])
  1281. if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null]
  1282. then
  1283. ac_cv_have_swap=yes
  1284. ac_cv_swap_command="$PATH_TO_LSPS -a"
  1285. ac_cv_swap_format=["%*s %*s %*s %f%*s %f %*s"]
  1286. ac_cv_swap_conv=1
  1287. AC_MSG_RESULT([using AIX lsps])
  1288. fi
  1289. dnl end if for PATH_TO_SWAPINFO
  1290. fi
  1291. dnl
  1292. dnl test for swapctl system call, both the 2-arg and 3-arg variants
  1293. dnl fwict, the 2-arg is an SVR4 standard, whereas the 3-arg is shared
  1294. dnl in the various BSD's
  1295. dnl
  1296. AC_CHECK_HEADERS([sys/stat.h sys/param.h])
  1297. AC_CHECK_HEADERS([sys/swap.h], [], [], [
  1298. #ifdef HAVE_SYS_PARAM_H
  1299. #include <sys/param.h>
  1300. #endif
  1301. ])
  1302. AC_CHECK_DECLS([swapctl],,,[
  1303. #include <unistd.h>
  1304. #include <sys/types.h>
  1305. #include <sys/param.h>
  1306. #include <sys/stat.h>
  1307. #include <sys/swap.h>
  1308. ])
  1309. AC_CHECK_TYPES([swaptbl_t, swapent_t],,,[
  1310. #include <sys/types.h>
  1311. #include <sys/param.h>
  1312. #include <sys/stat.h>
  1313. #include <sys/swap.h>
  1314. ])
  1315. AC_CHECK_MEMBERS([struct swapent.se_nblks],,,[
  1316. #include <unistd.h>
  1317. #include <sys/types.h>
  1318. #include <sys/param.h>
  1319. #include <sys/stat.h>
  1320. #include <sys/swap.h>
  1321. ])
  1322. if test "$ac_cv_have_decl_swapctl" = "yes";
  1323. then
  1324. EXTRAS="$EXTRAS check_swap"
  1325. AC_MSG_CHECKING([for 2-arg (SVR4) swapctl])
  1326. if test "$ac_cv_type_swaptbl_t" = "yes" -a \
  1327. "$ac_cv_type_swapent_t" = "yes";
  1328. then
  1329. AC_MSG_RESULT([yes])
  1330. ac_cv_check_swap_swapctl_svr4="1";
  1331. AC_DEFINE([CHECK_SWAP_SWAPCTL_SVR4],1,
  1332. [Define if 2-argument SVR4 swapctl exists])
  1333. else
  1334. AC_MSG_RESULT([no])
  1335. AC_MSG_CHECKING([for 3-arg (*BSD) swapctl])
  1336. if test "$ac_cv_member_struct_swapent_se_nblks" = "yes";
  1337. then
  1338. AC_MSG_RESULT([yes])
  1339. AC_DEFINE([CHECK_SWAP_SWAPCTL_BSD],1,
  1340. [Define if 3-argument BSD swapctl exists])
  1341. else
  1342. AC_MSG_RESULT([no])
  1343. fi
  1344. fi
  1345. AC_MSG_CHECKING([for whether swapctl uses blocks or pages])
  1346. if test "$ac_cv_check_swap_swapctl_svr4" = "1";
  1347. then
  1348. dnl
  1349. dnl the SVR4 spec returns values in pages
  1350. dnl
  1351. AC_MSG_RESULT([page])
  1352. AC_CHECK_DECLS([sysconf])
  1353. AC_MSG_CHECKING([for system page size])
  1354. if test "$ac_cv_have_decl_sysconf" = "yes";
  1355. then
  1356. AC_MSG_RESULT([determined by sysconf(3)])
  1357. ac_cv_swap_conv="(1048576/sysconf(_SC_PAGESIZE))"
  1358. else
  1359. AC_MSG_WARN([don't know. guessing 4096k])
  1360. ac_cv_swap_conv=256
  1361. fi
  1362. else
  1363. dnl
  1364. dnl the BSD spec returns values in blocks
  1365. dnl
  1366. AC_MSG_RESULT([blocks (assuming 512b)])
  1367. ac_cv_swap_conv=2048
  1368. fi
  1369. AC_DEFINE_UNQUOTED(SWAP_CONVERSION,$ac_cv_swap_conv,
  1370. [Conversion factor to MB])
  1371. fi
  1372. dnl
  1373. dnl end tests for the swapctl system calls
  1374. dnl
  1375. if test "x$ac_cv_have_swap" != "x"
  1376. then
  1377. AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])
  1378. EXTRAS="$EXTRAS check_swap"
  1379. fi
  1380. if test "x$ac_cv_swap_command" != "x"
  1381. then
  1382. AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$ac_cv_swap_command",
  1383. [Path to swap/swapinfo binary, with any args])
  1384. AC_DEFINE_UNQUOTED(SWAP_FORMAT,"$ac_cv_swap_format",
  1385. [Format string for parsing swap output])
  1386. AC_DEFINE_UNQUOTED(SWAP_CONVERSION,$ac_cv_swap_conv,
  1387. [Conversion factor to MB])
  1388. fi
  1389. AC_ARG_WITH(proc-meminfo,
  1390. ACX_HELP_STRING([--with-proc-meminfo=PATH],
  1391. [path to /proc/meminfo or equivalent]),
  1392. ac_cv_proc_meminfo=$withval)
  1393. dnl dunno why this does not work below - use hack (kbd)
  1394. dnl fine on linux, broken on solaris
  1395. dnl if /bin/test -e "/proc/meminfo"
  1396. AC_MSG_CHECKING([for /proc/meminfo])
  1397. if test -n "$ac_cv_proc_meminfo"; then
  1398. AC_MSG_RESULT([(command line) $ac_cv_proc_meminfo])
  1399. elif [cat /proc/meminfo > /dev/null 2>&1]; then
  1400. AC_MSG_RESULT([found /proc/meminfo])
  1401. ac_cv_proc_meminfo="/proc/meminfo"
  1402. else
  1403. AC_MSG_RESULT([no])
  1404. fi
  1405. if test -n "$ac_cv_proc_meminfo"; then
  1406. AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo])
  1407. AC_DEFINE_UNQUOTED(PROC_MEMINFO,"$ac_cv_proc_meminfo",[path to /proc/meminfo if name changes])
  1408. EXTRAS="$EXTRAS check_swap"
  1409. fi
  1410. AC_PATH_PROG(PATH_TO_DIG,dig)
  1411. AC_ARG_WITH(dig_command,
  1412. ACX_HELP_STRING([--with-dig-command=PATH],
  1413. [Path to dig command]), PATH_TO_DIG=$withval)
  1414. if test -n "$PATH_TO_DIG"; then
  1415. EXTRAS="$EXTRAS check_dig"
  1416. AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present])
  1417. fi
  1418. AC_PATH_PROG(PATH_TO_APTGET,apt-get)
  1419. AC_ARG_WITH(apt-get_command,
  1420. ACX_HELP_STRING([--with-apt-get-command=PATH],
  1421. [Path to apt-get command]),
  1422. with_apt_get_command=$withval,
  1423. with_apt_get_command=$PATH_TO_APTGET)
  1424. AC_DEFINE_UNQUOTED(PATH_TO_APTGET,"$PATH_TO_APTGET",[Path to apt-get command, if present])
  1425. if test -n "$PATH_TO_APTGET" ; then
  1426. EXTRAS="$EXTRAS check_apt"
  1427. fi
  1428. if test -f plugins/check_nt.c ; then
  1429. EXTRAS="$EXTRAS check_nt"
  1430. elif test -f ../plugins/check_nt.c ; then
  1431. EXTRAS="$EXTRAS check_nt"
  1432. fi
  1433. AC_MSG_CHECKING(for va_list)
  1434. AC_TRY_COMPILE([#ifdef __STDC__
  1435. #include <stdio.h>
  1436. #include <stdlib.h>
  1437. #include <stdarg.h>
  1438. #else
  1439. #include <sys/types.h>
  1440. #include <stdio.h>
  1441. #include <varargs.h>
  1442. #endif],
  1443. [va_list args;],
  1444. [AC_MSG_RESULT(yes)],
  1445. [NEED_VA_LIST=-DNEED_VA_LIST AC_SUBST(NEED_VA_LIST) AC_MSG_RESULT(no)])
  1446. case $host in
  1447. *bsd*)
  1448. AC_DEFINE(__bsd__,1,[bsd specific code in check_dhcp.c])
  1449. ;;
  1450. *linux*)
  1451. AC_DEFINE(__linux__,1,[sun specific code in check_dhcp.c])
  1452. ;;
  1453. *sun* | solaris*)
  1454. AC_DEFINE(__sun__,1,[sun specific code in check_dhcp.c])
  1455. ;;
  1456. *hpux*)
  1457. AC_DEFINE(__hpux__,1,[hpux specific code in check_dhcp.c])
  1458. ;;
  1459. esac
  1460. AC_SUBST(EXTRAS)
  1461. AC_SUBST(EXTRAS_ROOT)
  1462. AC_SUBST(EXTRA_NETOBJS)
  1463. AC_SUBST(DEPLIBS)
  1464. AM_GNU_GETTEXT([external], [need-ngettext])
  1465. AM_GNU_GETTEXT_VERSION(0.13.1)
  1466. dnl Check for Redhat spopen problem
  1467. dnl Wierd problem where ECHILD is returned from a wait call in error
  1468. dnl Only appears to affect nslookup and dig calls. Only affects redhat around
  1469. dnl 2.6.9-11 (okay in 2.6.9-5). Redhat investigating root cause
  1470. dnl We patch plugins/popen.c
  1471. dnl Need to add smp because uname different on those
  1472. dnl Can force patch to be applied with --enable-redhat-pthread-workaround
  1473. AC_ARG_ENABLE(redhat-pthread-workaround,
  1474. AC_HELP_STRING([--enable-redhat-pthread-workaround],
  1475. [force Redhat patch to be applied (default: test system)]),
  1476. [ac_cv_enable_redhat_pthread_workaround=$enableval],
  1477. [ac_cv_enable_redhat_pthread_workaround=test])
  1478. if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then
  1479. if echo $ac_cv_uname_r | egrep "\.EL(smp)?$" >/dev/null 2>&1 ; then
  1480. AC_MSG_CHECKING(for redhat spopen problem)
  1481. ( cd config_test && make && make test ) > /dev/null 2>&1
  1482. if test $? -eq 0 ; then
  1483. AC_MSG_RESULT(okay)
  1484. else
  1485. AC_MSG_RESULT(error)
  1486. AC_DEFINE(REDHAT_SPOPEN_ERROR, 1, [Workaround on redhat in spopen])
  1487. fi
  1488. fi
  1489. elif test "$ac_cv_enable_redhat_pthread_workaround" = "yes" ; then
  1490. AC_DEFINE(REDHAT_SPOPEN_ERROR, 1, [Forced workaround on redhat in spopen])
  1491. fi
  1492. dnl External libraries - see ACKNOWLEDGEMENTS
  1493. np_COREUTILS
  1494. np_CURL
  1495. AC_OUTPUT(
  1496. Makefile
  1497. lib/Makefile
  1498. m4/Makefile
  1499. plugins/Makefile
  1500. plugins/tests/Makefile
  1501. plugins-root/Makefile
  1502. plugins-scripts/Makefile
  1503. plugins-scripts/subst
  1504. plugins-scripts/utils.pm
  1505. plugins-scripts/utils.sh
  1506. command.cfg
  1507. test.pl
  1508. pkg/solaris/pkginfo
  1509. po/Makefile.in
  1510. )
  1511. dnl the ones below that are commented out need to be cleaned up
  1512. dnl in the configure code above to use with_foo instead of ac_cv_foo
  1513. dnl if we want them to show up here. it'd also make the code cleaner.
  1514. dnl i'll get to that on another rainy day :) -sf
  1515. ACX_FEATURE([with],[apt-get-command])
  1516. dnl ACX_FEATURE([with],[dig-command])
  1517. dnl ACX_FEATURE([with],[fping-command])
  1518. dnl ACX_FEATURE([with],[mailq-command])
  1519. dnl ACX_FEATURE([with],[nslookup-command])
  1520. ACX_FEATURE([with],[ping6-command])
  1521. ACX_FEATURE([with],[ping-command])
  1522. dnl ACX_FEATURE([with],[qstat-command])
  1523. dnl ACX_FEATURE([with],[rpcinfo-command])
  1524. dnl ACX_FEATURE([with],[smbclient-command])
  1525. dnl ACX_FEATURE([with],[snmpget-command])
  1526. dnl ACX_FEATURE([with],[snmpgetnext-command])
  1527. dnl ACX_FEATURE([with],[ssh-command])
  1528. dnl ACX_FEATURE([with],[uptime-command])
  1529. dnl ACX_FEATURE([with],[proc-loadavg])
  1530. dnl ACX_FEATURE([with],[proc-meminfo])
  1531. dnl ACX_FEATURE([with],[ps-command])
  1532. dnl ACX_FEATURE([with],[ps-format])
  1533. dnl ACX_FEATURE([with],[ps-cols])
  1534. dnl ACX_FEATURE([with],[ps-varlist])
  1535. ACX_FEATURE([with],[lwres])
  1536. ACX_FEATURE([with],[ipv6])
  1537. ACX_FEATURE([with],[mysql])
  1538. ACX_FEATURE([with],[openssl])
  1539. ACX_FEATURE([with],[gnutls])
  1540. ACX_FEATURE([enable],[emulate-getaddrinfo])
  1541. ACX_FEATURE([with],[perl])
  1542. ACX_FEATURE([with],[cgiurl])
  1543. ACX_FEATURE([with],[nagios-user])
  1544. ACX_FEATURE([with],[nagios-group])
  1545. ACX_FEATURE([with],[trusted-path])