parse: Manually insert priv_gst_parse_yyget/set_column prototypes for older flex

Older versions of flex (before 2.5.36) don't add the prototype, so it must
be added manually. We can't check by the version number, because Debian/Ubuntu
patched it into their 2.5.35 at some point.
This commit is contained in:
Olivier Crête 2013-11-29 14:00:35 -05:00
parent 06737aa972
commit 3c4d54fd88

View file

@ -43,6 +43,9 @@ lex.priv_gst_parse_yy.c: parse.l grammar.tab.h
echo '#ifdef HAVE_CONFIG_H' > lex.priv_gst_parse_yy_tmp2.c && \
echo '#include <config.h>' >> lex.priv_gst_parse_yy_tmp2.c && \
echo '#endif' >> lex.priv_gst_parse_yy_tmp2.c && \
{ grep -q priv_gst_parse_yyget_column parse_lex.h || \
{ echo 'int priv_gst_parse_yyget_column (void * yyscanner);' >> lex.priv_gst_parse_yy_tmp2.c && \
echo 'void priv_gst_parse_yyset_column (int column_no , void * yyscanner);' >> lex.priv_gst_parse_yy_tmp2.c; }; } && \
cat lex.priv_gst_parse_yy_tmp.c >> lex.priv_gst_parse_yy_tmp2.c && \
rm lex.priv_gst_parse_yy_tmp.c && \
mv lex.priv_gst_parse_yy_tmp2.c lex.priv_gst_parse_yy.c