configure.in 58 KB

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