]> git.sesse.net Git - ffmpeg/blobdiff - configure
Move pixdesc.{h,c} from libavcodec to libavutil.
[ffmpeg] / configure
index 3e92424f35dc32e78cd849b10e8b04f38d8584a4..b3d99a135bf037301e882da2367cbb0b04784c9e 100755 (executable)
--- a/configure
+++ b/configure
@@ -99,6 +99,7 @@ show_help(){
   echo "  --disable-aandct         disable AAN DCT code"
   echo "  --disable-fft            disable FFT code"
   echo "  --disable-golomb         disable Golomb code"
+  echo "  --disable-lpc            disable LPC code"
   echo "  --disable-mdct           disable MDCT code"
   echo "  --disable-rdft           disable RDFT code"
   echo "  --disable-vaapi          disable VAAPI code"
@@ -221,6 +222,7 @@ show_help(){
   echo "  --disable-neon           disable neon optimizations"
   echo "  --disable-vis            disable VIS optimizations"
   echo "  --disable-yasm           disable use of yasm assembler"
+  echo "  --enable-pic             build position-independent code"
   echo
   echo "Developer options (useful when working on FFmpeg itself):"
   echo "  --disable-debug          disable debugging symbols"
@@ -294,7 +296,7 @@ filter(){
     pat=$1
     shift
     for v; do
-        case "$v" in $pat) echo "$v" ;; esac
+        eval "case $v in $pat) echo $v ;; esac"
     done
 }
 
@@ -571,7 +573,8 @@ check_asm(){
     name="$1"
     asm="$2"
     shift 2
-    check_as "$@" <<EOF && enable $name || disable $name
+    disable $name
+    check_as "$@" <<EOF && enable $name
 void foo(void){ __asm__ volatile($asm); }
 EOF
 }
@@ -834,12 +837,14 @@ CONFIG_LIST="
     libvorbis
     libx264
     libxvid
+    lpc
     mdct
     memalign_hack
     mlib
     mpegaudio_hp
     network
     nonfree
+    pic
     postproc
     powerpc_perf
     rdft
@@ -865,6 +870,9 @@ THREADS_LIST='
 ARCH_LIST='
     alpha
     arm
+    avr32
+    avr32_ap
+    avr32_uc
     bfin
     ia64
     m68k
@@ -1060,6 +1068,7 @@ inline_asm_deps="!tms470"
 aac_decoder_select="fft mdct"
 aac_encoder_select="fft mdct"
 ac3_decoder_select="fft mdct"
+alac_encoder_select="lpc"
 atrac3_decoder_select="fft mdct"
 cavs_decoder_select="golomb"
 cook_decoder_select="fft mdct"
@@ -1073,7 +1082,7 @@ eatgq_decoder_select="aandct"
 eatqi_decoder_select="aandct"
 ffv1_decoder_select="golomb"
 flac_decoder_select="golomb"
-flac_encoder_select="golomb"
+flac_encoder_select="golomb lpc"
 flashsv_decoder_select="zlib"
 flashsv_encoder_select="zlib"
 flv_encoder_select="h263_encoder"
@@ -1192,12 +1201,12 @@ mp4_muxer_select="mov_muxer"
 mpegtsraw_demuxer_select="mpegts_demuxer"
 mxf_d10_muxer_select="mxf_muxer"
 psp_muxer_select="mov_muxer"
-redir_demuxer_deps="network"
 rtp_muxer_deps="network rtp_protocol"
 rtsp_demuxer_deps="sdp_demuxer"
 sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
 tg2_muxer_select="mov_muxer"
 tgp_muxer_select="mov_muxer"
+w64_demuxer_deps="wav_demuxer"
 
 # indevs / outdevs
 alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
@@ -1255,6 +1264,7 @@ shlibdir_default="$libdir_default"
 # toolchain
 ar="ar"
 cc_default="gcc"
+cc_version=\"unknown\"
 host_cc_default="gcc"
 ln_s="ln -sf"
 nm_default="nm"
@@ -1474,7 +1484,7 @@ fi
 tmpfile(){
     tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
         (set -C; exec > $tmp) 2>/dev/null ||
-        die "Unable to create temoporary file in $TMPDIR."
+        die "Unable to create temporary file in $TMPDIR."
     append TMPFILES $tmp
     eval $1=$tmp
 }
@@ -1508,20 +1518,31 @@ filter_cflags=echo
 filter_cppflags=echo
 filter_asflags=echo
 
-if   $cc --version 2>/dev/null | grep -qi gcc; then
+if   $cc -v 2>&1 | grep -qi ^gcc; then
     cc_type=gcc
+    cc_version=__VERSION__
+    if ! $cc -dumpversion | grep -q '^2\.'; then
+        CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
+        AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
+    fi
 elif $cc --version 2>/dev/null | grep -q Intel; then
     cc_type=icc
+    cc_version="AV_STRINGIFY(__INTEL_COMPILER)"
+    CC_DEPFLAGS='-MMD'
+    AS_DEPFLAGS='-MMD'
 elif $cc -v 2>&1 | grep -q xlc; then
     cc_type=xlc
+    cc_version="AV_STRINGIFY(__IBMC__)"
 elif $cc -V 2>/dev/null | grep -q Compaq; then
     cc_type=ccc
+    cc_version="AV_STRINGIFY(__DECC_VER)"
     DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -M'
     debuglevel=3
     add_ldflags -Wl,-z,now # calls to libots crash without this
-elif $cc --vsn 2>/dev/null | grep -q RVCT; then
+elif $cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then
     test -d "$sysroot" || die "No valid sysroot specified."
     cc_type=armcc
+    cc_version="AV_STRINGIFY(__ARMCC_VERSION)"
     armcc_conf="$PWD/armcc.conf"
     $cc --arm_linux_configure                 \
         --arm_linux_config_file="$armcc_conf" \
@@ -1530,17 +1551,20 @@ elif $cc --vsn 2>/dev/null | grep -q RVCT; then
         die "Error creating armcc configuration file."
     cc="$cc --arm_linux_config_file=$armcc_conf --translate_gcc"
     as_default="${cross_prefix}gcc"
+    CC_DEPFLAGS='-MMD'
+    AS_DEPFLAGS='-MMD'
 elif $cc -version 2>/dev/null | grep -q TMS470; then
     cc_type=tms470
+    cc_version="AV_STRINGIFY(__TI_COMPILER_VERSION__)"
     cc="$cc --gcc --abi=eabi -eo=.o -mc -me"
     CC_O='-fr=$(@D)'
     as_default="${cross_prefix}gcc"
     ld_default="${cross_prefix}gcc"
-    dep_cc_default="${cross_prefix}gcc"
     TMPO=$(basename $TMPC .c).o
     append TMPFILES $TMPO
     add_cflags -D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__=
-    DEPFLAGS='$(CPPFLAGS) -MM'
+    CC_DEPFLAGS='-ppa -ppd=$(@:.o=.d)'
+    AS_DEPFLAGS='-MMD'
     filter_cflags=tms470_flags
     tms470_flags(){
         for flag; do
@@ -1558,13 +1582,18 @@ elif $cc -version 2>/dev/null | grep -q TMS470; then
                     ;;
                 -mfpu=neon)     echo --float_support=vfpv3 --neon ;;
                 -mfpu=vfp)      echo --float_support=vfpv2        ;;
