Debian Codegraph @

macros/ax_nagios_get_paths

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