configure.in 59 KB

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