echo " --enable-libmp3lame enable MP3 encoding via libmp3lame [default=no]"
echo " --enable-libnut enable NUT (de)muxing via libnut,"
echo " native demuxer exists [default=no]"
+ echo " --enable-libschroedinger enable Dirac support via libschroedinger [default=no]"
echo " --enable-libtheora enable Theora encoding via libtheora [default=no]"
echo " --enable-libvorbis enable Vorbis encoding via libvorbis,"
echo " native implementation exists [default=no]"
libgsm
libmp3lame
libnut
+ libschroedinger
libtheora
libvorbis
libx264
soundcard_h
poll_h
sys_mman_h
+ sys_resource_h
sys_select_h
sys_soundcard_h
termios_h
libgsm_ms_decoder_deps="libgsm"
libgsm_ms_encoder_deps="libgsm"
libmp3lame_encoder_deps="libmp3lame"
+libschroedinger_decoder_deps="libschroedinger"
+libschroedinger_encoder_deps="libschroedinger"
libtheora_encoder_deps="libtheora"
libvorbis_encoder_deps="libvorbis"
libx264_encoder_deps="libx264"
esac
done
+cc="${cross_prefix}${cc}"
+ar="${cross_prefix}${ar}"
+nm="${cross_prefix}${nm}"
+ranlib="${cross_prefix}${ranlib}"
+strip="${cross_prefix}${strip}"
+
+case "$arch" in
+ i386|i486|i586|i686|i86pc|BePC)
+ arch="x86_32"
+ enable fast_unaligned
+ ;;
+ x86_64|amd64)
+ arch="x86_32"
+ enable fast_unaligned
+ check_cc <<EOF && enable fast_64bit && arch="x86_64"
+ int test[sizeof(char*) - 7];
+EOF
+ ;;
+ # armv4l is a subset of armv[567]*l
+ arm|armv[4567]*l)
+ arch="armv4l"
+ ;;
+ alpha)
+ arch="alpha"
+ enable fast_64bit
+ ;;
+ "Power Macintosh"|ppc|powerpc)
+ arch="powerpc"
+ ;;
+ ppc64)
+ arch="powerpc"
+ enable fast_64bit
+ ;;
+ mips|mipsel|IP*)
+ arch="mips"
+ ;;
+ sun4u|sparc64)
+ arch="sparc64"
+ enable fast_64bit
+ ;;
+ sparc)
+ arch="sparc"
+ ;;
+ sh4)
+ arch="sh4"
+ ;;
+ parisc)
+ arch="parisc"
+ ;;
+ parisc64)
+ arch="parisc"
+ enable fast_64bit
+ ;;
+ s390|s390x)
+ arch="s390"
+ ;;
+ m68k)
+ arch="m68k"
+ ;;
+ ia64)
+ arch="ia64"
+ enable fast_64bit
+ ;;
+ bfin)
+ arch="bfin"
+ ;;
+ *)
+ arch="unknown"
+ ;;
+esac
+
+enable $arch
+enabled_any x86_32 x86_64 && enable x86
+enabled sparc64 && enable sparc
+
# OS specific
case $target_os in
beos|haiku|zeta)
EXESUF=".exe"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
- SLIB_EXTRA_CMD='-lib /machine:i386 /def:$$(@:$(SLIBSUF)=.def)'
- SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
+ SLIB_EXTRA_CMD='-lib /machine:i386 /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
+ SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
+ install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"'
SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
;;
echo "# $0 $@" >$logfile
set >>$logfile
-case "$arch" in
- i386|i486|i586|i686|i86pc|BePC)
- arch="x86_32"
- enable fast_unaligned
- ;;
- x86_64|amd64)
- arch="x86_32"
- enable fast_unaligned
- check_cc <<EOF && enable fast_64bit && arch="x86_64"
- int test[sizeof(char*) - 7];
-EOF
- ;;
- # armv4l is a subset of armv[567]*l
- arm|armv[4567]*l)
- arch="armv4l"
- ;;
- alpha)
- arch="alpha"
- enable fast_64bit
- ;;
- "Power Macintosh"|ppc|powerpc)
- arch="powerpc"
- ;;
- ppc64)
- arch="powerpc"
- enable fast_64bit
- ;;
- mips|mipsel|IP*)
- arch="mips"
- ;;
- sun4u|sparc64)
- arch="sparc64"
- enable fast_64bit
- ;;
- sparc)
- arch="sparc"
- ;;
- sh4)
- arch="sh4"
- ;;
- parisc)
- arch="parisc"
- ;;
- parisc64)
- arch="parisc"
- enable fast_64bit
- ;;
- s390|s390x)
- arch="s390"
- ;;
- m68k)
- arch="m68k"
- ;;
- ia64)
- arch="ia64"
- enable fast_64bit
- ;;
- bfin)
- arch="bfin"
- ;;
- *)
- arch="unknown"
- ;;
-esac
-
-enable $arch
-enabled_any x86_32 x86_64 && enable x86
-enabled sparc64 && enable sparc
-
# Combine FFLDFLAGS and the LDFLAGS environment variable.
LDFLAGS="$FFLDFLAGS $LDFLAGS"
test -n "$cross_prefix" && enable cross_compile
-cc="${cross_prefix}${cc}"
-ar="${cross_prefix}${ar}"
-nm="${cross_prefix}${nm}"
-ranlib="${cross_prefix}${ranlib}"
-strip="${cross_prefix}${strip}"
# we need to build at least one lib type
if ! enabled_any static shared; then
check_cc <<EOF || die "Symbol mangling check failed."
int ff_extern;
EOF
-sym=$($nm -P -g $TMPO)
+sym=$($nm -P -g $TMPO | grep ff_extern)
extern_prefix=${sym%%ff_extern*}
check_asm inline_asm '""'
check_header dlfcn.h
check_header malloc.h
check_header sys/mman.h
+check_header sys/resource.h
check_header termios.h
if ! enabled_any memalign memalign_hack && enabled need_memalign ; then
enabled libgsm && require libgsm gsm.h gsm_create -lgsm
enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
enabled libnut && require libnut libnut.h nut_demuxer_init -lnut
+enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) \
+ && require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0)
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 x264 x264.h x264_encoder_open -lx264 -lm
# disable the native AC-3 decoder if liba52 is enabled
enabled liba52 && disable ac3_decoder
+# disable the slower libdirac decoder if libschroedinger is enabled
+enabled libschroedinger && enabled libdirac && disable libdirac_decoder
+
# libdc1394 check
if enabled libdc1394; then
{ check_lib dc1394/dc1394.h dc1394_new -ldc1394 -lraw1394 &&
check_cflags -fno-math-errno
check_cflags -fno-signed-zeros
+# add some flags for Intel C Compiler
+if $cc --version | grep -q Intel; then
+ # Just warnings, no remarks
+ check_cflags -w1
+ # -wd: Disable following warnings
+ # 144, 167, 556: -Wno-pointer-sign
+ # 10006: ignoring unknown option -fno-signed-zeros
+ # 10156: ignoring option '-W'; no argument required
+ check_cflags -wd144,167,556,10006,10156
+ # 11030: Warning unknown option --as-needed
+ # 10156: ignoring option '-export'; no argument required
+ check_ldflags -wd10156,11030
+ # Allow to compile with optimizations
+ check_ldflags -march=$cpu
+fi
+
# PIC flags for shared library objects where they are needed
if enabled shared; then
# LIBOBJFLAGS may have already been set in the OS configuration
echo "libgsm enabled ${libgsm-no}"
echo "libmp3lame enabled ${libmp3lame-no}"
echo "libnut enabled ${libnut-no}"
+echo "libschroedinger enabled ${libschroedinger-no}"
echo "libtheora enabled ${libtheora-no}"
echo "libvorbis enabled ${libvorbis-no}"
echo "x264 enabled ${libx264-no}"
pkgconfig_generate(){
name=$1
+shortname=${name#lib}
comment=$2
version=$3
libs=$4
Version: $version
Requires: $requires
Conflicts:
-Libs: -L\${libdir} $libs
+Libs: -L\${libdir} -l${shortname}
+Libs.private: $libs
Cflags: -I\${includedir}
EOF
-}
-
-pkgconfig_generate_uninstalled(){
-name=$1
-shortname=${name#lib}
-comment=$2
-version=$3
-libs=$4
-requires=$5
cat <<EOF >$name-uninstalled.pc
prefix=
exec_prefix=
Version: $version
Requires: $requires
Conflicts:
-Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
+Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF}
+Libs.private: $libs
Cflags: -I\${includedir}
EOF
}
-pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" -lavutil ""
-pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION"
-
-pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "-lavcodec $extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
-pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
-
-pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "-lavformat $extralibs" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
-pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
-
-pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "-lavdevice $extralibs" "$pkg_requires libavformat = $LIBAVFORMAT_VERSION"
-pkgconfig_generate_uninstalled libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$pkg_requires libavformat = $LIBAVFORMAT_VERSION"
-if enabled postproc; then
- pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" -lpostproc ""
- pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
-fi
-
+pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION"
+pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
+pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
+pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$pkg_requires libavformat = $LIBAVFORMAT_VERSION"
+enabled avfilter && \
+ pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
+enabled postproc && \
+ pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
if enabled swscale; then
- pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" -lswscale "libavutil = $LIBAVUTIL_VERSION"
- pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
+ pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
else
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
- pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
apply libswscale.pc sed s/^Libs:.*$/Libs:/
- apply libswscale-uninstalled.pc sed s/^Libs:.*$/Libs:/
-fi
-
-if enabled avfilter; then
- pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "-lavfilter $extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION" ffmpeg
- pkgconfig_generate_uninstalled libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
fi