configure.in 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765
  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_CHECK_HEADERS(mp.h)
  132. AC_CHECK_LIB(bsd,pow,MATHLIBS="$MATHLIBS -lbsd")
  133. AC_SUBST(MATHLIBS)
  134. dnl Check if we buils local libtap
  135. AC_ARG_ENABLE(libtap,
  136. AC_HELP_STRING([--enable-libtap],
  137. [Enable built-in libtap for unit-testing (default: autodetect system library).]),
  138. [enable_libtap=$enableval],
  139. [enable_libtap=no])
  140. AM_CONDITIONAL([USE_LIBTAP_LOCAL],[test "$enable_libtap" = "yes"])
  141. # If not local, check if we can use the system one
  142. if test "$enable_libtap" != "yes" ; then
  143. dnl Check for libtap, to run perl-like tests
  144. AC_CHECK_LIB(tap, plan_tests,
  145. enable_libtap="yes"
  146. )
  147. fi
  148. # Finally, define tests if we use libtap
  149. if test "$enable_libtap" = "yes" ; then
  150. EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64"
  151. AC_SUBST(EXTRA_TEST)
  152. fi
  153. dnl INI Parsing
  154. AC_ARG_ENABLE(extra-opts,
  155. AC_HELP_STRING([--enable-extra-opts],
  156. [Enables parsing of plugins ini config files for extra options (default: no)]),
  157. [enable_extra_opts=$enableval],
  158. [enable_extra_opts=no])
  159. AM_CONDITIONAL([USE_PARSE_INI],[test "$enable_extra_opts" = "yes"])
  160. if test "$enable_extra_opts" = "yes" ; then
  161. AC_DEFINE(NP_EXTRA_OPTS,[1],[Enable INI file parsing.])
  162. if test "$enable_libtap" = "yes"; then
  163. EXTRA_TEST="$EXTRA_TEST test_ini1 test_ini3 test_opts1 test_opts2 test_opts3"
  164. AC_SUBST(EXTRA_TEST)
  165. fi
  166. fi
  167. dnl Check for PostgreSQL libraries
  168. _SAVEDLIBS="$LIBS"
  169. _SAVEDCPPFLAGS="$CPPFLAGS"
  170. AC_ARG_WITH(pgsql,
  171. ACX_HELP_STRING([--with-pgsql=DIR],
  172. [sets path to pgsql installation]),
  173. PGSQL=$withval,)
  174. AC_CHECK_LIB(crypt,main)
  175. if test "$ac_cv_lib_crypt_main" = "yes" -a "x$PGSQL" != "xno"; then
  176. if test -n "$PGSQL"; then
  177. LDFLAGS="$LDFLAGS -L$PGSQL/lib"
  178. CPPFLAGS="$CPPFLAGS -I$PGSQL/include"
  179. fi
  180. AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt)
  181. if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then
  182. AC_CHECK_HEADERS(pgsql/libpq-fe.h)
  183. AC_CHECK_HEADERS(postgresql/libpq-fe.h)
  184. AC_CHECK_HEADERS(libpq-fe.h)
  185. if [[ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]]; then
  186. PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
  187. PGINCLUDE="-I$PGSQL/include"
  188. elif test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
  189. PGLIBS="-lpq -lcrypt"
  190. PGINCLUDE="-I/usr/include/pgsql"
  191. elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
  192. PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
  193. PGINCLUDE="-I/usr/include/postgresql"
  194. elif test "$ac_cv_header_libpq_fe_h" = "yes"; then
  195. PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
  196. PGINCLUDE="-I$PGSQL/include"
  197. fi
  198. if test -z "$PGINCLUDE"; then
  199. AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
  200. AC_MSG_WARN([install PostgreSQL headers to compile this plugin (see REQUIREMENTS).])
  201. else
  202. AC_SUBST(PGLIBS)
  203. AC_SUBST(PGINCLUDE)
  204. EXTRAS="$EXTRAS check_pgsql"
  205. fi
  206. else
  207. AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
  208. AC_MSG_WARN([LIBS="$LIBS" CPPFLAGS="$CPPFLAGS"])
  209. AC_MSG_WARN([install PostgreSQL libs to compile this plugin (see REQUIREMENTS).])
  210. fi
  211. else
  212. AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
  213. AC_MSG_WARN([install lib crypt and PostgreSQL libs to compile this plugin (see REQUIREMENTS).])
  214. fi
  215. LIBS="$_SAVEDLIBS"
  216. CPPFLAGS="$_SAVEDCPPFLAGS"
  217. dnl Check for radius libraries
  218. _SAVEDLIBS="$LIBS"
  219. AC_CHECK_LIB(radiusclient,rc_read_config)
  220. if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
  221. EXTRAS="$EXTRAS check_radius"
  222. RADIUSLIBS="-lradiusclient"
  223. AC_SUBST(RADIUSLIBS)
  224. else
  225. AC_CHECK_LIB(radiusclient-ng,rc_read_config)
  226. if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then
  227. EXTRAS="$EXTRAS check_radius"
  228. RADIUSLIBS="-lradiusclient-ng"
  229. AC_SUBST(RADIUSLIBS)
  230. else
  231. AC_MSG_WARN([Skipping radius plugin])
  232. AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).])
  233. fi
  234. fi
  235. LIBS="$_SAVEDLIBS"
  236. dnl Check for LDAP libraries
  237. _SAVEDLIBS="$LIBS"
  238. AC_CHECK_LIB(ldap,main,,,-llber)
  239. if test "$ac_cv_lib_ldap_main" = "yes"; then
  240. LDAPLIBS="-lldap -llber"\
  241. LDAPINCLUDE="-I/usr/include/ldap"
  242. AC_SUBST(LDAPLIBS)
  243. AC_SUBST(LDAPINCLUDE)
  244. AC_CHECK_FUNCS(ldap_set_option)
  245. EXTRAS="$EXTRAS check_ldap"
  246. AC_CHECK_FUNCS(ldap_init ldap_set_option ldap_get_option ldap_start_tls_s)
  247. else
  248. AC_MSG_WARN([Skipping LDAP plugin])
  249. AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).])
  250. fi
  251. LIBS="$_SAVEDLIBS"
  252. dnl Check for headers used by check_ide_smart
  253. AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no)
  254. if test "$FOUNDINCLUDE" = "yes" ; then
  255. AC_CHECK_HEADER(linux/types.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no)
  256. fi
  257. if test "$FOUNDINCLUDE" = "yes" ; then
  258. EXTRAS="$EXTRAS check_ide_smart"
  259. else
  260. AC_MSG_WARN([Skipping check_ide_smart plugin.])
  261. AC_MSG_WARN([check_ide_smart is linux specific. It requires linux/hdreg.h and linux/types.h.])
  262. fi
  263. dnl Check for mysql libraries
  264. np_mysqlclient
  265. if test $with_mysql = "no" ; then
  266. AC_MSG_WARN([Skipping mysql plugin])
  267. AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).])
  268. else
  269. EXTRAS="$EXTRAS check_mysql check_mysql_query"
  270. MYSQLINCLUDE="$np_mysql_include"
  271. MYSQLLIBS="$np_mysql_libs"
  272. MYSQLCFLAGS="$np_mysql_cflags"
  273. AC_SUBST(MYSQLINCLUDE)
  274. AC_SUBST(MYSQLLIBS)
  275. AC_SUBST(MYSQLCFLAGS)
  276. fi
  277. AC_ARG_WITH([ipv6],
  278. [AS_HELP_STRING([--with-ipv6], [support IPv6 @<:@default=check@:>@])],
  279. [], [with_ipv6=check])
  280. dnl Check for AF_INET6 support - unistd.h required for Darwin
  281. if test "$with_ipv6" != "no"; then
  282. AC_CACHE_CHECK([for IPv6 support], np_cv_sys_ipv6, [
  283. AC_TRY_COMPILE(
  284. [#ifdef HAVE_UNISTD_H
  285. #include <unistd.h>
  286. #endif
  287. #include <netinet/in.h>
  288. #include <sys/socket.h>],
  289. [struct sockaddr_in6 sin6;
  290. void *p;
  291. sin6.sin6_family = AF_INET6;
  292. sin6.sin6_port = 587;
  293. p = &sin6.sin6_addr;],
  294. [np_cv_sys_ipv6=yes],
  295. [np_cv_sys_ipv6=no])
  296. ])
  297. if test "$np_cv_sys_ipv6" = "no" -a "$with_ipv6" != "check"; then
  298. AC_MSG_FAILURE([--with-ipv6 was given, but test for IPv6 support failed])
  299. fi
  300. if test "$np_cv_sys_ipv6" = "yes"; then
  301. AC_DEFINE(USE_IPV6,1,[Enable IPv6 support])
  302. fi
  303. with_ipv6="$np_cv_sys_ipv6"
  304. fi
  305. dnl Checks for Kerberos. Must come before openssl checks for Redhat EL 3
  306. AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no)
  307. if test "$FOUNDINCLUDE" = "no"; then
  308. _SAVEDCPPFLAGS="$CPPFLAGS"
  309. CPPFLAGS="$_SAVEDCPPFLAGS -I/usr/kerberos/include"
  310. unset ac_cv_header_krb5_h
  311. AC_CHECK_HEADERS(krb5.h,
  312. KRB5INCLUDE="-I/usr/kerberos/include"
  313. FOUNDINCLUDE=yes,
  314. FOUNDINCLUDE=no)
  315. fi
  316. AC_SUBST(KRBINCLUDE)
  317. if test "$FOUNDINCLUDE" = "no"; then
  318. CPPFLAGS="$_SAVEDCPPFLAGS"
  319. fi
  320. dnl *** The following block comes from wget configure.ac ***
  321. dnl Unfortunately, as of this writing (OpenSSL 0.9.6), the libcrypto
  322. dnl shared library doesn't record its dependency on libdl, so we
  323. dnl need to check for it ourselves so we won't fail to link due to a
  324. dnl lack of -ldl. Most OSes use dlopen(), but HP-UX uses
  325. dnl shl_load().
  326. AC_CHECK_LIB(dl,dlopen)
  327. AC_CHECK_LIB(dl,shl_load)
  328. dnl openssl detection/configuration
  329. if ! test x"$with_openssl" = x"no"; then
  330. dnl Check for OpenSSL location if it wasn't already specified
  331. if ! test -d "$with_openssl"; then
  332. for d in $OPENSSL_DIRS; do
  333. if test -x ${d}/bin/openssl || test -x ${d}/sbin/openssl ; then
  334. with_openssl=$d
  335. fi
  336. done
  337. fi
  338. _SAVEDCPPFLAGS="$CPPFLAGS"
  339. _SAVEDLDFLAGS="$LDFLAGS"
  340. dnl Check for OpenSSL header files
  341. unset FOUNDINCLUDE
  342. if test x"$with_openssl" != x"/usr" ; then
  343. CPPFLAGS="$CPPFLAGS -I$with_openssl/include"
  344. LDFLAGS="$LDFLAGS -L$with_openssl/lib"
  345. fi
  346. dnl check for openssl in $dir/include/openssl
  347. AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.h,
  348. SSLINCLUDE="-I$with_openssl/include"
  349. FOUNDINCLUDE=yes,
  350. FOUNDINCLUDE=no)
  351. dnl else check to see if $dir/include has it
  352. if test "$FOUNDINCLUDE" = "no"; then
  353. AC_CHECK_HEADERS(ssl.h x509.h rsa.h pem.h crypto.h err.h,
  354. SSLINCLUDE="-I$with_openssl/include"
  355. FOUNDINCLUDE=yes,
  356. FOUNDINCLUDE=no)
  357. fi
  358. AC_SUBST(SSLINCLUDE)
  359. dnl if we didn't find it, reset CPPFLAGS
  360. if test "$FOUNDINCLUDE" = "no"; then
  361. CPPFLAGS="$_SAVEDCPPFLAGS"
  362. LDFLAGS="$_SAVEDLDFLAGS"
  363. fi
  364. dnl Check for crypto lib
  365. _SAVEDLIBS="$LIBS"
  366. LIBS="-L${with_openssl}/lib"
  367. AC_CHECK_LIB(crypto,CRYPTO_lock)
  368. if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then
  369. dnl Check for SSL lib
  370. AC_CHECK_LIB(ssl,main, SSLLIBS="-lssl -lcrypto",,-lcrypto)
  371. fi
  372. LIBS="$_SAVEDLIBS"
  373. dnl test headers and libs to decide whether check_http should use SSL
  374. if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then
  375. if test "$ac_cv_lib_ssl_main" = "yes"; then
  376. if test "$FOUNDINCLUDE" = "yes"; then
  377. FOUNDOPENSSL="yes"
  378. fi
  379. fi
  380. fi
  381. fi
  382. dnl check for gnutls if openssl isn't found (or is disabled)
  383. if test ! "$FOUNDOPENSSL" = "yes" && test ! "$with_gnutls" = "no"; then
  384. if test ! "$with_gnutls" = ""; then
  385. CPPFLAGS="$CPPFLAGS -I${with_gnutls}/include"
  386. elif test ! "$LIBGNUTLS_CONFIG" = ""; then
  387. CPPFLAGS="$CPPFLAGS -I`$LIBGNUTLS_CONFIG --prefix`"
  388. fi
  389. AC_CHECK_HEADERS([gnutls/openssl.h],FOUNDGNUTLS="yes",)
  390. if test "$FOUNDGNUTLS" = "yes"; then
  391. AC_CHECK_LIB(gnutls-openssl,main,SSLLIBS="-lgnutls-openssl")
  392. fi
  393. fi
  394. dnl end check for gnutls
  395. if test "$FOUNDOPENSSL" = "yes" || test "$FOUNDGNUTLS" = "yes"; then
  396. check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp"
  397. AC_SUBST(check_tcp_ssl)
  398. AC_SUBST(SSLLIBS)
  399. AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found])
  400. if test "$FOUNDOPENSSL" = "yes"; then
  401. AC_DEFINE(USE_OPENSSL,1,[Define if using OpenSSL libraries])
  402. with_openssl="yes"
  403. with_gnutls="no"
  404. else
  405. AC_DEFINE(USE_GNUTLS,1,[Define if using gnutls libraries])
  406. with_gnutls="yes"
  407. with_openssl="no"
  408. fi
  409. else
  410. dnl else deliberately disabled or no ssl support available
  411. AC_MSG_WARN([OpenSSL or GnuTLS libs could not be found or were disabled])
  412. with_openssl="no"
  413. with_gnutls="no"
  414. fi
  415. dnl
  416. dnl Checks for header files.
  417. dnl
  418. AC_HEADER_TIME
  419. AC_HEADER_SYS_WAIT
  420. AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h)
  421. AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h)
  422. dnl Checks for typedefs, structures, and compiler characteristics.
  423. AC_C_CONST
  424. AC_STRUCT_TM
  425. AC_TYPE_PID_T
  426. AC_TYPE_SIZE_T
  427. AC_TYPE_SIGNAL
  428. AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[
  429. AC_TRY_LINK([#include <stdarg.h>
  430. va_list ap1,ap2;], [va_copy(ap1,ap2);],
  431. ac_cv_HAVE_VA_COPY=yes,
  432. ac_cv_HAVE_VA_COPY=no)])
  433. if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then
  434. AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
  435. else
  436. AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE___VA_COPY,[
  437. AC_TRY_LINK([#include <stdarg.h>
  438. va_list ap1,ap2;], [__va_copy(ap1,ap2);],
  439. ac_cv_HAVE___VA_COPY=yes,
  440. ac_cv_HAVE___VA_COPY=no)])
  441. if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then
  442. AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
  443. fi
  444. fi
  445. AC_TRY_COMPILE([#include <sys/time.h>],
  446. [struct timeval *tv;
  447. struct timezone *tz;],
  448. AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
  449. AC_TRY_COMPILE([#include <sys/time.h>],
  450. [struct timeval *tv;
  451. struct timezone *tz;
  452. gettimeofday(tv, tz);],
  453. AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
  454. AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed])))
  455. dnl Checks for library functions.
  456. AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor)
  457. AC_CHECK_FUNCS(poll)
  458. AC_MSG_CHECKING(return type of socket size)
  459. AC_TRY_COMPILE([#include <stdlib.h>
  460. #include <sys/types.h>
  461. #include <sys/socket.h>],
  462. [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);],
  463. ac_cv_socket_size_type=["size_t"]
  464. AC_MSG_RESULT(size_t),
  465. ac_cv_socket_size_type=["int"]
  466. AC_MSG_RESULT(int))
  467. AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type ,
  468. [Define type of socket size])
  469. dnl #### Process table test
  470. AC_PATH_PROG(PATH_TO_PS,ps)
  471. AC_MSG_CHECKING(for ps syntax)
  472. AC_ARG_WITH(ps_command,
  473. ACX_HELP_STRING([--with-ps-command=PATH],
  474. [Verbatim command to execute for ps]),
  475. PS_COMMAND=$withval)
  476. AC_ARG_WITH(ps_format,
  477. ACX_HELP_STRING([--with-ps-format=FORMAT],
  478. [Format string for scanning ps output]),
  479. PS_FORMAT=$withval)
  480. AC_ARG_WITH(ps_cols,
  481. ACX_HELP_STRING([--with-ps-cols=NUM],
  482. [Number of columns in ps command]),
  483. PS_COLS=$withval)
  484. AC_ARG_WITH(ps_varlist,
  485. ACX_HELP_STRING([--with-ps-varlist=LIST],
  486. [Variable list for sscanf of 'ps' output]),
  487. PS_VARLIST=$withval)
  488. if test -n "$PS_COMMAND" && test -n "$PS_FORMAT" && test -n "$PS_COLS" && test -n "$PS_VARLIST"; then
  489. ac_cv_ps_command="$PS_COMMAND"
  490. ac_cv_ps_format="$PS_FORMAT"
  491. ac_cv_ps_varlist="$PS_VARLIST"
  492. ac_cv_ps_cols="$PS_COLS"
  493. AC_MSG_RESULT([(command-line) $ac_cv_ps_command])
  494. dnl Now using the pst3/kmem hack for solaris systems to avoid truncation
  495. elif test "$ac_cv_uname_s" = "SunOS"; then
  496. #
  497. # this is a very, very ugly hack, to hardcode the location for plugins
  498. #
  499. if test "$libexecdir" = '${exec_prefix}/libexec'; then
  500. if test "$exec_prefix" = "NONE"; then
  501. if test "$prefix" = "NONE"; then
  502. pst3="$ac_default_prefix/libexec/pst3"
  503. else
  504. pst3="$prefix/libexec/pst3"
  505. fi
  506. else
  507. pst3="$exec_prefix/libexec/pst3"
  508. fi
  509. else
  510. pst3="$libexecdir/pst3"
  511. fi
  512. ac_cv_ps_command="$pst3"
  513. ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
  514. ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
  515. ac_cv_ps_cols=9
  516. AC_MSG_RESULT([using nagios-plugins internal ps command (pst3) for solaris])
  517. if test `isainfo -b` = 64 ; then
  518. pst3_use_64bit=1
  519. AC_MSG_NOTICE([using 64bit pst3])
  520. else
  521. AC_MSG_NOTICE([using 32bit pst3])
  522. fi
  523. EXTRAS_ROOT="$EXTRAS_ROOT pst3"
  524. if test "$pst3_use_64bit" = 1; then
  525. dnl Test if we can actually compile code in 64bit
  526. old_cflags=$CFLAGS
  527. CFLAGS="$CFLAGS -m64"
  528. pst3_64bit_working=0
  529. AC_RUN_IFELSE(
  530. [AC_LANG_PROGRAM([], [
  531. return sizeof(void*) == 8 ? 0 : 1;
  532. ])
  533. ],[
  534. PST3CFLAGS="-m64"
  535. AC_SUBST(PST3CFLAGS)
  536. pst3_64bit_working=1
  537. AC_MSG_NOTICE([using -m64 for 64bit code])
  538. ],[
  539. pst3_64bit_working=0
  540. AC_MSG_NOTICE([compiler do not like -m64])
  541. ])
  542. CFLAGS=$old_cflags
  543. if test "$pst3_64bit_working" = 0; then
  544. old_cflags=$CFLAGS
  545. CFLAGS="$CFLAGS -xarch=v9"
  546. AC_RUN_IFELSE(
  547. [AC_LANG_PROGRAM([], [
  548. return sizeof(void*) == 8 ? 0 : 1;
  549. ])
  550. ],[
  551. PST3CFLAGS="-xarch=v9"
  552. AC_SUBST(PST3CFLAGS)
  553. pst3_64bit_working=1
  554. AC_MSG_NOTICE([using -xarch=v9 for 64bit code])
  555. ],[
  556. pst3_64bit_working=0
  557. AC_MSG_NOTICE([compiler do not like -xarch=v9])
  558. ])
  559. CFLAGS=$old_cflags
  560. fi
  561. if test "$pst3_64bit_working" = 0; then
  562. old_cflags=$CFLAGS
  563. CFLAGS="$CFLAGS -xarch=amd64"
  564. AC_RUN_IFELSE(
  565. [AC_LANG_PROGRAM([], [
  566. return sizeof(void*) == 8 ? 0 : 1;
  567. ])
  568. ],[
  569. PST3CFLAGS="-xarch=amd64"
  570. AC_SUBST(PST3CFLAGS)
  571. pst3_64bit_working=1
  572. AC_MSG_NOTICE([using -xarch=amd64 for 64bit code])
  573. ],[
  574. pst3_64bit_working=0
  575. AC_MSG_NOTICE([compiler do not like -xarch=amd64])
  576. ])
  577. CFLAGS=$old_cflags
  578. fi
  579. if test "$pst3_64bit_working" = 0; then
  580. AC_MSG_ERROR([I don't know how to build a 64-bit object!])
  581. fi
  582. fi
  583. dnl Removing this for the moment - Ton
  584. dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation
  585. dnl Limitation that command name is not available
  586. dnl elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \
  587. dnl egrep -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null
  588. dnl then
  589. dnl ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]"
  590. dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn"
  591. dnl ac_cv_ps_format=["%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT]%*s %*s %n"]
  592. dnl ac_cv_ps_cols=8
  593. dnl AC_MSG_RESULT([$ac_cv_ps_command])
  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 "procetime" >/dev/null; 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 echo "$with_ping_command" | grep '%d.*%d.*%s' >/dev/null
  841. then
  842. ac_cv_ping_packets_first=yes
  843. ac_cv_ping_has_timeout=yes
  844. elif echo "$with_ping_command" | grep '%d.*%s.*%d' >/dev/null || \
  845. echo "$with_ping_command" | grep '%s.*%d.*%d' >/dev/null
  846. then
  847. ac_cv_ping_has_timeout=yes
  848. elif echo "$with_ping_command" | grep '%d.*%s' >/dev/null
  849. then
  850. ac_cv_ping_packets_first=yes
  851. fi
  852. elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
  853. $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
  854. egrep -i "^round-trip|^rtt" >/dev/null
  855. then
  856. with_ping_command="$PATH_TO_PING -n -U -c %d %s"
  857. ac_cv_ping_packets_first=yes
  858. AC_MSG_RESULT([$with_ping_command])
  859. elif $PATH_TO_PING -n -U -w 10 -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 -w %d -c %d %s"
  863. ac_cv_ping_packets_first=yes
  864. ac_cv_ping_has_timeout=yes
  865. AC_MSG_RESULT([$with_ping_command])
  866. elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \
  867. egrep -i "^round-trip|^rtt" >/dev/null
  868. then
  869. with_ping_command="$PATH_TO_PING -n -U -c %d %s"
  870. ac_cv_ping_packets_first=yes
  871. AC_MSG_RESULT([$with_ping_command])
  872. elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
  873. egrep -i "^round-trip|^rtt" >/dev/null
  874. then
  875. with_ping_command="$PATH_TO_PING -n -c %d %s"
  876. ac_cv_ping_packets_first=yes
  877. AC_MSG_RESULT([$with_ping_command])
  878. elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \
  879. egrep -i "^round-trip|^rtt" >/dev/null
  880. then
  881. with_ping_command="$PATH_TO_PING -n %s -c %d"
  882. AC_MSG_RESULT([$with_ping_command])
  883. elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \
  884. egrep -i "^round-trip|^rtt" >/dev/null
  885. then
  886. with_ping_command="$PATH_TO_PING %s -n %d"
  887. AC_MSG_RESULT([$with_ping_command])
  888. elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
  889. egrep -i "^round-trip|^rtt" >/dev/null
  890. then
  891. with_ping_command="$PATH_TO_PING -n -s %s 56 %d"
  892. AC_MSG_RESULT([$with_ping_command])
  893. elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \
  894. egrep -i "^round-trip|^rtt" >/dev/null
  895. then
  896. with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d"
  897. AC_MSG_RESULT([$with_ping_command])
  898. elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \
  899. egrep -i "^round-trip|^rtt" >/dev/null
  900. then
  901. with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s"
  902. ac_cv_ping_packets_first=yes
  903. AC_MSG_RESULT([$with_ping_command])
  904. elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
  905. egrep -i "^round-trip|^rtt" >/dev/null
  906. then
  907. with_ping_command="$PATH_TO_PING -n -c %d %s"
  908. ac_cv_ping_packets_first=yes
  909. AC_MSG_RESULT([$with_ping_command])
  910. else
  911. AC_MSG_WARN([unable to find usable ping syntax])
  912. fi
  913. AC_DEFINE_UNQUOTED(PING_COMMAND,"$with_ping_command",
  914. [path and args for ICMP ping command])
  915. if test "x$ac_cv_ping_packets_first" != "xno"
  916. then
  917. AC_DEFINE(PING_PACKETS_FIRST,1,
  918. [Define if packet count must precede host])
  919. fi
  920. if test "x$ac_cv_ping_has_timeout" != "xno"
  921. then
  922. AC_DEFINE(PING_HAS_TIMEOUT,1,
  923. [Define if ping has its own timeout option that should be set])
  924. fi
  925. AC_ARG_WITH(ping6_command,
  926. ACX_HELP_STRING([--with-ping6-command=SYNTAX],
  927. [sets syntax for ICMPv6 ping]),
  928. with_ping6_command=$withval,)
  929. if test x"$with_ipv6" != xno ; then
  930. AC_MSG_CHECKING(for ICMPv6 ping syntax)
  931. ac_cv_ping6_packets_first=no
  932. if test -n "$with_ping6_command"
  933. then
  934. AC_MSG_RESULT([(command-line) $with_ping6_command])
  935. if echo "$with_ping6_command" | grep '%d.*%d.*%s' >/dev/null
  936. then
  937. ac_cv_ping6_packets_first=yes
  938. elif echo "$with_ping6_command" | grep '%d.*%s.*%d' >/dev/null || \
  939. echo "$with_ping6_command" | grep '%s.*%d.*%d' >/dev/null
  940. then
  941. # Just keep same logic as ping (IPv4) if we ever need ac_cv_ping6_has_timeout
  942. true
  943. elif echo "$with_ping6_command" | grep '%d.*%s' >/dev/null
  944. then
  945. ac_cv_ping6_packets_first=yes
  946. fi
  947. elif test "x$PATH_TO_PING6" != "x"; then
  948. if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
  949. $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
  950. egrep -i "^round-trip|^rtt" >/dev/null
  951. then
  952. with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
  953. ac_cv_ping6_packets_first=yes
  954. AC_MSG_RESULT([$with_ping6_command])
  955. elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \
  956. egrep -i "^round-trip|^rtt" >/dev/null
  957. then
  958. with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s"
  959. ac_cv_ping6_packets_first=yes
  960. ac_cv_ping_has_timeout=yes
  961. AC_MSG_RESULT([$with_ping6_command])
  962. elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \
  963. egrep -i "^round-trip|^rtt" >/dev/null
  964. then
  965. with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
  966. ac_cv_ping6_packets_first=yes
  967. AC_MSG_RESULT([$with_ping6_command])
  968. elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
  969. egrep -i "^round-trip|^rtt" >/dev/null
  970. then
  971. with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
  972. ac_cv_ping6_packets_first=yes
  973. AC_MSG_RESULT([$with_ping6_command])
  974. elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \
  975. egrep -i "^round-trip|^rtt" >/dev/null
  976. then
  977. with_ping6_command="$PATH_TO_PING6 -n %s -c %d"
  978. AC_MSG_RESULT([$with_ping6_command])
  979. elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \
  980. egrep -i "^round-trip|^rtt" >/dev/null
  981. then
  982. with_ping6_command="$PATH_TO_PING6 %s -n %d"
  983. AC_MSG_RESULT([$with_ping6_command])
  984. elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
  985. egrep -i "^round-trip|^rtt" >/dev/null
  986. then
  987. with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d"
  988. AC_MSG_RESULT([$with_ping6_command])
  989. elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
  990. egrep -i "^round-trip|^rtt" >/dev/null
  991. then
  992. with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d"
  993. AC_MSG_RESULT([$with_ping6_command])
  994. elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \
  995. egrep -i "^round-trip|^rtt" >/dev/null
  996. then
  997. with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s"
  998. ac_cv_ping6_packets_first=yes
  999. AC_MSG_RESULT([$with_ping_command])
  1000. elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
  1001. egrep -i "^round-trip|^rtt" >/dev/null
  1002. then
  1003. with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
  1004. ac_cv_ping6_packets_first=yes
  1005. AC_MSG_RESULT([$with_ping6_command])
  1006. fi
  1007. elif test "x$PATH_TO_PING" != "x"; then
  1008. if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
  1009. $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
  1010. egrep -i "^round-trip|^rtt" >/dev/null
  1011. then
  1012. with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
  1013. ac_cv_ping6_packets_first=yes
  1014. AC_MSG_RESULT([$with_ping6_command])
  1015. elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \
  1016. egrep -i "^round-trip|^rtt" >/dev/null
  1017. then
  1018. with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
  1019. ac_cv_ping6_packets_first=yes
  1020. AC_MSG_RESULT([$with_ping6_command])
  1021. elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
  1022. egrep -i "^round-trip|^rtt" >/dev/null
  1023. then
  1024. with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
  1025. ac_cv_ping6_packets_first=yes
  1026. AC_MSG_RESULT([$with_ping6_command])
  1027. elif $PATH_TO_PING -A inet6 -n ::1 -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 %s -c %d"
  1031. AC_MSG_RESULT([$with_ping6_command])
  1032. elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \
  1033. egrep -i "^round-trip|^rtt" >/dev/null
  1034. then
  1035. with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d"
  1036. AC_MSG_RESULT([$with_ping6_command])
  1037. elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
  1038. egrep -i "^round-trip|^rtt" >/dev/null
  1039. then
  1040. with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d"
  1041. AC_MSG_RESULT([$with_ping6_command])
  1042. elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
  1043. egrep -i "^round-trip|^rtt" >/dev/null
  1044. then
  1045. with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d"
  1046. AC_MSG_RESULT([$with_ping6_command])
  1047. elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \
  1048. egrep -i "^round-trip|^rtt" >/dev/null
  1049. then
  1050. with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s"
  1051. ac_cv_ping6_packets_first=yes
  1052. AC_MSG_RESULT([$with_ping_command])
  1053. elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
  1054. egrep -i "^round-trip|^rtt" >/dev/null
  1055. then
  1056. with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
  1057. ac_cv_ping6_packets_first=yes
  1058. AC_MSG_RESULT([$with_ping6_command])
  1059. fi
  1060. fi
  1061. if test "x$with_ping6_command" != "x"; then
  1062. AC_DEFINE_UNQUOTED(PING6_COMMAND,"$with_ping6_command",
  1063. [path and args for ICMPv6 ping command])
  1064. else
  1065. AC_MSG_RESULT([none])
  1066. fi
  1067. if test "x$ac_cv_ping6_packets_first" != "xno"; then
  1068. AC_DEFINE(PING6_PACKETS_FIRST,1,
  1069. [Define if packet count must precede host])
  1070. fi
  1071. fi
  1072. AC_ARG_WITH(nslookup_command,
  1073. ACX_HELP_STRING([--with-nslookup-command=PATH],
  1074. [sets path to nslookup executable]),
  1075. ac_cv_nslookup_command=$withval)
  1076. if test -n "$ac_cv_nslookup_command"; then
  1077. AC_MSG_NOTICE([Using specific nslookup at $ac_cv_nslookup_command])
  1078. else
  1079. AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)
  1080. if test -n "$PATH_TO_NSLOOKUP"
  1081. then
  1082. AC_MSG_CHECKING(for nslookup syntax)
  1083. if $PATH_TO_NSLOOKUP -sil 127.0.0.1 2>&1 | grep ["Invalid option: sil"] >/dev/null
  1084. then
  1085. ac_cv_nslookup_command="$PATH_TO_NSLOOKUP"
  1086. AC_MSG_RESULT([$ac_cv_nslookup_command])
  1087. else
  1088. ac_cv_nslookup_command="$PATH_TO_NSLOOKUP -sil"
  1089. AC_MSG_RESULT([$ac_cv_nslookup_command])
  1090. fi
  1091. else
  1092. AC_MSG_WARN([nslookup command not found])
  1093. fi
  1094. fi
  1095. if test -n "$ac_cv_nslookup_command"; then
  1096. EXTRAS="$EXTRAS check_dns"
  1097. AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command", [path and args for nslookup])
  1098. fi
  1099. AC_MSG_CHECKING([for number of cpus])
  1100. AC_TRY_COMPILE([#include <unistd.h>],
  1101. [sysconf(_SC_NPROCESSORS_CONF) > 0;],
  1102. AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of cpus])
  1103. AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]),
  1104. AC_MSG_RESULT([cannot calculate])
  1105. )
  1106. AC_PATH_PROG(PATH_TO_UPTIME,uptime)
  1107. AC_ARG_WITH(uptime_command,
  1108. ACX_HELP_STRING([--with-uptime-command=PATH],
  1109. [sets path to uptime]), PATH_TO_UPTIME=$withval)
  1110. AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary])
  1111. AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo)
  1112. AC_ARG_WITH(rpcinfo_command,
  1113. ACX_HELP_STRING([--with-rpcinfo-command=PATH],
  1114. [sets path to rpcinfo]), PATH_TO_RPCINFO=$withval)
  1115. AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary])
  1116. AC_PATH_PROG(PATH_TO_LMSTAT,lmstat)
  1117. if test -x "$PATH_TO_LMSTAT"
  1118. then
  1119. AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat])
  1120. else
  1121. AC_MSG_WARN([Get lmstat from Globetrotter Software to monitor flexlm licenses])
  1122. fi
  1123. AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient)
  1124. AC_ARG_WITH(smbclient_command,
  1125. ACX_HELP_STRING([--with-smbclient-command=PATH],
  1126. [sets path to smbclient]),
  1127. PATH_TO_SMBCLIENT=$withval)
  1128. if test -n "$PATH_TO_SMBCLIENT"
  1129. then
  1130. AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary])
  1131. else
  1132. AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares])
  1133. fi
  1134. AC_PATH_PROG(PATH_TO_WHO,who)
  1135. if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null]
  1136. then
  1137. ac_cv_path_to_who="$PATH_TO_WHO -q"
  1138. else
  1139. ac_cv_path_to_who="$PATH_TO_WHO"
  1140. fi
  1141. AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who",
  1142. [path and arguments for invoking 'who'])
  1143. AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
  1144. AC_ARG_WITH(snmpget_command,
  1145. ACX_HELP_STRING([--with-snmpget-command=PATH],
  1146. [Path to snmpget command]),
  1147. PATH_TO_SNMPGET=$withval)
  1148. if test -n "$PATH_TO_SNMPGET"
  1149. then
  1150. AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary])
  1151. EXTRAS="$EXTRAS check_hpjd check_snmp"
  1152. else
  1153. AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins])
  1154. fi
  1155. AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
  1156. AC_ARG_WITH(snmpgetnext_command,
  1157. ACX_HELP_STRING([--with-snmpgetnext-command=PATH],
  1158. [Path to snmpgetnext command]),
  1159. PATH_TO_SNMPGETNEXT=$withval)
  1160. if test -n "$PATH_TO_SNMPGETNEXT"
  1161. then
  1162. AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary])
  1163. fi
  1164. if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null )
  1165. then
  1166. AC_MSG_CHECKING(for Net::SNMP perl module)
  1167. AC_MSG_RESULT([found])
  1168. else
  1169. AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins])
  1170. fi
  1171. AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
  1172. AC_PATH_PROG(PATH_TO_QSTAT,qstat)
  1173. AC_ARG_WITH(qstat_command,
  1174. ACX_HELP_STRING([--with-qstat-command=PATH],
  1175. [Path to qstat command]), PATH_TO_QSTAT=$withval)
  1176. if test -x "$PATH_TO_QUAKESTAT"
  1177. then
  1178. ac_cv_path_to_qstat="$PATH_TO_QUAKESTAT"
  1179. EXTRAS="$EXTRAS check_game"
  1180. elif test -n "$PATH_TO_QSTAT"
  1181. then
  1182. ac_cv_path_to_qstat="$PATH_TO_QSTAT"
  1183. EXTRAS="$EXTRAS check_game"
  1184. else
  1185. AC_MSG_WARN([Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin])
  1186. fi
  1187. if test $ac_cv_path_to_qstat
  1188. then
  1189. AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat",
  1190. [path to qstat/quakestat])
  1191. fi
  1192. AC_PATH_PROG(PATH_TO_FPING,fping)
  1193. AC_ARG_WITH(fping_command,
  1194. ACX_HELP_STRING([--with-fping-command=PATH],
  1195. [Path to fping command]), PATH_TO_FPING=$withval)
  1196. if test -n "$PATH_TO_FPING"
  1197. then
  1198. AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping])
  1199. EXTRAS="$EXTRAS check_fping"
  1200. else
  1201. AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin])
  1202. fi
  1203. AC_PATH_PROG(PATH_TO_SSH,ssh)
  1204. AC_ARG_WITH(ssh_command,
  1205. ACX_HELP_STRING([--with-ssh-command=PATH],
  1206. [sets path for ssh]), PATH_TO_SSH=$withval)
  1207. if test -n "$PATH_TO_SSH"
  1208. then
  1209. AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary])
  1210. EXTRAS="$EXTRAS check_by_ssh"
  1211. else
  1212. AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin])
  1213. fi
  1214. AC_PATH_PROG(PATH_TO_MAILQ,mailq)
  1215. AC_ARG_WITH(mailq_command,
  1216. ACX_HELP_STRING([--with-mailq-command=PATH],
  1217. [sets path to mailq]), PATH_TO_MAILQ=$withval)
  1218. if test -n "$PATH_TO_MAILQ"
  1219. then
  1220. AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq])
  1221. else
  1222. AC_MSG_WARN([Could not find mailq or eqivalent])
  1223. fi
  1224. AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat)
  1225. if test -x "$PATH_TO_QMAIL_QSTAT"
  1226. then
  1227. AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat])
  1228. else
  1229. AC_MSG_WARN([Could not find qmail-qstat or eqivalent])
  1230. fi
  1231. dnl SWAP info required is amount allocated/available and amount free
  1232. dnl The plugin works through all the swap devices and adds up the total swap
  1233. dnl available.
  1234. AC_PATH_PROG(PATH_TO_SWAP,swap)
  1235. if (test -n "$PATH_TO_SWAP")
  1236. then
  1237. AC_MSG_CHECKING([for $PATH_TO_SWAP format])
  1238. if [$PATH_TO_SWAP -l 2>&1 >/dev/null]
  1239. then
  1240. ac_cv_have_swap=yes
  1241. ac_cv_swap_command="$PATH_TO_SWAP -l"
  1242. if [$PATH_TO_SWAP -l 2>/dev/null | \
  1243. egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \
  1244. >/dev/null]
  1245. then
  1246. ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %f %f"]
  1247. ac_cv_swap_conv=2048
  1248. AC_MSG_RESULT([using IRIX format swap])
  1249. elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null]
  1250. then
  1251. ac_cv_swap_format=["%*s %*[0-9,-] %*d %f %f"]
  1252. ac_cv_swap_conv=2048
  1253. AC_MSG_RESULT([using Unixware format swap])
  1254. else
  1255. dnl if we don't know what format swap's output is
  1256. dnl we might as well pretend we didn't see it
  1257. ac_cv_have_swap=""
  1258. ac_cv_swap_command=""
  1259. fi
  1260. fi
  1261. dnl end if for PATH_TO_SWAP
  1262. fi
  1263. AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo)
  1264. if (test -n "$PATH_TO_SWAPINFO")
  1265. then
  1266. AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format])
  1267. if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null]
  1268. then
  1269. ac_cv_have_swap=yes
  1270. ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
  1271. if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
  1272. then
  1273. ac_cv_swap_format=["%*s %f %*d %f"]
  1274. ac_cv_swap_conv=1024
  1275. AC_MSG_RESULT([using FreeBSD format swapinfo])
  1276. fi
  1277. elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null]
  1278. then
  1279. ac_cv_have_swap=yes
  1280. ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM"
  1281. ac_cv_swap_format=["%*s %f %*d %f"]
  1282. ac_cv_swap_conv=1024
  1283. AC_MSG_RESULT([using HP-UX format swapinfo])
  1284. fi
  1285. dnl end if for PATH_TO_SWAPINFO
  1286. fi
  1287. AC_PATH_PROG(PATH_TO_LSPS,lsps)
  1288. if (test -n "$PATH_TO_LSPS")
  1289. then
  1290. AC_MSG_CHECKING([for $PATH_TO_LSPS format])
  1291. if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null]
  1292. then
  1293. ac_cv_have_swap=yes
  1294. ac_cv_swap_command="$PATH_TO_LSPS -a"
  1295. ac_cv_swap_format=["%*s %*s %*s %f%*s %f %*s"]
  1296. ac_cv_swap_conv=1
  1297. AC_MSG_RESULT([using AIX lsps])
  1298. fi
  1299. dnl end if for PATH_TO_SWAPINFO
  1300. fi
  1301. dnl
  1302. dnl test for swapctl system call, both the 2-arg and 3-arg variants
  1303. dnl fwict, the 2-arg is an SVR4 standard, whereas the 3-arg is shared
  1304. dnl in the various BSD's
  1305. dnl
  1306. AC_CHECK_HEADERS([sys/stat.h sys/param.h])
  1307. AC_CHECK_HEADERS([sys/swap.h], [], [], [
  1308. #ifdef HAVE_SYS_PARAM_H
  1309. #include <sys/param.h>
  1310. #endif
  1311. ])
  1312. AC_CHECK_DECLS([swapctl],,,[
  1313. #include <unistd.h>
  1314. #include <sys/types.h>
  1315. #include <sys/param.h>
  1316. #include <sys/stat.h>
  1317. #include <sys/swap.h>
  1318. ])
  1319. AC_CHECK_TYPES([swaptbl_t, swapent_t],,,[
  1320. #include <sys/types.h>
  1321. #include <sys/param.h>
  1322. #include <sys/stat.h>
  1323. #include <sys/swap.h>
  1324. ])
  1325. AC_CHECK_MEMBERS([struct swapent.se_nblks],,,[
  1326. #include <unistd.h>
  1327. #include <sys/types.h>
  1328. #include <sys/param.h>
  1329. #include <sys/stat.h>
  1330. #include <sys/swap.h>
  1331. ])
  1332. if test "$ac_cv_have_decl_swapctl" = "yes";
  1333. then
  1334. EXTRAS="$EXTRAS check_swap"
  1335. AC_MSG_CHECKING([for 2-arg (SVR4) swapctl])
  1336. if test "$ac_cv_type_swaptbl_t" = "yes" -a \
  1337. "$ac_cv_type_swapent_t" = "yes";
  1338. then
  1339. AC_MSG_RESULT([yes])
  1340. ac_cv_check_swap_swapctl_svr4="1";
  1341. AC_DEFINE([CHECK_SWAP_SWAPCTL_SVR4],1,
  1342. [Define if 2-argument SVR4 swapctl exists])
  1343. else
  1344. AC_MSG_RESULT([no])
  1345. AC_MSG_CHECKING([for 3-arg (*BSD) swapctl])
  1346. if test "$ac_cv_member_struct_swapent_se_nblks" = "yes";
  1347. then
  1348. AC_MSG_RESULT([yes])
  1349. AC_DEFINE([CHECK_SWAP_SWAPCTL_BSD],1,
  1350. [Define if 3-argument BSD swapctl exists])
  1351. else
  1352. AC_MSG_RESULT([no])
  1353. fi
  1354. fi
  1355. AC_MSG_CHECKING([for whether swapctl uses blocks or pages])
  1356. if test "$ac_cv_check_swap_swapctl_svr4" = "1";
  1357. then
  1358. dnl
  1359. dnl the SVR4 spec returns values in pages
  1360. dnl
  1361. AC_MSG_RESULT([page])
  1362. AC_CHECK_DECLS([sysconf])
  1363. AC_MSG_CHECKING([for system page size])
  1364. if test "$ac_cv_have_decl_sysconf" = "yes";
  1365. then
  1366. AC_MSG_RESULT([determined by sysconf(3)])
  1367. ac_cv_swap_conv="(1048576/sysconf(_SC_PAGESIZE))"
  1368. else
  1369. AC_MSG_WARN([don't know. guessing 4096k])
  1370. ac_cv_swap_conv=256
  1371. fi
  1372. else
  1373. dnl
  1374. dnl the BSD spec returns values in blocks
  1375. dnl
  1376. AC_MSG_RESULT([blocks (assuming 512b)])
  1377. ac_cv_swap_conv=2048
  1378. fi
  1379. AC_DEFINE_UNQUOTED(SWAP_CONVERSION,$ac_cv_swap_conv,
  1380. [Conversion factor to MB])
  1381. fi
  1382. dnl
  1383. dnl end tests for the swapctl system calls
  1384. dnl
  1385. if test "x$ac_cv_have_swap" != "x"
  1386. then
  1387. AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])
  1388. EXTRAS="$EXTRAS check_swap"
  1389. fi
  1390. if test "x$ac_cv_swap_command" != "x"
  1391. then
  1392. AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$ac_cv_swap_command",
  1393. [Path to swap/swapinfo binary, with any args])
  1394. AC_DEFINE_UNQUOTED(SWAP_FORMAT,"$ac_cv_swap_format",
  1395. [Format string for parsing swap output])
  1396. AC_DEFINE_UNQUOTED(SWAP_CONVERSION,$ac_cv_swap_conv,
  1397. [Conversion factor to MB])
  1398. fi
  1399. AC_ARG_WITH(proc-meminfo,
  1400. ACX_HELP_STRING([--with-proc-meminfo=PATH],
  1401. [path to /proc/meminfo or equivalent]),
  1402. ac_cv_proc_meminfo=$withval)
  1403. dnl dunno why this does not work below - use hack (kbd)
  1404. dnl fine on linux, broken on solaris
  1405. dnl if /bin/test -e "/proc/meminfo"
  1406. AC_MSG_CHECKING([for /proc/meminfo])
  1407. if test -n "$ac_cv_proc_meminfo"; then
  1408. AC_MSG_RESULT([(command line) $ac_cv_proc_meminfo])
  1409. elif [cat /proc/meminfo > /dev/null 2>&1]; then
  1410. AC_MSG_RESULT([found /proc/meminfo])
  1411. ac_cv_proc_meminfo="/proc/meminfo"
  1412. else
  1413. AC_MSG_RESULT([no])
  1414. fi
  1415. if test -n "$ac_cv_proc_meminfo"; then
  1416. AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo])
  1417. AC_DEFINE_UNQUOTED(PROC_MEMINFO,"$ac_cv_proc_meminfo",[path to /proc/meminfo if name changes])
  1418. EXTRAS="$EXTRAS check_swap"
  1419. fi
  1420. AC_PATH_PROG(PATH_TO_DIG,dig)
  1421. AC_ARG_WITH(dig_command,
  1422. ACX_HELP_STRING([--with-dig-command=PATH],
  1423. [Path to dig command]), PATH_TO_DIG=$withval)
  1424. if test -n "$PATH_TO_DIG"; then
  1425. EXTRAS="$EXTRAS check_dig"
  1426. AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present])
  1427. fi
  1428. AC_PATH_PROG(PATH_TO_APTGET,apt-get)
  1429. AC_ARG_WITH(apt-get_command,
  1430. ACX_HELP_STRING([--with-apt-get-command=PATH],
  1431. [Path to apt-get command]),
  1432. with_apt_get_command=$withval,
  1433. with_apt_get_command=$PATH_TO_APTGET)
  1434. AC_DEFINE_UNQUOTED(PATH_TO_APTGET,"$PATH_TO_APTGET",[Path to apt-get command, if present])
  1435. if test -n "$PATH_TO_APTGET" ; then
  1436. EXTRAS="$EXTRAS check_apt"
  1437. fi
  1438. if test -f $srcdir/plugins/check_nt.c ; then
  1439. EXTRAS="$EXTRAS check_nt"
  1440. fi
  1441. dnl used in check_dhcp
  1442. AC_CHECK_HEADERS(sys/sockio.h)
  1443. case $host in
  1444. *bsd*)
  1445. AC_DEFINE(__bsd__,1,[bsd specific code in check_dhcp.c])
  1446. ;;
  1447. *linux*)
  1448. AC_DEFINE(__linux__,1,[linux specific code in check_dhcp.c])
  1449. ;;
  1450. *sun* | *solaris*)
  1451. AC_DEFINE(__sun__,1,[sun specific code in check_dhcp.c])
  1452. ;;
  1453. *hpux*)
  1454. AC_DEFINE(__hpux__,1,[hpux specific code in check_dhcp.c])
  1455. ;;
  1456. esac
  1457. AC_SUBST(EXTRAS)
  1458. AC_SUBST(EXTRAS_ROOT)
  1459. AC_SUBST(EXTRA_NETOBJS)
  1460. AC_SUBST(DEPLIBS)
  1461. AM_GNU_GETTEXT([external], [need-ngettext])
  1462. AM_GNU_GETTEXT_VERSION(0.15)
  1463. dnl Check for Redhat spopen problem
  1464. dnl Wierd problem where ECHILD is returned from a wait call in error
  1465. dnl Only appears to affect nslookup and dig calls. Only affects redhat around
  1466. dnl 2.6.9-11 (okay in 2.6.9-5). Redhat investigating root cause
  1467. dnl We patch plugins/popen.c
  1468. dnl Need to add smp because uname different on those
  1469. dnl Can force patch to be applied with --enable-redhat-pthread-workaround
  1470. AC_ARG_ENABLE(redhat-pthread-workaround,
  1471. AC_HELP_STRING([--enable-redhat-pthread-workaround],
  1472. [force Redhat patch to be applied (default: test system)]),
  1473. [ac_cv_enable_redhat_pthread_workaround=$enableval],
  1474. [ac_cv_enable_redhat_pthread_workaround=test])
  1475. if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then
  1476. if echo $ac_cv_uname_r | egrep "\.EL(smp)?$" >/dev/null 2>&1 ; then
  1477. AC_MSG_NOTICE([See http://nagiosplugins.org/faq/compile/configure_appears_to_hang if this next part takes a long time])
  1478. AC_MSG_CHECKING(for redhat spopen problem)
  1479. ( cd config_test && make && make test ) > /dev/null 2>&1
  1480. if test $? -eq 0 ; then
  1481. AC_MSG_RESULT(okay)
  1482. else
  1483. AC_MSG_RESULT(error)
  1484. AC_DEFINE(REDHAT_SPOPEN_ERROR, 1, [Workaround on redhat in spopen])
  1485. fi
  1486. fi
  1487. elif test "$ac_cv_enable_redhat_pthread_workaround" = "yes" ; then
  1488. AC_DEFINE(REDHAT_SPOPEN_ERROR, 1, [Forced workaround on redhat in spopen])
  1489. fi
  1490. dnl Perl modules
  1491. AC_ARG_ENABLE(perl-modules,
  1492. AC_HELP_STRING([--enable-perl-modules],
  1493. [Enables installation of Nagios::Plugin and its dependencies (default: no)]),
  1494. [enable_perl_modules=$enableval],
  1495. [enable_perl_modules=no])
  1496. if test "$enable_perl_modules" = "yes" ; then
  1497. AC_SUBST(PERLMODS_DIR,perlmods)
  1498. fi
  1499. # From Tap configure
  1500. # Checks for libraries
  1501. case "$host" in
  1502. *-*-*freebsd4*)
  1503. LDFLAGS="$LDFLAGS -pthread"
  1504. HAVE_LIBPTHREAD=1
  1505. ;;
  1506. *)
  1507. AC_CHECK_LIB(pthread, main)
  1508. ;;
  1509. esac
  1510. dnl External libraries - see ACKNOWLEDGEMENTS
  1511. gl_INIT
  1512. dnl Some helpful common compile errors checked here
  1513. 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
  1514. AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?)
  1515. fi
  1516. AC_OUTPUT(
  1517. Makefile
  1518. tap/Makefile
  1519. lib/Makefile
  1520. plugins/Makefile
  1521. lib/tests/Makefile
  1522. plugins-root/Makefile
  1523. plugins-scripts/Makefile
  1524. plugins-scripts/subst
  1525. plugins-scripts/utils.pm
  1526. plugins-scripts/utils.sh
  1527. perlmods/Makefile
  1528. command.cfg
  1529. test.pl
  1530. pkg/solaris/pkginfo
  1531. po/Makefile.in
  1532. )
  1533. dnl the ones below that are commented out need to be cleaned up
  1534. dnl in the configure code above to use with_foo instead of ac_cv_foo
  1535. dnl if we want them to show up here. it'd also make the code cleaner.
  1536. dnl i'll get to that on another rainy day :) -sf
  1537. ACX_FEATURE([with],[apt-get-command])
  1538. dnl ACX_FEATURE([with],[dig-command])
  1539. dnl ACX_FEATURE([with],[fping-command])
  1540. dnl ACX_FEATURE([with],[mailq-command])
  1541. dnl ACX_FEATURE([with],[nslookup-command])
  1542. ACX_FEATURE([with],[ping6-command])
  1543. ACX_FEATURE([with],[ping-command])
  1544. dnl ACX_FEATURE([with],[qstat-command])
  1545. dnl ACX_FEATURE([with],[rpcinfo-command])
  1546. dnl ACX_FEATURE([with],[smbclient-command])
  1547. dnl ACX_FEATURE([with],[snmpget-command])
  1548. dnl ACX_FEATURE([with],[snmpgetnext-command])
  1549. dnl ACX_FEATURE([with],[ssh-command])
  1550. dnl ACX_FEATURE([with],[uptime-command])
  1551. dnl ACX_FEATURE([with],[proc-meminfo])
  1552. dnl ACX_FEATURE([with],[ps-command])
  1553. dnl ACX_FEATURE([with],[ps-format])
  1554. dnl ACX_FEATURE([with],[ps-cols])
  1555. dnl ACX_FEATURE([with],[ps-varlist])
  1556. ACX_FEATURE([with],[ipv6])
  1557. ACX_FEATURE([with],[mysql])
  1558. ACX_FEATURE([with],[openssl])
  1559. ACX_FEATURE([with],[gnutls])
  1560. ACX_FEATURE([enable],[extra-opts])
  1561. ACX_FEATURE([with],[perl])
  1562. ACX_FEATURE([enable],[perl-modules])
  1563. ACX_FEATURE([with],[cgiurl])
  1564. ACX_FEATURE([with],[trusted-path])
  1565. ACX_FEATURE([enable],[libtap])