summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 91c0894)
raw | patch | inline | side by side (parent: 91c0894)
author | Subhendu Ghosh <sghosh@users.sourceforge.net> | |
Wed, 4 Sep 2002 06:00:14 +0000 (06:00 +0000) | ||
committer | Subhendu Ghosh <sghosh@users.sourceforge.net> | |
Wed, 4 Sep 2002 06:00:14 +0000 (06:00 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@91 f882894a-f735-0410-b71e-b25c423dba1c
configure.in | patch | blob | history |
diff --git a/configure.in b/configure.in
index 72552045b9a15d502747d30b66c6634ea88d786c..a9ffeb1c5bc9ad4a9a9f0905ae950d5ddaa1e683 100644 (file)
--- a/configure.in
+++ b/configure.in
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")
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)