Debian Codegraph @

check_hpasm/src/configure.in

raw
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION ($Revision: 1.150 $)
3 AC_PREREQ(2.58)
4 AC_INIT(check_hpasm,4.9)
5 AM_INIT_AUTOMAKE([1.9 tar-pax])
6 AC_CANONICAL_HOST
7
8 RELEASE=1
9 AC_SUBST(RELEASE)
10
11 AC_PREFIX_DEFAULT(/usr/local/nagios)
12
13 dnl Figure out how to invoke "install" and what install options to use.
14 AC_PROG_INSTALL
15 AC_SUBST(INSTALL)
16
17 AC_PROG_MAKE_SET
18 AC_PROG_AWK
19
20 WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n"
21 AC_SUBST(WARRANTY)
22
23 SUPPORT="Send email to [email protected] if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n"
24 AC_SUBST(SUPPORT)
25
26 AC_ARG_WITH(nagios_user,
27 ACX_HELP_STRING([--with-nagios-user=USER],
28 [set user name to run nagios]),
29 with_nagios_user=$withval,
30 with_nagios_user=nagios)
31 AC_ARG_WITH(nagios_group,
32 ACX_HELP_STRING([--with-nagios-group=GROUP],
33 [set group name to run nagios]),
34 with_nagios_group=$withval,
35 with_nagios_group=nagios)
36 AC_SUBST(with_nagios_user)
37 AC_SUBST(with_nagios_group)
38 INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
39 AC_SUBST(INSTALL_OPTS)
40 AC_ARG_WITH(noinst_level,
41 ACX_HELP_STRING([--with-noinst-level=LEVEL],
42 [error level if hpasm is not installed]),
43 with_noinst_level=$withval,
44 with_noinst_level=unknown)
45 AC_SUBST(NOINSTLEVEL, $with_noinst_level)
46 AC_ARG_WITH(degrees,
47 ACX_HELP_STRING([--with-degrees=UNIT],
48 [which temperature unit to use. (celsius or fahrenheit)]),
49 with_degrees=$withval,
50 with_degrees=unknown)
51 case "$with_degrees" in
52 fahrenheit)
53 AC_SUBST(CELSIUS, 0)
54 ;;
55 *)
56 AC_SUBST(CELSIUS, 1)
57 ;;
58 esac
59 AC_ARG_ENABLE([perfdata],
60 [ --enable-perfdata wether to output perfdata (default=no)], ,enable_perfdata=no)
61 if test x"$enable_perfdata" = xyes ; then
62 AC_SUBST(PERFDATA, 1)
63 else
64 AC_SUBST(PERFDATA, 0)
65 fi
66 AC_ARG_ENABLE([extendedinfo],
67 [ --enable-extendedinfo wether to output extended info (default=no)], ,enable_extendedinfo=no)
68 if test x"$enable_extendedinfo" = xyes ; then
69 AC_SUBST(EXTENDEDINFO, 1)
70 else
71 AC_SUBST(EXTENDEDINFO, 0)
72 fi
73 AC_ARG_ENABLE([hwinfo],
74 [ --disable-hwinfo wether to output model desc., serial no., bios version (default=yes)], ,enable_hwinfo=yes)
75
76 if test x"$enable_hwinfo" = xyes ; then
77 AC_SUBST(HWINFO, 1)
78 else
79 AC_SUBST(HWINFO, 0)
80 fi
81 AC_ARG_ENABLE([hpacucli],
82 [ --enable-hpacucli wether to check raid status with hpacucli (default=no)], ,enable_hpacucli=no)
83
84 if test x"$enable_hpacucli" = xyes ; then
85 AC_SUBST(HPACUCLI, 1)
86 elif test x"$enable_hpacucli" = xmaybe ; then
87 AC_SUBST(HPACUCLI, 2)
88 else
89 AC_SUBST(HPACUCLI, 0)
90 fi
91
92
93
94
95
96 case "$host_os" in
97 *hp*)
98 defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/contrib/bin
99 ;;
100 *)
101 defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin
102 ;;
103 esac
104
105 EXTRAS=
106 dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
107
108 dnl Checks for programs.
109 AC_PATH_PROG(SH,sh)
110 AC_PATH_PROG(PERL,perl)
111
112 dnl allow them to override the path of perl
113 AC_ARG_WITH(perl,
114 ACX_HELP_STRING([--with-perl=PATH],
115 [sets path to perl executable]),
116 with_perl=$withval,with_perl=$PERL)
117 AC_SUBST(PERL, $with_perl)
118
119 AC_OUTPUT(
120 Makefile
121 plugins-scripts/Makefile
122 plugins-scripts/subst
123 )
124
125 ACX_FEATURE([with],[perl])
126 ACX_FEATURE([with],[nagios-user])
127 ACX_FEATURE([with],[nagios-group])
128 ACX_FEATURE([with],[noinst-level])
129 ACX_FEATURE([with],[degrees])
130 ACX_FEATURE([enable],[perfdata])
131 ACX_FEATURE([enable],[extendedinfo])
132 ACX_FEATURE([enable],[hwinfo])
133 ACX_FEATURE([enable],[hpacucli])