git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in
blob: ba41d6e423b499a6179384694330b5edf40dfae7 (plain)
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
dnl Process this file with autoconf to produce a configure script.
AC_REVISION ($Revision: 1.150 $)
AC_PREREQ(2.58)
AC_INIT(check_hpasm,4.8)
AM_INIT_AUTOMAKE([1.9 tar-pax])
AC_CANONICAL_HOST

RELEASE=1
AC_SUBST(RELEASE)

AC_PREFIX_DEFAULT(/usr/local/nagios)

dnl Figure out how to invoke "install" and what install options to use.
AC_PROG_INSTALL
AC_SUBST(INSTALL)

AC_PROG_MAKE_SET
AC_PROG_AWK

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"
AC_SUBST(WARRANTY)

SUPPORT="Send email to mail_redacted_for_web 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"
AC_SUBST(SUPPORT)

AC_ARG_WITH(nagios_user,
  ACX_HELP_STRING([--with-nagios-user=USER],
    [set user name to run nagios]),
  with_nagios_user=$withval,
  with_nagios_user=nagios)
AC_ARG_WITH(nagios_group,
  ACX_HELP_STRING([--with-nagios-group=GROUP],
    [set group name to run nagios]),
  with_nagios_group=$withval,
  with_nagios_group=nagios)
AC_SUBST(with_nagios_user)
AC_SUBST(with_nagios_group)
INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
AC_SUBST(INSTALL_OPTS)
AC_ARG_WITH(noinst_level,
  ACX_HELP_STRING([--with-noinst-level=LEVEL],
    [error level if hpasm is not installed]),
  with_noinst_level=$withval,
  with_noinst_level=unknown)
AC_SUBST(NOINSTLEVEL, $with_noinst_level)
AC_ARG_WITH(degrees,
  ACX_HELP_STRING([--with-degrees=UNIT],
    [which temperature unit to use. (celsius or fahrenheit)]),
  with_degrees=$withval,
  with_degrees=unknown)
case "$with_degrees" in
  fahrenheit)
    AC_SUBST(CELSIUS, 0)
    ;;
  *)
    AC_SUBST(CELSIUS, 1)
    ;;
esac
AC_ARG_ENABLE([perfdata],
[  --enable-perfdata       wether to output perfdata (default=no)], ,enable_perfdata=no)
if test x"$enable_perfdata" = xyes ; then
  AC_SUBST(PERFDATA, 1)
else
  AC_SUBST(PERFDATA, 0)
fi
AC_ARG_ENABLE([extendedinfo],
[  --enable-extendedinfo   wether to output extended info (default=no)], ,enable_extendedinfo=no)
if test x"$enable_extendedinfo" = xyes ; then
  AC_SUBST(EXTENDEDINFO, 1)
else
  AC_SUBST(EXTENDEDINFO, 0)
fi
AC_ARG_ENABLE([hwinfo],
[  --disable-hwinfo        wether to output model desc., serial no., bios version (default=yes)], ,enable_hwinfo=yes)

if test x"$enable_hwinfo" = xyes ; then
  AC_SUBST(HWINFO, 1)
else
  AC_SUBST(HWINFO, 0)
fi
AC_ARG_ENABLE([hpacucli],
[  --enable-hpacucli       wether to check raid status with hpacucli (default=no)], ,enable_hpacucli=no)

if test x"$enable_hpacucli" = xyes ; then
  AC_SUBST(HPACUCLI, 1)
elif test x"$enable_hpacucli" = xmaybe ; then
  AC_SUBST(HPACUCLI, 2)
else
  AC_SUBST(HPACUCLI, 0)
fi





case "$host_os" in 
  *hp*)
    defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/contrib/bin
    ;;
  *)
    defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin
    ;;
esac

EXTRAS=
dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH

dnl Checks for programs.
AC_PATH_PROG(SH,sh)
AC_PATH_PROG(PERL,perl)

dnl allow them to override the path of perl
AC_ARG_WITH(perl,
  ACX_HELP_STRING([--with-perl=PATH],
    [sets path to perl executable]),
  with_perl=$withval,with_perl=$PERL)
AC_SUBST(PERL, $with_perl)

AC_OUTPUT(
  Makefile 
  plugins-scripts/Makefile 
  plugins-scripts/subst 
)

ACX_FEATURE([with],[perl])
ACX_FEATURE([with],[nagios-user])
ACX_FEATURE([with],[nagios-group])
ACX_FEATURE([with],[noinst-level])
ACX_FEATURE([with],[degrees])
ACX_FEATURE([enable],[perfdata])
ACX_FEATURE([enable],[extendedinfo])
ACX_FEATURE([enable],[hwinfo])
ACX_FEATURE([enable],[hpacucli])