diff --git a/src/modules/Mysql/configure.in b/src/modules/Mysql/configure.in
index de9ad1f7a73e09dc44fa74f8ede3632acdec041a..cd6daf1d2713b9be1e23969dc0aae2a59d5f8a1e 100644
--- a/src/modules/Mysql/configure.in
+++ b/src/modules/Mysql/configure.in
@@ -36,13 +36,18 @@ OLD_LDFLAGS=$LDFLAGS
 OLD_CPPFLAGS=$CPPFLAGS
 
 AC_ARG_WITH(mysql,  [  --without-mysql       no support for the Mysql database],[],[with_mysql=yes])
+AC_ARG_WITH(mariadb,[  --without-mariadb     disable use of MariaDB-client library],[],[with_mariadb=yes])
 
 if test x$with_mysql = xno; then
   :
 else
   PIKE_FEATURE_NODEP(Mysql)
 
-  AC_PATH_PROG(MARIADB_CONFIG,${ac_tool_prefix}mariadb_config,no)
+  if test "x$with_mariadb" = "xno"; then
+      MARIADB_CONFIG=no
+  else
+      AC_PATH_PROG(MARIADB_CONFIG,${ac_tool_prefix}mariadb_config,no)
+  fi
   if test "x${MARIADB_CONFIG}" = "xno"; then
 
   AC_MSG_CHECKING(for Mysql directory prefix)