configure: Fix gperf length parameter determination

gperf is not actually a build dependency as the generated files are
shipped in the tarball.  So the type depends on the gperf version on
the host that ran gperf and created the tarball, which might not be
the same as that on the actual build host, and gperf might not even
be installed there, leaving the type undetermined.

Fixes: e0e4322973 ("configure: Detect type of length parameter for gperf generated function")
This commit is contained in:
Tobias Brunner
2017-10-02 17:21:42 +02:00
parent 7dd29ab4ed
commit 0ae19f0ced
12 changed files with 39 additions and 15 deletions
+1
View File
@@ -1 +1,2 @@
stroke
stroke_keywords.[ch]
+9 -3
View File
@@ -4,13 +4,19 @@ stroke_SOURCES = \
stroke.c stroke_msg.h stroke_keywords.c stroke_keywords.h
stroke_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la $(SOCKLIB)
EXTRA_DIST = stroke_keywords.txt Android.mk
BUILT_SOURCES = stroke_keywords.c
MAINTAINERCLEANFILES = stroke_keywords.c
EXTRA_DIST = stroke_keywords.h.in stroke_keywords.txt Android.mk
BUILT_SOURCES = stroke_keywords.h stroke_keywords.c
MAINTAINERCLEANFILES = stroke_keywords.h stroke_keywords.c
AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan \
-DIPSEC_PIDDIR=\"${piddir}\"
stroke_keywords.h: $(srcdir)/stroke_keywords.h.in
$(AM_V_GEN) \
sed \
-e "s:\@GPERF_LEN_TYPE\@:$(GPERF_LEN_TYPE):" \
$< > $@
stroke_keywords.c: $(srcdir)/stroke_keywords.txt $(srcdir)/stroke_keywords.h
$(AM_V_GEN) \
$(GPERF) -m 10 -D -C -G -t < $(srcdir)/stroke_keywords.txt > $@
@@ -73,6 +73,7 @@ typedef enum {
typedef struct stroke_token stroke_token_t;
extern const stroke_token_t* in_word_set(register const char *str, register GPERF_LEN_TYPE len);
extern const stroke_token_t* in_word_set(register const char *str,
register @GPERF_LEN_TYPE@ len);
#endif /* _STROKE_KEYWORDS_H_ */