From a426f4220459a4c228a1ae4f286a873309c29a18 Mon Sep 17 00:00:00 2001 From: laforge Date: Thu, 17 May 2001 15:06:57 +0000 Subject: Support for old MySQL databases (Alexander Janssen) --- configure.in | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index da22cd8..ca693e8 100644 --- a/configure.in +++ b/configure.in @@ -86,6 +86,25 @@ else else MYSQLEXTRALIBS= fi + + dnl Here we check whether we have an old MySQL client library + dnl installed, which does not support the mysql_real_escape_string(), + dnl but the real_escape_string() function. + dnl Having a look in the libary itself should be more reliable than + dnl parsing the output of mysql --version. + + AC_MSG_CHECKING(for mysql_real_escape_string support) + + MYSQL_FUNCTION_TEST=`strings ${MYSQLLIBS}/libmysqlclient.a | grep mysql_real_escape_string` + + if test "x$MYSQL_FUNCTION_TEST" = x + then + EXTRA_MYSQL_DEF="OLD_MYSQL=1 " + AC_MSG_RESULT(found an older version of MySQL) + else + AC_MSG_RESULT(found a newer version of MySQL) + fi + fi ]) @@ -93,6 +112,7 @@ AC_SUBST(DATABASE_DIR) AC_SUBST(DATABASE_LIB) AC_SUBST(DATABASE_LIB_DIR) AC_SUBST(DB_DEF) +AC_SUBST(EXTRA_MYSQL_DEF) AC_SUBST(DATABASE_DRIVERS) -- cgit v1.2.3