#
# FFmpeg configure script
#
-# Copyright (c) 2000, 2001, 2002 Fabrice Bellard
-# Copyright (c) 2005-2006 Diego Biurrun
-# Copyright (c) 2005-2006 Mans Rullgard
+# Copyright (c) 2000-2002 Fabrice Bellard
+# Copyright (c) 2005-2008 Diego Biurrun
+# Copyright (c) 2005-2008 Mans Rullgard
#
+# Prevent locale nonsense from breaking basic text processing.
+export LC_ALL=C
+
# make sure we are running under a compatible shell
# try to make this part work with most shells
echo
echo "External library support:"
echo " --enable-mlib use Sun medialib [default=no]"
- echo " --enable-liba52 enable GPLed liba52 support [default=no]"
- echo " --enable-liba52bin open liba52.so.0 at runtime [default=no]"
echo " --enable-avisynth allow reading AVISynth script files [default=no]"
echo " --enable-libamr-nb enable libamr-nb floating point audio codec"
echo " --enable-libamr-wb enable libamr-wb floating point audio codec"
echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
+ echo " --extra-version=STRING version string suffix []"
echo " --build-suffix=SUFFIX suffix for application specific build []"
echo " --arch=ARCH select architecture [$arch]"
echo " --cpu=CPU selects the minimum cpu required (affects"
EOF
}
-check_func2(){
- log check_func2 "$@"
+check_func_headers(){
+ log check_func_headers "$@"
headers=$1
func=$2
shift 2
func="$2"
shift 2
temp_extralibs "$@"
- check_func2 "$headers" $func && add_extralibs "$@"
+ check_func_headers "$headers" $func && add_extralibs "$@"
err=$?
restore_flags
return $err
gray
hardcoded_tables
ipv6
- liba52
- liba52bin
libamr_nb
libamr_wb
libdc1394
sys_resource_h
sys_select_h
sys_soundcard_h
+ sys_videoio_h
termios_h
threads
winsock2_h
cc
cpu
cross_prefix
+ extra_version
logfile
source_path
target_os
byteswap_h_deps="!armv4l"
# decoders / encoders
-ac3_decoder_deps="gpl !liba52"
+ac3_decoder_deps="gpl"
dxa_decoder_deps="zlib"
+eac3_decoder_deps="gpl"
flashsv_decoder_deps="zlib"
flashsv_encoder_deps="zlib"
mlp_decoder_deps="mlp_parser"
zmbv_encoder_deps="zlib"
# external libraries
-liba52_decoder_deps="liba52"
-liba52bin_decoder_extralibs='$ldl'
libamr_nb_decoder_deps="libamr_nb"
libamr_nb_encoder_deps="libamr_nb"
libamr_wb_decoder_deps="libamr_wb"
rtsp_demuxer_deps="sdp_demuxer"
sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
v4l_demuxer_deps="linux_videodev_h"
-v4l2_demuxer_deps="linux_videodev2_h"
+v4l2_demuxer_deps_any="linux_videodev2_h sys_videoio_h"
vfwcap_demuxer_deps="capCreateCaptureWindow"
vfwcap_demuxer_extralibs="-lvfw32"
x11_grab_device_demuxer_deps="x11grab XShmCreateImage"
vhook="default"
# build settings
-add_cflags -D_ISOC99_SOURCE
+add_cflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
SHFLAGS='-shared -Wl,-soname,$$(@F)'
VHOOKSHFLAGS='$(SHFLAGS)'
FFSERVERLDFLAGS=-Wl,-E
TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
TMPSH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
+check_cflags -fasm
+check_cflags -std=c99
+
case "$arch" in
i386|i486|i586|i686|i86pc|BePC)
arch="x86_32"
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
FFSERVERLDFLAGS=-Wl,-bind_at_load
objformat="macho"
+ enabled x86_64 && objformat="macho64"
;;
mingw32*)
target_os=mingw32
if enabled_any libfaad libfaadbin ; then
if check_header faad.h; then
- check_cc << EOF
+ check_cc <<EOF
#include <faad.h>
#ifndef FAAD2_VERSION
ok faad1
enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
}
die_gpl_disabled "The Postprocessing code" postproc
- die_gpl_disabled "liba52" liba52
die_gpl_disabled "libx264" libx264
die_gpl_disabled "libxvidcore" libxvid
die_gpl_disabled "FAAD2" libfaad2
enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
case "$objformat" in
elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
+ macho64) append YASMFLAGS "-DPIC -DPREFIX" ;;
*) append YASMFLAGS "-DPREFIX" ;;
esac
check_yasm "pabsw xmm0, xmm0" && enable yasm
check_func inet_aton $network_extralibs
check_func memalign
check_func mkstemp
-check_func2 windows.h GetProcessTimes
+check_func_headers windows.h GetProcessTimes
check_header byteswap.h
check_header conio.h
check_header dlfcn.h
check_header malloc.h
+check_header poll.h
check_header sys/mman.h
check_header sys/resource.h
+check_header sys/select.h
check_header termios.h
if ! enabled_any memalign memalign_hack && enabled need_memalign ; then
enabled zlib && check_lib zlib.h zlibVersion -lz || disable zlib
enabled bzlib && check_lib bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
-# ffserver uses poll(),
-# if it's not found we can emulate it using select().
-if enabled ffserver; then
- check_header poll.h
- check_header sys/select.h
-fi
-
# check for some common methods of building with pthread support
# do this before the optional library checks as some of them require pthreads
if enabled pthreads; then
# these are off by default, so fail if requested and not available
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lvfw32
-enabled liba52 && require liba52 a52dec/a52.h a52_init -la52
enabled libamr_nb && require libamrnb amrnb/interf_dec.h Speech_Decode_Frame_init -lamrnb -lm
enabled libamr_wb && require libamrwb amrwb/dec_if.h D_IF_init -lamrwb -lm
enabled libdirac && add_cflags "$(pkg-config --cflags dirac)" \
elif check_header winsock2.h ; then
network_extralibs="-lws2_32"
check_type ws2tcpip.h socklen_t
- check_func2 winsock2.h closesocket
+ check_func_headers winsock2.h closesocket
fi
fi
check_header linux/videodev.h
check_header linux/videodev2.h
+check_header sys/videoio.h
-check_func2 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
+check_func_headers "windows.h vfw.h" capCreateCaptureWindow -lvfw32
# check for ioctl_meteor.h, ioctl_bt848.h and alternatives
{ check_header dev/bktr/ioctl_meteor.h &&
check_cflags -fno-signed-zeros
# add some flags for Intel C Compiler
-if $cc --version | grep -q Intel; then
+if $cc --version 2> /dev/null | grep -q Intel; then
# Just warnings, no remarks
check_cflags -w1
# -wd: Disable following warnings
# LIBOBJFLAGS may have already been set in the OS configuration
if test -z "$LIBOBJFLAGS" ; then
case "$arch" in
- x86_64|ia64|alpha|sparc*|power*|parisc*) LIBOBJFLAGS='$(PIC)' ;;
+ x86_64|ia64|alpha|sparc*|power*|parisc*|mips*) LIBOBJFLAGS='$(PIC)' ;;
esac
fi
fi
if test "$build_suffix" != ""; then
echo "build suffix $build_suffix"
fi
+if test "$extra_version" != ""; then
+ echo "version string suffix $extra_version"
+fi
echo "big-endian ${bigendian-no}"
if test $arch = "x86_32" -o $arch = "x86_64"; then
echo "yasm ${yasm-no}"
fi
echo "Sun medialib support ${mlib-no}"
echo "AVISynth enabled ${avisynth-no}"
-echo "liba52 support ${liba52-no}"
-echo "liba52 dlopened ${liba52bin-no}"
echo "libamr-nb support ${libamr_nb-no}"
echo "libamr-wb support ${libamr_wb-no}"
echo "libdc1394 support ${libdc1394-no}"
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
if enabled bigendian; then
# 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
+ printf '#define ASMALIGN(ZEROBITS) ".align 1 << " #ZEROBITS "\\n\\t"\n' >> $TMPH
echo "#define EXTERN_PREFIX \"${extern_prefix}\"" >> $TMPH
prefix=
exec_prefix=
libdir=\${pcfiledir}
-includedir=\${pcfiledir}/..
+includedir=${source_path}
Name: $name
Description: $comment