diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-09-18 17:57:05 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-09-19 13:24:43 +0200 |
commit | e0e43229736a84db5af6cb7af9cc2ae03da4c906 (patch) | |
tree | f496c2132e700b761b49571254292622a80254bd /configure.ac | |
parent | d4593353c97347fc9505a5a4fe3cfb66b246874f (diff) | |
download | strongswan-e0e43229736a.tar.bz2 strongswan-e0e43229736a.tar.xz |
configure: Detect type of length parameter for gperf generated function
Since 3.1 gperf uses size_t for the length parameter instead of an
unsigned int.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 400c33bf0..0cfe52484 100644 --- a/configure.ac +++ b/configure.ac @@ -378,6 +378,21 @@ AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin]) AC_MSG_CHECKING([gperf version >= 3.0.0]) if test -x "$GPERF"; then if test "`$GPERF --version | $AWK -F' ' '/^GNU gperf/ { print $3 }' | $AWK -F. '{ print $1 }'`" -ge "3"; then + GPERF_OUTPUT="`echo foo | ${GPERF}`" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <string.h> + const char *in_word_set(const char*, size_t); $GPERF_OUTPUT]])], + [GPERF_LEN_TYPE=size_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <string.h> + const char *in_word_set(const char*, unsigned); $GPERF_OUTPUT]])], + [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_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) |