summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8250d65)
raw | patch | inline | side by side (parent: 8250d65)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Tue, 21 Mar 2006 11:42:59 +0000 (11:42 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Tue, 21 Mar 2006 11:42:59 +0000 (11:42 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1333 f882894a-f735-0410-b71e-b25c423dba1c
CHANGES | patch | blob | history | |
REQUIREMENTS | patch | blob | history | |
THANKS.in | patch | blob | history | |
configure.in | patch | blob | history | |
plugins/Makefile.am | patch | blob | history | |
plugins/tests/Makefile.am | patch | blob | history |
index 743fafeb0f079c34aff7ae42dd8b1ffd2725a259..c334546ecda62fafb96497373f2c30ac2ab8e502 100644 (file)
--- a/CHANGES
+++ b/CHANGES
1.4.3
Setuid plugins (check_dhcp, check_icmp) separated into plugins-root/. Run make install as root to install
check_mysql_query added to run arbitrary SQL commands, with threshold checking
+ ./configure --with-mysql option deprecated. To get mysql compiling, must have mysql_config in PATH
+ libtool now required for development systems
1.4.2
Fix for Redhat ES4 for check_dns and check_dig
diff --git a/REQUIREMENTS b/REQUIREMENTS
index f16de93682e9c1f03beacaad00f527f219d09d90..fbd213b62674d5a14c7308520abf4dd664285069 100644 (file)
--- a/REQUIREMENTS
+++ b/REQUIREMENTS
Lib: libmysql, libmysqlclient
Redhat Powertools Source: mysql-3.20.32a-3.i386.rpm, mysql-devel-3.20.32a-3.i386.rpm (these seem to be broken, however)
RPMS from www.mysql.org work better
+ Must have mysql_config in PATH
check_pqsql:
- Requires the PostgreSQL libraries available from
diff --git a/THANKS.in b/THANKS.in
index 1373142be7133a75245a99c3e43f41c851d15de8..1fd52c9012ff90fd88e75a2e4e089e64a56142df 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Jon Vandegrift
Jason Crawford
Steven Kreuzer
+Johan Fischer
diff --git a/configure.in b/configure.in
index e02dc8955ed2c26908fecdb2b9f0085f8e6fcc1d..87b8e2cc18686c8a193d2a7d5a04c1695ef29e52 100644 (file)
--- a/configure.in
+++ b/configure.in
LIBS="$_SAVEDLIBS"
dnl Check for mysql libraries
-_SAVEDLIBS="$LIBS"
-_SAVEDCPPFLAGS="$CPPFLAGS"
-FOUNDMYSQL="no"
-AC_ARG_WITH(mysql,
- ACX_HELP_STRING([--with-mysql=DIR],
- [sets path to mysql installation (assumes lib/lib64 and include subdirs)]),
- MYSQL=$withval,)
-# Find the mysql client libs
-if test -n "$MYSQL"; then
- MYSQLLIBDIR=$MYSQL/lib
- MYSQLLIB64DIR=$MYSQL/lib64
-elif test -f /usr/lib/libmysqlclient.so -o -f /usr/lib/libmysqlclient.a ; then
- MYSQL="/usr"
- MYSQLLIBDIR=$MYSQL/lib
- MYSQLLIB64DIR=$MYSQL/lib64
-elif test -f /usr/lib/mysql/libmysqlclient.so -o -f /usr/lib/mysql/libmysqlclient.a ; then
- MYSQL="/usr"
- MYSQLLIBDIR=$MYSQL/lib/mysql
- MYSQLLIB64DIR=$MYSQL/lib64/mysql
-elif test -f /usr/local/lib/libmysqlclient.so -o -f /usr/local/lib/libmysqlclient.a ; then
- MYSQL="/usr/local"
- MYSQLLIBDIR=$MYSQL/lib
- MYSQLLIB64DIR=$MYSQL/lib64
-elif test -f /usr/local/lib/mysql/libmysqlclient.so -o -f /usr/local/lib/mysql/libmysqlclient.a ; then
- MYSQL="/usr/local"
- MYSQLLIBDIR=$MYSQL/lib/mysql
- MYSQLLIB64DIR=$MYSQL/lib64/mysql
-elif test -f /usr/local/mysql/lib/libmysqlclient.so -o -f /usr/local/mysql/lib/libmysqlclient.a ; then
- MYSQL="/usr/local/mysql"
- MYSQLLIBDIR=$MYSQL/lib
- MYSQLLIB64DIR=$MYSQL/lib64
-fi
-
-# Check libs okay
-if test -n "$MYSQL" ; then
- CPPFLAGS="-L$MYSQLLIBDIR -L$MYSQLLIB64DIR"
- AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
- AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
-fi
-
-# Check headers okay
-if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
- CPPFLAGS="-I$MYSQL/include"
- AC_CHECK_HEADERS(mysql.h errmsg.h, FOUNDMYSQL="yes" MYSQLINCLUDE="-I$MYSQL/include")
- if test x"$FOUNDMYSQL" != x"yes" ; then
- AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h, FOUNDMYSQL="yes" MYSQLINCLUDE="-I$MYSQL/include/mysql")
- fi
-fi
-
-# Setup mysql plugins
-if test $FOUNDMYSQL = "yes" ; then
+AC_PATH_PROG(MYSQLCONFIG, mysql_config)
+if test -z "$MYSQLCONFIG"; then
+ AC_MSG_WARN([Skipping mysql plugin])
+ AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).])
+else
EXTRAS="$EXTRAS check_mysql check_mysql_query"
- if test -d $MYSQLLIB64DIR ; then
- MYSQLLIBS="-L$MYSQLLIB64DIR -rpath $MYSQLLIB64DIR $MYSQLLIBS"
- fi
- if test -d $MYSQLLIBDIR ; then
- MYSQLLIBS="-L$MYSQLLIBDIR -rpath $MYSQLLIBDIR $MYSQLLIBS"
- fi
+ MYSQLINCLUDE=`$MYSQLCONFIG --include`
+ MYSQLLIBS=`$MYSQLCONFIG --libs`
+ MYSQLCFLAGS=`$MYSQLCONFIG --cflags`
AC_SUBST(MYSQLINCLUDE)
AC_SUBST(MYSQLLIBS)
-else
- AC_MSG_WARN([Skipping mysql plugin])
- AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).])
+ AC_SUBST(MYSQLCFLAGS)
fi
-CPPFLAGS="$_SAVEDCPPFLAGS"
-LIBS="$_SAVEDLIBS"
AC_CHECK_HEADERS(unistd.h)
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 9a1f6d09fbb7dd4b6b9d1e2ce90bfed762660697..dc01ff2d6e0f313fe618c3c60f54b9681737c389 100644 (file)
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
check_load_LDADD = $(BASEOBJS) popen.o
check_mrtg_LDADD = $(BASEOBJS)
check_mrtgtraf_LDADD = $(BASEOBJS)
+check_mysql_CFLAGS = $(MYSQLCFLAGS)
check_mysql_CPPFLAGS = $(MYSQLINCLUDE)
check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS)
+check_mysql_query_CFLAGS = $(MYSQLCFLAGS)
check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE)
check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS)
check_nagios_LDADD = $(BASEOBJS) runcmd.o
index d3e74945fc2a0921c791586ae1130f6b5afe7938..8ed3fc1d2af9113cfade6c0ac9065991cb5391a6 100644 (file)
test_utils_SOURCES = test_utils.c
test_utils_CFLAGS = -g -I..
-test_utils_LDFLAGS = -rpath /usr/local/lib -ltap
+test_utils_LDFLAGS = -L/usr/local/lib -ltap
test_utils_LDADD = ../utils.o
test: ${noinst_PROGRAMS}