Revision 2f3e7d55

View differences:

configure
318 318
    done
319 319
}
320 320

  
321
print_config_enable(){
322
    print_config $@
323
    shift 3
324
    for cfg; do
325
        enabled $cfg && val=1 || val=0
326
        echo "#define ENABLE_`toupper $cfg` $val" >> $header
327
    done
328
}
329

  
321 330
flags_saved(){
322 331
    (: ${SAVE_CFLAGS?}) 2>/dev/null
323 332
}
......
2007 2016
echo "EXTRALIBS=$extralibs" >> config.mak
2008 2017

  
2009 2018
print_config HAVE_   $TMPH config.mak $HAVE_LIST
2010
print_config CONFIG_ $TMPH config.mak $CONFIG_LIST
2011 2019
print_config TARGET_ $TMPH config.mak $TARGET_LIST
2020
print_config_enable CONFIG_ $TMPH config.mak $CONFIG_LIST   \
2021
                                             $DECODER_LIST  \
2022
                                             $ENCODER_LIST  \
2023
                                             $PARSER_LIST   \
2024
                                             $BSF_LIST      \
2025
                                             $DEMUXER_LIST  \
2026
                                             $MUXER_LIST    \
2027
                                             $PROTOCOL_LIST \
2012 2028

  
2013 2029
if test "$targetos" = darwin; then
2014 2030
  echo "#define CONFIG_DARWIN 1"  >> $TMPH
......
2033 2049
fi
2034 2050

  
2035 2051

  
2036
for part in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $BSF_LIST $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST; do
2037
    ucname="`toupper $part`"
2038
    config_name="CONFIG_$ucname"
2039
    enabled_name="ENABLE_$ucname"
2040
    if enabled $part; then
2041
        echo "#define $config_name 1" >> $TMPH
2042
        echo "#define $enabled_name 1" >> $TMPH
2043
        echo "$config_name=yes" >> config.mak
2044
    else
2045
        echo "#define $enabled_name 0" >> $TMPH
2046
    fi
2047
done
2048

  
2049 2052
# Do not overwrite config.h if unchanged to avoid superfluous rebuilds.
2050 2053
if ! cmp -s $TMPH config.h; then
2051 2054
        mv -f $TMPH config.h

Also available in: Unified diff