Skip to content
Snippets Groups Projects
configure 119 KiB
Newer Older
  • Learn to ignore specific revisions
  • #define restrict $_restrict
    #define EXTERN_PREFIX "${extern_prefix}"
    #define EXTERN_ASM ${extern_prefix}
    
    test -n "$malloc_prefix" &&
        echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH
    
    
    if enabled yasm; then
        append config_files $TMPASM
        printf '' >$TMPASM
    fi
    
    
    print_config ARCH_   "$config_files" $ARCH_LIST
    print_config HAVE_   "$config_files" $HAVE_LIST
    print_config CONFIG_ "$config_files" $CONFIG_LIST       \
    
    Måns Rullgård's avatar
    Måns Rullgård committed
                                         $CONFIG_EXTRA      \
    
    echo "#endif /* LIBAV_CONFIG_H */" >> $TMPH
    
    Diego Biurrun's avatar
    Diego Biurrun committed
    # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
    
    cp_if_changed $TMPH config.h
    
    enabled yasm && cp_if_changed $TMPASM config.asm
    
    
    cat > $TMPH <<EOF
    /* Generated by ffconf */
    #ifndef AVUTIL_AVCONFIG_H
    #define AVUTIL_AVCONFIG_H
    EOF
    
    
    print_config AV_HAVE_ $TMPH $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
        enabled ${name#lib} || return 0
        mkdir -p $name
        cat <<EOF > $name/$name.pc
    
    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 "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM"
    
    pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
    
    pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
    pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
    
    pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
    pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
    
    pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"