diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | REQUIREMENTS | 1 | ||||
-rw-r--r-- | THANKS.in | 1 | ||||
-rw-r--r-- | configure.in | 71 | ||||
-rw-r--r-- | plugins/Makefile.am | 2 | ||||
-rw-r--r-- | plugins/tests/Makefile.am | 2 |
6 files changed, 16 insertions, 63 deletions
@@ -3,6 +3,8 @@ This file documents the major additions and syntax changes between releases. | |||
3 | 1.4.3 | 3 | 1.4.3 |
4 | Setuid plugins (check_dhcp, check_icmp) separated into plugins-root/. Run make install as root to install | 4 | Setuid plugins (check_dhcp, check_icmp) separated into plugins-root/. Run make install as root to install |
5 | check_mysql_query added to run arbitrary SQL commands, with threshold checking | 5 | check_mysql_query added to run arbitrary SQL commands, with threshold checking |
6 | ./configure --with-mysql option deprecated. To get mysql compiling, must have mysql_config in PATH | ||
7 | libtool now required for development systems | ||
6 | 8 | ||
7 | 1.4.2 | 9 | 1.4.2 |
8 | Fix for Redhat ES4 for check_dns and check_dig | 10 | Fix for Redhat ES4 for check_dns and check_dig |
diff --git a/REQUIREMENTS b/REQUIREMENTS index f16de93..fbd213b 100644 --- a/REQUIREMENTS +++ b/REQUIREMENTS | |||
@@ -39,6 +39,7 @@ check_mysql, check_mysql_query: | |||
39 | Lib: libmysql, libmysqlclient | 39 | Lib: libmysql, libmysqlclient |
40 | Redhat Powertools Source: mysql-3.20.32a-3.i386.rpm, mysql-devel-3.20.32a-3.i386.rpm (these seem to be broken, however) | 40 | Redhat Powertools Source: mysql-3.20.32a-3.i386.rpm, mysql-devel-3.20.32a-3.i386.rpm (these seem to be broken, however) |
41 | RPMS from www.mysql.org work better | 41 | RPMS from www.mysql.org work better |
42 | Must have mysql_config in PATH | ||
42 | 43 | ||
43 | check_pqsql: | 44 | check_pqsql: |
44 | - Requires the PostgreSQL libraries available from | 45 | - Requires the PostgreSQL libraries available from |
@@ -176,3 +176,4 @@ Gerhard Lausser | |||
176 | Jon Vandegrift | 176 | Jon Vandegrift |
177 | Jason Crawford | 177 | Jason Crawford |
178 | Steven Kreuzer | 178 | Steven Kreuzer |
179 | Johan Fischer | ||
diff --git a/configure.in b/configure.in index e02dc89..87b8e2c 100644 --- a/configure.in +++ b/configure.in | |||
@@ -254,72 +254,19 @@ fi | |||
254 | LIBS="$_SAVEDLIBS" | 254 | LIBS="$_SAVEDLIBS" |
255 | 255 | ||
256 | dnl Check for mysql libraries | 256 | dnl Check for mysql libraries |
257 | _SAVEDLIBS="$LIBS" | 257 | AC_PATH_PROG(MYSQLCONFIG, mysql_config) |
258 | _SAVEDCPPFLAGS="$CPPFLAGS" | 258 | if test -z "$MYSQLCONFIG"; then |
259 | FOUNDMYSQL="no" | 259 | AC_MSG_WARN([Skipping mysql plugin]) |
260 | AC_ARG_WITH(mysql, | 260 | AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).]) |
261 | ACX_HELP_STRING([--with-mysql=DIR], | 261 | else |
262 | [sets path to mysql installation (assumes lib/lib64 and include subdirs)]), | ||
263 | MYSQL=$withval,) | ||
264 | # Find the mysql client libs | ||
265 | if test -n "$MYSQL"; then | ||
266 | MYSQLLIBDIR=$MYSQL/lib | ||
267 | MYSQLLIB64DIR=$MYSQL/lib64 | ||
268 | elif test -f /usr/lib/libmysqlclient.so -o -f /usr/lib/libmysqlclient.a ; then | ||
269 | MYSQL="/usr" | ||
270 | MYSQLLIBDIR=$MYSQL/lib | ||
271 | MYSQLLIB64DIR=$MYSQL/lib64 | ||
272 | elif test -f /usr/lib/mysql/libmysqlclient.so -o -f /usr/lib/mysql/libmysqlclient.a ; then | ||
273 | MYSQL="/usr" | ||
274 | MYSQLLIBDIR=$MYSQL/lib/mysql | ||
275 | MYSQLLIB64DIR=$MYSQL/lib64/mysql | ||
276 | elif test -f /usr/local/lib/libmysqlclient.so -o -f /usr/local/lib/libmysqlclient.a ; then | ||
277 | MYSQL="/usr/local" | ||
278 | MYSQLLIBDIR=$MYSQL/lib | ||
279 | MYSQLLIB64DIR=$MYSQL/lib64 | ||
280 | elif test -f /usr/local/lib/mysql/libmysqlclient.so -o -f /usr/local/lib/mysql/libmysqlclient.a ; then | ||
281 | MYSQL="/usr/local" | ||
282 | MYSQLLIBDIR=$MYSQL/lib/mysql | ||
283 | MYSQLLIB64DIR=$MYSQL/lib64/mysql | ||
284 | elif test -f /usr/local/mysql/lib/libmysqlclient.so -o -f /usr/local/mysql/lib/libmysqlclient.a ; then | ||
285 | MYSQL="/usr/local/mysql" | ||
286 | MYSQLLIBDIR=$MYSQL/lib | ||
287 | MYSQLLIB64DIR=$MYSQL/lib64 | ||
288 | fi | ||
289 | |||
290 | # Check libs okay | ||
291 | if test -n "$MYSQL" ; then | ||
292 | CPPFLAGS="-L$MYSQLLIBDIR -L$MYSQLLIB64DIR" | ||
293 | AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz) | ||
294 | AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") | ||
295 | fi | ||
296 | |||
297 | # Check headers okay | ||
298 | if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then | ||
299 | CPPFLAGS="-I$MYSQL/include" | ||
300 | AC_CHECK_HEADERS(mysql.h errmsg.h, FOUNDMYSQL="yes" MYSQLINCLUDE="-I$MYSQL/include") | ||
301 | if test x"$FOUNDMYSQL" != x"yes" ; then | ||
302 | AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h, FOUNDMYSQL="yes" MYSQLINCLUDE="-I$MYSQL/include/mysql") | ||
303 | fi | ||
304 | fi | ||
305 | |||
306 | # Setup mysql plugins | ||
307 | if test $FOUNDMYSQL = "yes" ; then | ||
308 | EXTRAS="$EXTRAS check_mysql check_mysql_query" | 262 | EXTRAS="$EXTRAS check_mysql check_mysql_query" |
309 | if test -d $MYSQLLIB64DIR ; then | 263 | MYSQLINCLUDE=`$MYSQLCONFIG --include` |
310 | MYSQLLIBS="-L$MYSQLLIB64DIR -rpath $MYSQLLIB64DIR $MYSQLLIBS" | 264 | MYSQLLIBS=`$MYSQLCONFIG --libs` |
311 | fi | 265 | MYSQLCFLAGS=`$MYSQLCONFIG --cflags` |
312 | if test -d $MYSQLLIBDIR ; then | ||
313 | MYSQLLIBS="-L$MYSQLLIBDIR -rpath $MYSQLLIBDIR $MYSQLLIBS" | ||
314 | fi | ||
315 | AC_SUBST(MYSQLINCLUDE) | 266 | AC_SUBST(MYSQLINCLUDE) |
316 | AC_SUBST(MYSQLLIBS) | 267 | AC_SUBST(MYSQLLIBS) |
317 | else | 268 | AC_SUBST(MYSQLCFLAGS) |
318 | AC_MSG_WARN([Skipping mysql plugin]) | ||
319 | AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).]) | ||
320 | fi | 269 | fi |
321 | CPPFLAGS="$_SAVEDCPPFLAGS" | ||
322 | LIBS="$_SAVEDLIBS" | ||
323 | 270 | ||
324 | AC_CHECK_HEADERS(unistd.h) | 271 | AC_CHECK_HEADERS(unistd.h) |
325 | 272 | ||
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 9a1f6d0..dc01ff2 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am | |||
@@ -63,8 +63,10 @@ check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) | |||
63 | check_load_LDADD = $(BASEOBJS) popen.o | 63 | check_load_LDADD = $(BASEOBJS) popen.o |
64 | check_mrtg_LDADD = $(BASEOBJS) | 64 | check_mrtg_LDADD = $(BASEOBJS) |
65 | check_mrtgtraf_LDADD = $(BASEOBJS) | 65 | check_mrtgtraf_LDADD = $(BASEOBJS) |
66 | check_mysql_CFLAGS = $(MYSQLCFLAGS) | ||
66 | check_mysql_CPPFLAGS = $(MYSQLINCLUDE) | 67 | check_mysql_CPPFLAGS = $(MYSQLINCLUDE) |
67 | check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) | 68 | check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) |
69 | check_mysql_query_CFLAGS = $(MYSQLCFLAGS) | ||
68 | check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE) | 70 | check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE) |
69 | check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) | 71 | check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) |
70 | check_nagios_LDADD = $(BASEOBJS) runcmd.o | 72 | check_nagios_LDADD = $(BASEOBJS) runcmd.o |
diff --git a/plugins/tests/Makefile.am b/plugins/tests/Makefile.am index d3e7494..8ed3fc1 100644 --- a/plugins/tests/Makefile.am +++ b/plugins/tests/Makefile.am | |||
@@ -15,7 +15,7 @@ LIBS = @LIBINTL@ | |||
15 | 15 | ||
16 | test_utils_SOURCES = test_utils.c | 16 | test_utils_SOURCES = test_utils.c |
17 | test_utils_CFLAGS = -g -I.. | 17 | test_utils_CFLAGS = -g -I.. |
18 | test_utils_LDFLAGS = -rpath /usr/local/lib -ltap | 18 | test_utils_LDFLAGS = -L/usr/local/lib -ltap |
19 | test_utils_LDADD = ../utils.o | 19 | test_utils_LDADD = ../utils.o |
20 | 20 | ||
21 | test: ${noinst_PROGRAMS} | 21 | test: ${noinst_PROGRAMS} |