aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorGravatar Subhendu Ghosh <sghosh@users.sourceforge.net> 2002-09-04 06:00:14 +0000
committerGravatar Subhendu Ghosh <sghosh@users.sourceforge.net> 2002-09-04 06:00:14 +0000
commitbf059287f7eaf44e5342615dc6c4f7866e50b6c6 (patch)
treebbb8de626de7524efcd8600aa40f77ee259e8e0e /configure.in
parent91c089475cc8be8531a6f19f2a30a9f0c641e489 (diff)
downloadmonitoring-plugins-bf059287f7eaf44e5342615dc6c4f7866e50b6c6.tar.gz
more Mysql patches
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@91 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 72552045..a9ffeb1c 100644
--- a/configure.in
+++ b/configure.in
@@ -155,13 +155,18 @@ else
fi
LIBS="$_SAVEDLIBS"
+
dnl Check for mysql libraries
_SAVEDLIBS="$LIBS"
_SAVEDCPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I/usr/include"
-AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval])
-if test -n "$MYSQLLIBDIR"; then
- AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
+dnl CPPFLAGS="-I/usr/include"
+
+AC_ARG_WITH(mysql,--with-mysql=<dir> sets path to mysql installation (assumes lib/mysql and include subdirs),[MYSQL=$withval])
+if test -n "$MYSQL"; then
+ MYSQLLIBDIR=$MYSQL/lib/mysql
+ CPPFLAGS="-I$MYSQL/include"
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR ",,-L$MYSQLLIBDIR -lz)
+ AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
elif test -f /usr/lib/libmysqlclient.so; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
@@ -176,21 +181,23 @@ elif test -f /usr/lib/mysql/libmysqlclient.a; then
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
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$MYSQL/include" )
if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
EXTRAS="$EXTRAS check_mysql"
+ CPPFLAGS="$_SAVEDCPPFLAGS -I$MYSQL/include"
AC_SUBST(MYSQLLIBS)
AC_SUBST(check_mysql_LDFLAGS)
else
AC_MSG_WARN([Skipping mysql plugin])
AC_MSG_WARN([install mysql client headers to compile this plugin (see Requirements).])
+ CPPFLAGS="$_SAVEDCPPFLAGS"
fi
else
AC_MSG_WARN([Skipping mysql plugin])
AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
+ CPPFLAGS="$_SAVEDCPPFLAGS"
fi
LIBS="$_SAVEDLIBS"
-CPPFLAGS="$_SAVEDCPPFLAGS"
dnl Check for OpenSSL location
AC_PATH_PROG(OPENSSL,openssl)