-                -mfpu=softvfp)  echo --float_support=vfplib       ;;
+                -msoft-float)   echo --float_support=vfplib       ;;
                 -Os)            echo -O3 -mf=2                    ;;
                 -O[0-3])        echo $flag -mf=5                  ;;
                 -g)             echo -g -mn                       ;;
             esac
         done
     }
+elif $cc -v 2>&1 | grep -q clang; then
+    cc_type=clang
+    cc_version=__VERSION__
+    CC_DEPFLAGS='-MMD'
+    AS_DEPFLAGS='-MMD'
 fi
 
 test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"
@@ -1574,6 +1603,9 @@ test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"
 : ${ld_default:=$cc}
 set_default as dep_cc ld
 
+test -n "$CC_DEPFLAGS" || CCDEP=$DEPEND_CMD
+test -n "$AS_DEPFLAGS" || ASDEP=$DEPEND_CMD
+
 add_cflags $extra_cflags
 add_asflags $extra_cflags
 
@@ -1587,6 +1619,10 @@ if test -n "$sysroot"; then
             add_cppflags -I"$sysinclude"
             add_ldflags  --sysroot="$sysroot"
         ;;
+        clang)
+            add_cppflags -isysroot="$sysroot"
+            add_ldflags -isysroot="$sysroot"
+        ;;
     esac
 fi
 
