diff options
author | Haru <haru@dotalux.com> | 2014-10-24 00:42:18 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-10-24 00:51:58 +0200 |
commit | e1e5bd338fe507d23ac72c964efa5c7009c30bba (patch) | |
tree | 4b7f72903afc941e9a70461f39ad848e721d0f90 /configure | |
parent | bf2d0b4295b5197ce6d303e8124c470613df94bf (diff) | |
download | hercules-e1e5bd338fe507d23ac72c964efa5c7009c30bba.tar.gz hercules-e1e5bd338fe507d23ac72c964efa5c7009c30bba.tar.bz2 hercules-e1e5bd338fe507d23ac72c964efa5c7009c30bba.tar.xz hercules-e1e5bd338fe507d23ac72c964efa5c7009c30bba.zip |
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 <haru@dotalux.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 45 |
1 files changed, 5 insertions, 40 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in d84fa6f. +# From configure.in 2ae9f0c. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -7395,45 +7395,10 @@ 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" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 -$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; } -if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmysqlclient $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mysql_init (); -int -main () -{ -return mysql_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mysqlclient_mysql_init=yes -else - ac_cv_lib_mysqlclient_mysql_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5 -$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; } -if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then : +ac_fn_c_check_func "$LINENO" "mysql_init" "ac_cv_func_mysql_init" +if test "x$ac_cv_func_mysql_init" = xyes; then : HAVE_MYSQL="yes" fi @@ -7446,7 +7411,7 @@ fi CPPFLAGS="$MYSQL_OLD_CPPFLAGS" -LDFLAGS="$MYSQL_OLD_LDFLAGS" +LIBS="$MYSQL_OLD_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking MySQL library (required)" >&5 $as_echo_n "checking MySQL library (required)... " >&6; } |