parse: Manually insert priv_gst_parse_yyget/set_column prototypes for older flex
authorOlivier Crête <olivier.crete@collabora.com>
Fri, 29 Nov 2013 19:00:35 +0000 (14:00 -0500)
committerOlivier Crête <olivier.crete@collabora.com>
Fri, 29 Nov 2013 19:02:24 +0000 (14:02 -0500)
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.

gst/parse/Makefile.am

index 1d6f8ff..9227408 100644 (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