summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTomas Chvatal <tchvatal@suse.cz>2013-04-28 17:53:58 +0200
committerTomáš Chvátal <tchvatal@suse.cz>2013-05-03 11:48:39 +0200
commit12af4ae6fd084e0605af07a46d6933ceaeb186e9 (patch)
tree2da19b8394395f2ba9cbb8cb0e5c6bef2d2c0617 /configure.ac
parentfdo#60924: Move more libs to autoinstallation (diff)
downloadcore-12af4ae6fd084e0605af07a46d6933ceaeb186e9.tar.gz
core-12af4ae6fd084e0605af07a46d6933ceaeb186e9.zip
Search for mariadb_config and mysql_config so it works everywhere
Change-Id: Id6ae4cde25998bb21981b7cccb23a094f217750f
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 4fc41e9b3a1a..7c4582df9e2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1416,9 +1416,8 @@ AC_ARG_WITH(system-apache-commons,
AC_ARG_WITH(system-mariadb,
AS_HELP_STRING([--with-system-mariadb],
- [Use MariaDB libraries already on system, for building the MariaDB Connector/LibreOffice
- extension. If the mariadb_config executable is not in PATH, use MARIADBCONFIG to
- point to it.]),,
+ [Use MariaDB/MySQL libraries already on system, for building the MariaDB Connector/LibreOffice
+ extension.]),,
[with_system_mariadb="$with_system_libs"])
AC_ARG_WITH(system-mysql-cppconn,
@@ -7702,15 +7701,20 @@ if test "$ENABLE_MARIADBC" = "YES"; then
if test "$with_system_mariadb" = "yes"; then
AC_MSG_RESULT([external])
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])
MARIADB_VERSION=`$MARIADBCONFIG --version`
MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1`
if test "$MARIADB_MAJOR" -ge "5"; then
AC_MSG_RESULT([OK])
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
AC_MSG_CHECKING([for MariaDB Client library])
MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`