configure.in 58 KB

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