1
dnl Process this file with autoconf to produce a configure script.
2
AC_REVISION ($Revision: 1.150 $)
4
AC_INIT(check_mysql_health,2.1.7)
5
AM_INIT_AUTOMAKE([1.9 tar-pax])
11
AC_PREFIX_DEFAULT(/usr/local/nagios)
13
dnl Figure out how to invoke "install" and what install options to use.
19
dnl AC_PROG_GCC_TRADITIONAL
24
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"
27
SUPPORT="Send email to gerhard.lausser@consol.de 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"
30
AC_ARG_WITH(nagios_user,
31
ACX_HELP_STRING([--with-nagios-user=USER],
32
[set user name to run nagios]),
33
with_nagios_user=$withval,
34
with_nagios_user=nagios)
35
AC_ARG_WITH(nagios_group,
36
ACX_HELP_STRING([--with-nagios-group=GROUP],
37
[set group name to run nagios]),
38
with_nagios_group=$withval,
39
with_nagios_group=nagios)
40
AC_SUBST(with_nagios_user)
41
AC_SUBST(with_nagios_group)
42
INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
43
AC_SUBST(INSTALL_OPTS)
45
AC_ARG_WITH(statefiles_dir,
46
ACX_HELP_STRING([--with-statefiles-dir=PATH],
47
[sets directory for the state files (default=/var/tmp/check_mysql_health)]),
48
with_statefiles_dir=$withval,
49
with_statefiles_dir=/var/tmp/check_mysql_health)
50
AC_SUBST(STATEFILES_DIR, $with_statefiles_dir)
51
echo variable with_statefiles_dir is $with_statefiles_dir
53
AC_ARG_WITH(mymodules_dir,
54
ACX_HELP_STRING([--with-mymodules-dir=PATH],
55
[sets directory for own extensions which will be included during the build process (default=/usr/local/nagios/libexec)]),
56
with_mymodules_dir=$withval,
57
with_mymodules_dir=/usr/local/nagios/libexec)
58
AC_SUBST(MYMODULES_DIR, $with_mymodules_dir)
59
echo variable with_mymodules_dir is $with_mymodules_dir
61
AC_ARG_WITH(mymodules_dyn_dir,
62
ACX_HELP_STRING([--with-mymodules-dyn-dir=PATH],
63
[sets directory for own extensions which will be included at runtime (default=/usr/local/nagios/libexec)]),
64
with_mymodules_dyn_dir=$withval,
65
with_mymodules_dyn_dir=/usr/local/nagios/libexec)
66
AC_SUBST(MYMODULES_DYN_DIR, $with_mymodules_dyn_dir)
67
echo variable with_mymodules_dyn_dir is $with_mymodules_dyn_dir
70
dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
72
dnl Checks for programs.
74
AC_PATH_PROG(PERL,perl)
75
AC_PATH_PROG(GZIP,gzip)
76
AC_PATH_PROGS(AWK,gawk nawk /usr/xpg4/bin/awk awk)
77
AC_PATH_PROG(GREP,grep)
78
AC_PATH_PROG(ECHO,echo)
82
dnl allow them to override the path of perl
84
ACX_HELP_STRING([--with-perl=PATH],
85
[sets path to perl executable]),
86
with_perl=$withval,with_perl=$PERL)
87
AC_SUBST(PERL, $with_perl)
91
plugins-scripts/Makefile
96
ACX_FEATURE([with],[perl])
97
ACX_FEATURE([with],[statefiles-dir])
98
ACX_FEATURE([with],[nagios-user])
99
ACX_FEATURE([with],[nagios-group])
100
ACX_FEATURE([with],[mymodules-dir])
101
ACX_FEATURE([with],[mymodules-dyn-dir])