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