fix the compilation problem because of gperf changes in 3.1

This commit is contained in:
Gergan Penkov
2017-05-27 12:28:00 +02:00
parent 3fe3c71ea7
commit 08d25154e5
2 changed files with 23 additions and 1 deletions

View File

@@ -32,6 +32,27 @@ to install it.]])],
[AC_MSG_ERROR([[GNU gperf required, please install it.]])])
])
GPERF_TEST="$(echo foo,bar | ${GPERF} -L ANSI-C)"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#include <string.h>
const char * in_word_set(const char *, size_t);
$GPERF_TEST]
)],
[GPERF_LEN_TYPE=size_t],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#include <string.h>
const char * in_word_set(const char *, unsigned);
$GPERF_TEST]
)],
[GPERF_LEN_TYPE=unsigned],
[AC_MSG_ERROR([** unable to determine gperf len type])]
)]
)
AC_DEFINE_UNQUOTED([GPERF_LEN_TYPE], [$GPERF_LEN_TYPE], [gperf len type])
AC_PATH_PROG([ANTLR], [[antlr3]])
AS_IF([[test -z "$ANTLR"]],
[AS_IF([[test -f "$srcdir/src/SMARTPLLexer.h"]],