@@ -1639,7 +1675,7 @@ case $cpu in
         disable cmov
     ;;
     # targets that do support conditional mov (cmov)
-    i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2)
+    i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2|amdfam10)
         cpuflags="-march=$cpu"
         enable cmov
         enable fast_cmov
@@ -1676,6 +1712,22 @@ case $cpu in
     mips*|[45]k*|[237]4k*|m4k|r*000|loongson2[ef])
         cpuflags="-march=$cpu"
     ;;
+    ap7[02]0[0-2])
+        subarch="avr32_ap"
+        cpuflags="-mpart=$cpu"
+    ;;
+    ap)
+        subarch="avr32_ap"
+        cpuflags="-march=$cpu"
+    ;;
+    uc3[ab]*)
+        subarch="avr32_uc"
+        cpuflags="-mcpu=$cpu"
+    ;;
+    uc)
+        subarch="avr32_uc"
+        cpuflags="-march=$cpu"
+    ;;
     generic)
     ;;
     *)
@@ -1713,7 +1765,7 @@ case "$arch" in
         arch="alpha"
         enable fast_64bit
         check_cflags -mieee
-        pic=$shared
+        spic=$shared
     ;;
     arm|armv[4567]*l)
         arch="arm"
@@ -1726,29 +1778,29 @@ case "$arch" in
     ia64)
         arch="ia64"
         enable fast_64bit
-        pic=$shared
+        spic=$shared
     ;;
     m68k)
         arch="m68k"
     ;;
     mips|mipsel|IP*)
         arch="mips"
-        pic=$shared
+        spic=$shared
     ;;
     mips64)
         arch="mips"
         subarch="mips64"
         enable fast_64bit
-        pic=$shared
+        spic=$shared
     ;;
     parisc|hppa)
         arch="parisc"
-        pic=$shared
+        spic=$shared
     ;;
     parisc64|hppa64)
         arch="parisc"
         enable fast_64bit
-        pic=$shared
+        spic=$shared
     ;;
     "Power Macintosh"|ppc|powerpc)
         arch="ppc"
@@ -1768,28 +1820,25 @@ case "$arch" in
     ;;
     sparc)
         arch="sparc"
-        pic=$shared
+        spic=$shared
     ;;
     sun4u|sparc64)
         arch="sparc"
         subarch="sparc64"
         enable fast_64bit
-        pic=$shared
-    ;;
-    i386|i486|i586|i686|i86pc|BePC)
-        arch="x86"
-        subarch="x86_32"
-        enable fast_unaligned
+        spic=$shared
     ;;
-    x86_64|amd64)
+    i386|i486|i586|i686|i86pc|BePC|x86_64|amd64)
         arch="x86"
         subarch="x86_32"
-        enable cmov
-        enable fast_cmov
         enable fast_unaligned
-        check_cc <<EOF && enable fast_64bit && subarch="x86_64" && pic=$shared
+        check_cc <<EOF && enable fast_64bit && subarch="x86_64" && spic=$shared
         int test[sizeof(char*) - 7];
 EOF
