summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-17 20:50:23 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-17 20:50:23 +0200
commit1715c2a33632b333f8e8e581ef23ea5fe0234edd (patch)
treef2f9ddca0f4940edd845d71a5bfd74c8a09ba633 /configure
parente46ce9c0ac88cdc3b4604c249576cfde0c5c4946 (diff)
parent409bb1c5daba69aac788ce5065d05b8ea8441cfd (diff)
downloadmpv-1715c2a33632b333f8e8e581ef23ea5fe0234edd.tar.bz2
mpv-1715c2a33632b333f8e8e581ef23ea5fe0234edd.tar.xz
Merge svn changes up to r27949
Conflicts: common.mak libvo/vo_xv.c libvo/x11_common.c libvo/x11_common.h stream/cache2.c
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure68
1 files changed, 64 insertions, 4 deletions
diff --git a/configure b/configure
index efa711f746..fdce325fee 100755
--- a/configure
+++ b/configure
@@ -78,6 +78,19 @@ cxx_check() {
compile_check $TMPCPP $@ -lstdc++
}
+yasm_check() {
+ echo >> "$TMPLOG"
+ cat "$TMPS" >> "$TMPLOG"
+ echo >> "$TMPLOG"
+ echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
+ rm -f "$TMPEXE"
+ $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
+ TMP="$?"
+ echo >> "$TMPLOG"
+ echo >> "$TMPLOG"
+ return "$TMP"
+}
+
tmp_run() {
"$TMPEXE" >> "$TMPLOG" 2>&1
}
@@ -408,6 +421,7 @@ Miscellaneous options:
--cc=COMPILER C compiler to build MPlayer [gcc]
--host-cc=COMPILER C compiler for tools needed while building [gcc]
--as=ASSEMBLER assembler to build MPlayer [as]
+ --yasm=YASM Yasm assembler to build MPlayer [yasm]
--ar=AR librarian to build MPlayer [ar]
--ranlib=RANLIB ranlib to build MPlayer [ranlib]
--windres=WINDRES windres to build MPlayer [windres]
@@ -493,6 +507,7 @@ _cc=cc
_ar=ar
test "$CC" && _cc="$CC"
_as=auto
+_yasm=yasm
_runtime_cpudetection=no
_cross_compile=auto
_prefix="/usr/local"
@@ -790,6 +805,9 @@ for ac_option do
--as=*)
_as=`echo $ac_option | cut -d '=' -f 2`
;;
+ --yasm=*)
+ _yasm=`echo $ac_option | cut -d '=' -f 2`
+ ;;
--ar=*)
_ar=`echo $ac_option | cut -d '=' -f 2`
;;
@@ -1543,7 +1561,7 @@ elif test -r /compat/linux/proc/cpuinfo && ! x86_32 ; then
# FreeBSD with Linux emulation /proc mounted,
# extract CPU information from it
_cpuinfo="cat /compat/linux/proc/cpuinfo"
-elif darwin && ! x86_32 ; then
+elif darwin && ! x86 ; then
# use hostinfo on Darwin
_cpuinfo="hostinfo"
elif aix; then
@@ -2385,6 +2403,40 @@ else
fi
echores $_asmalign_pot
+echocheck "yasm"
+if test -z "$YASMFLAGS" ; then
+ if darwin ; then
+ x86_64 && objformat="macho64" || objformat="macho32"
+ elif win32 ; then
+ objformat="win32"
+ else
+ objformat="elf"
+ fi
+ # currently tested for Linux x86, x86_64
+ YASMFLAGS="-f $objformat"
+ x86_64 && YASMFLAGS="$YASMFLAGS -DARCH_X86_64 -m amd64"
+ case "$objformat" in
+ elf) test $_debug && YASMFLAGS="$YASMFLAGS -g dwarf2" ;;
+ macho64) YASMFLAGS="$YASMFLAGS -DPIC -DPREFIX" ;;
+ *) YASMFLAGS="$YASMFLAGS -DPREFIX" ;;
+ esac
+else
+ _warn_CFLAGS=yes
+fi
+
+echo "pabsw xmm0, xmm0" > $TMPS
+yasm_check || _yasm=""
+if test $_yasm ; then
+ test "$_mmx" = "yes" && fft_mmx="yes"
+ _def_yasm='#define HAVE_YASM 1'
+ _have_yasm="yes"
+ echores "$_yasm"
+else
+ _def_yasm='#undef HAVE_YASM'
+ fft_mmx="no"
+ _have_yasm="no"
+ echores "no"
+fi
#FIXME: This should happen before the check for CFLAGS..
if ppc && ( test "$_altivec" = yes || test "$_runtime_cpudetection" = yes ) ; then
@@ -3521,7 +3573,7 @@ if test "$_macosx" = auto ; then
else
_macosx=no
_noaomodules="macosx $_noaomodules"
- _novomodules="quartz $_novomodules"
+ _novomodules="macosx quartz $_novomodules"
fi
fi
if test "$_macosx" = yes ; then
@@ -5785,7 +5837,7 @@ if test "$_zlib" = yes ; then
_ld_extra="$_ld_extra -lz"
else
_def_zlib='#undef CONFIG_ZLIB'
- _libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// -e/TSCC_DECODER// `
+ _libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// -e s/TSCC_DECODER// `
_libavencoders=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
fi
echores "$_zlib"
@@ -7766,6 +7818,8 @@ if test "$cc_vendor" = "gnu" ; then
cc_check -std=gnu99 && CFLAGS="-std=gnu99 $CFLAGS"
cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS"
cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS"
+else
+ CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
fi
CFLAGS_FFMPEG="-I../.. $CFLAGS"
@@ -7800,6 +7854,7 @@ AR = $_ar
CC = $_cc
CXX = $_cc
HOST_CC = $_host_cc
+YASM = $_yasm
INSTALL = $_install
INSTALLSTRIP = $_install_strip
RANLIB = $_ranlib
@@ -7819,6 +7874,7 @@ CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
CFLAGS_STACKREALIGN = $cflags_stackrealign
CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
CFLAGS_TREMOR_LOW = $cflags_tremor_low
+YASMFLAGS = $YASMFLAGS
EXTRALIBS = $_extra_libs
EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
@@ -7986,6 +8042,7 @@ LIBNAME=\$(LIBPREF)\$(NAME)\$(LIBSUF)
# Some FFmpeg codecs depend on these. Enable them unconditionally for now.
CONFIG_FFT=yes
+CONFIG_FFT_MMX=$fft_mmx
CONFIG_GOLOMB=yes
CONFIG_MDCT=yes
@@ -8010,6 +8067,7 @@ CONFIG_ZLIB=$_zlib
HAVE_PTHREADS = $_pthreads
HAVE_W32THREADS = $_w32threads
+HAVE_YASM = $_have_yasm
`echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
`echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
@@ -8413,6 +8471,7 @@ $_def_threads
#else
#define ENABLE_THREADS 0
#endif
+$_def_yasm
#define CONFIG_GPL 1
#define ENABLE_SMALL 0
@@ -8544,7 +8603,8 @@ EOF
if test "$_warn_CFLAGS" = yes; then
cat <<EOF
-MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
+MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
+but:
*** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***