summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in71
1 files changed, 62 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index ef0d06b6..7fccb98d 100644
--- a/configure.in
+++ b/configure.in
@@ -11,6 +11,7 @@ PACKAGE_RELEASE="${REL}"
11AC_SUBST(PACKAGE_RELEASE) 11AC_SUBST(PACKAGE_RELEASE)
12AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION}) 12AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
13AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h) 13AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
14AC_CANONICAL_HOST
14 15
15AC_PREFIX_DEFAULT(/usr/local/nagios) 16AC_PREFIX_DEFAULT(/usr/local/nagios)
16 17
@@ -52,18 +53,38 @@ SUPPORT="Send email to nagios-users@lists.sourceforge.net if you have questions\
52AC_SUBST(SUPPORT) 53AC_SUBST(SUPPORT)
53 54
54dnl CGIURL has changed for Nagios with 1.0 beta 55dnl CGIURL has changed for Nagios with 1.0 beta
55AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin) 56dnl AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin)
57AC_ARG_WITH(cgiurl,
58 ACX_HELP_STRING([--with-cgiurl=DIR],
59 [sets URL for cgi programs]),
60 cgiurl=$withval,
61 cgiurl=/nagios/cgi-bin)
56CGIURL="$cgiurl" 62CGIURL="$cgiurl"
57AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs]) 63AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs])
58 64
59AC_ARG_WITH(nagios_user,--with-nagios-user=<user> sets user name to run nagios,nagios_usr=$withval,nagios_usr=nagios) 65dnl AC_ARG_WITH(nagios_user,--with-nagios-user=<user> sets user name to run nagios,nagios_usr=$withval,nagios_usr=nagios)
60AC_ARG_WITH(nagios_group,--with-nagios-group=<group> sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios) 66AC_ARG_WITH(nagios_user,
67 ACX_HELP_STRING([--with-nagios-user=USER],
68 [set user name to run nagios]),
69 nagios_usr=$withval,
70 nagios_usr=nagios)
71dnl AC_ARG_WITH(nagios_group,--with-nagios-group=<group> sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios)
72AC_ARG_WITH(nagios_group,
73 ACX_HELP_STRING([--with-nagios-group=GROUP],
74 [set group name to run nagios]),
75 nagios_grp=$withval,
76 nagios_grp=nagios)
61AC_SUBST(nagios_usr) 77AC_SUBST(nagios_usr)
62AC_SUBST(nagios_grp) 78AC_SUBST(nagios_grp)
63INSTALL_OPTS="-o $nagios_usr -g $nagios_grp" 79INSTALL_OPTS="-o $nagios_usr -g $nagios_grp"
64AC_SUBST(INSTALL_OPTS) 80AC_SUBST(INSTALL_OPTS)
65 81
66AC_ARG_WITH(trusted_path,--with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin sets trusted path for executables called by scripts,trusted_path=$withval,trusted_path=/bin:/sbin:/usr/bin:/usr/sbin) 82dnl AC_ARG_WITH(trusted_path,--with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin sets trusted path for executables called by scripts,trusted_path=$withval,trusted_path=/bin:/sbin:/usr/bin:/usr/sbin)
83AC_ARG_WITH(trusted_path,
84 ACX_HELP_STRING([--with-trusted-path=PATH],
85 [sets trusted path for executables called by scripts (default=/bin:/sbin:/usr/bin:/usr/sbin)]),
86 trusted_path=$withval,
87 trusted_path=/bin:/sbin:/usr/bin:/usr/sbin)
67AC_SUBST(trusted_path) 88AC_SUBST(trusted_path)
68 89
69EXTRAS= 90EXTRAS=
@@ -84,6 +105,18 @@ AC_PATH_PROG(SH,sh)
84AC_PATH_PROG(HOSTNAME,hostname) 105AC_PATH_PROG(HOSTNAME,hostname)
85AC_PATH_PROG(BASENAME,basename) 106AC_PATH_PROG(BASENAME,basename)
86 107
108dnl
109dnl Check for miscellaneous stuff
110dnl
111
112case $host_vender-$host_os in
113sun*)
114 AC_DEFINE(__EXTENSIONS__,1,[Sun's netdb.h needs this for getaddrinfo])
115 ;;
116osf*)
117 AC_DEFINE(_OSF_SOURCE,1,[OSF needs this for getaddrinfo])
118 ;;
119esac
87 120
88dnl 121dnl
89dnl Checks for libraries. 122dnl Checks for libraries.
@@ -98,7 +131,11 @@ AC_SUBST(SOCKETLIBS)
98dnl Check for PostgreSQL libraries 131dnl Check for PostgreSQL libraries
99_SAVEDLIBS="$LIBS" 132_SAVEDLIBS="$LIBS"
100_SAVEDCPPFLAGS="$CPPFLAGS" 133_SAVEDCPPFLAGS="$CPPFLAGS"
101AC_ARG_WITH(pgsql,--with-pgsql=<dir> sets path to pgsql installation,[PGSQL=$withval]) 134dnl AC_ARG_WITH(pgsql,--with-pgsql=<dir> sets path to pgsql installation,[PGSQL=$withval])
135AC_ARG_WITH(pgsql,
136 ACX_HELP_STRING([--with-pgsql=DIR],
137 [sets path to pgsql installation]),
138 PGSQL=$withval,)
102AC_CHECK_LIB(crypt,main) 139AC_CHECK_LIB(crypt,main)
103if test "$ac_cv_lib_crypt_main" = "yes"; then 140if test "$ac_cv_lib_crypt_main" = "yes"; then
104 if test -n "$PGSQL"; then 141 if test -n "$PGSQL"; then
@@ -175,7 +212,11 @@ LIBS="$_SAVEDLIBS"
175dnl Check for mysql libraries 212dnl Check for mysql libraries
176_SAVEDLIBS="$LIBS" 213_SAVEDLIBS="$LIBS"
177_SAVEDCPPFLAGS="$CPPFLAGS" 214_SAVEDCPPFLAGS="$CPPFLAGS"
178AC_ARG_WITH(mysql,--with-mysql=<dir> sets path to mysql installation (assumes lib/mysql and include subdirs),[MYSQL=$withval]) 215dnl AC_ARG_WITH(mysql,--with-mysql=<dir> sets path to mysql installation (assumes lib/mysql and include subdirs),[MYSQL=$withval])
216AC_ARG_WITH(mysql,
217 ACX_HELP_STRING([--with-mysql=DIR],
218 [sets path to mysql installation (assumes lib/mysql and include subdirs]),
219 MYSQL=$withval,)
179if test -n "$MYSQL"; then 220if test -n "$MYSQL"; then
180 MYSQLLIBDIR=$MYSQL/lib/mysql 221 MYSQLLIBDIR=$MYSQL/lib/mysql
181 CPPFLAGS="-I$MYSQL/include" 222 CPPFLAGS="-I$MYSQL/include"
@@ -229,7 +270,11 @@ elif test "$OPENSSL" = "/usr/local/bin/openssl"; then
229elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then 270elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then
230 OPENSSL=/usr/local/ssl 271 OPENSSL=/usr/local/ssl
231fi 272fi
232AC_ARG_WITH(openssl,--with-openssl=<dir> sets path to openssl installation,[OPENSSL=$withval]) 273dnl AC_ARG_WITH(openssl,--with-openssl=<dir> sets path to openssl installation,[OPENSSL=$withval])
274AC_ARG_WITH(openssl,
275 ACX_HELP_STRING([--with-openssl=DIR],
276 [sets path to openssl installation]),
277 OPENSSL=$withval,)
233 278
234dnl ######################################################################### 279dnl #########################################################################
235dnl Check if Posix getaddrinfo() is available. It is also possible to use 280dnl Check if Posix getaddrinfo() is available. It is also possible to use
@@ -785,7 +830,11 @@ else
785 echo "** Unable to find usable ps syntax" 830 echo "** Unable to find usable ps syntax"
786fi 831fi
787 832
788AC_ARG_WITH(df_command,--with-df-command=<syntax> sets syntax for df,DF_COMMAND=$withval) 833dnl AC_ARG_WITH(df_command,--with-df-command=<syntax>,sets syntax for df,DF_COMMAND=$withval)
834AC_ARG_WITH(df_command,
835 ACX_HELP_STRING([--with-df-command=SYNTAX],
836 [sets syntax for df]),
837 DF_COMMAND=$withval,)
789if test -n "$DF_COMMAND" 838if test -n "$DF_COMMAND"
790then 839then
791 AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command]) 840 AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command])
@@ -815,7 +864,11 @@ fi
815 864
816AC_PATH_PROG(PATH_TO_PING,ping) 865AC_PATH_PROG(PATH_TO_PING,ping)
817 866
818AC_ARG_WITH(ping_command,--with-ping-command=<syntax> sets syntax for ping,PING_COMMAND=$withval) 867dnl AC_ARG_WITH(ping_command,--with-ping-command=<syntax> sets syntax for ping,PING_COMMAND=$withval)
868AC_ARG_WITH(ping_command,
869 ACX_HELP_STRING([--with-ping-command=SYNTAX],
870 [sets syntax for ping]),
871 PING_COMMAND=$withval,)
819if test -n "$PING_COMMAND" 872if test -n "$PING_COMMAND"
820then 873then
821 echo " ping syntax... (command-line) $PING_COMMAND" 874 echo " ping syntax... (command-line) $PING_COMMAND"