+        if test "$subarch" = "x86_64"; then
+            enable cmov
+            enable fast_cmov
+        fi
     ;;
     *)
         arch="unknown"
@@ -1797,6 +1846,7 @@ EOF
 esac
 
 enable $arch $subarch
+enabled spic && enable pic
 
 # OS specific
 case $target_os in
@@ -1830,6 +1880,7 @@ case $target_os in
     sunos)
         FFSERVERLDFLAGS=""
         SHFLAGS='-shared -Wl,-h,$$(@F)'
+        enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
         network_extralibs="-lsocket -lnsl"
         add_cppflags -D__EXTENSIONS__
         ;;
@@ -1862,7 +1913,8 @@ case $target_os in
         FFSERVERLDFLAGS=-Wl,-bind_at_load
         objformat="macho"
         enabled x86_64 && objformat="macho64"
-        enabled shared || check_cflags -mdynamic-no-pic
+        enabled_any pic shared ||
+            { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
         ;;
     mingw32*)
         if test $target_os = "mingw32ce"; then
@@ -2017,6 +2069,15 @@ check_deps $ARCH_EXT_LIST
 
 disabled optimizations || check_cflags -fomit-frame-pointer
 
+enable_pic() {
+    enable pic
+    add_cppflags -DPIC
+    add_cflags   -fPIC
+    add_asflags  -fPIC
+}
+
+enabled pic && enable_pic
+
 check_cc <<EOF || die "Symbol mangling check failed."
 int ff_extern;
 EOF
@@ -2045,6 +2106,8 @@ od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
 if enabled arm; then
 
+    check_cflags -marm
+
     check_ld <<EOF && enable vfp_args
 __asm__ (".eabi_attribute 28, 1");
 int main(void) { return 0; }
@@ -2060,6 +2123,8 @@ EOF
     enabled iwmmxt  && check_asm iwmmxt  '"wunpckelub wr6, wr4"'
     enabled neon    && check_asm neon    '"vadd.i16 q0, q0, q0"'
 
+    enabled_all armv6t2 shared !pic && enable_pic
+
 elif enabled mips; then
 
     check_asm loongson '"dmult.g $1, $2, $3"'
@@ -2113,8 +2178,9 @@ elif enabled x86; then
     return i;
 EOF
 
-    # check wether EBX is available on x86
-    check_asm ebx_available '"":::"%ebx"'
+    # check whether EBX is available on x86
+    check_asm ebx_available '""::"b"(0)' &&
+        check_asm ebx_available '"":::"%ebx"'
 
     # check whether more than 10 operands are supported
     check_cc <<EOF && enable ten_operands
@@ -2228,8 +2294,8 @@ check_func truncf
 # these are off by default, so fail if requested and not available
 enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lvfw32
 enabled libdirac   && add_cflags $(pkg-config --cflags dirac) &&
-                      require  libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init -ldirac_decoder &&
-                      require  libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init -ldirac_encoder
+                      require  libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init $(pkg-config --libs dirac) &&
+                      require  libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init $(pkg-config --libs dirac)
 enabled libfaac    && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
 enabled libfaad    && require2 libfaad faad.h faacDecOpen -lfaad
 enabled libgsm     && require  libgsm gsm.h gsm_create -lgsm
@@ -2243,9 +2309,9 @@ enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) &&
 enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex
 enabled libtheora  && require  libtheora theora/theora.h theora_info_init -ltheora -logg
 enabled libvorbis  && require  libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
-enabled libx264    && require  libx264 x264.h x264_encoder_open -lx264 -lm &&
-                      { check_cpp_condition x264.h "X264_BUILD >= 65" ||
-                        die "ERROR: libx264 version must be >= 0.65."; }
+enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 -lm &&
+                      { check_cpp_condition x264.h "X264_BUILD >= 78" ||
+                        die "ERROR: libx264 version must be >= 0.78."; }
 enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
 enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
 
@@ -2344,7 +2410,7 @@ check_header X11/extensions/XShm.h      &&
 check_func XOpenDisplay -lX11           &&
 check_func XShmCreateImage -lX11 -lXext
 
