configure.in 58 KB

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