summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubhendu Ghosh <sghosh@users.sourceforge.net>2002-09-04 06:00:14 (GMT)
committerSubhendu Ghosh <sghosh@users.sourceforge.net>2002-09-04 06:00:14 (GMT)
commitbf059287f7eaf44e5342615dc6c4f7866e50b6c6 (patch)
treebbb8de626de7524efcd8600aa40f77ee259e8e0e
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
-rw-r--r--configure.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 7255204..a9ffeb1 100644
--- a/configure.in
+++ b/configure.in
@@ -155,13 +155,18 @@ else
155fi 155fi
156LIBS="$_SAVEDLIBS" 156LIBS="$_SAVEDLIBS"
157 157
158
158dnl Check for mysql libraries 159dnl Check for mysql libraries
159_SAVEDLIBS="$LIBS" 160_SAVEDLIBS="$LIBS"
160_SAVEDCPPFLAGS="$CPPFLAGS" 161_SAVEDCPPFLAGS="$CPPFLAGS"
161CPPFLAGS="-I/usr/include" 162dnl CPPFLAGS="-I/usr/include"
162AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval]) 163
163if test -n "$MYSQLLIBDIR"; then 164AC_ARG_WITH(mysql,--with-mysql=<dir> sets path to mysql installation (assumes lib/mysql and include subdirs),[MYSQL=$withval])
164 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz) 165if test -n "$MYSQL"; then
166 MYSQLLIBDIR=$MYSQL/lib/mysql
167 CPPFLAGS="-I$MYSQL/include"
168 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR ",,-L$MYSQLLIBDIR -lz)
169 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
165elif test -f /usr/lib/libmysqlclient.so; then 170elif test -f /usr/lib/libmysqlclient.so; then
166 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz) 171 AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
167 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") 172 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient")
@@ -176,21 +181,23 @@ elif test -f /usr/lib/mysql/libmysqlclient.a; then
176 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql) 181 AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
177fi 182fi
178if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then 183if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
179 AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h) 184 AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h, MYSQLINCLUDE="-I$MYSQL/include" )
180 if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then 185 if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
181 EXTRAS="$EXTRAS check_mysql" 186 EXTRAS="$EXTRAS check_mysql"
187 CPPFLAGS="$_SAVEDCPPFLAGS -I$MYSQL/include"
182 AC_SUBST(MYSQLLIBS) 188 AC_SUBST(MYSQLLIBS)
183 AC_SUBST(check_mysql_LDFLAGS) 189 AC_SUBST(check_mysql_LDFLAGS)
184 else 190 else
185 AC_MSG_WARN([Skipping mysql plugin]) 191 AC_MSG_WARN([Skipping mysql plugin])
186 AC_MSG_WARN([install mysql client headers to compile this plugin (see Requirements).]) 192 AC_MSG_WARN([install mysql client headers to compile this plugin (see Requirements).])
193 CPPFLAGS="$_SAVEDCPPFLAGS"
187 fi 194 fi
188else 195else
189 AC_MSG_WARN([Skipping mysql plugin]) 196 AC_MSG_WARN([Skipping mysql plugin])
190 AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).]) 197 AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
198 CPPFLAGS="$_SAVEDCPPFLAGS"
191fi 199fi
192LIBS="$_SAVEDLIBS" 200LIBS="$_SAVEDLIBS"
193CPPFLAGS="$_SAVEDCPPFLAGS"
194 201
195dnl Check for OpenSSL location 202dnl Check for OpenSSL location
196AC_PATH_PROG(OPENSSL,openssl) 203AC_PATH_PROG(OPENSSL,openssl)