From 06edef3d5e072ef3c4face9ce946d2d9c36cc477 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 20 Mar 2016 10:00:58 +0100 Subject: Generate the lists of enabled protocols/bsfs from configure. --- configure | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 2eb686a591..117e286450 100755 --- a/configure +++ b/configure @@ -5310,6 +5310,23 @@ cp_if_changed $TMPH libavutil/avconfig.h test -n "$WARNINGS" && printf "\n$WARNINGS" +# generate the lists of enabled components +print_enabled_components(){ + file=$1 + struct_name=$2 + name=$3 + shift 3 + echo "static const $struct_name *$name[] = {" > $TMPH + for c in $*; do + enabled $c && printf " &ff_%s,\n" $c >> $TMPH + done + echo " NULL };" >> $TMPH + cp_if_changed $TMPH $file +} + +print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST +print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $PROTOCOL_LIST + # build pkg-config files lib_version(){ -- cgit v1.2.3