summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2007-03-06 14:18:11 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2007-03-06 14:18:11 (GMT)
commit184348053332cf256d3dd8e661ad756949c2b9b2 (patch)
tree98d012696bd7b694380dcdd2f61631e55e481226
parent31ff40189a387f3cc547f5799622a54758d7004c (diff)
downloadmonitoring-plugins-184348053332cf256d3dd8e661ad756949c2b9b2.tar.gz
Detect if check_mysql compile will work at ./configure time, due to some
Redhat systems distributing mysql_config, but not the include files git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1627 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--NEWS1
-rw-r--r--configure.in16
2 files changed, 13 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 67b6877..310c08b 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ This file documents the major additions and syntax changes between releases.
3?? ?? 3?? ??
4 Fixed MKINSTALLDIRS problem in po/ 4 Fixed MKINSTALLDIRS problem in po/
5 Root plugins installed with world executable 5 Root plugins installed with world executable
6 ./configure now detects if possible to compile check_mysql
6 check_sybase from contrib now maintained in NagiosExchange 7 check_sybase from contrib now maintained in NagiosExchange
7 8
81.4.6 5th February 2007 91.4.6 5th February 2007
diff --git a/configure.in b/configure.in
index 5d1e75d..b0d1c97 100644
--- a/configure.in
+++ b/configure.in
@@ -242,23 +242,31 @@ if test $with_mysql != "no" ; then
242 AC_MSG_WARN([Skipping mysql plugin]) 242 AC_MSG_WARN([Skipping mysql plugin])
243 AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).]) 243 AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).])
244 else 244 else
245 with_mysql=$MYSQLCONFIG
246 EXTRAS="$EXTRAS check_mysql check_mysql_query"
247 MYSQLINCLUDE=`$MYSQLCONFIG --include` 245 MYSQLINCLUDE=`$MYSQLCONFIG --include`
248 # Mysql 3 does not support --include. --cflags should be sufficient 246 # Mysql 3 does not support --include. --cflags should be sufficient
249 if test $? -ne 0 ; then 247 if test $? -ne 0 ; then
250 MYSQLINCLUDE="" 248 MYSQLINCLUDE=""
249 TEMP_INCLUDE="-I$with_mysql/include" # Guessed location
250 else
251 TEMP_INCLUDE=$MYSQLINCLUDE
251 fi 252 fi
252 MYSQLLIBS=`$MYSQLCONFIG --libs` 253 MYSQLLIBS=`$MYSQLCONFIG --libs`
253 MYSQLCFLAGS=`$MYSQLCONFIG --cflags` 254 MYSQLCFLAGS=`$MYSQLCONFIG --cflags`
254 AC_SUBST(MYSQLINCLUDE) 255 AC_SUBST(MYSQLINCLUDE)
255 AC_SUBST(MYSQLLIBS) 256 AC_SUBST(MYSQLLIBS)
256 AC_SUBST(MYSQLCFLAGS) 257 AC_SUBST(MYSQLCFLAGS)
258 dnl Test for mysqlclient. Some redhat systems have mysql_config, but no headers
259 _SAVEDCPPFLAGS=$CPPFLAGS
260 _SAVEDLDFLAGS="$LDFLAGS"
261 CPPFLAGS="$CPPFLAGS $TEMP_INCLUDE"
262 LDFLAGS="$LDFLAGS $MYSQLLIBS"
263 AC_CHECK_LIB([mysqlclient], [mysql_init], [with_mysql=$MYSQLCONFIG
264EXTRAS="$EXTRA check_mysql check_mysql_query"], [with_mysql="not found"])
265 CPPFLAGS=$_SAVEDCPPFLAGS
266 LDFLAGS=$_SAVEDLDFLAGS
257 fi 267 fi
258fi 268fi
259 269
260AC_CHECK_HEADERS(unistd.h)
261
262dnl Check for AF_INET6 support - unistd.h required for Darwin 270dnl Check for AF_INET6 support - unistd.h required for Darwin
263AC_CACHE_CHECK([for IPv6 support], with_ipv6, [ 271AC_CACHE_CHECK([for IPv6 support], with_ipv6, [
264 AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H 272 AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H