-enabled debug && add_cflags -g"$debuglevel"
+enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
 
 # add some useful compiler flags if supported
 check_cflags -Wdeclaration-after-statement
@@ -2407,10 +2473,10 @@ elif enabled ccc; then
     add_cflags -msg_disable unreachcode
 elif enabled gcc; then
     check_cflags -fno-tree-vectorize
+elif enabled clang; then
+    check_cflags -Qunused-arguments
 fi
 
-enabled pic && LIBOBJFLAGS='$(PIC)'
-
 if enabled gprof; then
     add_cflags  -p
     add_ldflags -p
@@ -2560,12 +2626,6 @@ echo "License: $license"
 echo "Creating config.mak and config.h..."
 
 echo "# Automatically generated by configure - do not modify!" > config.mak
-echo "/* Automatically generated by configure - do not modify! */" > $TMPH
-echo "#ifndef FFMPEG_CONFIG_H" >> $TMPH
-echo "#define FFMPEG_CONFIG_H" >> $TMPH
-echo "#define FFMPEG_CONFIGURATION \"$(c_escape $FFMPEG_CONFIGURATION)\"" >> $TMPH
-echo "#define FFMPEG_DATADIR \"$(eval c_escape $datadir)\"" >> $TMPH
-
 echo "ifndef FFMPEG_CONFIG_MAK" >> config.mak
 echo "FFMPEG_CONFIG_MAK=1" >> config.mak
 
@@ -2600,8 +2660,6 @@ echo "LDFLAGS=$LDFLAGS" >> config.mak
 echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak
 echo "SHFLAGS=$SHFLAGS" >> config.mak
 echo "YASMFLAGS=$YASMFLAGS" >> config.mak
-echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
-echo "PIC=-fPIC -DPIC" >> config.mak
 echo "BUILDSUF=$build_suffix" >> config.mak
 echo "FULLNAME=$FULLNAME" >> config.mak
 echo "LIBPREF=$LIBPREF" >> config.mak
@@ -2611,8 +2669,11 @@ echo "SLIBPREF=$SLIBPREF" >> config.mak
 echo "SLIBSUF=$SLIBSUF" >> config.mak
 echo "EXESUF=$EXESUF" >> config.mak
 echo "EXTRA_VERSION=$extra_version" >> config.mak
-echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
 echo "DEPFLAGS=$DEPFLAGS" >> config.mak
+echo "CCDEP=$CCDEP" >> config.mak
+echo "ASDEP=$ASDEP" >> config.mak
+echo "CC_DEPFLAGS=$CC_DEPFLAGS" >> config.mak
+echo "AS_DEPFLAGS=$AS_DEPFLAGS" >> config.mak
 echo "HOSTCC=$host_cc" >> config.mak
 echo "HOSTCFLAGS=$host_cflags" >> config.mak
 echo "HOSTEXESUF=$HOSTEXESUF" >> config.mak
@@ -2662,6 +2723,30 @@ echo "EXTRALIBS=$extralibs" >> config.mak
 
 echo "ARCH=$arch" >> config.mak
 
+
+echo "/* Automatically generated by configure - do not modify! */" > $TMPH
+echo "#ifndef FFMPEG_CONFIG_H" >> $TMPH
+echo "#define FFMPEG_CONFIG_H" >> $TMPH
+echo "#define FFMPEG_CONFIGURATION \"$(c_escape $FFMPEG_CONFIGURATION)\"" >> $TMPH
+echo "#define FFMPEG_DATADIR \"$(eval c_escape $datadir)\"" >> $TMPH
+
+echo "#define CC_TYPE \"$cc_type\"" >> $TMPH
+echo "#define CC_VERSION $cc_version" >> $TMPH
+echo "#define restrict $_restrict" >> $TMPH
+
+if enabled small || disabled optimizations; then
+    echo "#define av_always_inline"  >> $TMPH
+fi
+
+
+# Apparently it's not possible to portably echo a backslash.
+enabled asmalign_pot &&
+    printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH ||
+    printf '#define ASMALIGN(ZEROBITS) ".align 1 << " #ZEROBITS "\\n\\t"\n' >> $TMPH
+
+echo "#define EXTERN_PREFIX \"${extern_prefix}\"" >> $TMPH
+echo "#define EXTERN_ASM ${extern_prefix}" >> $TMPH
+
 print_config ARCH_   $TMPH config.mak $ARCH_LIST
 print_config HAVE_   $TMPH config.mak $HAVE_LIST
 print_config CONFIG_ $TMPH config.mak $CONFIG_LIST       \
