summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2017-01-12 09:28:02 +0100
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:22:32 +0100
commit947a6c107a40f43b64adb3736a495e47caad7414 (patch)
tree79bac6e0023cf3c7b4d34e6720d5d8983e1e8481 /configure.ac
parent18a4f5b6f2977120281715a4b9dfee46a303436b (diff)
Fix lookup_errno by adding a gperf length parameter detection.
build-sys: add check for gperf lookup function signature (#5055) gperf-3.1 generates lookup functions that take a size_t length parameter instead of unsigned int. Test for this at configure time. Fixes: https://github.com/systemd/systemd/issues/5039
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 23 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8e3f7b3cd..24f4d0dd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,7 +232,29 @@ AC_CHECK_SIZEOF(rlim_t,,[
#include <sys/resource.h>
])
- # ------------------------------------------------------------------------------
+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])
+
+# ------------------------------------------------------------------------------
# we use python to build the man page index
have_python=no
AC_ARG_WITH([python],