From 699497272624df86126f769c4b5b839e7b0c92a9 Mon Sep 17 00:00:00 2001 From: Jonathan GIBERT Date: Thu, 4 Mar 2021 17:54:51 +0100 Subject: [PATCH] Support older mysql client version in configure --- configure | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure b/configure index caf11f5..f493b55 100755 --- a/configure +++ b/configure @@ -46,6 +46,15 @@ testpkg_db() { DBLIBS="${DBLIBS} ${PKG_LIBS}" } +# support for older mysql version +# if mysql_config is found in path adds librairies to DBCFLAGS/DBLIBS and returns success. +# Otherwise, returns failure. +test_mysql_config() { + which mysql_config &>/dev/null || return $? + DBCFLAGS="${DBCFLAGS} $(mysql_config --cflags)" + DBLIBS="${DBLIBS} $(mysql_config --libs)" +} + # testpkg_common pkg1 pkg2 ... # If all libraries are found, adds them to OSCFLAGS/OSLIBS and returns success. # Otherwise, returns failure. @@ -931,7 +940,7 @@ fi ########################### if [ -z "${TURN_NO_MYSQL}" ] ; then - if testpkg_db mariadb || testpkg_db mysqlclient ; then + if testpkg_db mariadb || testpkg_db mysqlclient || test_mysql_config; then ${ECHO_CMD} "MySQL found." else ${ECHO_CMD} "MySQL not found. Building without MySQL support."