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