diff options
author | Andrei Pavel <andrei@isc.org> | 2023-01-20 21:41:53 +0100 |
---|---|---|
committer | Andrei Pavel <andrei@isc.org> | 2023-01-23 17:48:14 +0100 |
commit | 135bfa4ad700ab7fe30baed20e2dd2ea0f7a5176 (patch) | |
tree | 6485c3d5319fb149ce49bd5934cae4fc15d0ced8 /configure.ac | |
parent | [#2693] Addressed review comments (diff) | |
download | kea-135bfa4ad700ab7fe30baed20e2dd2ea0f7a5176.tar.xz kea-135bfa4ad700ab7fe30baed20e2dd2ea0f7a5176.zip |
[#2727] introduce HAVE_MYSQL_GET_OPTION
Addresses error:
mysql_connection_unittest.cc: In member function ‘virtual void {anonymous}::MySqlConnectionTest_connectionTimeout_Test::TestBody()’:
mysql_connection_unittest.cc:633:77: error: ‘mysql_get_option’ was not declared in this scope
EXPECT_EQ(0, mysql_get_option(mysql, MYSQL_OPT_CONNECT_TIMEOUT, &timeout));
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 1eda7360fb..018a433591 100644 --- a/configure.ac +++ b/configure.ac @@ -722,7 +722,7 @@ if test "$MYSQL_CONFIG" != "" ; then # Note that MYSQL is present in the config.h file AC_DEFINE([HAVE_MYSQL], [1], [MySQL is present]) - # Check is my_bool is defined. + # Check if my_bool is defined. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([#include <mysql.h> const my_bool MLM_FALSE = 0;] @@ -731,9 +731,27 @@ if test "$MYSQL_CONFIG" != "" ; then AC_DEFINE([HAVE_MYSQL_MY_BOOL], [1], [MySQL uses my_bool])], [AC_MSG_RESULT([checking for MySQL my_bool... no])]) + # Check if mysql_get_option is defined. + AC_MSG_CHECKING([for MySQL mysql_get_option]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#include <mysql.h>], + [MYSQL handle; + unsigned int timeout; + mysql_get_option(&handle, MYSQL_OPT_CONNECT_TIMEOUT, &timeout);] + )], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_MYSQL_GET_OPTION], [true], [MySQL has mysql_get_option defined.])], + [AC_MSG_RESULT([no]) + AC_MSG_WARN([mysql_get_option program failed to build: + +$(cat conftest.cpp) + +$(cat conftest.err)])] + ) + CPPFLAGS=$CPPFLAGS_SAVED LIBS=$LIBS_SAVED - fi # Solaris puts FIONREAD in filio.h |