Skip to content
Snippets Groups Projects
configure 86.4 KiB
Newer Older
  • Learn to ignore specific revisions
  • echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
    
    echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
    
    Diego Biurrun's avatar
    Diego Biurrun committed
    # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
    
    cp_if_changed $TMPH config.h
    
    cat > $TMPH <<EOF
    /* Generated by ffconf */
    #ifndef AVUTIL_AVCONFIG_H
    #define AVUTIL_AVCONFIG_H
    EOF
    
    print_config AV_HAVE_ $TMPH /dev/null $HAVE_LIST_PUB
    
    echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
    
    cp_if_changed $TMPH libavutil/avconfig.h
    
    
    test -n "$WARNINGS" && printf "\n$WARNINGS"
    
    
    # build pkg-config files
    
    pkgconfig_generate(){
    name=$1
    
    shortname=${name#lib}${build_suffix}
    
    comment=$2
    version=$3
    libs=$4
    requires=$5
    
    exec_prefix=\${prefix}
    
    Name: $name
    Description: $comment
    Version: $version
    
    Requires: $(enabled shared || echo $requires)
    
    Requires.private: $(enabled shared && echo $requires)
    
    Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
    
    Libs.private: $(enabled shared && echo $libs)
    
    Cflags: -I\${includedir}
    
    cat <<EOF > $name/$name-uninstalled.pc
    
    libdir=\${pcfiledir}
    
    includedir=${source_path}
    
    Name: $name
    Description: $comment
    Version: $version
    Requires: $requires
    
    Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
    
    pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION"
    
    pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
    pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
    pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
    
    enabled avfilter &&
    
        pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
    
    enabled postproc &&
    
        pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
    
    pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"