diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 784 |
1 files changed, 397 insertions, 387 deletions
@@ -108,28 +108,28 @@ die () { # OS test booleans functions issystem() { - test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`" + test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)" } -linux() { issystem "Linux" || issystem "uClinux" ; return "$?" ; } -sunos() { issystem "SunOS" ; return "$?" ; } -hpux() { issystem "HP-UX" ; return "$?" ; } -irix() { issystem "IRIX" ; return "$?" ; } -aix() { issystem "AIX" ; return "$?" ; } -cygwin() { issystem "CYGWIN" ; return "$?" ; } -freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; return "$?" ; } -netbsd() { issystem "NetBSD" ; return "$?" ; } -bsdos() { issystem "BSD/OS" ; return "$?" ; } -openbsd() { issystem "OpenBSD" ; return "$?" ; } -dragonfly() { issystem "DragonFly" ; return "$?" ; } -qnx() { issystem "QNX" ; return "$?" ; } -darwin() { issystem "Darwin" ; return "$?" ; } -gnu() { issystem "GNU" ; return "$?" ; } -mingw32() { issystem "MINGW32" ; return "$?" ; } -morphos() { issystem "MorphOS" ; return "$?" ; } -amigaos() { issystem "AmigaOS" ; return "$?" ; } -win32() { cygwin || mingw32 ; return "$?" ; } -beos() { issystem "BEOS" ; return "$?" ; } -os2() { issystem "OS/2" ; return "$?" ; } +aix() { issystem "AIX"; } +amigaos() { issystem "AmigaOS"; } +beos() { issystem "BEOS"; } +bsdos() { issystem "BSD/OS"; } +cygwin() { issystem "CYGWIN"; } +darwin() { issystem "Darwin"; } +dragonfly() { issystem "DragonFly"; } +freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; } +gnu() { issystem "GNU"; } +hpux() { issystem "HP-UX"; } +irix() { issystem "IRIX"; } +linux() { issystem "Linux"; } +mingw32() { issystem "MINGW32"; } +morphos() { issystem "MorphOS"; } +netbsd() { issystem "NetBSD"; } +openbsd() { issystem "OpenBSD"; } +os2() { issystem "OS/2"; } +qnx() { issystem "QNX"; } +sunos() { issystem "SunOS"; } +win32() { cygwin || mingw32; } # arch test boolean functions # x86/x86pc is used by QNX @@ -192,14 +192,14 @@ echores() { ############################################################################# # Check how echo works in this /bin/sh -case `echo -n` in +case $(echo -n) in -n) _echo_n= _echo_c='\c' ;; # SysV echo *) _echo_n='-n ' _echo_c= ;; # BSD echo esac -msg_lang_all=`echo help/help_mp-??.h help/help_mp-??_??.h | sed -e "s:help/help_mp-\(..\).h:\1:g" -e "s:help/help_mp-\(.....\).h:\1:g"` -man_lang_all=`echo DOCS/man/??/mplayer.1 DOCS/man/??_??/mplayer.1 | sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g"` -doc_lang_all=`echo DOCS/xml/??/ DOCS/xml/??_??/ | sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g"` +msg_lang_all=$(echo help/help_mp-??.h help/help_mp-??_??.h | sed -e "s:help/help_mp-\(..\).h:\1:g" -e "s:help/help_mp-\(.....\).h:\1:g") +man_lang_all=$(echo DOCS/man/??/mplayer.1 DOCS/man/??_??/mplayer.1 | sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g") +doc_lang_all=$(echo DOCS/xml/??/ DOCS/xml/??_??/ | sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g") show_help(){ cat << EOF @@ -256,6 +256,7 @@ Optional features: --enable-smb enable Samba (SMB) input [autodetect] --enable-live enable LIVE555 Streaming Media [autodetect] --enable-nemesi enable Nemesi Streaming Media [autodetect] + --disable-vcd disable VCD support [autodetect] --disable-dvdnav disable libdvdnav [autodetect] --disable-dvdread disable libdvdread [autodetect] --disable-dvdread-internal disable internal libdvdread [autodetect] @@ -270,7 +271,6 @@ Optional features: --disable-sortsub disable subtitle sorting [enabled] --enable-fribidi enable the FriBiDi libs [autodetect] --disable-enca disable ENCA charset oracle library [autodetect] - --disable-macosx disable Mac OS X specific features [autodetect] --disable-maemo disable maemo specific features [autodetect] --enable-macosx-finder enable Mac OS X Finder invocation parameter parsing [disabled] @@ -337,8 +337,8 @@ Codecs: --enable-xmms enable XMMS input plugin support [disabled] --enable-libdca enable libdca support [autodetect] --disable-mp3lib disable builtin mp3lib [autodetect] - --disable-liba52 disable liba52 [autodetect] - --disable-liba52-internal disable builtin liba52 [autodetect] + --disable-liba52 disable liba52 [autodetect] + --disable-liba52-internal disable builtin liba52 [autodetect] --disable-libmpeg2 disable builtin libmpeg2 [autodetect] --disable-musepack disable musepack support [autodetect] --disable-libamr_nb disable libamr narrowband [autodetect] @@ -406,6 +406,8 @@ Video output: --disable-pnm disable PNM video output [enable] --disable-md5sum disable md5sum video output [enable] --disable-yuv4mpeg disable yuv4mpeg video output [enable] + --disable-corevideo disable CoreVideo video output [autodetect] + --disable-quartz disable Quartz video output [autodetect] Audio output: --disable-alsa disable ALSA audio output [autodetect] @@ -420,6 +422,7 @@ Audio output: --disable-sunaudio disable Sun audio output [autodetect] --disable-dart disable DART audio output [autodetect] --disable-win32waveout disable Windows waveout audio output [autodetect] + --disable-coreaudio disable CoreAudio audio output [autodetect] --disable-select disable using select() on the audio device [enable] Miscellaneous options: @@ -526,19 +529,19 @@ _libavutil_so=auto _libavcodec_a=auto _libamr_nb=auto _libamr_wb=auto -_libavdecoders_all=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` -_libavdecoders=` echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER//` -_libavencoders_all=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` -_libavencoders=` echo $_libavencoders_all | sed 's/ LIB[A-Z0-9_]*_ENCODER//g'` -_libavparsers_all=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` +_libavdecoders_all=$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') +_libavdecoders=$(echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER//) +_libavencoders_all=$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') +_libavencoders=$(echo $_libavencoders_all | sed 's/ LIB[A-Z0-9_]*_ENCODER//g') +_libavparsers_all=$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') _libavparsers=$_libavparsers_all -_libavbsfs_all=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` +_libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') _libavbsfs=$_libavbsfs_all -_libavdemuxers_all=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]'` -_libavdemuxers=`echo $_libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/RTSP_DEMUXER// -e s/SDP_DEMUXER// -e s/AVISYNTH_DEMUXER// ` -_libavmuxers_all=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]'` -_libavmuxers=`echo $_libavmuxers_all | sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s/RTP_MUXER// ` -_libavprotocols_all=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]'` +_libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') +_libavdemuxers=$(echo $_libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/RTSP_DEMUXER// -e s/SDP_DEMUXER// -e s/AVISYNTH_DEMUXER//) +_libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') +_libavmuxers=$(echo $_libavmuxers_all | sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s/RTP_MUXER//) +_libavprotocols_all=$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') _libavcodec_so=auto _libavformat_a=auto _libavformat_so=auto @@ -620,6 +623,7 @@ _faac_lavc=auto _ladspa=auto _libbs2b=auto _xmms=no +_vcd=auto _dvdnav=auto _dvdnavconfig=dvdnav-config _dvdreadconfig=dvdread-config @@ -706,8 +710,10 @@ _freetype=auto _fontconfig=auto _menu=no _qtx=auto -_macosx=auto _maemo=auto +_coreaudio=auto +_corevideo=auto +_quartz=auto _macosx_finder=no _macosx_bundle=auto _sortsub=yes @@ -738,113 +744,113 @@ for ac_option do show_help ;; --prefix=*) - _prefix=`echo $ac_option | cut -d '=' -f 2` + _prefix=$(echo $ac_option | cut -d '=' -f 2) ;; --bindir=*) - _bindir=`echo $ac_option | cut -d '=' -f 2` + _bindir=$(echo $ac_option | cut -d '=' -f 2) ;; --datadir=*) - _datadir=`echo $ac_option | cut -d '=' -f 2` + _datadir=$(echo $ac_option | cut -d '=' -f 2) ;; --mandir=*) - _mandir=`echo $ac_option | cut -d '=' -f 2` + _mandir=$(echo $ac_option | cut -d '=' -f 2) ;; --confdir=*) - _confdir=`echo $ac_option | cut -d '=' -f 2` + _confdir=$(echo $ac_option | cut -d '=' -f 2) ;; --libdir=*) - _libdir=`echo $ac_option | cut -d '=' -f 2` + _libdir=$(echo $ac_option | cut -d '=' -f 2) ;; --codecsdir=*) - _codecsdir=`echo $ac_option | cut -d '=' -f 2` + _codecsdir=$(echo $ac_option | cut -d '=' -f 2) ;; --win32codecsdir=*) - _win32codecsdir=`echo $ac_option | cut -d '=' -f 2` + _win32codecsdir=$(echo $ac_option | cut -d '=' -f 2) ;; --xanimcodecsdir=*) - _xanimcodecsdir=`echo $ac_option | cut -d '=' -f 2` + _xanimcodecsdir=$(echo $ac_option | cut -d '=' -f 2) ;; --realcodecsdir=*) - _realcodecsdir=`echo $ac_option | cut -d '=' -f 2` + _realcodecsdir=$(echo $ac_option | cut -d '=' -f 2) ;; --with-install=*) - _install=`echo $ac_option | cut -d '=' -f 2 ` + _install=$(echo $ac_option | cut -d '=' -f 2 ) ;; --with-xvmclib=*) - _xvmclib=`echo $ac_option | cut -d '=' -f 2` + _xvmclib=$(echo $ac_option | cut -d '=' -f 2) ;; --with-sdl-config=*) - _sdlconfig=`echo $ac_option | cut -d '=' -f 2` + _sdlconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-freetype-config=*) - _freetypeconfig=`echo $ac_option | cut -d '=' -f 2` + _freetypeconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-fribidi-config=*) - _fribidiconfig=`echo $ac_option | cut -d '=' -f 2` + _fribidiconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-gtk-config=*) - _gtkconfig=`echo $ac_option | cut -d '=' -f 2` + _gtkconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-glib-config=*) - _glibconfig=`echo $ac_option | cut -d '=' -f 2` + _glibconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-dvdnav-config=*) - _dvdnavconfig=`echo $ac_option | cut -d '=' -f 2` + _dvdnavconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --with-dvdread-config=*) - _dvdreadconfig=`echo $ac_option | cut -d '=' -f 2` + _dvdreadconfig=$(echo $ac_option | cut -d '=' -f 2) ;; --extra-cflags=*) - extra_cflags=`echo $ac_option | cut -d '=' -f 2-` + extra_cflags=$(echo $ac_option | cut -d '=' -f 2-) ;; --extra-ldflags=*) - extra_ldflags=`echo $ac_option | cut -d '=' -f 2-` + extra_ldflags=$(echo $ac_option | cut -d '=' -f 2-) ;; --extra-libs=*) - extra_libs=`echo $ac_option | cut -d '=' -f 2` + extra_libs=$(echo $ac_option | cut -d '=' -f 2) ;; --extra-libs-mplayer=*) - libs_mplayer=`echo $ac_option | cut -d '=' -f 2` + libs_mplayer=$(echo $ac_option | cut -d '=' -f 2) ;; --extra-libs-mencoder=*) - libs_mencoder=`echo $ac_option | cut -d '=' -f 2` + libs_mencoder=$(echo $ac_option | cut -d '=' -f 2) ;; --target=*) - _target=`echo $ac_option | cut -d '=' -f 2` + _target=$(echo $ac_option | cut -d '=' -f 2) ;; --cc=*) - _cc=`echo $ac_option | cut -d '=' -f 2` + _cc=$(echo $ac_option | cut -d '=' -f 2) ;; --host-cc=*) - _host_cc=`echo $ac_option | cut -d '=' -f 2` + _host_cc=$(echo $ac_option | cut -d '=' -f 2) ;; --as=*) - _as=`echo $ac_option | cut -d '=' -f 2` + _as=$(echo $ac_option | cut -d '=' -f 2) ;; --nm=*) - _nm=`echo $ac_option | cut -d '=' -f 2` + _nm=$(echo $ac_option | cut -d '=' -f 2) ;; --yasm=*) - _yasm=`echo $ac_option | cut -d '=' -f 2` + _yasm=$(echo $ac_option | cut -d '=' -f 2) ;; --ar=*) - _ar=`echo $ac_option | cut -d '=' -f 2` + _ar=$(echo $ac_option | cut -d '=' -f 2) ;; --ranlib=*) - _ranlib=`echo $ac_option | cut -d '=' -f 2` + _ranlib=$(echo $ac_option | cut -d '=' -f 2) ;; --windres=*) - _windres=`echo $ac_option | cut -d '=' -f 2` + _windres=$(echo $ac_option | cut -d '=' -f 2) ;; --charset=*) - _charset=`echo $ac_option | cut -d '=' -f 2` + _charset=$(echo $ac_option | cut -d '=' -f 2) ;; --language=*) - _language=`echo $ac_option | cut -d '=' -f 2` + _language=$(echo $ac_option | cut -d '=' -f 2) ;; --enable-static) @@ -863,7 +869,7 @@ for ac_option do _debug='-g' ;; --enable-debug=*) - _debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2` + _debug=$(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2) ;; --disable-debug) _debug= @@ -1020,6 +1026,8 @@ for ac_option do --disable-libbs2b) _libbs2b=no ;; --enable-xmms) _xmms=yes ;; --disable-xmms) _xmms=no ;; + --enable-vcd) _vcd=yes ;; + --disable-vcd) _vcd=no ;; --enable-dvdread) _dvdread=yes ;; --disable-dvdread) _dvdread=no ;; --enable-dvdread-internal) _dvdread_internal=yes ;; @@ -1089,7 +1097,7 @@ for ac_option do --enable-vidix) _vidix=yes ;; --disable-vidix) _vidix=no ;; --with-vidix-drivers=*) - _vidix_drivers=`echo $ac_option | cut -d '=' -f 2` + _vidix_drivers=$(echo $ac_option | cut -d '=' -f 2) ;; --disable-vidix-pcidb) _vidix_pcidb=no ;; --enable-dhahelper) _dhahelper=yes ;; @@ -1124,16 +1132,16 @@ for ac_option do --disable-libamr_nb) _libamr_nb=no ;; --enable-libamr_wb) _libamr_wb=yes ;; --disable-libamr_wb) _libamr_wb=no ;; - --enable-decoder=*) _libavdecoders="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-decoder=*) _libavdecoders=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; - --enable-encoder=*) _libavencoders="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-encoder=*) _libavencoders=`echo $_libavencoders | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; - --enable-parser=*) _libavparsers="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-parser=*) _libavparsers=`echo $_libavparsers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; - --enable-demuxer=*) _libavdemuxers="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-demuxer=*) _libavdemuxers=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; - --enable-muxer=*) _libavmuxers="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;; - --disable-muxer=*) _libavmuxers=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;; + --enable-decoder=*) _libavdecoders="$_libavdecoders $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-decoder=*) _libavdecoders=$(echo $_libavdecoders | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; + --enable-encoder=*) _libavencoders="$_libavencoders $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-encoder=*) _libavencoders=$(echo $_libavencoders | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; + --enable-parser=*) _libavparsers="$_libavparsers $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-parser=*) _libavparsers=$(echo $_libavparsers | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; + --enable-demuxer=*) _libavdemuxers="$_libavdemuxers $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-demuxer=*) _libavdemuxers=$(echo $_libavdemuxers | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; + --enable-muxer=*) _libavmuxers="$_libavmuxers $(echo $ac_option | cut -d '=' -f 2)" ;; + --disable-muxer=*) _libavmuxers=$(echo $_libavmuxers | sed "s/$(echo $ac_option | cut -d '=' -f 2)//g") ;; --enable-libavformat_a) _libavformat_a=yes ;; --disable-libavformat_a) _libavformat_a=no ;; --enable-libavformat_so) _libavformat_so=yes ;; @@ -1245,8 +1253,12 @@ for ac_option do --enable-qtx) _qtx=yes ;; --disable-qtx) _qtx=no ;; - --enable-macosx) _macosx=yes ;; - --disable-macosx) _macosx=no ;; + --enable-coreaudio) _coreaudio=yes ;; + --disable-coreaudio) _coreaudio=no ;; + --enable-corevideo) _corevideo=yes ;; + --disable-corevideo) _corevideo=no ;; + --enable-quartz) _quartz=yes ;; + --disable-quartz) _quartz=no ;; --enable-macosx-finder) _macosx_finder=yes ;; --disable-macosx-finder) _macosx_finder=no ;; --enable-macosx-bundle) _macosx_bundle=yes;; @@ -1320,7 +1332,7 @@ test -z "$_libdir" && _libdir="$_prefix/lib" # Determine our OS name and CPU architecture if test -z "$_target" ; then # OS name - system_name=`uname -s 2>&1` + system_name=$(uname -s 2>&1) case "$system_name" in Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS) ;; @@ -1349,7 +1361,7 @@ if test -z "$_target" ; then # host's CPU/instruction set - host_arch=`uname -p 2>&1` + host_arch=$(uname -p 2>&1) case "$host_arch" in i386|sparc|ppc|alpha|arm|mips|vax) ;; @@ -1363,7 +1375,7 @@ if test -z "$_target" ; then # recognize. # x86/x86pc is used by QNX - case "`uname -m 2>&1`" in + case "$(uname -m 2>&1)" in i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;; ia64) host_arch=ia64 ;; x86_64|amd64) @@ -1391,8 +1403,8 @@ if test -z "$_target" ; then ;; esac else # if test -z "$_target" - system_name=`echo $_target | cut -d '-' -f 2` - case "`echo $system_name | tr A-Z a-z`" in + system_name=$(echo $_target | cut -d '-' -f 2) + case "$(echo $system_name | tr A-Z a-z)" in linux) system_name=Linux ;; freebsd) system_name=FreeBSD ;; gnu/kfreebsd) system_name=FreeBSD ;; @@ -1407,9 +1419,9 @@ else # if test -z "$_target" mingw32msvc) system_name=MINGW32 ;; esac # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed - host_arch=`echo $_target | cut -d '-' -f 1` - if test `echo $host_arch` != "x86_64" ; then - host_arch=`echo $host_arch | tr '_' '-'` + host_arch=$(echo $_target | cut -d '-' -f 1) + if test $(echo $host_arch) != "x86_64" ; then + host_arch=$(echo $host_arch | tr '_' '-') fi fi @@ -1435,8 +1447,7 @@ if netbsd || dragonfly ; then fi if darwin; then - extra_ldflags="$extra_ldflags -L/usr/local/lib" - extra_cflags="$extra_cflags -I/usr/local/include" + extra_cflags="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags" _timer=timer-darwin.c fi @@ -1471,6 +1482,7 @@ if amigaos ; then _sighandler=no _stream_cache=no def_stream_cache="#undef CONFIG_STREAM_CACHE" + extra_cflags="-DNEWLIB -D__USE_INLINE__ $extra_cflags" fi if qnx ; then @@ -1503,29 +1515,15 @@ echo configuration: $_configuration > "$TMPLOG" echo >> "$TMPLOG" -# Check how to call 'head' and 'tail'. Newer versions spit out warnings -# if used as 'head -1' instead of 'head -n 1', but older versions don't -# know about '-n'. -if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then - _head() { head -$1 2>/dev/null ; } -else - _head() { head -n $1 2>/dev/null ; } -fi -if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then - _tail() { tail -$1 2>/dev/null ; } -else - _tail() { tail -n $1 2>/dev/null ; } -fi - # Checking CC version... # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure) -if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then +if test "$(basename $_cc)" = "icc" || test "$(basename $_cc)" = "ecc"; then echocheck "$_cc version" cc_vendor=intel - cc_name=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1` - cc_version=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3` - _cc_major=`echo $cc_version | cut -d '.' -f 1` - _cc_minor=`echo $cc_version | cut -d '.' -f 2` + cc_name=$($_cc -V 2>&1 | head -n 1 | cut -d ',' -f 1) + cc_version=$($_cc -V 2>&1 | head -n 1 | cut -d ',' -f 2 | cut -d ' ' -f 3) + _cc_major=$(echo $cc_version | cut -d '.' -f 1) + _cc_minor=$(echo $cc_version | cut -d '.' -f 2) # TODO verify older icc/ecc compatibility case $cc_version in '') @@ -1543,20 +1541,20 @@ if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then echores "$cc_version" else for _cc in "$_cc" cc gcc ; do - cc_name_tmp=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1` + cc_name_tmp=$($_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1) if test "$cc_name_tmp" = "gcc"; then cc_name=$cc_name_tmp echocheck "$_cc version" cc_vendor=gnu - cc_version=`$_cc -dumpversion 2>&1` + cc_version=$($_cc -dumpversion 2>&1) case $cc_version in 2.96*) cc_fail=yes ;; *) - _cc_major=`echo $cc_version | cut -d '.' -f 1` - _cc_minor=`echo $cc_version | cut -d '.' -f 2` - _cc_mini=`echo $cc_version | cut -d '.' -f 3` + _cc_major=$(echo $cc_version | cut -d '.' -f 1) + _cc_minor=$(echo $cc_version | cut -d '.' -f 2) + _cc_mini=$(echo $cc_version | cut -d '.' -f 3) ;; esac echores "$cc_version" @@ -1591,12 +1589,12 @@ fi # now that we know what compiler should be used for compilation, try to find # out which assembler is used by the $_cc compiler if test "$_as" = auto ; then - _as=`$_cc -print-prog-name=as` + _as=$($_cc -print-prog-name=as) test -z "$_as" && _as=as fi if test "$_nm" = auto ; then - _nm=`$_cc -print-prog-name=nm` + _nm=$($_cc -print-prog-name=nm) test -z "$_nm" && _nm=nm fi @@ -1629,16 +1627,16 @@ fi if x86 ; then # gather more CPU information - pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1` - pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` - pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` - pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` - pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` + pname=$($_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -n 1) + pvendor=$($_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1) + pfamily=$($_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1) + pmodel=$($_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1) + pstepping=$($_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1) - exts=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1` + exts=$($_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | head -n 1) - pparam=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \ - -e s/xmm/sse/ -e s/kni/sse/` + pparam=$(echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \ + -e s/xmm/sse/ -e s/kni/sse/) for ext in $pparam ; do eval test \"\$_$ext\" = auto 2>/dev/null && eval _$ext=kernel_check @@ -2052,8 +2050,8 @@ EOF def_fast_64bit='#define HAVE_FAST_64BIT 1' elif sunos ; then echocheck "CPU type" - karch=`uname -m` - case "`echo $karch`" in + karch=$(uname -m) + case "$(echo $karch)" in sun4) proc=v7 ;; sun4c) proc=v7 ;; sun4d) proc=v8 ;; @@ -2102,15 +2100,15 @@ EOF echocheck "CPU type" case $system_name in Linux) - proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1` - if test -n "`$_cpuinfo | grep altivec`"; then + proc=$($_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | head -n 1) + if test -n "$($_cpuinfo | grep altivec)"; then test $_altivec = auto && _altivec=yes fi ;; Darwin) - proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'` - if [ `sysctl -n hw.vectorunit` -eq 1 -o \ - "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then + proc=$($_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//') + if [ $(sysctl -n hw.vectorunit) -eq 1 -o \ + "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then test $_altivec = auto && _altivec=yes fi ;; @@ -2120,14 +2118,14 @@ EOF 2*|3.0*|3.1*|3.2*|3.3*) ;; *) - if [ `sysctl -n machdep.altivec` -eq 1 ]; then + if [ $(sysctl -n machdep.altivec) -eq 1 ]; then test $_altivec = auto && _altivec=yes fi ;; esac ;; AIX) - proc=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'` + proc=$($_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//') ;; esac if test "$_altivec" = yes; then @@ -2193,7 +2191,7 @@ EOF fi if test -n "$_mcpu"; then - _optimizing=`echo $_mcpu | cut -c 8-` + _optimizing=$(echo $_mcpu | cut -c 8-) echores "$_optimizing" else echores "none" @@ -2218,7 +2216,7 @@ int main(void) { } EOF $_cc -o "$TMPEXE" "$TMPC" - case `"$TMPEXE"` in + case $("$TMPEXE") in 0-0) proc="ev4"; _mvi="0";; 1-0) proc="ev5"; _mvi="0";; @@ -2250,8 +2248,8 @@ EOF if irix ; then echocheck "CPU type" - proc=`hinv -c processor | grep CPU | cut -d " " -f3` - case "`echo $proc`" in + proc=$(hinv -c processor | grep CPU | cut -d " " -f3) + case "$(echo $proc)" in R3000) _march='-mips1' _mcpu='-mtune=r2000' ;; R4000) _march='-mips3' _mcpu='-mtune=r4000' ;; R4400) _march='-mips3' _mcpu='-mtune=r4400' ;; @@ -2422,6 +2420,22 @@ elif test -z "$CFLAGS" ; then else _warn_CFLAGS=yes fi + +cat > $TMPC << EOF +int main(void) { return 0; } +EOF +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" + cc_check -Wundef && CFLAGS="-Wundef $CFLAGS" +else + CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS" +fi + +cc_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer" + + if test -n "$LDFLAGS" ; then extra_ldflags="$extra_ldflags $LDFLAGS" _warn_CFLAGS=yes @@ -2438,7 +2452,7 @@ fi if x86_32 ; then # Checking assembler (_as) compatibility... # Added workaround for older as that reads from stdin by default - atmos - as_version=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'` + as_version=$(echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p') echocheck "assembler ($_as $as_version)" _pref_as_version='2.9.1' @@ -2524,7 +2538,7 @@ if test -z "$YASMFLAGS" ; then x86_64 && objformat="macho64" || objformat="macho" elif win32 ; then objformat="win32" - else + else objformat="elf" fi # currently tested for Linux x86, x86_64 @@ -2614,6 +2628,17 @@ EOF test "$_altivec" = yes && CFLAGS="$CFLAGS $_altivec_gcc_flags" fi +if ppc ; then +def_xform_asm='#define HAVE_XFORM_ASM 0' +xform_asm=no +echocheck "XFORM ASM support" + cat > $TMPC << EOF +int main(void) { __asm__ volatile ("lwzx 0, %y0" :: "Z"(*(int*)0)); return 0; } +EOF +cc_check && xform_asm=yes && def_xform_asm='#define HAVE_XFORM_ASM 1' +echores "$xform_asm" +fi + if arm ; then echocheck "ARM pld instruction" cat > $TMPC << EOF @@ -2697,7 +2722,7 @@ test "$_mvi" = yes && _cpuexts="MVI $_cpuexts" # Checking kernel version... if x86_32 && linux ; then _k_verc_problem=no - kernel_version=`uname -r 2>&1` + kernel_version=$(uname -r 2>&1) echocheck "$system_name kernel version" case "$kernel_version" in '') kernel_version="?.??"; _k_verc_fail=yes;; @@ -2768,7 +2793,7 @@ echores "$_langinfo" echocheck "language" test -z "$_language" && _language=$LINGUAS -_language=`echo $_language | tr , " "` +_language=$(echo $_language | tr , " ") if $(echo $_language | grep -q all) ; then doc_lang=en ; doc_langs=$doc_lang_all man_lang=en ; man_langs=$man_lang_all @@ -2790,7 +2815,7 @@ else break else echo ${_echo_n} "$lang not found, ${_echo_c}" - _language=`echo $_language | sed "s/$lang *//"` + _language=$(echo $_language | sed "s/$lang *//") fi done fi @@ -2899,10 +2924,10 @@ EOF eval _$func=no cc_check -D_ISOC99_SOURCE $_ld_lm && eval _$func=yes if eval test "x\$_$func" = "xyes"; then - eval def_$func="\"#define HAVE_`echo $func | tr '[a-z]' '[A-Z]'` 1\"" + eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\"" echores yes else - eval def_$func="\"#define HAVE_`echo $func | tr '[a-z]' '[A-Z]'` 0\"" + eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\"" echores no fi done @@ -3294,6 +3319,11 @@ echores "$_dynamic_plugins" def_threads='#define HAVE_THREADS 0' echocheck "pthread" +if linux ; then + THREAD_CFLAGS=-D_REENTRANT +elif freebsd || netbsd || openbsd || bsdos ; then + THREAD_CFLAGS=-D_THREAD_SAFE +fi if test "$_pthreads" = auto ; then cat > $TMPC << EOF #include <pthread.h> @@ -3304,7 +3334,7 @@ _pthreads=no if ! hpux ; then for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do # for crosscompilation, we cannot execute the program, be happy if we can link statically - cc_check $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break + cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break done fi fi @@ -3312,6 +3342,7 @@ if test "$_pthreads" = yes ; then test $_ld_pthread && _res_comment="using $_ld_pthread" def_pthreads='#define HAVE_PTHREADS 1' def_threads='#define HAVE_THREADS 1' + extra_cflags="$extra_cflags $THREAD_CFLAGS" else _res_comment="v4l, v4l2, ao_nas, win32 loader disabled" def_pthreads='#undef HAVE_PTHREADS' @@ -3344,8 +3375,8 @@ echores "$_w32threads" echocheck "rpath" netbsd &&_rpath=yes if test "$_rpath" = yes ; then - for I in `echo $extra_ldflags | sed 's/-L//g'` ; do - tmp="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`" + for I in $(echo $extra_ldflags | sed 's/-L//g') ; do + tmp="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')" done extra_ldflags=$tmp fi @@ -3781,95 +3812,20 @@ echores "$_sys_sysinfo" if darwin; then -echocheck "Mac OS X APIs" -if test "$_macosx" = auto ; then - productName=`/usr/bin/sw_vers -productName` - if test "$productName" = "Mac OS X" || - test "$productName" = "Mac OS X Server" ; then - _macosx=yes - else - _macosx=no - _noaomodules="macosx $_noaomodules" - _novomodules="macosx quartz $_novomodules" - fi -fi -if test "$_macosx" = yes ; then - cat > $TMPC <<EOF -#include <CoreAudio/CoreAudio.h> -int main(void) { return 0; } -EOF - if cc_check -framework CoreAudio; then - extra_ldflags="$extra_ldflags -framework CoreAudio -framework AudioUnit -framework AudioToolbox" - _coreaudio=yes - def_coreaudio='#define CONFIG_COREAUDIO 1' - _aomodules="macosx $_aomodules" - else - _coreaudio=no - def_coreaudio='#undef CONFIG_COREAUDIO' - _noaomodules="macosx $_noaomodules" - fi - cat > $TMPC <<EOF -#include <Carbon/Carbon.h> -#include <QuickTime/QuickTime.h> -int main(void) { - EnterMovies(); - ExitMovies(); - CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false); - return 0; -} -EOF - if cc_check -framework Carbon -framework QuickTime; then - extra_ldflags="$extra_ldflags -framework Carbon -framework QuickTime" - _quartz=yes - def_quartz='#define CONFIG_QUARTZ 1' - _vomodules="quartz $_vomodules" - def_quicktime='#define CONFIG_QUICKTIME 1' - else - _quartz=no - def_quartz='#undef CONFIG_QUARTZ' - _novomodules="quartz $_novomodules" - def_quicktime='#undef CONFIG_QUICKTIME' - fi -cat > $TMPC <<EOF -#include <Carbon/Carbon.h> -#include <QuartzCore/CoreVideo.h> -int main(void) { return 0; } -EOF - if cc_check -framework Carbon -framework QuartzCore -framework OpenGL; then - _vomodules="macosx $_vomodules" - extra_ldflags="$extra_ldflags -framework Cocoa -framework QuartzCore -framework OpenGL" - def_corevideo='#define CONFIG_COREVIDEO 1' - _corevideo=yes - else - _novomodules="macosx $_novomodules" - def_corevideo='#undef CONFIG_COREVIDEO' - _corevideo=no - fi -fi -echores "$_macosx" - echocheck "Mac OS X Finder Support" -if test "$_macosx_finder" = auto ; then - _macosx_finder=$_macosx -fi -if test "$_macosx_finder" = yes; then +def_macosx_finder='#undef CONFIG_MACOSX_FINDER' +if test "$_macosx_finder" = yes ; then def_macosx_finder='#define CONFIG_MACOSX_FINDER 1' - _macosx_finder=yes -else - def_macosx_finder='#undef CONFIG_MACOSX_FINDER' - _macosx_finder=no + extra_ldflags="$extra_ldflags -framework Carbon" fi echores "$_macosx_finder" echocheck "Mac OS X Bundle file locations" -if test "$_macosx_bundle" = auto ; then - _macosx_bundle=$_macosx_finder -fi -if test "$_macosx_bundle" = yes; then +def_macosx_bundle='#undef CONFIG_MACOSX_BUNDLE' +test "$_macosx_bundle" = auto && _macosx_bundle=$_macosx_finder +if test "$_macosx_bundle" = yes ; then def_macosx_bundle='#define CONFIG_MACOSX_BUNDLE 1' -else - def_macosx_bundle='#undef CONFIG_MACOSX_BUNDLE' - _macosx_bundle=no + extra_ldflags="$extra_ldflags -framework Carbon" fi echores "$_macosx_bundle" @@ -3904,7 +3860,7 @@ EOF fi if test "$_apple_remote" = yes ; then def_apple_remote='#define CONFIG_APPLE_REMOTE 1' - extra_ldflags="$extra_ldflags -framework IOKit" + libs_mplayer="$libs_mplayer -framework IOKit -framework Cocoa" else def_apple_remote='#undef CONFIG_APPLE_REMOTE' fi @@ -3938,7 +3894,7 @@ fi #if linux echocheck "pkg-config" _pkg_config=pkg-config -if `$_pkg_config --version > /dev/null 2>&1`; then +if $($_pkg_config --version > /dev/null 2>&1); then if test "$_ld_static"; then _pkg_config="$_pkg_config --static" fi @@ -4116,15 +4072,15 @@ dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION ; EOF if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then - _directfb_version=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" | tr -d '()'` - _dfb_major=`echo $_directfb_version | cut -d . -f 1` - _dfb_minor=`echo $_directfb_version | cut -d . -f 2` - _dfb_micro=`echo $_directfb_version | cut -d . -f 3` - _dfb_version=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro` - if test "$_dfb_version" -ge `dfb_version 0 9 13`; then + _directfb_version=$(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" | tr -d '()') + _dfb_major=$(echo $_directfb_version | cut -d . -f 1) + _dfb_minor=$(echo $_directfb_version | cut -d . -f 2) + _dfb_micro=$(echo $_directfb_version | cut -d . -f 3) + _dfb_version=$(dfb_version $_dfb_major $_dfb_minor $_dfb_micro) + if test "$_dfb_version" -ge $(dfb_version 0 9 13); then def_directfb_version="#define DIRECTFBVERSION $_dfb_version" _res_comment="$_directfb_version" - test "$_dfb_version" -ge `dfb_version 0 9 15` && _dfbmga=yes + test "$_dfb_version" -ge $(dfb_version 0 9 15) && _dfbmga=yes else def_directfb_version='#undef DIRECTFBVERSION' _directfb=no @@ -4157,7 +4113,7 @@ fi echocheck "X11 headers presence" _x11_headers="no" _res_comment="check if the dev(el) packages are installed" - for I in `echo $extra_cflags | sed s/-I//g` /usr/include ; do + for I in $(echo $extra_cflags | sed s/-I//g) /usr/include ; do if test -f "$I/X11/Xlib.h" ; then _x11_headers="yes" _res_comment="" @@ -4189,7 +4145,7 @@ EOF -L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/X11R6/lib64 \ -L/usr/lib ; do if netbsd; then - _ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`" + _ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)" else _ld_tmp="$I -lXext -lX11 $_ld_pthread" fi @@ -4312,7 +4268,7 @@ if test "$_xvmc" = yes ; then else def_xvmc='#define CONFIG_XVMC 0' |