1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-02 01:20:54 +00:00

Update to 1.3.0.b2.

Submitted by:	maintainer
This commit is contained in:
Pete Fritchman 2003-01-03 19:08:00 +00:00
parent b69248efff
commit 40e5056d19
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=72439
20 changed files with 142 additions and 226 deletions

View File

@ -6,12 +6,11 @@
#
PORTNAME= nagios-plugins
PORTVERSION= 1.3.b1
PORTREVISION= 0
PORTVERSION= 1.3.0.b2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nagiosplug
DISTNAME= nagiosplug-1.3-beta1
DISTNAME= nagios-plugins-1.3.0-beta2
MAINTAINER= blaz@si.FreeBSD.org
@ -21,7 +20,8 @@ CONFIGURE_ARGS= --sbindir=${PREFIX}/share/nagios/sbin \
--libexecdir=${PREFIX}/libexec/nagios \
--datadir=${PREFIX}/share/nagios \
--sysconfdir=${PREFIX}/etc/nagios \
--localstatedir=${PREFIX}/var/nagios
--localstatedir=${PREFIX}/var/nagios \
--with-df-command="/bin/df -Pkt noprocfs"
CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
MKDIR="${MKDIR}"

View File

@ -0,0 +1,7 @@
PLIST_SUB+= SUB_QSTAT="@comment "
PLIST_SUB+= SUB_FPING="@comment "
PLIST_SUB+= SUB_SNMP="@comment "
PLIST_SUB+= SUB_RADIUS="@comment "
PLIST_SUB+= SUB_MYSQL="@comment "
PLIST_SUB+= SUB_PGSQL="@comment "
PLIST_SUB+= SUB_LDAP="@comment "

View File

@ -1 +1 @@
MD5 (nagiosplug-1.3-beta1.tar.gz) = be984a7feebe0f6f3ecf13255f18014d
MD5 (nagios-plugins-1.3.0-beta2.tar.gz) = 7a6cce300f6a90c7587d4eced4271182

View File

@ -1,20 +1,20 @@
--- plugins/check_by_ssh.c.orig Thu Feb 28 07:42:57 2002
+++ plugins/check_by_ssh.c Sun Jul 14 09:50:43 2002
@@ -382,6 +382,8 @@
--- plugins/check_by_ssh.c.orig Wed Nov 20 02:19:07 2002
+++ plugins/check_by_ssh.c Tue Nov 26 14:20:28 2002
@@ -361,6 +361,8 @@
" list of nagios service names, separated by ':' [optional]\n"
"-n, --name=NAME\n"
" short name of host in nagios configuration [optional]\n"
+ "-v, --verbose\n"
+ " display command being executed\n"
"\n"
"The most common mode of use is to refer to a local identity file with\n"
"the '-i' option. In this mode, the identity pair should have a null\n"
@@ -405,7 +407,7 @@
"-4, --use-ipv4\n"
" tell ssh to use IPv4\n"
"-6, --use-ipv6\n"
@@ -388,7 +390,7 @@
{
printf
("Usage:\n"
- "check_by_ssh [-f] [-t timeout] [-i identity] [-l user] -H <host> <command>\n"
+ "check_by_ssh [-fv] [-t timeout] [-i identity] [-l user] -H <host> <command>\n"
" [-n name] [-s servicelist] [-O outputfile] [-P port]\n"
- "check_by_ssh [-f46] [-t timeout] [-i identity] [-l user] -H <host> -C <command>\n"
+ "check_by_ssh [-fv46] [-t timeout] [-i identity] [-l user] -H <host> -C <command>\n"
" [-n name] [-s servicelist] [-O outputfile] [-p port]\n"
"check_by_ssh -V prints version info\n"
"check_by_ssh -h prints more detailed help\n");

View File

@ -0,0 +1,11 @@
--- plugins/check_mysql.c.orig Fri Nov 15 02:04:51 2002
+++ plugins/check_mysql.c Tue Nov 26 15:12:58 2002
@@ -207,7 +207,7 @@
if (strlen(db) == 0 && argc > c)
db = argv[c++];
- if (is_intnonneg (argv[c]))
+ if (argc > c && is_intnonneg (argv[c]))
db_port = atoi (argv[c++]);
return validate_arguments ();

View File

@ -1,13 +0,0 @@
--- plugins/check_snmp.c.orig Thu Feb 28 07:42:59 2002
+++ plugins/check_snmp.c Sun Jul 14 17:21:03 2002
@@ -145,8 +145,8 @@
/* create the command line to execute */
command_line = ssprintf
(command_line,
- "%s -m ALL -v 1 %s %s %s",
- PATH_TO_SNMPGET, server_address, community, oid);
+ "%s -m ALL -v 1 -c %s %s %s",
+ PATH_TO_SNMPGET, community, server_address, oid);
/* run the command */
child_process = spopen (command_line);

