diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-02-06 14:56:17 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-02-06 14:56:17 +0900 |
commit | ab66a7a9dfe818d884caf555293370c730eccc57 (patch) | |
tree | 612f58f9278373c80b3750e909b8d49b8709e493 | |
parent | 584ae66d0fed95773a4164ad666c58c84852361b (diff) | |
download | gnunet-ab66a7a9dfe818d884caf555293370c730eccc57.tar.gz gnunet-ab66a7a9dfe818d884caf555293370c730eccc57.zip |
MYSQL: Another jab at proper my_bool detection.
The previous check did not work because you cannot
check typedef's with #if(n)def.
-rw-r--r-- | configure.ac | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 1472877d1..3e7b42a12 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -940,14 +940,12 @@ mysql_bool="bool" | |||
940 | AS_IF([test "x$mysql" = "xtrue"], | 940 | AS_IF([test "x$mysql" = "xtrue"], |
941 | [AC_MSG_CHECKING([for my_bool]) | 941 | [AC_MSG_CHECKING([for my_bool]) |
942 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | 942 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
943 | [[#include <mysql/mysql.h>]], | 943 | [[#include <mysql/mysql.h>] |
944 | [[#ifndef my_bool | 944 | [typedef int my_bool;]])], # Hint: this fails if my_bool is defined already |
945 | #no my_bool found | ||
946 | #endif]])], | ||
947 | [AC_MSG_RESULT([yes]) | ||
948 | mysql_bool="my_bool"], | ||
949 | [AC_MSG_RESULT([no]) | 945 | [AC_MSG_RESULT([no]) |
950 | mysql_bool="bool"])]) | 946 | mysql_bool="bool"], |
947 | [AC_MSG_RESULT([yes]) | ||
948 | mysql_bool="my_bool"])]) | ||
951 | 949 | ||
952 | AC_SUBST([mysql_bool]) | 950 | AC_SUBST([mysql_bool]) |
953 | 951 | ||