configure.in 58 KB

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