configure.in 58 KB

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