summaryrefslogtreecommitdiffstats
path: root/ulogd/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
commit052956d29b2a36b6d935569302878ed99727958c (patch)
tree5feaa17616584476158eef3c8eb59fb267e77c48 /ulogd/configure.in
parentdf7f67bedcb2665f40d79c8da6a68b57a0146c07 (diff)
Support for old MySQL databases (Alexander Janssen)
Diffstat (limited to 'ulogd/configure.in')
-rw-r--r--ulogd/configure.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/ulogd/configure.in b/ulogd/configure.in
index da22cd8..ca693e8 100644
--- a/ulogd/configure.in
+++ b/ulogd/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)