X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=24f4d0dd69963610d5c018a8a346dd28d3cc1584;hp=8e3f7b3cd043d35919d7aaa03bf902d353cd22d4;hb=bceb7d6de7ddef3c2f3528eb76717cf6a2690cd6;hpb=f4f4df01e7f959b6a2d76b58a815a5a3feb0bb67 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 ]) - # ------------------------------------------------------------------------------ +GPERF_TEST="$(echo foo,bar | ${GPERF} -L ANSI-C)" + +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ + #include + const char * in_word_set(const char *, size_t); + $GPERF_TEST] + )], + [GPERF_LEN_TYPE=size_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ + #include + 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],