diff options
author | Haru <haru@dotalux.com> | 2019-02-11 05:14:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-11 05:14:44 +0100 |
commit | aca5362df2c0e215471519a9f08159bb8c7015f5 (patch) | |
tree | 81591cb75c9c62fda3f8a5c3888c3bb99cb8a638 /configure.ac | |
parent | 2d8a44b753832610d23678629127369f5db576a3 (diff) | |
parent | 9288a2b0ff525eb212f1417e797f18876ea9bd17 (diff) | |
download | hercules-aca5362df2c0e215471519a9f08159bb8c7015f5.tar.gz hercules-aca5362df2c0e215471519a9f08159bb8c7015f5.tar.bz2 hercules-aca5362df2c0e215471519a9f08159bb8c7015f5.tar.xz hercules-aca5362df2c0e215471519a9f08159bb8c7015f5.zip |
Merge pull request #2365 from 4144/mybool
Add support for mysql versions where type my_bool not exists.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9e88b618b..ec9e35cfe 100644 --- a/configure.ac +++ b/configure.ac @@ -1597,6 +1597,28 @@ MYSQL_OLD_LIBS="$LIBS" ; LIBS="$LIBS $MYSQL_LIBS" MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS" AC_CHECK_FUNC([mysql_init], [HAVE_MYSQL="yes"]) AC_CHECK_HEADER([mysql.h], [], [HAVE_MYSQL=""]) + +AC_MSG_CHECKING([whether my_bool is supported (MySQL)]) +AC_RUN_IFELSE( + [AC_LANG_SOURCE([ + #ifdef WIN32 + #include "common/winapi.h" // Needed before mysql.h + #endif + #include <mysql.h> + int main(int argc, char **argv){ + my_bool val = (my_bool)0; + return (int)val; + } + ])], + [ + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_RESULT([no (converting my_bool to bool)]) + MYSQL_CFLAGS="$MYSQL_CFLAGS -Dmy_bool=bool" + ] +) + CPPFLAGS="$MYSQL_OLD_CPPFLAGS" LIBS="$MYSQL_OLD_LIBS" |