aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-11 11:35:06 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-11 11:35:25 +0200
commit286759692f1d5c84da625d5c0ced374a2585e978 (patch)
tree997953d000fbda96123811b8faa63ee428539edf /configure.ac
parentc0349b05c9736151899fa7aae3231cc64fca2bc4 (diff)
downloadgnunet-286759692f1d5c84da625d5c0ced374a2585e978.tar.gz
gnunet-286759692f1d5c84da625d5c0ced374a2585e978.zip
fix: mysql version detection
Fix detection macro and support mysql8+ my_bool deprecation. Fixes #6465.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 39e7ffa7e..88a2134ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1404,12 +1404,11 @@ AS_IF([test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"],
1404 AC_MSG_CHECKING(mysql version) 1404 AC_MSG_CHECKING(mysql version)
1405 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( 1405 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1406 [[ 1406 [[
1407 #include <mysql/mysql.h>]], 1407 #include <mysql/mysql_version.h>]],
1408 [[ 1408 [[
1409 #if (MYSQL_VERSION_ID < 40100) 1409 #if (MYSQL_VERSION_ID < 40100)
1410 #error needs at least version >= 4.1 1410 #error needs at least version >= 4.1
1411 #endif 1411 #endif
1412 int main () { return 0; }
1413 ]]) 1412 ]])
1414 ], 1413 ],
1415 [mysql=true], 1414 [mysql=true],
@@ -1423,6 +1422,21 @@ AS_IF([test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"],
1423 mysqlfail=false 1422 mysqlfail=false
1424 AC_MSG_RESULT(ok) 1423 AC_MSG_RESULT(ok)
1425 ]) 1424 ])
1425 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1426 [[
1427 #include <mysql/mysql_version.h>]],
1428 [[
1429 #if (MYSQL_VERSION_ID < 80000)
1430 #error needs at least version >= 4.1
1431 #endif
1432 ]])
1433 ],
1434 [mysql8=true],
1435 [mysql8=false])
1436 AS_IF([test x$mysql8 = xtrue],
1437 [
1438 AC_DEFINE([HAVE_MYSQL8],[1],[Have mysql8])
1439 ],[])
1426]) 1440])
1427 1441
1428AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue) 1442AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)