ax_nagios_get_paths 19 KB

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