Kaydet (Commit) 12af4ae6 authored tarafından Tomas Chvatal's avatar Tomas Chvatal Kaydeden (comit) Tomáš Chvátal

Search for mariadb_config and mysql_config so it works everywhere

Change-Id: Id6ae4cde25998bb21981b7cccb23a094f217750f
üst 6e8b24cc
...@@ -1416,9 +1416,8 @@ AC_ARG_WITH(system-apache-commons, ...@@ -1416,9 +1416,8 @@ AC_ARG_WITH(system-apache-commons,
AC_ARG_WITH(system-mariadb, AC_ARG_WITH(system-mariadb,
AS_HELP_STRING([--with-system-mariadb], AS_HELP_STRING([--with-system-mariadb],
[Use MariaDB libraries already on system, for building the MariaDB Connector/LibreOffice [Use MariaDB/MySQL libraries already on system, for building the MariaDB Connector/LibreOffice
extension. If the mariadb_config executable is not in PATH, use MARIADBCONFIG to extension.]),,
point to it.]),,
[with_system_mariadb="$with_system_libs"]) [with_system_mariadb="$with_system_libs"])
AC_ARG_WITH(system-mysql-cppconn, AC_ARG_WITH(system-mysql-cppconn,
...@@ -7702,15 +7701,20 @@ if test "$ENABLE_MARIADBC" = "YES"; then ...@@ -7702,15 +7701,20 @@ if test "$ENABLE_MARIADBC" = "YES"; then
if test "$with_system_mariadb" = "yes"; then if test "$with_system_mariadb" = "yes"; then
AC_MSG_RESULT([external]) AC_MSG_RESULT([external])
SYSTEM_MARIADB=YES SYSTEM_MARIADB=YES
AC_ARG_VAR(MARIADBCONFIG, [Setting this variable will override the mariadb_config script detection]) 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.])
fi
fi
AC_MSG_CHECKING([MariaDB version]) AC_MSG_CHECKING([MariaDB version])
MARIADB_VERSION=`$MARIADBCONFIG --version` MARIADB_VERSION=`$MARIADBCONFIG --version`
MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1` MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1`
if test "$MARIADB_MAJOR" -ge "5"; then if test "$MARIADB_MAJOR" -ge "5"; then
AC_MSG_RESULT([OK]) AC_MSG_RESULT([OK])
else else
AC_MSG_ERROR([too old, use 5.0.x or 5.1.x]) AC_MSG_ERROR([too old, use 5.0.x or later])
fi fi
AC_MSG_CHECKING([for MariaDB Client library]) AC_MSG_CHECKING([for MariaDB Client library])
MARIADB_CFLAGS=`$MARIADBCONFIG --cflags` MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment