ax_nagios_get_paths 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. # ===========================================================================
  2. # SYNOPSIS
  3. #
  4. # AX_NAGIOS_GET_PATHS
  5. #
  6. # DESCRIPTION
  7. #
  8. # This macro figures out the installation & run paths for various systems
  9. # The argument are:
  10. # the O/S determined by the AX_NAGIOS_GET_OS macro.
  11. # the distribution type as determined by AX_NAGIOS_GET_DISTRIB_TYPE
  12. # the init type as determined by AX_NAGIOS_GET_INIT
  13. # the inetd type as determined by AX_NAGIOS_GET_INETD
  14. #
  15. # LICENSE
  16. #
  17. # Copyright (c) 2016 Nagios Core Development Team
  18. #
  19. # This program is free software; you can redistribute it and/or modify it
  20. # under the terms of the GNU General Public License as published by the
  21. # Free Software Foundation; either version 2 of the License, or (at your
  22. # option) any later version.
  23. #
  24. # This program is distributed in the hope that it will be useful, but
  25. # WITHOUT ANY WARRANTY; without even the implied warranty of
  26. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  27. # Public License for more details.
  28. #
  29. # You should have received a copy of the GNU General Public License along
  30. # with this program. If not, see <http://www.gnu.org/licenses/>.
  31. #
  32. # As a special exception, the respective Autoconf Macro's copyright owner
  33. # gives unlimited permission to copy, distribute and modify the configure
  34. # scripts that are the output of Autoconf when processing the Macro. You
  35. # need not follow the terms of the GNU General Public License when using
  36. # or distributing such scripts, even though portions of the text of the
  37. # Macro appear in them. The GNU General Public License (GPL) does govern
  38. # all other use of the material that constitutes the Autoconf Macro.
  39. #
  40. # This special exception to the GPL applies to versions of the Autoconf
  41. # Macro released by the Autoconf Archive. When you make and distribute a
  42. # modified version of the Autoconf Macro, you may extend this special
  43. # exception to the GPL to apply to your modified version as well.
  44. # ===========================================================================
  45. AU_ALIAS([AC_NAGIOS_GET_PATHS], [AX_NAGIOS_GET_PATHS])
  46. AC_DEFUN([AX_NAGIOS_GET_PATHS],
  47. [
  48. AC_SUBST(pkgsysconfdir)
  49. AC_SUBST(objsysconfdir)
  50. AC_SUBST(sbindir)
  51. AC_SUBST(initname)
  52. AC_SUBST(inetdname)
  53. AC_SUBST(pluginsdir)
  54. AC_SUBST(brokersdir)
  55. AC_SUBST(cgibindir)
  56. AC_SUBST(webdir)
  57. AC_SUBST(privatesysconfdir)
  58. AC_SUBST(pkglocalstatedir)
  59. AC_SUBST(logdir)
  60. AC_SUBST(piddir)
  61. AC_SUBST(pipedir)
  62. AC_SUBST(spooldir)
  63. AC_SUBST(initdir)
  64. AC_SUBST(inetddir)
  65. AC_SUBST(tmpfilesd)
  66. AC_SUBST(subsyslockdir)
  67. AC_SUBST(subsyslockfile)
  68. if test x$DBG_PATHS != x; then
  69. echo
  70. echo Incoming paths:
  71. echo " prefix $prefix"
  72. echo " exec_prefix $exec_prefix"
  73. echo " bindir $bindir"
  74. echo " sbindir $sbindir"
  75. echo " libexecdir $libexecdir"
  76. echo " sysconfdir $sysconfdir"
  77. echo " localstatedir $localstatedir"
  78. echo " datarootdir $datarootdir"
  79. echo " datadir $datadir"
  80. echo " localedir $localedir"
  81. echo
  82. fi
  83. AC_MSG_CHECKING(for which paths to use )
  84. AC_ARG_ENABLE(install_method,
  85. AC_HELP_STRING([--enable-install-method=<method>],
  86. [sets the install method to use: 'default' (the default) will install to
  87. /usr/local/nagios, 'os' will try to determine which method to use based
  88. on OS type and distribution. Fine tuning using the '--bindir', etc.
  89. overrides above will still work]),
  90. install_method=$enableval,
  91. install_method=default
  92. )
  93. AC_ARG_ENABLE(showdirs_only,
  94. AC_HELP_STRING([--enable-showdirs-only=yes],
  95. [This option will cause 'configure' to stop after determining the install
  96. locations based on '--enable-install-method', so you can see the
  97. destinations before a full './configure', 'make', 'make install'
  98. process.]),
  99. showdirs_only=$enableval,
  100. showdirs_only=no
  101. )
  102. AS_CASE([$install_method],
  103. [yes], install_method="os",
  104. [no], install_method="default",
  105. [default|os], :,
  106. [*], echo >&6; AC_MSG_ERROR(['--enable-install-method=$install_method' is invalid])
  107. )
  108. if test $showdirs_only != "no"; then showdirs_only="yes"; fi
  109. AS_CASE([$dist_type],
  110. [*solaris*|*hp-ux*|*aix*|*osx*], opsys=unix)
  111. need_cgi=no
  112. need_web=no
  113. need_brk=no
  114. need_plg=no
  115. need_pipe=no
  116. need_spl=no
  117. need_loc=no
  118. need_log_subdir=no
  119. need_etc_subdir=no
  120. need_pls_dir=no
  121. AS_CASE([$PKG_NAME],
  122. [nagios],
  123. need_log_subdir=yes
  124. need_etc_subdir=yes
  125. need_pls_dir=yes
  126. need_brk=yes
  127. need_pipe=yes
  128. need_spl=yes
  129. need_loc=yes
  130. need_cgi=yes
  131. need_web=yes,
  132. [ndoutils],
  133. need_spl=yes,
  134. [nrpe],
  135. need_plg=yes,
  136. [nsca],
  137. need_cgi=no,
  138. [plugins],
  139. need_loc=yes
  140. need_plg=yes
  141. )
  142. AC_ARG_WITH(pkgsysconfdir, AC_HELP_STRING([--with-pkgsysconfdir=DIR],
  143. [where configuration files should be placed]),
  144. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  145. pkgsysconfdir="$withval"
  146. fi)
  147. AC_ARG_WITH(objsysconfdir, AC_HELP_STRING([--with-objsysconfdir=DIR],
  148. [where object configuration files should be placed]),
  149. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  150. objsysconfdir="$withval"
  151. fi)
  152. AC_ARG_WITH(privatesysconfdir, AC_HELP_STRING([--with-privatesysconfdir=DIR],
  153. [where private configuration files should be placed]),
  154. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  155. privatesysconfdir="$withval"
  156. fi)
  157. AC_ARG_WITH(webdir, AC_HELP_STRING([--with-webdir=DIR],
  158. [where the website files should be placed]),
  159. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  160. webdir="$withval"
  161. fi)
  162. AC_ARG_WITH(pluginsdir, AC_HELP_STRING([--with-pluginsdir=DIR],
  163. [where the plugins should be placed]),
  164. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  165. pluginsdir="$withval"
  166. fi)
  167. AC_ARG_WITH(brokersdir, AC_HELP_STRING([--with-brokersdir=DIR],
  168. [where the broker modules should be placed]),
  169. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  170. brokersdir="$withval"
  171. fi)
  172. AC_ARG_WITH(cgibindir, AC_HELP_STRING([--with-cgibindir=DIR],
  173. [where the CGI programs should be placed]),
  174. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  175. cgibindir="$withval"
  176. fi)
  177. AC_ARG_WITH(logdir, AC_HELP_STRING([--with-logdir=DIR],
  178. [where log files should be placed]),
  179. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  180. logdir="$withval"
  181. fi)
  182. AC_ARG_WITH(piddir, AC_HELP_STRING([--with-piddir=DIR],
  183. [where the PID file should be placed]),
  184. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  185. piddir="$withval"
  186. fi)
  187. AC_ARG_WITH(pipedir, AC_HELP_STRING([--with-pipedir=DIR],
  188. [where socket and pipe files should be placed]),
  189. if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
  190. pipedir="$withval"
  191. fi)
  192. #
  193. # Setup the base directory
  194. #
  195. if test $install_method = "default"; then
  196. if test $opsys = "unix"; then
  197. if test x"$prefix" = "xNONE"; then prefix="/usr/local/nagios"; fi
  198. else
  199. if test x"$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi
  200. fi
  201. datarootdir=${datarootdir="$prefix"}
  202. else
  203. if test x"$datadir" = x'${datarootdir}'; then AS_UNSET(datadir); fi
  204. if test x"$sysconfdir" = x'${prefix}/etc'; then AS_UNSET(sysconfdir); fi
  205. if test x"$prefix" = "xNONE"; then
  206. if test $dist_type = freebsd -o $dist_type = openbsd -o $dist_type = osx; then
  207. prefix="/usr/local"
  208. elif test $dist_type = netbsd; then
  209. prefix="/usr/pkg"
  210. else
  211. prefix="/usr"
  212. fi
  213. fi
  214. if test x"$exec_prefix" = "xNONE"; then exec_prefix=$prefix; fi
  215. if test x"$localstatedir" = x'${prefix}/var'; then
  216. if test $dist_type = "osx"; then
  217. localstatedir="/private/var"
  218. else
  219. localstatedir="/var"
  220. fi
  221. fi
  222. if test $opsys = "unix"; then
  223. if test x"$datarootdir" = x'${prefix}/share'; then
  224. if test $dist_type = "hp-ux"; then
  225. datarootdir="/usr/local/share"
  226. if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
  227. libexecdir="/usr/nagios"
  228. fi
  229. elif test $dist_type = "osx"; then
  230. datarootdir="/usr/local/share"
  231. if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
  232. libexecdir="/usr/local/nagios"
  233. fi
  234. elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then
  235. libexecdir="/usr/lib/nagios"
  236. fi
  237. fi
  238. if test $dist_type = "osx"; then
  239. if test x"$sbindir" = x'${exec_prefix}/sbin'; then
  240. sbindir="$libexecdir"
  241. fi
  242. if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
  243. libexecdir="/usr/local/libexec/nagios"
  244. fi
  245. fi
  246. elif test $opsys = "bsd"; then
  247. if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
  248. libexecdir=${exec_prefix}/libexec/nagios;
  249. fi
  250. elif test x"$libexecdir" = x'${exec_prefix}/lib'; then
  251. libexecdir=${libexecdir}/nagios;
  252. elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then
  253. libexecdir=${exec_prefix}/lib/nagios;
  254. fi
  255. fi
  256. if test x"$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi
  257. tmpfilesd=${tmpfilesd="/usr/lib/tmpfiles.d"}
  258. if test ! -d "$tmpfilesd"; then
  259. tmpfilesd="N/A"
  260. else
  261. tmpfilesd="$tmpfilesd/$PKG_NAME.conf"
  262. fi
  263. subsyslockdir=${subsyslockdir="/var/lock/subsys"}
  264. if test ! -d "$subsyslockdir"; then
  265. subsyslockdir="N/A"
  266. subsyslockfile="N/A"
  267. else
  268. subsyslockfile="$subsyslockdir/$PKG_NAME"
  269. fi
  270. if test "$need_loc" = no; then
  271. localedir="N/A"
  272. fi
  273. if test $install_method = "default" ; then
  274. #
  275. # Do the default setup
  276. #
  277. sbindir=${bindir}
  278. datadir=${datadir="$datarootdir"}
  279. if test $need_web = yes; then
  280. webdir=${webdir="$datadir"}
  281. else
  282. webdir="N/A"
  283. fi
  284. if test $opsys = "unix"; then
  285. sysconfdir=${sysconfdir="/etc/opt"}
  286. fi
  287. pkgsysconfdir=${pkgsysconfdir="$sysconfdir"}
  288. if test $need_etc_subdir = yes; then
  289. objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
  290. else
  291. objsysconfdir="N/A"
  292. fi
  293. privatesysconfdir=${privatesysconfdir="$pkgsysconfdir"}
  294. logdir=${logdir="$localstatedir"}
  295. piddir=${piddir="$localstatedir"}
  296. if test "$need_pipe" = yes; then
  297. pipedir=${pipedir="$localstatedir/rw"}
  298. else
  299. pipedir="N/A"
  300. fi
  301. if test "$need_pls_dir" = yes; then
  302. pkglocalstatedir=${pkglocalstatedir="$localstatedir"}
  303. else
  304. pkglocalstatedir="N/A"
  305. fi
  306. if test "$need_spl" = yes; then
  307. spooldir=${spooldir="$localstatedir/var"}
  308. else
  309. spooldir="N/A"
  310. fi
  311. if test $need_brk = yes; then
  312. brokersdir=${brokersdir="$bindir"}
  313. else
  314. brokersdir="N/A"
  315. fi
  316. if test $need_plg = yes; then
  317. pluginsdir=${pluginsdir="$libexecdir"}
  318. else
  319. pluginsdir="N/A"
  320. fi
  321. if test $need_cgi = yes; then
  322. cgibindir=${cgibindir="$prefix/sbin"}
  323. else
  324. cgibindir="N/A"
  325. fi
  326. elif test $opsys = "linux"; then
  327. #
  328. # Linux "Standard" install
  329. #
  330. install_method="$install_method : FHS"
  331. datadir=${datadir="$datarootdir/nagios"}
  332. if test $need_web = yes; then
  333. webdir=${webdir="$datadir/html"}
  334. else
  335. webdir="N/A"
  336. fi
  337. sysconfdir=${sysconfdir="/etc"}
  338. pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
  339. if test $need_etc_subdir = yes; then
  340. objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
  341. else
  342. objsysconfdir="N/A"
  343. fi
  344. privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
  345. if test $need_log_subdir = yes; then
  346. logdir=${logdir="$localstatedir/log/$PKG_NAME"}
  347. else
  348. logdir=${logdir="$localstatedir/log"}
  349. fi
  350. piddir=${piddir="$localstatedir/run/${PKG_NAME}"}
  351. if test "$need_pipe" = yes; then
  352. pipedir=${pipedir="$localstatedir/run/${PKG_NAME}"}
  353. else
  354. pipedir="N/A"
  355. fi
  356. if test "$need_pls_dir" = yes; then
  357. pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$PKG_NAME"}
  358. else
  359. pkglocalstatedir="N/A"
  360. fi
  361. if test "$need_spl" = yes; then
  362. spooldir=${spooldir="$localstatedir/spool/$PKG_NAME"}
  363. else
  364. spooldir="N/A"
  365. fi
  366. if test $need_brk = yes; then
  367. brokersdir=${brokersdir="$libexecdir/brokers"}
  368. else
  369. brokersdir="N/A"
  370. fi
  371. if test $need_plg = yes; then
  372. pluginsdir=${pluginsdir="$libexecdir/plugins"}
  373. else
  374. pluginsdir="N/A"
  375. fi
  376. if test $need_cgi = yes; then
  377. cgibindir=${cgibindir="$libexecdir/cgi-bin"}
  378. else
  379. cgibindir="N/A"
  380. fi
  381. elif test $opsys = "unix"; then
  382. #
  383. # "Standard" Unix install
  384. #
  385. install_method="$install_method : Unix Standard"
  386. if test $dist_type = osx; then
  387. install_method="$install_method : OS X Standard"
  388. sbindir=${sbindir="/usr/local/libexec"}
  389. fi
  390. datadir=${datadir="$datarootdir/nagios"}
  391. if test $need_web = yes; then
  392. webdir=${webdir="$datadir/html"}
  393. else
  394. webdir="N/A"
  395. fi
  396. if test $dist_type = osx; then
  397. sysconfdir=${sysconfdir="/private/etc"}
  398. else
  399. sysconfdir=${sysconfdir="/etc"}
  400. fi
  401. pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
  402. if test $need_etc_subdir = yes; then
  403. objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
  404. else
  405. objsysconfdir="N/A"
  406. fi
  407. privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
  408. if test "$need_pls_dir" = yes; then
  409. pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$PKG_NAME"}
  410. else
  411. pkglocalstatedir="N/A"
  412. fi
  413. if test "$need_loc" = yes; then
  414. localedir=${localedir="/usr/local/share/locale/<lang>/LC_MESSAGES/nagios-plugins.mo"}
  415. fi
  416. if test "$need_spl" = yes; then
  417. spooldir=${spooldir="$localstatedir/spool/$PKG_NAME"}
  418. else
  419. spooldir="N/A"
  420. fi
  421. if test $need_brk = yes; then
  422. brokersdir=${brokersdir="$libexecdir/brokers"}
  423. else
  424. brokersdir="N/A"
  425. fi
  426. if test $need_plg = yes; then
  427. pluginsdir=${pluginsdir="$libexecdir/plugins"}
  428. else
  429. pluginsdir="N/A"
  430. fi
  431. if test $need_cgi = yes; then
  432. cgibindir=${cgibindir="$libexecdir/cgi-bin"}
  433. else
  434. cgibindir="N/A"
  435. fi
  436. AS_CASE([$dist_type],
  437. [*hp-ux*],
  438. piddir=${piddir="$pkgsysconfdir"}
  439. pipedir=${pipedir="$pkglocalstatedir"}
  440. logdir=${logdir="$pkglocalstatedir/log"},
  441. [*],
  442. piddir=${piddir="$localstatedir/run/${PKG_NAME}"}
  443. if test "$need_pipe" = yes; then
  444. pipedir=${pipedir="$localstatedir/run/${PKG_NAME}"}
  445. else
  446. pipedir="N/A"
  447. fi
  448. if test $need_log_subdir = yes; then
  449. logdir=${logdir="$localstatedir/log/$PKG_NAME"}
  450. else
  451. logdir=${logdir="$localstatedir/log"}
  452. fi
  453. )
  454. elif test $opsys = "bsd"; then
  455. #
  456. # "Standard" BSD install
  457. #
  458. install_method="$install_method : BSD"
  459. if test $dist_type = freebsd -o $dist_type = openbsd; then
  460. prefix=${prefix="/usr/local"}
  461. exec_prefix=${exec_prefix="/usr/local"}
  462. if test $dist_type = freebsd; then
  463. install_method="$install_method : FreeBSD"
  464. else
  465. install_method="$install_method : OpenBSD"
  466. fi
  467. elif test $dist_type = netbsd; then
  468. prefix=${prefix="/usr/pkg"}
  469. exec_prefix=${exec_prefix="/usr/pkg"}
  470. install_method="$install_method : NetBSD"
  471. fi
  472. datadir=${datadir="$datarootdir/nagios"}
  473. if test $need_web = yes -o $need_cgi = yes; then
  474. if test $dist_type = freebsd; then
  475. webdir=${webdir="$prefix/www/nagios"}
  476. elif test $dist_type = netbsd; then
  477. webdir=${webdir="$prefix/share/nagios"}
  478. elif test $dist_type = openbsd; then
  479. webdir=${webdir="/var/www/nagios"}
  480. fi
  481. else
  482. webdir="N/A"
  483. fi
  484. if test $dist_type = freebsd; then
  485. sysconfdir=${sysconfdir="/usr/local/etc"}
  486. else
  487. sysconfdir=${sysconfdir="/etc"}
  488. fi
  489. pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
  490. if test $need_etc_subdir = yes; then
  491. objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
  492. else
  493. objsysconfdir="N/A"
  494. fi
  495. privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
  496. if test "$need_pls_dir" = yes; then
  497. pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$PKG_NAME"}
  498. else
  499. pkglocalstatedir="N/A"
  500. fi
  501. if test "$need_loc" = yes; then
  502. localedir=${localedir="/usr/local/share/locale/<lang>/LC_MESSAGES/nagios-plugins.mo"}
  503. fi
  504. if test "$need_spl" = yes; then
  505. spooldir=${spooldir="$localstatedir/spool/$PKG_NAME"}
  506. else
  507. spooldir="N/A"
  508. fi
  509. if test $need_brk = yes; then
  510. brokersdir=${brokersdir="$libexecdir/brokers"}
  511. else
  512. brokersdir="N/A"
  513. fi
  514. if test $need_plg = yes; then
  515. pluginsdir=${pluginsdir="$libexecdir/plugins"}
  516. else
  517. pluginsdir="N/A"
  518. fi
  519. if test $need_cgi = yes; then
  520. if test $dist_type = freebsd; then
  521. cgibindir=${cgibindir="$webdir/cgi-bin"}
  522. elif test $dist_type = netbsd; then
  523. cgibindir=${pluginsdir="$libexecdir/cgi-bin"}
  524. elif test $dist_type = openbsd; then
  525. cgibindir=${pluginsdir="/var/www/cgi-bin/nagios"}
  526. fi
  527. else
  528. cgibindir="N/A"
  529. fi
  530. piddir=${piddir="$localstatedir/run/${PKG_NAME}"}
  531. if test "$need_pipe" = yes; then
  532. pipedir=${pipedir="$localstatedir/run/${PKG_NAME}"}
  533. else
  534. pipedir="N/A"
  535. fi
  536. if test $need_log_subdir = yes; then
  537. logdir=${logdir="$localstatedir/log/$PKG_NAME"}
  538. else
  539. logdir=${logdir="$localstatedir/log"}
  540. fi
  541. else
  542. #
  543. # Unknown install
  544. #
  545. install_method="unknown"
  546. webdir=unknown
  547. pkgsysconfdir=unknown
  548. objsysconfdir=unknown
  549. privatesysconfdir=unknown
  550. logdir=unknown
  551. piddir=unknown
  552. pipedir=unknown
  553. pkglocalstatedir=unknown
  554. spooldir=unknown
  555. brokersdir=unknown
  556. pluginsdir=unknown
  557. cgibindir=unknown
  558. fi
  559. eval prefix=$prefix
  560. eval exec_prefix=$exec_prefix
  561. eval bindir=$bindir
  562. eval sbindir=$sbindir
  563. eval datarootdir=$datarootdir
  564. eval datadir=$datadir
  565. eval libexecdir=$libexecdir
  566. eval brokersdir=$brokersdir
  567. eval pluginsdir=$pluginsdir
  568. eval cgibindir=$cgibindir
  569. eval pkglocalstatedir=$pkglocalstatedir
  570. eval webdir=$webdir
  571. eval localedir=$localedir
  572. eval sysconfdir=$sysconfdir
  573. eval pkgsysconfdir=$pkgsysconfdir
  574. eval piddir=$piddir
  575. #
  576. # Init scripts/files
  577. #
  578. AS_CASE([$init_type],
  579. [sysv],
  580. if test $dist_type = "hp-ux"; then
  581. initdir=${initdir="/sbin/init.d"}
  582. else
  583. initdir=${initdir="/etc/init.d"}
  584. fi
  585. initname=${initname="$PKG_NAME"}
  586. initconfdir=${initconfdir="/etc/conf.d"}
  587. initconf=${initconf="$initconfdir/$PKG_NAME"},
  588. [systemd],
  589. if test $dist_type = "debian"; then
  590. initdir=${initdir="/lib/systemd/system"}
  591. else
  592. initdir=${initdir="/usr/lib/systemd/system"}
  593. fi
  594. initname=${initname="$PKG_NAME.service"},
  595. [bsd],
  596. initdir=${initdir="/etc/rc.d"}
  597. initname=${initname="rc.$PKG_NAME"},
  598. [newbsd],
  599. initdir=${initdir="/etc/rc.d"}
  600. initname=${initname="$PKG_NAME"},
  601. [gentoo],
  602. initdir=${initdir="/etc/init.d"}
  603. initname=${initname="$PKG_NAME"}
  604. initconfdir=${initconfdir="/etc/init.d"}
  605. initconf=${initconf="$initconfdir/$PKG_NAME"},
  606. [openrc],
  607. initdir=${initdir="/etc/init.d"}
  608. initname=${initname="$PKG_NAME"}
  609. initconfdir=${initconfdir="/etc/conf.d"}
  610. initconf=${initconf="$initconfdir/$PKG_NAME"},
  611. [smf*],
  612. if test $init_type = smf10; then
  613. initdir=${initdir="/var/svc/manifest/network/nagios"}
  614. else
  615. initdir=${initdir="/lib/svc/manifest/network/nagios"}
  616. fi
  617. initname=${initname="$PKG_NAME.xml"}
  618. initconfdir=unknown
  619. initconf=unknown,
  620. [upstart],
  621. initdir=${initdir="/etc/init"}
  622. initname=${initname="$PKG_NAME.conf"}
  623. initconfdir=${initconfdir="/etc/default"}
  624. initconf=${initconf="$initconfdir/$PKG_NAME"},
  625. [launchd],
  626. initdir=${initdir="/Library/LaunchDaemons"}
  627. initname=${initname="org.nagios.$PKG_NAME.plist"},
  628. # initconfdir=${initconfdir="/private/etc"}
  629. # initconf=${initconf="$initconfdir/$PKG_NAME"},
  630. [*],
  631. initdir=unknown
  632. initname=unknown)
  633. #
  634. # Inetd (per connection) scripts/files
  635. #
  636. AS_CASE([$inetd_type],
  637. [inetd*],
  638. inetddir=${inetddir="/etc"}
  639. inetdname=${inetdname="inetd.conf"},
  640. [xinetd],
  641. inetddir=${inetddir="/etc/xinetd.d"}
  642. inetdname=${inetdname="$PKG_NAME"},
  643. [systemd],
  644. if test $dist_type = "debian"; then
  645. inetddir=${inetddir="/lib/systemd/system"}
  646. else
  647. inetddir=${inetddir="/usr/lib/systemd/system"}
  648. fi
  649. netdname=${inetdname="$PKG_NAME.socket"},
  650. [smf*],
  651. if test $init_type = smf10; then
  652. inetddir=${inetddir="/var/svc/manifest/network/nagios"}
  653. else
  654. inetddir=${inetddir="/lib/svc/manifest/network/nagios"}
  655. fi
  656. inetdname=${inetdname="$PKG_NAME.xml"},
  657. # [upstart],
  658. # inetddir=${inetddir="/etc/init.d"}
  659. # inetdname=${inetdname="$PKG_NAME"},
  660. [launchd],
  661. inetddir=${inetddir="/Library/LaunchDaemons"}
  662. inetdname=${inetdname="org.nagios.$PKG_NAME.plist"},
  663. [*],
  664. inetddir=${inetddir="unknown"}
  665. inetdname=${inetdname="unknown"})
  666. AC_MSG_RESULT($install_method)
  667. ])