summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/drivers/configure.in.in
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-09-08 20:05:18 +0200
committerSlávek Banko <[email protected]>2019-09-08 20:05:18 +0200
commitfa4a35fd4b069bde6cc6d924f18376096b644737 (patch)
tree41f005c57ec51aa08c5fa8cb2e28dc36aa672a9f /kexi/kexidb/drivers/configure.in.in
parent9b2ed2915c07470d5fc3b648b8f1d5feceeba263 (diff)
downloadkoffice-fa4a35fd4b069bde6cc6d924f18376096b644737.tar.gz
koffice-fa4a35fd4b069bde6cc6d924f18376096b644737.zip
Added detection whether the basic structure of MySQL / MariaDB
client is named st_mysql or MYSQL. This resolves FTBFS with MySQL client >= 8.0. This resolves issue #4. Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'kexi/kexidb/drivers/configure.in.in')
-rw-r--r--kexi/kexidb/drivers/configure.in.in37
1 files changed, 37 insertions, 0 deletions
diff --git a/kexi/kexidb/drivers/configure.in.in b/kexi/kexidb/drivers/configure.in.in
index 1afe3487..a5126cf4 100644
--- a/kexi/kexidb/drivers/configure.in.in
+++ b/kexi/kexidb/drivers/configure.in.in
@@ -90,6 +90,43 @@ dnl *** Show that we are doing as requested. ***
AC_MSG_NOTICE([Not attempting to configure MySQL as requested])
fi
+if test "$compile_mysql_plugin" = "yes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -I$mysql_incdir"
+
+ AC_MSG_CHECKING([if mysql has st_mysql struct])
+ AC_TRY_COMPILE(
+ [
+ #include <mysql.h>
+ typedef struct st_mysql MYSQL;
+ ],
+ [],
+ AC_MSG_RESULT( yes )
+ mysql_struct=st_mysql,
+ AC_MSG_RESULT( no )
+ [
+ AC_MSG_CHECKING([if mysql has MYSQL struct])
+ AC_TRY_COMPILE(
+ [
+ #include <mysql.h>
+ typedef struct MYSQL MYSQL;
+ ],
+ [],
+ AC_MSG_RESULT( yes )
+ mysql_struct=MYSQL,
+ AC_MSG_RESULT( no )
+ compile_mysql_plugin=no
+ )
+ ]
+ )
+
+ CXXFLAGS="$save_CXXFLAGS"
+ AC_LANG_RESTORE
+fi
+
+AC_DEFINE_UNQUOTED(MYSQL_STRUCT, $mysql_struct, [struct type name for MySql])
AM_CONDITIONAL(compile_mysql_plugin, test "$compile_mysql_plugin" = "yes")
dnl ========================================