diff options
author | wsnipex <wsnipex@a1.net> | 2015-02-09 15:31:09 +0100 |
---|---|---|
committer | wsnipex <wsnipex@a1.net> | 2015-02-09 16:56:47 +0100 |
commit | c214a83060b3909ceaf834fa0df5b40fe5495cb1 (patch) | |
tree | c42418e87a64716c62a95259d5f3171e91f5b12f /configure.in | |
parent | df009bbb92e540b4be87d8e1ef784e2f31505875 (diff) |
[configure] tinyxml upstream does not provide a pkg-config file,
so we must fallback to checking the header :/
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 7bcf070a86..121f41c9a6 100644 --- a/configure.in +++ b/configure.in @@ -1117,9 +1117,21 @@ if test "$use_mysql" = "yes"; then fi AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth])) +AC_LANG_PUSH([C++]) PKG_CHECK_MODULES([TINYXML], [tinyxml >= 2.6.2], [INCLUDES="$INCLUDES $TINYXML_CFLAGS"; LIBS="$LIBS $TINYXML_LIBS"], - AC_MSG_ERROR("libtinyxml >= 2.6.2 not found")) + [AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include <stdlib.h> +#include <tinyxml.h> + +int main() { + if (TIXML_MAJOR_VERSION < 2) exit(1); + if (TIXML_MAJOR_VERSION == 2 && ( TIXML_MINOR_VERSION < 6 || ( TIXML_MINOR_VERSION == 6 && TIXML_PATCH_VERSION < 2 ))) exit(1); +} + ]])],[AC_CHECK_LIB([tinyxml], [main],, AC_MSG_ERROR("tinyxml >= 2.6.2 not found"))], [AC_MSG_ERROR([tinyxml >= 2.6.2 not found])] + )]) +AC_LANG_POP([C++]) PKG_CHECK_MODULES([YAJL], [yajl >= 2], [INCLUDES="$INCLUDES $YAJL_CFLAGS"; LIBS="$LIBS $YAJL_LIBS"; YAJL_FOUND="true"], |