Compile fix for Debian Buster.

Sat, 23 Nov 2019 11:34:33 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 23 Nov 2019 11:34:33 +0100
changeset 551
57cb71496a9a
parent 550
f34e480ec6c5
child 552
ee0db754111e

Compile fix for Debian Buster.

bmsd/bms.h file | annotate | diff | comparison | revisions
config.h.in file | annotate | diff | comparison | revisions
config.status file | annotate | diff | comparison | revisions
configure file | annotate | diff | comparison | revisions
configure.ac file | annotate | diff | comparison | revisions
--- a/bmsd/bms.h	Sun Nov 10 16:48:19 2019 +0100
+++ b/bmsd/bms.h	Sat Nov 23 11:34:33 2019 +0100
@@ -45,7 +45,12 @@
 #include <libxml/encoding.h>
 #include <libxml/xmlwriter.h>
 #include <mosquitto.h>
+#ifdef HAVE_MYSQL_MYSQL_H
 #include <mysql/mysql.h>
+#endif
+#ifdef HAVE_MARIADB_MYSQL_H
+#include <mariadb/mysql.h>
+#endif
 #include <json-c/json.h>
 
 
--- a/config.h.in	Sun Nov 10 16:48:19 2019 +0100
+++ b/config.h.in	Sat Nov 23 11:34:33 2019 +0100
@@ -9,3 +9,9 @@
 /* According to Sun we MUST define this in the source */
 #define _REENTRANT 1
 
+/* Define if you have the <mysql/mysql.h> header file. */
+#undef HAVE_MYSQL_MYSQL_H
+
+/* Define if you have the <mariadb/mysql.h> header file. */
+#undef HAVE_MARIADB_MYSQL_H
+
--- a/config.status	Sun Nov 10 16:48:19 2019 +0100
+++ b/config.status	Sat Nov 23 11:34:33 2019 +0100
@@ -724,7 +724,7 @@
 D["HAVE_UNISTD_H"]=" 1"
 D["HAVE_MOSQUITTO_H"]=" 1"
 D["HAVE_JSON_C_JSON_H"]=" 1"
-D["HAVE_MYSQL_MYSQL_H"]=" 1"
+D["HAVE_MARIADB_MYSQL_H"]=" 1"
 D["HAVE_LIBXML_XMLMEMORY_H"]=" 1"
 D["HAVE_UUID_UUID_H"]=" 1"
 D["STDC_HEADERS"]=" 1"
--- a/configure	Sun Nov 10 16:48:19 2019 +0100
+++ b/configure	Sat Nov 23 11:34:33 2019 +0100
@@ -3652,6 +3652,18 @@
 
 done
 
+  for ac_header in mariadb/mysql.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "mariadb/mysql.h" "ac_cv_header_mariadb_mysql_h" "$ac_includes_default"
+if test "x$ac_cv_header_mariadb_mysql_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MARIADB_MYSQL_H 1
+_ACEOF
+
+fi
+
+done
+
 else
   as_fn_error $? "mysqlclient not found" "$LINENO" 5
 fi
--- a/configure.ac	Sun Nov 10 16:48:19 2019 +0100
+++ b/configure.ac	Sat Nov 23 11:34:33 2019 +0100
@@ -66,6 +66,7 @@
 if test "$result" = "yes"; then
   LIBS="$LIBS -lmysqlclient"
   AC_CHECK_HEADERS(mysql/mysql.h)
+  AC_CHECK_HEADERS(mariadb/mysql.h)
 else
   AC_MSG_ERROR(mysqlclient not found)
 fi

mercurial