From e1e5bd338fe507d23ac72c964efa5c7009c30bba Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 24 Oct 2014 00:42:18 +0200 Subject: Added support for other libmysqlclient variants - This allows Hercules to correctly detect MariaDB and other drop-in replacements in distributions that rename their libmysqlclient (i.e. Debian / Ubuntu renaming it to libmariadbclient). - Closes issue #368 - Due to a bug in Ubuntu 14.04 LTS (incorrect output by the mariadb-provided version of `mysql_config --libs` and missing dependencies of libmariadbclient-dev), users of said distribution will have to manually specify ./configure LIBS="-lssl -lcrypto" as well as manually install the libssl-dev package, if they wish to use libmariadbclient-dev, as it will be unable to link otherwise (note: this issue isn't Hercules-specific) - Special thanks to Andrei Karas Signed-off-by: Haru --- configure.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index cd1dbea1d..ec3b1f735 100644 --- a/configure.in +++ b/configure.in @@ -1256,12 +1256,12 @@ else MYSQL_VERSION="unknown" fi -MYSQL_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS $MYSQL_LIBS" +MYSQL_OLD_LIBS="$LIBS" ; LIBS="$LIBS $MYSQL_LIBS" MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS" -AC_CHECK_LIB([mysqlclient], [mysql_init], [HAVE_MYSQL="yes"], []) +AC_CHECK_FUNC([mysql_init], [HAVE_MYSQL="yes"]) AC_CHECK_HEADER([mysql.h], [], [HAVE_MYSQL=""]) CPPFLAGS="$MYSQL_OLD_CPPFLAGS" -LDFLAGS="$MYSQL_OLD_LDFLAGS" +LIBS="$MYSQL_OLD_LIBS" AC_MSG_CHECKING([MySQL library (required)]) if test "$HAVE_MYSQL" = "yes" ; then -- cgit v1.2.3-60-g2f50