summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorlaforge <laforge>2001-05-17 15:06:57 +0000
committerlaforge <laforge>2001-05-17 15:06:57 +0000
commita426f4220459a4c228a1ae4f286a873309c29a18 (patch)
tree8f94406dcc5294a7b9948661e8745a4e4a1862c5 /configure.in
parent85d9f8bfc13384d3f6326be439eb3374cdc5bec1 (diff)
Support for old MySQL databases (Alexander Janssen)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in20
1 files changed, 20 insertions, 0 deletions
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)