@@ -2678,20 +2763,6 @@ print_config CONFIG_ $TMPH config.mak $CONFIG_LIST       \
                                       $INDEV_LIST        \
                                       $OUTDEV_LIST       \
 
-echo "#define restrict $_restrict" >> $TMPH
-
-if enabled small || disabled optimizations; then
-    echo "#define av_always_inline"  >> $TMPH
-fi
-
-
-# Apparently it's not possible to portably echo a backslash.
-enabled asmalign_pot &&
-    printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH ||
-    printf '#define ASMALIGN(ZEROBITS) ".align 1 << " #ZEROBITS "\\n\\t"\n' >> $TMPH
-
-echo "#define EXTERN_PREFIX \"${extern_prefix}\"" >> $TMPH
-
 echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
 echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
 
@@ -2702,44 +2773,34 @@ cmp -s $TMPH config.h &&
 
 # build tree in object directory if source path is different from current one
 if enabled source_path_used; then
-    DIRS="\
-        doc               \
-        libavcodec        \
-        libavcodec/alpha  \
-        libavcodec/arm    \
-        libavcodec/bfin   \
-        libavcodec/mlib   \
-        libavcodec/ppc    \
-        libavcodec/sh4    \
-        libavcodec/sparc  \
-        libavcodec/x86    \
-        libavdevice       \
-        libavfilter       \
-        libavformat       \
-        libavutil         \
-        libpostproc       \
-        libswscale        \
-        libswscale/bfin   \
-        libswscale/mlib   \
-        libswscale/ppc    \
-        libswscale/sparc  \
-        libswscale/x86    \
-        tests             \
-        tools             \
-        "
-    FILES="\
-        Makefile             \
-        common.mak           \
-        subdir.mak           \
-        doc/texi2pod.pl      \
-        libavcodec/Makefile  \
-        libavdevice/Makefile \
-        libavfilter/Makefile \
-        libavformat/Makefile \
-        libavutil/Makefile   \
-        libpostproc/Makefile \
-        libswscale/Makefile  \
-        "
+    DIRS="
+        doc
+        libavcodec
+        libavcodec/$arch
+        libavdevice
+        libavfilter
+        libavformat
+        libavutil
+        libavutil/$arch
+        libpostproc
+        libswscale
+        libswscale/$arch
+        tests
+        tools
+    "
+    FILES="
+        Makefile
+        common.mak
+        subdir.mak
+        doc/texi2pod.pl
+        libavcodec/Makefile
+        libavdevice/Makefile
+        libavfilter/Makefile
+        libavformat/Makefile
+        libavutil/Makefile
+        libpostproc/Makefile
+        libswscale/Makefile
+    "
     for dir in $DIRS ; do
         mkdir -p $dir
     done
@@ -2767,10 +2828,10 @@ includedir=$incdir
 Name: $name
 Description: $comment
 Version: $version
-Requires: $(disabled shared && echo $requires)
+Requires: $(enabled shared || echo $requires)
 Requires.private: $(enabled shared && echo $requires)
 Conflicts:
-Libs: -L\${libdir} -l${shortname} $(disabled shared && echo $libs)
+Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
 Libs.private: $(enabled shared && echo $libs)
 Cflags: -I\${includedir}
 EOF