diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-19 22:57:40 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-19 23:03:14 +0200 |
commit | 02a11749da521e8e2099b464c0fcbebce9e95e22 (patch) | |
tree | e7e9b5bac422843ae8b031f9b59f4769e81a4845 /configure.ac | |
parent | 96953171bf0503a89611b7c518668f749fe14425 (diff) |
fdo#70496 revert to using libmysqlclient
Change-Id: I5b98b5e7840e4f1c6005aee0c1f43ef814ecf77b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 02a1687c0f00..3f3d809db9c6 100644 --- a/configure.ac +++ b/configure.ac @@ -1520,6 +1520,11 @@ AC_ARG_WITH(system-mariadb, extension.]),, [with_system_mariadb="$with_system_libs"]) +AC_ARG_ENABLE(bundle-mariadb, + AS_HELP_STRING([--enable-bundle-mariadb], + [When using MariaDB/MySQL libraries already on system, bundle them with the MariaDB Connector/LibreOffice extension.]) +) + AC_ARG_WITH(system-mysql-cppconn, AS_HELP_STRING([--with-system-mysql-cppconn], [Use MySQL C++ Connector libraries already on system.]),, @@ -8185,11 +8190,12 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then if test "$with_system_mariadb" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_MARIADB=YES - AC_PATH_PROG(MARIADBCONFIG, [mariadb_config]) + #AC_PATH_PROG(MARIADBCONFIG, [mariadb_config]) if test -z "$MARIADBCONFIG"; then AC_PATH_PROG(MARIADBCONFIG, [mysql_config]) if test -z "$MARIADBCONFIG"; then - AC_MSG_ERROR([mariadb_config and mysql_config are missing. Install MariaDB or MySQL package.]) + #AC_MSG_ERROR([mariadb_config and mysql_config are missing. Install MariaDB or MySQL package.]) + AC_MSG_ERROR([mysql_config is missing. Install MySQL client library development package.]) fi fi AC_MSG_CHECKING([MariaDB version]) @@ -8202,10 +8208,36 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then fi AC_MSG_CHECKING([for MariaDB Client library]) MARIADB_CFLAGS=`$MARIADBCONFIG --cflags` - MARIADB_LIBS=`$MARIADBCONFIG --libs` - AC_MSG_RESULT([includes $MARIADB_CFLAGS, libraries $MARIADB_LIBS]) + MARIADB_LIBS=`$MARIADBCONFIG --libs_r` + AC_MSG_RESULT([includes '$MARIADB_CFLAGS', libraries '$MARIADB_LIBS']) + AC_MSG_CHECKING([whether to bundle the MySQL/MariaDB client library]) + if test "$enable_bundle_mariadb" = "yes"; then + AC_MSG_RESULT([yes]) + BUNDLE_MARIADB=YES + LIBMARIADB=lib$(echo "${MARIADB_LIBS}" | sed -e 's/[[[:space:]]]\+-l/\n/g' | grep -E '(mysqlclient|mariadb)') + if test "$_os" = "Darwin"; then + LIBMARIADB=${LIBMARIADB}.dylib + elif test "$_os" = "WINNT"; then + LIBMARIADB=${LIBMARIADB}.dll + else + LIBMARIADB=${LIBMARIADB}.so + fi + LIBMARIADB_PATH=$($MARIADBCONFIG --variable=pkglibdir) + AC_MSG_CHECKING([for $LIBMARIADB in $LIBMARIADB_PATH]) + if test -e "$LIBMARIADB_PATH/$LIBMARIADB"; then + AC_MSG_RESULT([found.]) + PathFormat "$LIBMARIADB_PATH" + LIBMARIADB_PATH="$formatted_path" + else + AC_MSG_ERROR([not found.]) + fi + else + AC_MSG_RESULT([no]) + BUNDLE_MARIADB=NO + fi else AC_MSG_RESULT([internal]) + AC_MSG_ERROR([libmariadb is known to be broken as of 2013-10; use libmysqlclient]) SYSTEM_MARIADB=NO MARIADB_CFLAGS="-I${WORKDIR}/UnpackedTarball/mariadb/include" MARIADB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lmariadblib" @@ -8215,6 +8247,9 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then AC_SUBST(SYSTEM_MARIADB) AC_SUBST(MARIADB_CFLAGS) AC_SUBST(MARIADB_LIBS) + AC_SUBST(LIBMARIADB) + AC_SUBST(LIBMARIADB_PATH) + AC_SUBST(BUNDLE_MARIADB) AC_LANG_PUSH([C++]) dnl =================================================================== |