View File

@ -1,20 +0,0 @@
--- plugins/check_ssh.c.orig Thu Feb 28 07:42:59 2002
+++ plugins/check_ssh.c Sun Jul 14 09:59:41 2002
@@ -250,7 +250,7 @@
printf ("%s\n", output);
ssh_proto = output + 4;
ssh_server = ssh_proto + strspn (ssh_proto, "0123456789-. ");
- ssh_proto[strspn (ssh_proto, "0123456789-. ")] = 0;
+ ssh_proto[strspn (ssh_proto, "0123456789. ")] = 0;
printf
("SSH ok - protocol version %s - server version %s\n",
ssh_proto, ssh_server);
@@ -277,7 +277,7 @@
{
printf
("Usage:\n"
- " %s -t [timeout] -p [port] <host>\n"
+ " %s [-t <timeout>] [-p <port>] <host>\n"
" %s -V prints version info\n"
" %s -h prints more detailed help\n", PROGNAME, PROGNAME, PROGNAME);
}

View File

@ -1,7 +1,7 @@
--- configure.in.orig Thu Jun 13 05:03:07 2002
+++ configure.in Fri Jul 19 21:31:32 2002
@@ -7,7 +7,7 @@
dnl AM_INIT_AUTOMAKE(nagios-plugins,$VERSION)
--- configure.in.orig Fri Nov 22 03:46:49 2002
+++ configure.in Tue Nov 26 14:48:27 2002
@@ -14,7 +14,7 @@
AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
-AC_PREFIX_DEFAULT(/usr/local/nagios)
@ -9,7 +9,7 @@
dnl Figure out how to invoke "install" and what install options to use.
@@ -46,7 +46,6 @@
@@ -56,7 +56,6 @@
AC_ARG_WITH(nagios_group,--with-nagios-group=<group> sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios)
AC_SUBST(nagios_usr)
AC_SUBST(nagios_grp)
@ -17,7 +17,7 @@
AC_SUBST(INSTALL_OPTS)
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)
@@ -98,8 +97,8 @@
@@ -102,8 +101,8 @@
AC_CHECK_HEADERS(postgresql/libpq-fe.h)
AC_CHECK_HEADERS(libpq-fe.h)
if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
@ -28,7 +28,7 @@
elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
PGINCLUDE="-I/usr/include/postgresql"
@@ -127,25 +126,37 @@
@@ -131,25 +130,37 @@
LIBS="$_SAVEDLIBS"
CPPFLAGS="$_SAVEDCPPFLAGS"
@ -72,70 +72,42 @@
AC_SUBST(LDAPLIBS)
AC_SUBST(LDAPINCLUDE)
EXTRAS="$EXTRAS check_ldap"
@@ -154,13 +165,14 @@
@@ -158,7 +169,7 @@
AC_MSG_WARN([install LDAP libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
-
+fi
dnl Check for mysql libraries
_SAVEDLIBS="$LIBS"
_SAVEDCPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I/usr/include"
+CPPFLAGS="-I${LOCALBASE}/include"
AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval])
-if test -n "$MYSQLLIBS"; then
+if test -n "$MYSQLLIBDIR"; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
elif test -f /usr/lib/libmysqlclient.so; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
@@ -176,7 +188,8 @@
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
@@ -351,24 +362,6 @@
LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a"
fi
if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
- AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h)
+ AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h,MYSQLINCLUDE="-I${LOCALBASE}/include")
+ AC_SUBST(MYSQLINCLUDE)
if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
EXTRAS="$EXTRAS check_mysql"
AC_SUBST(MYSQLLIBS)
@@ -190,7 +203,7 @@
AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
-CPPFLAGS="$_SAVEDCPPFLAGS"
+CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE"
dnl Check for OpenSSL location
AC_PATH_PROG(OPENSSL,openssl)
@@ -269,16 +282,16 @@
dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
dnl AC_SUBST(libsnprintf_a_SOURCES)
-dnl We used to not do long options unless a compatible lib was found
-dnl Now we provide code and make libgetopt if native is not suitable
-AC_MSG_CHECKING(for getopt_long)
-AC_TRY_COMPILE([#include <getopt.h>
-#include <stdlib.h>],
-[int option_index=0;
-static struct option *long_options;
-getopt_long(0,NULL,"+h",long_options,&option_index);],
-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
+dnl AC_MSG_CHECKING(for getopt_long)
+dnl AC_TRY_COMPILE([#include <getopt.h>
+dnl #include <stdlib.h>],
+dnl [int option_index=0;
+dnl static struct option *long_options;
+dnl getopt_long(0,NULL,"+h",long_options,&option_index);],
+dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
+dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
-AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
+dnl AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
@@ -683,6 +696,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
- #include <stdlib.h>],
- [int option_index=0;
- static struct option *long_options;
- getopt_long(0,NULL,"+h",long_options,&option_index);],
- [AC_DEFINE(HAVE_GETOPT_H,1,[Define if getopt headers are found])
- AC_DEFINE(HAVE_GETOPT_LONG,1,[Define if getopt_long is found])
- AC_MSG_RESULT(yes)],
- [AC_DEFINE(HAVE_GETOPT_H,1,[Define if getopt headers are found])
- AC_DEFINE(HAVE_GETOPT_LONG,1,[Define if getopt_long is found])
- AC_MSG_RESULT(no)
- import_sources=getopt
- LIBS="$LIBS -lgetopt"
- DEPLIBS="$DEPLIBS libgetopt.a"])
-
AC_TRY_COMPILE([#include <sys/time.h>],
[struct timeval *tv;
struct timezone *tz;],
@@ -775,6 +768,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO",[path and arguments for invoking 'who'])
fi
+AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp)
@ -143,7 +115,7 @@
AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
if test -x "$PATH_TO_SNMPGET"
then
@@ -705,7 +720,10 @@
@@ -797,7 +792,10 @@
echo "** Tried $PERL - install Net::SNMP perl module if you want to"
echo " use the perl snmp plugins"
fi
@ -154,7 +126,7 @@
AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
AC_PATH_PROG(PATH_TO_QSTAT,qstat)
if test -x "$PATH_TO_QUAKESTAT"
@@ -719,7 +737,10 @@
@@ -811,7 +809,10 @@
else
echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
fi
@ -165,7 +137,7 @@
AC_PATH_PROG(PATH_TO_FPING,fping)
if test -x "$PATH_TO_FPING"
then
@@ -727,6 +748,7 @@
@@ -819,6 +820,7 @@
EXTRAS="$EXTRAS check_fping"
else
echo "** Get fping from http://www.fping.com in order to make check_fping plugin"

View File

@ -18,12 +18,12 @@ libexec/nagios/check_ircd
%%SUB_LDAP%%libexec/nagios/check_ldap
libexec/nagios/check_load
libexec/nagios/check_log
libexec/nagios/check_mailq
libexec/nagios/check_mrtg
libexec/nagios/check_mrtgtraf
%%SUB_MYSQL%%libexec/nagios/check_mysql
libexec/nagios/check_nagios
libexec/nagios/check_nntp
libexec/nagios/check_nt
libexec/nagios/check_ntp
libexec/nagios/check_nwstat
libexec/nagios/check_oracle
@ -47,6 +47,7 @@ libexec/nagios/check_ups
libexec/nagios/check_users
libexec/nagios/check_vsz
libexec/nagios/check_wave
libexec/nagios/negate
libexec/nagios/urlize
libexec/nagios/utils.pm
libexec/nagios/utils.sh

View File

@ -79,7 +79,7 @@ while [ "$1" ]; do
;;
\"MySQL\")
echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client"
echo "CONFIGURE_ARGS+= --with-mysqllibdir=\${LOCALBASE}/lib/mysql"
echo "CONFIGURE_ARGS+= --with-mysql=\${LOCALBASE}"
SUB_MYSQL=""
;;
\"PostgreSQL\")

View File

@ -6,12 +6,11 @@
#
PORTNAME= nagios-plugins
PORTVERSION= 1.3.b1
PORTREVISION= 0
PORTVERSION= 1.3.0.b2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nagiosplug
DISTNAME= nagiosplug-1.3-beta1
DISTNAME= nagios-plugins-1.3.0-beta2
MAINTAINER= blaz@si.FreeBSD.org
@ -21,7 +20,8 @@ CONFIGURE_ARGS= --sbindir=${PREFIX}/share/nagios/sbin \
--libexecdir=${PREFIX}/libexec/nagios \
--datadir=${PREFIX}/share/nagios \
--sysconfdir=${PREFIX}/etc/nagios \
--localstatedir=${PREFIX}/var/nagios
--localstatedir=${PREFIX}/var/nagios \
--with-df-command="/bin/df -Pkt noprocfs"
CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
MKDIR="${MKDIR}"

View File

@ -0,0 +1,7 @@
PLIST_SUB+= SUB_QSTAT="@comment "
PLIST_SUB+= SUB_FPING="@comment "
PLIST_SUB+= SUB_SNMP="@comment "
PLIST_SUB+= SUB_RADIUS="@comment "
PLIST_SUB+= SUB_MYSQL="@comment "
PLIST_SUB+= SUB_PGSQL="@comment "
PLIST_SUB+= SUB_LDAP="@comment "

View File

@ -1 +1 @@
MD5 (nagiosplug-1.3-beta1.tar.gz) = be984a7feebe0f6f3ecf13255f18014d
MD5 (nagios-plugins-1.3.0-beta2.tar.gz) = 7a6cce300f6a90c7587d4eced4271182

View File

@ -1,20 +1,20 @@
--- plugins/check_by_ssh.c.orig Thu Feb 28 07:42:57 2002
+++ plugins/check_by_ssh.c Sun Jul 14 09:50:43 2002
@@ -382,6 +382,8 @@
--- plugins/check_by_ssh.c.orig Wed Nov 20 02:19:07 2002
+++ plugins/check_by_ssh.c Tue Nov 26 14:20:28 2002
@@ -361,6 +361,8 @@
" list of nagios service names, separated by ':' [optional]\n"
"-n, --name=NAME\n"
" short name of host in nagios configuration [optional]\n"
+ "-v, --verbose\n"
+ " display command being executed\n"
"\n"
"The most common mode of use is to refer to a local identity file with\n"
"the '-i' option. In this mode, the identity pair should have a null\n"
@@ -405,7 +407,7 @@
"-4, --use-ipv4\n"
" tell ssh to use IPv4\n"
"-6, --use-ipv6\n"
@@ -388,7 +390,7 @@
{
printf
("Usage:\n"
- "check_by_ssh [-f] [-t timeout] [-i identity] [-l user] -H <host> <command>\n"
+ "check_by_ssh [-fv] [-t timeout] [-i identity] [-l user] -H <host> <command>\n"
" [-n name] [-s servicelist] [-O outputfile] [-P port]\n"
- "check_by_ssh [-f46] [-t timeout] [-i identity] [-l user] -H <host> -C <command>\n"
+ "check_by_ssh [-fv46] [-t timeout] [-i identity] [-l user] -H <host> -C <command>\n"
" [-n name] [-s servicelist] [-O outputfile] [-p port]\n"
"check_by_ssh -V prints version info\n"
"check_by_ssh -h prints more detailed help\n");

View File

@ -0,0 +1,11 @@
--- plugins/check_mysql.c.orig Fri Nov 15 02:04:51 2002
+++ plugins/check_mysql.c Tue Nov 26 15:12:58 2002
@@ -207,7 +207,7 @@
if (strlen(db) == 0 && argc > c)
db = argv[c++];
- if (is_intnonneg (argv[c]))
+ if (argc > c && is_intnonneg (argv[c]))
db_port = atoi (argv[c++]);
return validate_arguments ();

View File

@ -1,13 +0,0 @@
--- plugins/check_snmp.c.orig Thu Feb 28 07:42:59 2002
+++ plugins/check_snmp.c Sun Jul 14 17:21:03 2002
@@ -145,8 +145,8 @@
/* create the command line to execute */
command_line = ssprintf
(command_line,
- "%s -m ALL -v 1 %s %s %s",
- PATH_TO_SNMPGET, server_address, community, oid);
+ "%s -m ALL -v 1 -c %s %s %s",
+ PATH_TO_SNMPGET, community, server_address, oid);
/* run the command */
child_process = spopen (command_line);

View File

@ -1,20 +0,0 @@
--- plugins/check_ssh.c.orig Thu Feb 28 07:42:59 2002
+++ plugins/check_ssh.c Sun Jul 14 09:59:41 2002
@@ -250,7 +250,7 @@
printf ("%s\n", output);
ssh_proto = output + 4;
ssh_server = ssh_proto + strspn (ssh_proto, "0123456789-. ");
- ssh_proto[strspn (ssh_proto, "0123456789-. ")] = 0;
+ ssh_proto[strspn (ssh_proto, "0123456789. ")] = 0;
printf
("SSH ok - protocol version %s - server version %s\n",
ssh_proto, ssh_server);
@@ -277,7 +277,7 @@
{
printf
("Usage:\n"
- " %s -t [timeout] -p [port] <host>\n"
+ " %s [-t <timeout>] [-p <port>] <host>\n"
" %s -V prints version info\n"
" %s -h prints more detailed help\n", PROGNAME, PROGNAME, PROGNAME);
}

View File

@ -1,7 +1,7 @@
--- configure.in.orig Thu Jun 13 05:03:07 2002
+++ configure.in Fri Jul 19 21:31:32 2002
@@ -7,7 +7,7 @@
dnl AM_INIT_AUTOMAKE(nagios-plugins,$VERSION)
--- configure.in.orig Fri Nov 22 03:46:49 2002
+++ configure.in Tue Nov 26 14:48:27 2002
@@ -14,7 +14,7 @@
AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
-AC_PREFIX_DEFAULT(/usr/local/nagios)
@ -9,7 +9,7 @@
dnl Figure out how to invoke "install" and what install options to use.
@@ -46,7 +46,6 @@
@@ -56,7 +56,6 @@
AC_ARG_WITH(nagios_group,--with-nagios-group=<group> sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios)
AC_SUBST(nagios_usr)
AC_SUBST(nagios_grp)
@ -17,7 +17,7 @@
AC_SUBST(INSTALL_OPTS)
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)
@@ -98,8 +97,8 @@
@@ -102,8 +101,8 @@
AC_CHECK_HEADERS(postgresql/libpq-fe.h)
AC_CHECK_HEADERS(libpq-fe.h)
if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
@ -28,7 +28,7 @@
elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
PGINCLUDE="-I/usr/include/postgresql"
@@ -127,25 +126,37 @@
@@ -131,25 +130,37 @@
LIBS="$_SAVEDLIBS"
CPPFLAGS="$_SAVEDCPPFLAGS"
@ -72,70 +72,42 @@
AC_SUBST(LDAPLIBS)
AC_SUBST(LDAPINCLUDE)
EXTRAS="$EXTRAS check_ldap"
@@ -154,13 +165,14 @@
@@ -158,7 +169,7 @@
AC_MSG_WARN([install LDAP libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
-
+fi
dnl Check for mysql libraries
_SAVEDLIBS="$LIBS"
_SAVEDCPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I/usr/include"
+CPPFLAGS="-I${LOCALBASE}/include"
AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval])
-if test -n "$MYSQLLIBS"; then
+if test -n "$MYSQLLIBDIR"; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
elif test -f /usr/lib/libmysqlclient.so; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
@@ -176,7 +188,8 @@
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
@@ -351,24 +362,6 @@
LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a"
fi
if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
- AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h)
+ AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h,MYSQLINCLUDE="-I${LOCALBASE}/include")
+ AC_SUBST(MYSQLINCLUDE)
if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
EXTRAS="$EXTRAS check_mysql"
AC_SUBST(MYSQLLIBS)
@@ -190,7 +203,7 @@
AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
-CPPFLAGS="$_SAVEDCPPFLAGS"
+CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE"
dnl Check for OpenSSL location
AC_PATH_PROG(OPENSSL,openssl)
@@ -269,16 +282,16 @@
dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
dnl AC_SUBST(libsnprintf_a_SOURCES)
-dnl We used to not do long options unless a compatible lib was found
-dnl Now we provide code and make libgetopt if native is not suitable
-AC_MSG_CHECKING(for getopt_long)
-AC_TRY_COMPILE([#include <getopt.h>
-#include <stdlib.h>],
-[int option_index=0;
-static struct option *long_options;
-getopt_long(0,NULL,"+h",long_options,&option_index);],
-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
+dnl AC_MSG_CHECKING(for getopt_long)
+dnl AC_TRY_COMPILE([#include <getopt.h>
+dnl #include <stdlib.h>],
+dnl [int option_index=0;
+dnl static struct option *long_options;
+dnl getopt_long(0,NULL,"+h",long_options,&option_index);],
+dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
+dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
-AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
+dnl AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
@@ -683,6 +696,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
- #include <stdlib.h>],
- [int option_index=0;
- static struct option *long_options;
- getopt_long(0,NULL,"+h",long_options,&option_index);],
- [AC_DEFINE(HAVE_GETOPT_H,1,[Define if getopt headers are found])
- AC_DEFINE(HAVE_GETOPT_LONG,1,[Define if getopt_long is found])
- AC_MSG_RESULT(yes)],
- [AC_DEFINE(HAVE_GETOPT_H,1,[Define if getopt headers are found])
- AC_DEFINE(HAVE_GETOPT_LONG,1,[Define if getopt_long is found])
- AC_MSG_RESULT(no)
- import_sources=getopt
- LIBS="$LIBS -lgetopt"
- DEPLIBS="$DEPLIBS libgetopt.a"])
-
AC_TRY_COMPILE([#include <sys/time.h>],
[struct timeval *tv;
struct timezone *tz;],
@@ -775,6 +768,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO",[path and arguments for invoking 'who'])
fi
+AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp)
@ -143,7 +115,7 @@
AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
if test -x "$PATH_TO_SNMPGET"
then
@@ -705,7 +720,10 @@
@@ -797,7 +792,10 @@
echo "** Tried $PERL - install Net::SNMP perl module if you want to"
echo " use the perl snmp plugins"
fi
@ -154,7 +126,7 @@
AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
AC_PATH_PROG(PATH_TO_QSTAT,qstat)
if test -x "$PATH_TO_QUAKESTAT"
@@ -719,7 +737,10 @@
@@ -811,7 +809,10 @@
else
echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
fi
@ -165,7 +137,7 @@
AC_PATH_PROG(PATH_TO_FPING,fping)
if test -x "$PATH_TO_FPING"
then
@@ -727,6 +748,7 @@
@@ -819,6 +820,7 @@
EXTRAS="$EXTRAS check_fping"
else
echo "** Get fping from http://www.fping.com in order to make check_fping plugin"

View File

@ -18,12 +18,12 @@ libexec/nagios/check_ircd
%%SUB_LDAP%%libexec/nagios/check_ldap
libexec/nagios/check_load
libexec/nagios/check_log
libexec/nagios/check_mailq
libexec/nagios/check_mrtg
libexec/nagios/check_mrtgtraf
%%SUB_MYSQL%%libexec/nagios/check_mysql
libexec/nagios/check_nagios
libexec/nagios/check_nntp
libexec/nagios/check_nt
libexec/nagios/check_ntp
libexec/nagios/check_nwstat
libexec/nagios/check_oracle
@ -47,6 +47,7 @@ libexec/nagios/check_ups
libexec/nagios/check_users
libexec/nagios/check_vsz
libexec/nagios/check_wave
libexec/nagios/negate
libexec/nagios/urlize
libexec/nagios/utils.pm
libexec/nagios/utils.sh

View File

@ -79,7 +79,7 @@ while [ "$1" ]; do
;;
\"MySQL\")
echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client"
echo "CONFIGURE_ARGS+= --with-mysqllibdir=\${LOCALBASE}/lib/mysql"
echo "CONFIGURE_ARGS+= --with-mysql=\${LOCALBASE}"
SUB_MYSQL=""
;;
\"PostgreSQL\")