summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--REQUIREMENTS1
-rw-r--r--THANKS.in1
-rw-r--r--configure.in71
-rw-r--r--plugins/Makefile.am2
-rw-r--r--plugins/tests/Makefile.am2
6 files changed, 16 insertions, 63 deletions
diff --git a/CHANGES b/CHANGES
index 743fafeb..c334546e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,8 @@ This file documents the major additions and syntax changes between releases.
31.4.3 31.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
71.4.2 91.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 f16de936..fbd213b6 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
43check_pqsql: 44check_pqsql:
44 - Requires the PostgreSQL libraries available from 45 - Requires the PostgreSQL libraries available from
diff --git a/THANKS.in b/THANKS.in
index 1373142b..1fd52c90 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -176,3 +176,4 @@ Gerhard Lausser
176Jon Vandegrift 176Jon Vandegrift
177Jason Crawford 177Jason Crawford
178Steven Kreuzer 178Steven Kreuzer
179Johan Fischer
diff --git a/configure.in b/configure.in
index e02dc895..87b8e2cc 100644
--- a/configure.in
+++ b/configure.in
@@ -254,72 +254,19 @@ fi
254LIBS="$_SAVEDLIBS" 254LIBS="$_SAVEDLIBS"
255 255
256dnl Check for mysql libraries 256dnl Check for mysql libraries
257_SAVEDLIBS="$LIBS" 257AC_PATH_PROG(MYSQLCONFIG, mysql_config)
258_SAVEDCPPFLAGS="$CPPFLAGS" 258if test -z "$MYSQLCONFIG"; then
259FOUNDMYSQL="no" 259 AC_MSG_WARN([Skipping mysql plugin])
260AC_ARG_WITH(mysql, 260 AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).])
261 ACX_HELP_STRING([--with-mysql=DIR], 261else
262 [sets path to mysql installation (assumes lib/lib64 and include subdirs)]),
263 MYSQL=$withval,)
264# Find the mysql client libs
265if test -n "$MYSQL"; then
266 MYSQLLIBDIR=$MYSQL/lib
267 MYSQLLIB64DIR=$MYSQL/lib64
268elif test -f /usr/lib/libmysqlclient.so -o -f /usr/lib/libmysqlclient.a ; then
269 MYSQL="/usr"
270 MYSQLLIBDIR=$MYSQL/lib
271 MYSQLLIB64DIR=$MYSQL/lib64
272elif 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
276elif 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
280elif 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
284elif 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
288fi
289
290# Check libs okay
291if 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")
295fi
296
297# Check headers okay
298if 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
304fi
305
306# Setup mysql plugins
307if 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)
317else 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).])
320fi 269fi
321CPPFLAGS="$_SAVEDCPPFLAGS"
322LIBS="$_SAVEDLIBS"
323 270
324AC_CHECK_HEADERS(unistd.h) 271AC_CHECK_HEADERS(unistd.h)
325 272
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 9a1f6d09..dc01ff2d 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -63,8 +63,10 @@ check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS)
63check_load_LDADD = $(BASEOBJS) popen.o 63check_load_LDADD = $(BASEOBJS) popen.o
64check_mrtg_LDADD = $(BASEOBJS) 64check_mrtg_LDADD = $(BASEOBJS)
65check_mrtgtraf_LDADD = $(BASEOBJS) 65check_mrtgtraf_LDADD = $(BASEOBJS)
66check_mysql_CFLAGS = $(MYSQLCFLAGS)
66check_mysql_CPPFLAGS = $(MYSQLINCLUDE) 67check_mysql_CPPFLAGS = $(MYSQLINCLUDE)
67check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) 68check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS)
69check_mysql_query_CFLAGS = $(MYSQLCFLAGS)
68check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE) 70check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE)
69check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) 71check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS)
70check_nagios_LDADD = $(BASEOBJS) runcmd.o 72check_nagios_LDADD = $(BASEOBJS) runcmd.o
diff --git a/plugins/tests/Makefile.am b/plugins/tests/Makefile.am
index d3e74945..8ed3fc1d 100644
--- a/plugins/tests/Makefile.am
+++ b/plugins/tests/Makefile.am
@@ -15,7 +15,7 @@ LIBS = @LIBINTL@
15 15
16test_utils_SOURCES = test_utils.c 16test_utils_SOURCES = test_utils.c
17test_utils_CFLAGS = -g -I.. 17test_utils_CFLAGS = -g -I..
18test_utils_LDFLAGS = -rpath /usr/local/lib -ltap 18test_utils_LDFLAGS = -L/usr/local/lib -ltap
19test_utils_LDADD = ../utils.o 19test_utils_LDADD = ../utils.o
20 20
21test: ${noinst_PROGRAMS} 21test: ${noinst_PROGRAMS}