summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-05-03 13:48:46 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-05-03 13:48:46 +0200
commitbec43b53804ab420ba3f3652849114e42f40e16a (patch)
tree7fd05507034139cfa890e449f96d8f252e117cc0 /configure.ac
parenta34e46801b52b2614f9f3f16eb23e6fd14de6288 (diff)
downloadrsyslog-bec43b53804ab420ba3f3652849114e42f40e16a.zip
rsyslog-bec43b53804ab420ba3f3652849114e42f40e16a.tar.gz
rsyslog-bec43b53804ab420ba3f3652849114e42f40e16a.tar.xz
ommysql: added support for new mysql_library_[init/exit]
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e7a2619..5124dab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -514,8 +514,24 @@ if test "x$enable_mysql" = "xyes"; then
[AC_MSG_FAILURE([MySQL library is missing])],
[`mysql_config --libs`]
)
+ AC_MSG_CHECKING(if we have mysql_library_init)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $MYSQL_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $MYSQL_LIBS"
+ AC_TRY_LINK(
+ [#include <mysql.h>
+ #include <stdio.h>],
+ [mysql_library_init(0, NULL, NULL)],
+ [have_mysql_library_init=yes],
+ [have_mysql_library_init=no])
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
fi
AM_CONDITIONAL(ENABLE_MYSQL, test x$enable_mysql = xyes)
+if test "$have_mysql_library_init" = "yes"; then
+ AC_DEFINE([HAVE_MYSQL_LIBRARY_INIT], [1], [mysql_library_init available])
+fi
AC_SUBST(MYSQL_CFLAGS)
AC_SUBST(MYSQL_LIBS)