2001-10-25 11:46:50 +00:00
|
|
|
#! /bin/sh
|
2001-06-04 08:07:57 +00:00
|
|
|
#
|
2001-11-17 03:53:05 +00:00
|
|
|
# Original version (C) 2000 Pontscho/fresh!mindworkz
|
|
|
|
# pontscho@makacs.poliod.hu
|
2001-05-30 20:23:20 +00:00
|
|
|
#
|
2001-11-17 03:53:05 +00:00
|
|
|
# History / Contributors: check the cvs log !
|
2001-07-04 10:45:20 +00:00
|
|
|
#
|
2001-11-17 03:53:05 +00:00
|
|
|
# Cleanups all over the place (c) 2001 pl
|
2001-05-22 07:45:35 +00:00
|
|
|
#
|
2001-04-17 22:04:44 +00:00
|
|
|
#
|
2001-11-17 03:53:05 +00:00
|
|
|
# Guidelines:
|
|
|
|
# If the option is named 'opt':
|
|
|
|
# _opt : should have a value in yes/no/auto
|
|
|
|
# _def_opt : '#define ... 1' or '#undef ...' that is: some C code
|
|
|
|
# _ld_opt : ' -L/path/dir -lopt ' that is: some GCC option
|
|
|
|
# _inc_opt : ' -I/path/dir/include '
|
2001-04-16 00:44:29 +00:00
|
|
|
#
|
2002-02-05 22:57:17 +00:00
|
|
|
# In this file, a tab is 8 chars and indentation shift is 2 characters
|
|
|
|
#
|
2001-11-17 03:53:05 +00:00
|
|
|
# GOTCHAS:
|
|
|
|
# - config files are currently:
|
2001-11-18 17:45:23 +00:00
|
|
|
# config.h config.mak libvo/config.mak libao2/config.mak
|
|
|
|
# Gui/config.mak libvo2/config.mak
|
2001-03-24 21:37:25 +00:00
|
|
|
#
|
2001-11-17 03:53:05 +00:00
|
|
|
#############################################################################
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Prefer these macros to full length text !
|
|
|
|
# These macros only return an error code - NO display is done
|
2001-10-13 20:14:05 +00:00
|
|
|
cc_check() {
|
2001-11-19 00:38:41 +00:00
|
|
|
echo >> "$TMPLOG"
|
2001-11-17 03:53:05 +00:00
|
|
|
cat "$TMPC" >> "$TMPLOG"
|
|
|
|
echo >> "$TMPLOG"
|
2001-11-19 00:38:41 +00:00
|
|
|
echo "$_cc $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
|
2001-11-20 12:31:35 +00:00
|
|
|
> "$TMPO"
|
2001-11-19 00:38:41 +00:00
|
|
|
( "$_cc" $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
|
|
|
|
TMP="$?"
|
|
|
|
echo >> "$TMPLOG"
|
|
|
|
echo "ldd $TMPO" >> "$TMPLOG"
|
|
|
|
( ldd "$TMPO" ) >> "$TMPLOG" 2>&1
|
|
|
|
echo >> "$TMPLOG"
|
|
|
|
return "$TMP"
|
2001-10-13 16:53:37 +00:00
|
|
|
}
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Display error message, flushes tempfile, exit
|
2001-10-13 20:14:05 +00:00
|
|
|
die () {
|
2001-11-17 03:53:05 +00:00
|
|
|
echo
|
|
|
|
echo "Error: $@" >&2
|
|
|
|
echo >&2
|
|
|
|
rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
|
2001-11-27 17:58:29 +00:00
|
|
|
echo "Check "$TMPLOG" if you do not understand why it failed."
|
2001-11-17 03:53:05 +00:00
|
|
|
exit 1
|
2001-10-13 16:53:37 +00:00
|
|
|
}
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# OS test booleans functions
|
2001-12-01 17:17:32 +00:00
|
|
|
issystem() {
|
|
|
|
test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
|
|
|
|
}
|
|
|
|
linux() { issystem "Linux" ; return "$?" ; }
|
|
|
|
sunos() { issystem "SunOS" ; return "$?" ; }
|
|
|
|
irix() { issystem "IRIX" ; return "$?" ; }
|
|
|
|
cygwin() { issystem "CYGWIN" ; return "$?" ; }
|
|
|
|
freebsd() { issystem "FreeBSD" ; return "$?" ; }
|
|
|
|
netbsd() { issystem "NetBSD" ; return "$?" ; }
|
|
|
|
bsdos() { issystem "BSD/OS" ; return "$?" ; }
|
|
|
|
openbsd() { issystem "OpenBSD" ; return "$?" ; }
|
2001-10-31 18:25:28 +00:00
|
|
|
bsd() { freebsd || netbsd || bsdos || openbsd ; return "$?" ; }
|
2001-12-01 17:17:32 +00:00
|
|
|
qnx() { issystem "QNX" ; return "$?" ; }
|
2001-10-13 16:53:37 +00:00
|
|
|
|
2001-11-19 12:04:19 +00:00
|
|
|
# arch test boolean functions
|
|
|
|
x86() {
|
|
|
|
case "$host_arch" in
|
|
|
|
i[3-9]86|x86*) return 0 ;;
|
|
|
|
*) return 1 ;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Use this before starting a check
|
|
|
|
echocheck() {
|
|
|
|
echo "============ Checking for $@ ============" >> "$TMPLOG"
|
2002-02-05 22:57:17 +00:00
|
|
|
echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
|
2001-11-17 03:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Use this to echo the results of a check
|
|
|
|
echores() {
|
2001-11-17 22:50:30 +00:00
|
|
|
echo "Result is: $@" >> "$TMPLOG"
|
2001-11-17 03:53:05 +00:00
|
|
|
echo "##########################################" >> "$TMPLOG"
|
|
|
|
echo "" >> "$TMPLOG"
|
|
|
|
echo "$@"
|
|
|
|
}
|
|
|
|
#############################################################################
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-06-05 18:40:44 +00:00
|
|
|
# Check how echo works in this /bin/sh
|
|
|
|
case `echo -n` in
|
2002-02-05 22:57:17 +00:00
|
|
|
-n) _echo_n= _echo_c='\c' ;; # SysV echo
|
|
|
|
*) _echo_n='-n ' _echo_c= ;; # BSD echo
|
2001-06-05 18:40:44 +00:00
|
|
|
esac
|
|
|
|
|
2001-10-23 18:32:55 +00:00
|
|
|
LANGUAGES=`echo help_mp-??.h | sed "s/help_mp-\(..\).h/\1/g"`
|
2001-06-05 18:40:44 +00:00
|
|
|
|
2001-07-24 09:16:53 +00:00
|
|
|
for parm in "$@" ; do
|
2001-10-23 18:32:55 +00:00
|
|
|
if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
|
|
|
|
cat << EOF
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
Usage: $0 [OPTIONS]...
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-10-23 18:32:55 +00:00
|
|
|
Configuration:
|
|
|
|
-h, --help display this help and exit
|
|
|
|
|
|
|
|
Installation directories:
|
2001-10-13 16:53:37 +00:00
|
|
|
--prefix=DIR use this prefix for installing mplayer [/usr/local]
|
|
|
|
--datadir=DIR use this prefix for installing machine independent
|
2001-12-25 21:58:10 +00:00
|
|
|
data files (fonts, skins) [PREFIX/share/mplayer]
|
|
|
|
--confdir=DIR use this prefix for installing configuration files
|
|
|
|
[same as datadir]
|
2001-10-23 18:32:55 +00:00
|
|
|
|
|
|
|
Optional features:
|
2001-11-23 00:21:51 +00:00
|
|
|
--disable-mencoder disable mencoder [autodetect]
|
2001-10-23 18:32:55 +00:00
|
|
|
--enable-largefiles enable support for files >2^32 bytes long [disable]
|
2002-02-22 13:47:31 +00:00
|
|
|
--enable-linux-devfs set default devices to devfs ones [disable]
|
2001-11-17 09:57:54 +00:00
|
|
|
--enable-termcap use termcap database for key codes [autodetect]
|
2001-11-17 11:26:26 +00:00
|
|
|
--enable-lirc enable LIRC (remote control) support [autodetect]
|
2001-10-23 18:32:55 +00:00
|
|
|
--enable-gui enable GUI [disable]
|
2002-03-10 22:49:18 +00:00
|
|
|
--enable-png enable png support [autodetect]
|
|
|
|
--enable-jpeg enable jpeg support [autodetect]
|
2001-12-01 15:05:08 +00:00
|
|
|
--disable-tv disable TV Interface (tv/dvb grabbers) [enable]
|
2001-12-24 02:56:02 +00:00
|
|
|
--disable-tv-v4l disable Video 4 Linux TV Interface support [autodetect]
|
2001-10-23 18:32:55 +00:00
|
|
|
--disable-win32 disable Win32 DLL support [autodetect]
|
2001-12-30 13:26:14 +00:00
|
|
|
--disable-dshow disable DirectShow support [autodetect]
|
2001-11-03 21:25:55 +00:00
|
|
|
--disable-xanim disable XAnim DLL support [autodetect]
|
2002-02-12 22:03:44 +00:00
|
|
|
--disable-xvid disable XviD codec [autodetect]
|
|
|
|
--disable-divx4linux disable DivX4linux codec [autodetect]
|
2002-04-13 17:28:33 +00:00
|
|
|
--enable-opendivx enable _old_ OpenDivx codec [disable]
|
2001-10-23 18:32:55 +00:00
|
|
|
--enable-vorbis build with OggVorbis support [autodetect]
|
2002-03-18 23:30:04 +00:00
|
|
|
--enable-faad build with FAAD (AAC) support [autodetect]
|
2001-10-23 18:32:55 +00:00
|
|
|
--disable-iconv do not use iconv(3) function [autodetect]
|
2001-11-20 07:53:20 +00:00
|
|
|
--disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
|
2002-04-13 17:28:33 +00:00
|
|
|
--enable-mp1e enable libmp1e support
|
|
|
|
(use this option if it does not compile) [disable]
|
2002-04-13 16:51:01 +00:00
|
|
|
--disable-libdv disable libdv 0.9.5 support [autodetect]
|
2001-12-24 02:56:02 +00:00
|
|
|
--disable-streaming disable network streaming support
|
|
|
|
(support for: http/mms/rtp) [enable]
|
2002-02-05 22:57:17 +00:00
|
|
|
--disable-vidix disable VIDIX stuff [enable]
|
2002-02-23 21:20:16 +00:00
|
|
|
--disable-new-input disable new input system [enable]
|
2002-02-03 12:43:18 +00:00
|
|
|
--enable-joystick enable joystick support in new input [disable]
|
2002-03-15 20:48:42 +00:00
|
|
|
--enable-i18n GNU internationalisation [disable]
|
2002-03-16 02:03:37 +00:00
|
|
|
--disable-runtime-cpudetection disable runtime CPU detection [enable]
|
2002-04-16 17:29:04 +00:00
|
|
|
--disable-dvdnav Disable dvdnav support [autodetect]
|
2002-04-21 21:18:28 +00:00
|
|
|
--disable-dvdread Disable libdvdread support [autodetect]
|
|
|
|
--disable-mpdvdkit Disable mpdvdkit support [autodetect]
|
2002-04-16 17:29:04 +00:00
|
|
|
|
2001-10-23 18:32:55 +00:00
|
|
|
Video:
|
2001-10-13 16:53:37 +00:00
|
|
|
--enable-gl build with OpenGL render support [autodetect]
|
2001-11-29 18:56:08 +00:00
|
|
|
--enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
|
2002-02-07 02:21:39 +00:00
|
|
|
--enable-vesa build with VESA support [autodetect]
|
2001-10-13 16:53:37 +00:00
|
|
|
--enable-svga build with SVGAlib support [autodetect]
|
|
|
|
--enable-sdl build with SDL render support [autodetect]
|
|
|
|
--enable-aa build with AAlib render support [autodetect]
|
|
|
|
--enable-ggi build with GGI render support [autodetect]
|
2001-12-24 02:56:02 +00:00
|
|
|
--enable-dxr3 build with DXR3/H+ render support [autodetect]
|
|
|
|
--enable-dvb build with support for output via DVB-Card [autodetect]
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-mga build with mga_vid support
|
2001-10-23 18:32:55 +00:00
|
|
|
(check for /dev/mga_vid) [autodetect]
|
|
|
|
--enable-xmga build with mga_vid X Window support
|
|
|
|
(check for X & /dev/mga_vid) [autodetect]
|
2001-10-13 16:53:37 +00:00
|
|
|
--enable-xv build with Xv render support for X 4.x [autodetect]
|
2001-12-24 02:56:02 +00:00
|
|
|
--enable-vm build with XF86VidMode support for X11 [autodetect]
|
|
|
|
--enable-xinerama build with Xinerama support for X11 [autodetect]
|
2001-10-13 16:53:37 +00:00
|
|
|
--enable-x11 build with X11 render support [autodetect]
|
2002-01-06 22:57:58 +00:00
|
|
|
--enable-fbdev build with FBDev render support [autodetect]
|
2002-02-05 22:57:17 +00:00
|
|
|
--enable-fbdev=nocopy yuv12 converts directly into framebuffer
|
2001-11-23 15:34:03 +00:00
|
|
|
--enable-mlib build with MLIB support (Solaris only) [autodetect]
|
2001-11-19 12:04:19 +00:00
|
|
|
--enable-3dfx build with 3dfx support [disable]
|
|
|
|
--enable-tdfxfb build with tdfxfb support [disable]
|
2001-12-03 01:09:36 +00:00
|
|
|
--enable-directfb build with DirectFB support [autodetect]
|
2002-01-17 01:27:20 +00:00
|
|
|
--enable-zr build with ZR36067/ZR36060 support [disable]
|
2001-10-13 16:53:37 +00:00
|
|
|
|
2001-10-23 18:32:55 +00:00
|
|
|
Audio:
|
2001-10-13 16:53:37 +00:00
|
|
|
--disable-ossaudio disable OSS sound support [autodetect]
|
|
|
|
--disable-alsa disable alsa sound support [autodetect]
|
|
|
|
--disable-sunaudio disable Sun sound support [autodetect]
|
2001-10-23 18:32:55 +00:00
|
|
|
--disable-mad disable mad audio support [autodetect]
|
2001-11-20 07:53:20 +00:00
|
|
|
--disable-select disable using select() on OSS audio device [enable]
|
2001-10-13 16:53:37 +00:00
|
|
|
|
2001-10-31 18:25:28 +00:00
|
|
|
Miscellaneous options:
|
2001-10-24 22:41:17 +00:00
|
|
|
--cc=COMPILER use this C compiler to build MPlayer [gcc]
|
2001-10-23 18:32:55 +00:00
|
|
|
--target=PLATFORM target platform (i386-linux, arm-linux, etc)
|
2001-11-15 17:11:23 +00:00
|
|
|
--enable-static build a statically linked binary. If more linking
|
|
|
|
options needed : --enable-static="-lslang -lncurses"
|
2001-10-23 18:32:55 +00:00
|
|
|
--language=xx select a language [en]
|
|
|
|
(Available: $LANGUAGES)
|
|
|
|
|
|
|
|
Advanced options:
|
|
|
|
--enable-mmx build with mmx support [autodetect]
|
|
|
|
--enable-mmx2 build with mmx2 support (PIII, Athlon) [autodetect]
|
|
|
|
--enable-3dnow build with 3dnow! support [autodetect]
|
|
|
|
--enable-3dnowex build with 3dnow-dsp! support (K7) [autodetect]
|
|
|
|
--enable-sse build with sse support [autodetect]
|
2001-12-28 18:29:12 +00:00
|
|
|
--enable-sse2 build with sse2 support [autodetect]
|
2001-10-23 18:32:55 +00:00
|
|
|
--disable-fastmemcpy disable 3dnow/sse/mmx optimized memcpy() [enable]
|
|
|
|
--enable-debug[=1-3] compile debugging information into mplayer [disable]
|
|
|
|
--enable-profile compile profiling information into mplayer [disable]
|
2002-03-27 03:45:55 +00:00
|
|
|
--disable-sighandler disable sighandler for crashes [enable]
|
2001-10-23 18:32:55 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
Hazardous options a.k.a. "DO NOT BUGREPORT ANYTHING !"
|
2002-02-10 11:25:14 +00:00
|
|
|
--disable-gcc-checking disable gcc version checking [enable]
|
2001-10-23 18:32:55 +00:00
|
|
|
|
|
|
|
Use these options if autodetection fails:
|
2001-11-17 03:53:05 +00:00
|
|
|
--with-extraincdir=DIR extra headers (png, dvb, mad, sdl, css, ...) in DIR
|
|
|
|
--with-extralibdir=DIR extra library files (png, SDL, ...) in DIR
|
2001-10-23 18:32:55 +00:00
|
|
|
--with-x11incdir=DIR X headers in DIR
|
2001-11-17 03:53:05 +00:00
|
|
|
--with-x11libdir=DIR X library files in DIR
|
2001-11-19 00:38:41 +00:00
|
|
|
--with-csslibdir=DIR libcss in DIR
|
|
|
|
--with-madlibdir=DIR libmad (libmad shared lib.) in DIR
|
2002-02-05 22:57:17 +00:00
|
|
|
--with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
|
2002-03-28 20:40:21 +00:00
|
|
|
--with-libdvdnav=DIR libdvdnav in DIR
|
2001-10-23 18:32:55 +00:00
|
|
|
--with-win32libdir=DIR W*ndows DLL files in DIR
|
2001-11-03 21:25:55 +00:00
|
|
|
--with-xanimlibdir=DIR XAnim DLL files in DIR
|
2002-02-12 22:03:44 +00:00
|
|
|
--with-xvidcore=PATH path to XviD libcore.a (e.g: /opt/lib/libcore.a)
|
2001-11-05 00:00:25 +00:00
|
|
|
--with-sdl-config=PATH path to sdl*-config (e.g.: /opt/bin/sdl-config)
|
|
|
|
--with-gtk-config=PATH path to gtk*-config (e.g.: /opt/bin/gtk-config)
|
|
|
|
--with-glib-config=PATH path to glib*-config (e.g.: /opt/bin/glib-config)
|
2001-10-23 18:32:55 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
EOF
|
2001-10-23 18:32:55 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
2001-07-24 09:16:53 +00:00
|
|
|
done # for parm in ...
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
# 1st pass checking for vital options
|
2001-10-23 18:32:55 +00:00
|
|
|
_cc=gcc
|
|
|
|
test "$CC" && _cc="$CC"
|
2001-07-28 05:36:45 +00:00
|
|
|
_as=auto
|
2002-03-19 18:42:27 +00:00
|
|
|
_runtime_cpudetection=yes
|
2001-07-30 11:14:59 +00:00
|
|
|
for ac_option do
|
2001-11-17 03:53:05 +00:00
|
|
|
case "$ac_option" in
|
2001-07-28 05:36:45 +00:00
|
|
|
--target=*)
|
2001-11-17 03:53:05 +00:00
|
|
|
_target=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2001-07-28 05:36:45 +00:00
|
|
|
--cc=*)
|
2001-11-17 03:53:05 +00:00
|
|
|
_cc=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2001-07-28 05:36:45 +00:00
|
|
|
--as=*)
|
2001-11-17 03:53:05 +00:00
|
|
|
_as=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2002-02-10 11:25:14 +00:00
|
|
|
--enable-gcc-checking)
|
|
|
|
_skip_cc_check=no
|
|
|
|
;;
|
2001-07-28 05:36:45 +00:00
|
|
|
--disable-gcc-checking)
|
2001-11-17 03:53:05 +00:00
|
|
|
_skip_cc_check=yes
|
|
|
|
;;
|
2001-11-19 00:38:41 +00:00
|
|
|
--enable-static)
|
|
|
|
_ld_static='-static'
|
|
|
|
;;
|
|
|
|
--disable-static)
|
|
|
|
_ld_static=''
|
|
|
|
;;
|
|
|
|
--enable-static=*)
|
|
|
|
_ld_static="-static `echo $ac_option | cut -d '=' -f 2`"
|
|
|
|
;;
|
2001-07-28 05:36:45 +00:00
|
|
|
--with-extraincdir=*)
|
2001-11-17 03:53:05 +00:00
|
|
|
_inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
|
|
|
|
;;
|
|
|
|
--with-extralibdir=*)
|
|
|
|
_ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
|
|
|
|
;;
|
2002-03-19 18:42:27 +00:00
|
|
|
--enable-runtime-cpudetection)
|
|
|
|
_runtime_cpudetection=yes
|
|
|
|
;;
|
|
|
|
--disable-runtime-cpudetection)
|
|
|
|
_runtime_cpudetection=no
|
|
|
|
;;
|
2001-11-17 03:53:05 +00:00
|
|
|
esac
|
2001-07-28 05:36:45 +00:00
|
|
|
done
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-07-14 17:05:23 +00:00
|
|
|
# Determine our OS name and CPU architecture
|
2001-10-11 23:41:43 +00:00
|
|
|
if test -z "$_target" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
# OS name
|
|
|
|
system_name=`( uname -s ) 2>&1`
|
|
|
|
case "$system_name" in
|
2001-11-18 17:45:23 +00:00
|
|
|
Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX)
|
2001-11-17 03:53:05 +00:00
|
|
|
;;
|
|
|
|
IRIX*)
|
|
|
|
system_name=IRIX
|
|
|
|
;;
|
|
|
|
[cC][yY][gG][wW][iI][nN]*)
|
|
|
|
system_name=CYGWIN
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
system_name="$system_name-UNKNOWN"
|
|
|
|
;;
|
|
|
|
esac
|
2001-10-31 18:25:28 +00:00
|
|
|
|
2001-07-28 05:36:45 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# host's CPU/instruction set
|
2001-10-31 18:25:28 +00:00
|
|
|
host_arch=`( uname -p ) 2>&1`
|
2001-07-28 05:36:45 +00:00
|
|
|
case "$host_arch" in
|
2001-10-31 18:25:28 +00:00
|
|
|
i386|sparc|ppc|alpha|arm|mips)
|
2001-11-17 03:53:05 +00:00
|
|
|
;;
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
*) # uname -p on Linux returns 'unknown' for the processor type,
|
|
|
|
# OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
|
2001-07-29 13:24:23 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Maybe uname -m (machine hardware name) returns something we
|
|
|
|
# recognize.
|
|
|
|
|
|
|
|
case "`( uname -m ) 2>&1`" in
|
2001-11-18 17:45:23 +00:00
|
|
|
i[3-9]86|x86*) host_arch=i386 ;;
|
|
|
|
ppc) host_arch=ppc ;;
|
|
|
|
alpha) host_arch=alpha ;;
|
|
|
|
sparc*) host_arch=sparc ;;
|
|
|
|
arm*) host_arch=arm ;;
|
|
|
|
*) host_arch=UNKNOWN ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
2001-06-21 00:06:40 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
system_name=`echo $_target | cut -d '-' -f 2`
|
|
|
|
host_arch=`echo $_target | cut -d '-' -f 1`
|
2001-06-21 00:06:40 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echo "Detected operating system: $system_name"
|
|
|
|
echo "Detected host architecture: $host_arch"
|
2001-10-05 00:39:54 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
# LGB: temporary files
|
2001-10-13 16:53:37 +00:00
|
|
|
for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
|
2001-11-17 03:53:05 +00:00
|
|
|
test "$I" && break
|
2001-10-13 16:53:37 +00:00
|
|
|
done
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-18 21:36:30 +00:00
|
|
|
TMPLOG="configure.log"
|
|
|
|
rm -f "$TMPLOG"
|
2001-11-17 03:53:05 +00:00
|
|
|
TMPC="$I/mplayer-conf-$RANDOM-$$.c"
|
|
|
|
TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp"
|
|
|
|
TMPO="$I/mplayer-conf-$RANDOM-$$.o"
|
|
|
|
TMPS="$I/mplayer-conf-$RANDOM-$$.S"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
# config files
|
2001-06-21 00:06:40 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# FIXME: A lot of stuff is installed under /usr/local
|
|
|
|
# NK: But we should never use this stuff implicitly since we call compiler
|
|
|
|
# from /usr we should be sure that there no effects from other compilers
|
|
|
|
# (libraries) which might be installed into /usr/local. Let users use this
|
|
|
|
# stuff explicitly as command line argument. In other words: It would be
|
|
|
|
# resonable have or only /usr/include or only /usr/local/include.
|
2001-10-28 21:44:23 +00:00
|
|
|
|
|
|
|
if freebsd ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
_ld_extra="$_ld_extra -L/usr/local/lib"
|
|
|
|
_inc_extra="$_inc_extra -I/usr/local/include"
|
2001-10-28 21:44:23 +00:00
|
|
|
fi
|
|
|
|
|
2001-06-05 18:40:44 +00:00
|
|
|
|
2001-06-05 07:10:00 +00:00
|
|
|
# Checking CC version...
|
2001-10-23 18:32:55 +00:00
|
|
|
# gcc-3.0 merges optimizations coming from egcs, pgcc, agcc, ...
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$_skip_cc_check" != yes ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "$_cc version"
|
2001-11-23 18:25:09 +00:00
|
|
|
# also check for name (the version checking is only for _gcc_ up for now)
|
|
|
|
# FIXME implement this in ver. check.
|
2001-11-27 16:50:34 +00:00
|
|
|
cc_name=`$_cc -v 2>&1 | tail -1 | cut -d ' ' -f 1`
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_version=`$_cc -v 2>&1 | sed -n 's/^.*version \([aegcygnustp-]*[0-9.]*\).*$/\1/p'`
|
|
|
|
case $cc_version in
|
|
|
|
'')
|
|
|
|
cc_version="v. ?.??, bad"
|
|
|
|
cc_verc_fail=yes
|
|
|
|
;;
|
2001-07-25 07:03:55 +00:00
|
|
|
2.95.[2-9]|2.95.[2-9].[0-9]|3.[0-9]|3.[0-9].[0-9])
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_version="$cc_version, ok"
|
2002-01-25 13:14:40 +00:00
|
|
|
cc_verc_fail=no
|
2001-11-17 03:53:05 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
cc_version="$cc_version, bad"
|
|
|
|
cc_verc_fail=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
echores "$cc_version"
|
2001-12-29 11:35:21 +00:00
|
|
|
# If gcc version is crappy RH one, then check if the user has installed the optional
|
|
|
|
# (at least in Rh7.2) gcc3 packages to save them some pain - malc@tmbg.co.uk
|
2002-01-25 13:14:40 +00:00
|
|
|
if test "$cc_verc_fail" = yes ; then
|
2001-12-29 11:35:21 +00:00
|
|
|
echocheck "gcc3 version"
|
|
|
|
_cc=gcc3
|
|
|
|
cc_version=`$_cc -v 2>&1 | sed -n 's/^.*version \([aegcygnustp-]*[0-9.]*\).*$/\1/p'`
|
|
|
|
case $cc_version in
|
|
|
|
'')
|
|
|
|
cc_version="v. ?.??, bad"
|
|
|
|
cc_verc_fail=yes
|
|
|
|
;;
|
|
|
|
2.95.[2-9]|2.95.[2-9].[0-9]|3.[0-9]|3.[0-9].[0-9])
|
|
|
|
cc_version="$cc_version, ok"
|
2002-01-25 13:14:40 +00:00
|
|
|
cc_verc_fail=no
|
2001-12-29 11:35:21 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
cc_version="$cc_version, bad"
|
|
|
|
cc_verc_fail=yes
|
|
|
|
;;
|
|
|
|
esac
|
2002-01-25 13:14:40 +00:00
|
|
|
echores "$cc_version"
|
2001-12-29 11:35:21 +00:00
|
|
|
fi
|
2002-01-25 13:14:40 +00:00
|
|
|
if test "$cc_verc_fail" = yes ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cat <<EOF
|
2001-08-30 11:08:36 +00:00
|
|
|
|
2001-11-14 22:18:16 +00:00
|
|
|
*** Please downgrade/upgrade C compiler to gcc-2.95.x or gcc-3.x version! ***
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
You are using a different compiler than ours. We do not have the time to make
|
|
|
|
sure everything works with compilers than the one we use. Use either use the
|
|
|
|
same compiler as ours, or use --disable-gcc-checking but DO *NOT* REPORT BUGS
|
|
|
|
unless you can reproduce them after recompiling with 2.95.x or 3.0.x version!
|
2001-11-14 22:18:16 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
Note for gcc 2.96 users: some versions of this compiler are known to miscompile
|
|
|
|
mplayer and lame (which is used for mencoder). If you get compile errors,
|
|
|
|
first upgrade to the latest 2.96 release (but minimum 2.96-85) and try again.
|
|
|
|
If the problem still exists, try with gcc 3.0.x (or 2.95.x) *BEFORE* reporting
|
|
|
|
bugs!
|
|
|
|
|
|
|
|
GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
|
|
|
|
|
|
|
|
*** For details please read DOCS/gcc-2.96-3.0.html ***
|
2001-10-24 03:09:23 +00:00
|
|
|
|
2001-08-30 11:08:36 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
die "Bad gcc version"
|
|
|
|
fi
|
2001-06-04 20:12:41 +00:00
|
|
|
else
|
2001-10-06 15:38:56 +00:00
|
|
|
cat <<EOF
|
|
|
|
|
2001-11-14 22:18:16 +00:00
|
|
|
******************************************************************************
|
2001-10-06 15:38:56 +00:00
|
|
|
|
2001-11-14 22:18:16 +00:00
|
|
|
Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
|
|
|
|
Ok. You know. Do it. But did you already read DOCS/gcc-2.96-3.0.html ???
|
2001-10-24 03:04:14 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
|
2001-10-24 03:04:14 +00:00
|
|
|
Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
|
2001-11-17 03:53:05 +00:00
|
|
|
Lame which is used by mencoder produces weird errors, too.
|
2001-10-24 03:04:14 +00:00
|
|
|
|
2001-11-14 22:18:16 +00:00
|
|
|
If you have any problem, then install GCC 2.95.x or 3.x version and try again.
|
|
|
|
If the problem _still_ exists, then read DOCS/bugreports.html !
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
*** DO NOT SEND BUGREPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
|
|
|
|
|
2001-11-14 22:18:16 +00:00
|
|
|
******************************************************************************
|
2001-10-06 15:38:56 +00:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
read _answer
|
|
|
|
|
2001-06-04 09:38:18 +00:00
|
|
|
fi
|
2001-02-24 20:28:24 +00:00
|
|
|
# ---
|
|
|
|
|
2001-07-04 10:45:20 +00:00
|
|
|
# now that we know what compiler should be used for compilation, try to find
|
|
|
|
# out which assembler is used by the $_cc compiler
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$_as" = auto ; then
|
2001-07-04 10:45:20 +00:00
|
|
|
_as=`$_cc -print-prog-name=as`
|
2001-11-17 03:53:05 +00:00
|
|
|
test -z "$_as" && _as=as
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Try to find the available options for the current CPU
|
2001-11-19 12:04:19 +00:00
|
|
|
if x86 ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
if test -r /proc/cpuinfo ; then
|
|
|
|
# linux with /proc mounted, extract cpu information from it
|
|
|
|
_cpuinfo="cat /proc/cpuinfo"
|
|
|
|
elif test -r /compat/linux/proc/cpuinfo ; then
|
|
|
|
# FreeBSD with linux emulation /proc mounted,
|
|
|
|
# extract cpu information from it
|
|
|
|
_cpuinfo="cat /compat/linux/proc/cpuinfo"
|
|
|
|
else
|
|
|
|
# all other OS try to extract cpu information from a small helper
|
|
|
|
# program TOOLS/cpuinfo instead
|
|
|
|
$_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c
|
|
|
|
_cpuinfo="TOOLS/cpuinfo"
|
2001-07-04 10:45:20 +00:00
|
|
|
fi
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
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`
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
pparam=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | head -1`
|
|
|
|
if test -z "$pparam" ; then
|
|
|
|
pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | head -1`
|
|
|
|
fi
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
_mmx=no
|
|
|
|
_3dnow=no
|
|
|
|
_3dnowex=no
|
|
|
|
_mmx2=no
|
|
|
|
_sse=no
|
|
|
|
_sse2=no
|
2001-12-16 11:35:14 +00:00
|
|
|
_mtrr=no
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
for i in $pparam ; do
|
|
|
|
case "$i" in
|
|
|
|
3dnow) _3dnow=yes ;;
|
|
|
|
3dnowext) _3dnow=yes _3dnowex=yes ;;
|
|
|
|
mmx) _mmx=yes ;;
|
|
|
|
mmxext) _mmx2=yes ;;
|
|
|
|
mtrr|k6_mtrr) _mtrr=yes ;;
|
|
|
|
xmm|sse|kni) _sse=yes _mmx2=yes ;;
|
2001-12-28 18:01:56 +00:00
|
|
|
sse2) _sse2=yes ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
esac
|
2001-11-03 21:25:55 +00:00
|
|
|
done
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "CPU vendor"
|
|
|
|
echores "$pvendor ($pfamily:$pmodel:$pstepping)"
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "CPU type"
|
|
|
|
echores "$pname"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2002-03-19 18:42:27 +00:00
|
|
|
if test "$_runtime_cpudetection" = yes ; then
|
|
|
|
_mmx=yes
|
|
|
|
_3dnow=yes
|
|
|
|
_3dnowex=yes
|
|
|
|
_mmx2=yes
|
|
|
|
_sse=yes
|
|
|
|
_sse2=yes
|
|
|
|
_mtrr=yes
|
|
|
|
fi
|
|
|
|
|
2001-11-05 21:49:20 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-13 12:44:32 +00:00
|
|
|
|
2002-01-17 09:32:22 +00:00
|
|
|
if [ "$host_arch" = alpha ]; then
|
|
|
|
echocheck "CPU type"
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
int main() {
|
|
|
|
unsigned long ver, mask;
|
|
|
|
asm ("implver %0" : "=r" (ver));
|
|
|
|
asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
|
|
|
|
printf("%ld-%x\n", ver, ~mask);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
$_cc -o "$TMPO" "$TMPC"
|
2002-02-27 11:16:18 +00:00
|
|
|
case `"$TMPO"` in
|
2002-01-17 09:32:22 +00:00
|
|
|
0-0) proc="ev4" ;;
|
|
|
|
1-0) proc="ev5" ;;
|
|
|
|
1-1) proc="ev56" ;;
|
|
|
|
1-101) proc="pca56" ;;
|
|
|
|
2-303) proc="ev6" ;;
|
|
|
|
2-307) proc="ev67" ;;
|
|
|
|
2-1307) proc="ev68" ;;
|
|
|
|
esac
|
|
|
|
echores "$proc"
|
|
|
|
fi
|
|
|
|
|
2001-10-27 17:41:54 +00:00
|
|
|
|
2001-07-12 15:35:52 +00:00
|
|
|
case "$host_arch" in
|
2001-11-19 12:04:19 +00:00
|
|
|
i[3-9]86|x86*)
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_arch="#define ARCH_X86 1"
|
|
|
|
_target_arch="TARGET_ARCH_X86 = yes"
|
|
|
|
_def_words_endian="#undef WORDS_BIGENDIAN"
|
|
|
|
iproc=586
|
|
|
|
proc=pentium
|
|
|
|
|
|
|
|
case "$pvendor" in
|
|
|
|
AuthenticAMD)
|
|
|
|
case "$pfamily" in
|
|
|
|
3) proc=i386 iproc=386 ;;
|
|
|
|
4) proc=i486 iproc=486 ;;
|
|
|
|
5) proc=k5 iproc=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
|
|
|
|
test "$pmodel" -ge 6 && proc=k6 ;;
|
|
|
|
6|7) proc=k7 iproc=686 ;;
|
|
|
|
*) proc=pentium iproc=586 ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
GenuineIntel)
|
|
|
|
case "$pfamily" in
|
|
|
|
3) proc=i386 iproc=386 ;;
|
|
|
|
4) proc=i486 iproc=486 ;;
|
|
|
|
5) proc=pentium iproc=586 ;;
|
2001-12-28 18:01:56 +00:00
|
|
|
6|15) proc=i686 iproc=686 ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
*) proc=pentium iproc=586 ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
unknown)
|
|
|
|
case "$pfamily" in
|
|
|
|
3) proc=i386 iproc=386 ;;
|
|
|
|
4) proc=i486 iproc=486 ;;
|
|
|
|
*) proc=pentium iproc=586 ;;
|
2001-07-12 15:35:52 +00:00
|
|
|
esac
|
2001-11-17 03:53:05 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
proc=pentium iproc=586 ;;
|
|
|
|
esac
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-07-12 15:35:52 +00:00
|
|
|
# check that gcc supports our cpu, if not, fallback to pentium
|
|
|
|
# LGB: check -mcpu and -march swithing step by step with enabling
|
|
|
|
# to fall back till 386.
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "GCC & CPU optimization abilities"
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
2002-03-20 15:28:26 +00:00
|
|
|
if test "$_runtime_cpudetection" = no ; then
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "k7" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=athlon
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "athlon" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=pentiumpro
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "k6" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=k5
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "k5" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=pentium
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "i686" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=pentiumpro
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "pentiumpro" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=pentium
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "pentium" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=i486
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "i486" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=i386
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "i386" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cc_check -march=$proc -mcpu=$proc || proc=error
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$proc" = "error" ; then
|
2002-03-19 18:42:27 +00:00
|
|
|
echores "Your $_cc does not support even \"i386\" for '-march' and '-mcpu'."
|
|
|
|
_mcpu=""
|
|
|
|
_march=""
|
|
|
|
else
|
|
|
|
_march="-march=$proc"
|
|
|
|
_mcpu="-mcpu=$proc"
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2002-03-19 18:42:27 +00:00
|
|
|
else
|
|
|
|
# i686 is probably the most common cpu - optimize to it
|
|
|
|
_mcpu="-mcpu=i686"
|
|
|
|
# at least i486 required, for bswap instruction
|
|
|
|
_march="-march=i486"
|
|
|
|
cc_check $_mcpu || _mcpu=""
|
|
|
|
cc_check $_march $_mcpu || _march=""
|
|
|
|
fi
|
2001-11-14 00:33:39 +00:00
|
|
|
|
|
|
|
## Gabucino : --target takes effect here (hopefully...) by overwriting
|
2001-11-17 03:53:05 +00:00
|
|
|
## autodetected mcpu/march parameters
|
2001-11-14 00:33:39 +00:00
|
|
|
if test "$_target" ; then
|
|
|
|
_march="-march=$host_arch"
|
|
|
|
_mcpu="-mcpu=$host_arch"
|
2001-11-17 03:53:05 +00:00
|
|
|
proc="$_target"
|
2002-02-10 11:25:14 +00:00
|
|
|
# Note: this has to be extended
|
|
|
|
case "$proc" in
|
|
|
|
i386*) iproc=386 ;;
|
|
|
|
i486*) iproc=486 ;;
|
|
|
|
i586*) iproc=586 ;;
|
|
|
|
i686*) iproc=686 ;;
|
|
|
|
*) iproc=586 ;;
|
|
|
|
esac
|
2001-11-14 00:33:39 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$proc"
|
2001-07-12 15:35:52 +00:00
|
|
|
;;
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
sparc)
|
|
|
|
_def_arch='#define ARCH_SPARC 1'
|
|
|
|
_target_arch='TARGET_ARCH_SPARC = yes'
|
|
|
|
_def_words_endian='#define WORDS_BIGENDIAN 1'
|
|
|
|
iproc='sparc'
|
|
|
|
proc='v8'
|
|
|
|
_march=''
|
2001-07-12 15:35:52 +00:00
|
|
|
_mcpu="-mcpu=$proc"
|
|
|
|
;;
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
arm)
|
|
|
|
_def_arch="#define ARCH_ARM 1"
|
|
|
|
_target_arch='TARGET_ARCH_ARM = yes'
|
|
|
|
_def_words_endian='#undef WORDS_BIGENDIAN'
|
2001-07-28 05:36:45 +00:00
|
|
|
iproc=arm
|
2001-11-17 03:53:05 +00:00
|
|
|
proc=''
|
|
|
|
_march=''
|
|
|
|
_mcpu=''
|
2001-07-28 05:36:45 +00:00
|
|
|
;;
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
ppc)
|
|
|
|
_def_arch='#define ARCH_PPC 1'
|
|
|
|
_target_arch='TARGET_ARCH_PPC = yes'
|
|
|
|
_def_words_endian='#define WORDS_BIGENDIAN 1'
|
|
|
|
iproc='ppc'
|
|
|
|
proc=''
|
|
|
|
_march=''
|
|
|
|
_mcpu=''
|
2001-08-29 11:18:37 +00:00
|
|
|
;;
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
alpha)
|
|
|
|
_def_arch='#define ARCH_ALPHA 1'
|
|
|
|
_target_arch='TARGET_ARCH_ALPHA = yes'
|
|
|
|
_def_words_endian='#undef WORDS_BIGENDIAN'
|
|
|
|
iproc='alpha'
|
|
|
|
_march=''
|
2002-01-17 09:32:22 +00:00
|
|
|
echocheck "GCC & CPU optimization abilities"
|
|
|
|
if test "$proc" = "ev68" ; then
|
|
|
|
cc_check -mcpu=$proc || proc=ev67
|
|
|
|
fi
|
|
|
|
if test "$proc" = "ev67" ; then
|
|
|
|
cc_check -mcpu=$proc || proc=ev6
|
|
|
|
fi
|
|
|
|
_mcpu="-mcpu=$proc"
|
|
|
|
echores "$proc"
|
2001-09-18 13:45:38 +00:00
|
|
|
;;
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
mips)
|
|
|
|
_def_arch="#define ARCH_SGI_MIPS 1"
|
|
|
|
_target_arch="TARGET_ARCH_SGI_MIPS = yes"
|
|
|
|
_def_words_endian='#define WORDS_BIGENDIAN 1'
|
|
|
|
iproc='sgi-mips'
|
|
|
|
proc=''
|
|
|
|
_march=''
|
|
|
|
_mcpu=''
|
2001-10-24 14:02:19 +00:00
|
|
|
;;
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
*)
|
2001-07-12 15:35:52 +00:00
|
|
|
echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
|
2001-10-13 16:53:37 +00:00
|
|
|
echo "It seems noone has ported MPlayer to your OS or CPU type yet."
|
|
|
|
die "unsupported architecture $host_arch"
|
2001-07-12 15:35:52 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2002-03-19 18:42:27 +00:00
|
|
|
if x86 && test "$_runtime_cpudetection" = no ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
extcheck() {
|
|
|
|
if test "$1" = yes ; then
|
|
|
|
echocheck "kernel support of $2"
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
int main(void){__asm__ __volatile__ ("$3":::"memory");return(0);}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
if ( cc_check && $TMPO ) > /dev/null 2>&1 ; then
|
|
|
|
echores "yes"
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
echores "failed"
|
|
|
|
echo "It seems that your kernel does not correctly support $2."
|
|
|
|
echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2001-11-21 16:43:33 +00:00
|
|
|
extcheck $_mmx "mmx" "emms" || _mmx=no
|
|
|
|
extcheck $_3dnow "3dnow" "femms" || _3dnow=no
|
|
|
|
extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex=no
|
|
|
|
extcheck $_mmx2 "mmx2" "sfence" || _mmx2=no
|
|
|
|
extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no
|
|
|
|
extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "mtrr support"
|
|
|
|
echores "$_mtrr"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2001-04-15 20:31:58 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
_prefix="/usr/local"
|
2001-08-14 14:34:27 +00:00
|
|
|
|
2001-11-29 18:56:08 +00:00
|
|
|
# GOTCHA: the variables below defines the default behavior for autodetection
|
|
|
|
# and have - unless stated otherwise - at least 2 states : yes no
|
|
|
|
# If autodetection is available then the third state is: auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_libavcodec=auto
|
2001-11-26 00:46:44 +00:00
|
|
|
_libavcodecso=no # changed default to no as it causes problems - atmos
|
2002-04-13 17:28:33 +00:00
|
|
|
_mp1e=no
|
2001-12-30 13:55:05 +00:00
|
|
|
_mencoder=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
_x11=auto
|
2001-11-29 18:56:08 +00:00
|
|
|
_dga=auto # 1 2 no auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_xv=auto
|
|
|
|
_sdl=auto
|
2001-12-03 01:13:48 +00:00
|
|
|
_nas=auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_png=auto
|
2002-03-10 22:49:18 +00:00
|
|
|
_jpg=auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_gl=auto
|
|
|
|
_ggi=auto
|
|
|
|
_aa=auto
|
|
|
|
_svga=auto
|
2002-02-07 02:21:39 +00:00
|
|
|
_vesa=auto
|
2002-01-06 22:57:58 +00:00
|
|
|
_fbdev=auto
|
2002-01-17 01:12:01 +00:00
|
|
|
_fbdev_nocopy=no
|
2001-11-17 03:53:05 +00:00
|
|
|
_dvb=auto
|
|
|
|
_dxr3=auto
|
|
|
|
_iconv=auto
|
2001-11-20 07:53:20 +00:00
|
|
|
_rtc=auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_ossaudio=auto
|
|
|
|
_mad=auto
|
|
|
|
_vorbis=auto
|
2002-03-18 23:30:04 +00:00
|
|
|
_faad=auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_css=auto
|
2002-04-16 17:29:04 +00:00
|
|
|
_dvdnav=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
_dvdread=auto
|
2002-04-21 21:18:28 +00:00
|
|
|
_dvdkit=auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_xanim=auto
|
|
|
|
_xinerama=auto
|
|
|
|
_mga=auto
|
|
|
|
_xmga=auto
|
|
|
|
_vm=auto
|
|
|
|
_mlib=auto
|
|
|
|
_sgiaudio=auto
|
|
|
|
_sunaudio=auto
|
|
|
|
_alsa=auto
|
|
|
|
_fastmemcpy=yes
|
|
|
|
_win32=auto
|
2001-12-10 22:40:14 +00:00
|
|
|
_dshow=yes
|
2001-11-29 18:56:08 +00:00
|
|
|
_select=yes
|
2001-12-01 15:05:08 +00:00
|
|
|
_tv=yes
|
|
|
|
_tv_v4l=auto
|
2002-03-15 16:10:29 +00:00
|
|
|
_tv_bsdbt848=auto
|
2001-12-23 23:20:49 +00:00
|
|
|
_streaming=yes
|
2002-01-11 17:20:43 +00:00
|
|
|
_vidix=yes
|
2002-02-21 13:31:05 +00:00
|
|
|
_new_input=yes
|
2002-02-03 12:43:18 +00:00
|
|
|
_joystick=no
|
2002-02-12 22:03:44 +00:00
|
|
|
_xvid=auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_divx4linux=auto
|
2002-04-10 10:19:43 +00:00
|
|
|
_opendivx=no
|
2001-11-17 11:26:26 +00:00
|
|
|
_lirc=auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_gui=no
|
2001-11-17 09:57:54 +00:00
|
|
|
_termcap=auto
|
2001-11-19 16:42:01 +00:00
|
|
|
_termios=auto
|
2001-11-17 03:53:05 +00:00
|
|
|
_3dfx=no
|
|
|
|
_tdfxfb=no
|
2001-12-03 01:09:36 +00:00
|
|
|
_directfb=auto
|
2002-01-17 01:27:20 +00:00
|
|
|
_zr=no
|
2001-11-17 22:50:30 +00:00
|
|
|
_largefiles=no
|
2001-11-17 11:26:26 +00:00
|
|
|
_vo2=no
|
2001-11-17 03:53:05 +00:00
|
|
|
_language=en
|
2001-11-19 15:54:43 +00:00
|
|
|
_shm=auto
|
2002-02-22 13:47:31 +00:00
|
|
|
_linux_devfs=no
|
2002-03-15 20:48:42 +00:00
|
|
|
_i18n=no
|
2002-03-27 03:45:55 +00:00
|
|
|
_sighandler=yes
|
2002-04-13 16:51:01 +00:00
|
|
|
_libdv=auto
|
2001-09-01 19:36:44 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
for ac_option do
|
|
|
|
case "$ac_option" in
|
|
|
|
# Skip 1st pass
|
|
|
|
--target=*) ;;
|
|
|
|
--cc=*) ;;
|
|
|
|
--as=*) ;;
|
2002-02-10 11:25:14 +00:00
|
|
|
--enable-gcc-checking) ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--disable-gcc-checking) ;;
|
2001-11-19 01:03:11 +00:00
|
|
|
--enable-static*) ;;
|
2001-11-19 00:38:41 +00:00
|
|
|
--disable-static*) ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--with-extraincdir=*) ;;
|
|
|
|
--with-extralibdir=*) ;;
|
2002-03-19 18:42:27 +00:00
|
|
|
--enable-runtime-cpudetection) ;;
|
|
|
|
--disable-runtime-cpudetection) ;;
|
2001-11-19 00:38:41 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Real 2nd pass
|
2001-11-23 00:21:51 +00:00
|
|
|
--enable-mencoder) _mencoder=yes ;;
|
|
|
|
--disable-mencoder) _mencoder=no ;;
|
2002-03-15 20:48:42 +00:00
|
|
|
--enable-i18n) _i18n=yes ;;
|
|
|
|
--disable-i18n) _i18n=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-x11) _x11=yes ;;
|
|
|
|
--disable-x11) _x11=no ;;
|
|
|
|
--enable-xv) _xv=yes ;;
|
|
|
|
--disable-xv) _xv=no ;;
|
|
|
|
--enable-sdl) _sdl=yes ;;
|
|
|
|
--disable-sdl) _sdl=no ;;
|
2001-12-03 01:13:48 +00:00
|
|
|
--enable-nas) _nas=yes ;;
|
|
|
|
--disable-nas) _nas=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-png) _png=yes ;;
|
|
|
|
--disable-png) _png=no ;;
|
2002-03-10 22:49:18 +00:00
|
|
|
--enable-jpeg) _jpg=yes ;;
|
|
|
|
--disable-jpeg) _jpg=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-gl) _gl=yes ;;
|
|
|
|
--disable-gl) _gl=no ;;
|
|
|
|
--enable-ggi) _ggi=yes ;;
|
|
|
|
--disable-ggi) _ggi=no ;;
|
|
|
|
--enable-aa) _aa=yes ;;
|
|
|
|
--disable-aa) _aa=no ;;
|
|
|
|
--enable-svga) _svga=yes ;;
|
|
|
|
--disable-svga) _svga=no ;;
|
2002-02-07 02:21:39 +00:00
|
|
|
--enable-vesa) _vesa=yes ;;
|
|
|
|
--disable-vesa) _vesa=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-fbdev) _fbdev=yes ;;
|
2002-01-17 01:12:01 +00:00
|
|
|
--enable-fbdev=nocopy) _fbdev=yes; _fbdev_nocopy=yes ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--disable-fbdev) _fbdev=no ;;
|
|
|
|
--enable-dvb) _dvb=yes ;;
|
|
|
|
--disable-dvb) _dvb=no ;;
|
|
|
|
--enable-dxr3) _dxr3=yes ;;
|
|
|
|
--disable-dxr3) _dxr3=no ;;
|
|
|
|
--enable-iconv) _iconv=yes ;;
|
|
|
|
--disable-iconv) _iconv=no ;;
|
2001-11-20 07:53:20 +00:00
|
|
|
--enable-rtc) _rtc=yes ;;
|
|
|
|
--disable-rtc) _rtc=no ;;
|
2001-12-28 21:07:39 +00:00
|
|
|
--enable-mp1e) _mp1e=yes ;;
|
2001-12-10 14:41:44 +00:00
|
|
|
--disable-mp1e) _mp1e=no ;;
|
2002-04-13 16:51:01 +00:00
|
|
|
--enable-libdv) _libdv=yes ;;
|
|
|
|
--disable-libdv) _libdv=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-ossaudio) _ossaudio=yes ;;
|
|
|
|
--disable-ossaudio) _ossaudio=no ;;
|
|
|
|
--enable-mad) _mad=yes ;;
|
|
|
|
--disable-mad) _mad=no ;;
|
|
|
|
--enable-vorbis) _vorbis=yes ;;
|
|
|
|
--disable-vorbis) _vorbis=no ;;
|
2002-03-18 23:30:04 +00:00
|
|
|
--enable-faad) _faad=yes ;;
|
|
|
|
--disable-faad) _faad=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-css) _css=yes ;;
|
|
|
|
--disable-css) _css=no ;;
|
|
|
|
--enable-dvdread) _dvdread=yes ;;
|
|
|
|
--disable-dvdread) _dvdread=no ;;
|
2002-04-21 21:18:28 +00:00
|
|
|
--enable-mpdvdkit) _dvdkit=yes ;;
|
|
|
|
--disable-mpdvdkit) _dvdkit=no ;;
|
2002-04-16 17:29:04 +00:00
|
|
|
--enable-dvdnav) _dvdnav=yes ;;
|
|
|
|
--disable-dvdnav) _dvdnav=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-xanim) _xanim=yes ;;
|
|
|
|
--disable-xanim) _xanim=no ;;
|
|
|
|
--enable-xinerama) _xinerama=yes ;;
|
|
|
|
--disable-xinerama) _xinerama=no ;;
|
|
|
|
--enable-mga) _mga=yes ;;
|
|
|
|
--disable-mga) _mga=no ;;
|
|
|
|
--enable-xmga) _xmga=yes ;;
|
|
|
|
--disable-xmga) _xmga=no ;;
|
|
|
|
--enable-vm) _vm=yes ;;
|
|
|
|
--disable-vm) _vm=no ;;
|
|
|
|
--enable-mlib) _mlib=yes ;;
|
|
|
|
--disable-mlib) _mlib=no ;;
|
|
|
|
--enable-sunaudio) _sunaudio=yes ;;
|
|
|
|
--disable-sunaudio) _sunaudio=no ;;
|
|
|
|
--enable-sgiaudio) _sgiaudio=yes ;;
|
|
|
|
--disable-sgiaudio) _sgiaudio=no ;;
|
|
|
|
--enable-alsa) _alsa=yes ;;
|
|
|
|
--disable-alsa) _alsa=no ;;
|
|
|
|
--enable-tv) _tv=yes ;;
|
|
|
|
--disable-tv) _tv=no ;;
|
2002-03-15 16:10:29 +00:00
|
|
|
--enable-tv-bsdbt848) _tv_bsdbt848=yes ;;
|
|
|
|
--disable-tv-bsdbt848) _tv_bsdbt848=no ;;
|
2001-12-01 15:05:08 +00:00
|
|
|
--enable-tv-v4l) _tv_v4l=yes ;;
|
|
|
|
--disable-tv-v4l) _tv_v4l=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-fastmemcpy) _fastmemcpy=yes ;;
|
|
|
|
--disable-fastmemcpy) _fastmemcpy=no ;;
|
|
|
|
--enable-streaming) _streaming=yes ;;
|
|
|
|
--disable-streaming) _streaming=no ;;
|
2002-01-11 17:20:43 +00:00
|
|
|
--enable-vidix) _vidix=yes ;;
|
|
|
|
--disable-vidix) _vidix=no ;;
|
2002-02-05 22:57:17 +00:00
|
|
|
--enable-new-input) _new_input=yes ;;
|
|
|
|
--disable-new-input) _new_input=no ;;
|
|
|
|
--enable-joystick) _joystick=yes ;;
|
|
|
|
--disable-joystick) _joystick=no ;;
|
2002-02-12 22:03:44 +00:00
|
|
|
--enable-xvid) _xvid=yes ;;
|
|
|
|
--disable-xvid) _xvid=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-divx4linux) _divx4linux=yes ;;
|
|
|
|
--disable-divx4linux) _divx4linux=no ;;
|
2002-02-03 00:52:51 +00:00
|
|
|
--enable-opendivx) _opendivx=yes ;;
|
|
|
|
--disable-opendivx) _opendivx=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-lirc) _lirc=yes ;;
|
|
|
|
--disable-lirc) _lirc=no ;;
|
|
|
|
--enable-gui) _gui=yes ;;
|
|
|
|
--disable-gui) _gui=no ;;
|
|
|
|
--enable-termcap) _termcap=yes ;;
|
|
|
|
--disable-termcap) _termcap=no ;;
|
2001-11-19 16:42:01 +00:00
|
|
|
--enable-termios) _termios=yes ;;
|
|
|
|
--disable-termios) _termios=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-3dfx) _3dfx=yes ;;
|
|
|
|
--disable-3dfx) _3dfx=no ;;
|
|
|
|
--enable-tdfxfb) _tdfxfb=yes ;;
|
|
|
|
--disable-tdfxfb) _tdfxfb=no ;;
|
2001-12-03 01:09:36 +00:00
|
|
|
--enable-directfb) _directfb=yes ;;
|
|
|
|
--disable-directfb) _directfb=no ;;
|
2002-01-17 01:27:20 +00:00
|
|
|
--enable-zr) _zr=yes ;;
|
2002-02-05 22:57:17 +00:00
|
|
|
--disable-zr) _zr=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-mtrr) _mtrr=yes ;;
|
|
|
|
--disable-mtrr) _mtrr=no ;;
|
2001-11-17 22:50:30 +00:00
|
|
|
--enable-largefiles) _largefiles=yes ;;
|
2001-11-17 23:19:02 +00:00
|
|
|
--disable-largefiles) _largefiles=no ;;
|
2001-11-17 11:26:26 +00:00
|
|
|
--enable-vo2) _vo2=yes ;;
|
|
|
|
--disable-vo2) _vo2=no ;;
|
2001-11-19 15:54:43 +00:00
|
|
|
--enable-shm) _shm=yes ;;
|
|
|
|
--disable-shm) _shm=no ;;
|
2001-11-29 18:56:08 +00:00
|
|
|
--enable-select) _select=yes ;;
|
|
|
|
--disable-select) _select=no ;;
|
2002-02-22 13:47:31 +00:00
|
|
|
--enable-linux-devfs) _linux_devfs=yes ;;
|
|
|
|
--disable-linux-devfs) _linux_devfs=no ;;
|
2001-11-17 11:26:26 +00:00
|
|
|
|
2001-11-29 18:56:08 +00:00
|
|
|
--enable-dga) _dga=auto ;; # as we don't know if it's 1 or 2
|
|
|
|
--enable-dga=*) _dga=`echo $ac_option | cut -d '=' -f 2` ;;
|
|
|
|
--disable-dga) _dga=no ;;
|
2001-07-03 14:22:23 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
--language=*)
|
|
|
|
LINGUAS=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2002-03-28 20:40:21 +00:00
|
|
|
--with-libdvdnav=*)
|
|
|
|
_dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
_dvdnav=yes
|
|
|
|
;;
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
--with-win32libdir=*)
|
|
|
|
_win32libdir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
_win32=yes
|
|
|
|
;;
|
|
|
|
--with-xanimlibdir=*)
|
|
|
|
_xanimlibdir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
_xanim=yes
|
|
|
|
;;
|
|
|
|
--with-csslibdir=*)
|
|
|
|
_csslibdir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
_css=yes
|
|
|
|
;;
|
|
|
|
--with-mlibdir=*)
|
|
|
|
_mlibdir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
_mlib=yes
|
|
|
|
;;
|
2001-06-04 20:12:41 +00:00
|
|
|
|
2002-02-10 11:25:14 +00:00
|
|
|
--disable-profile)
|
|
|
|
_profile=
|
|
|
|
;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-profile)
|
|
|
|
_profile='-p'
|
|
|
|
;;
|
|
|
|
--enable-debug)
|
|
|
|
_debug='-g'
|
|
|
|
;;
|
|
|
|
--enable-debug=*)
|
|
|
|
_debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2002-03-27 03:45:55 +00:00
|
|
|
--disable-sighandler)
|
|
|
|
_sighandler=no
|
|
|
|
;;
|
2001-06-05 02:26:56 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-sse) _sse=yes ;;
|
|
|
|
--disable-sse) _sse=no ;;
|
2001-12-28 18:29:12 +00:00
|
|
|
--enable-sse2) _sse2=yes ;;
|
|
|
|
--disable-sse2) _sse2=no ;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--enable-mmx2) _mmx2=yes ;;
|
|
|
|
--disable-mmx2) _mmx2=no ;;
|
|
|
|
--enable-3dnow) _3dnow=yes ;;
|
|
|
|
--disable-3dnow) _3dnow=no _3dnowex=no ;;
|
|
|
|
--enable-3dnowex) _3dnow=yes _3dnowex=yes ;;
|
|
|
|
--disable-3dnowex) _3dnowex=no ;;
|
|
|
|
--enable-mmx) _mmx=yes ;;
|
|
|
|
--disable-mmx) # without mmx 3Dnow! and stuff is also not possible
|
|
|
|
_3dnow=no _3dnowex=no _mmx=no _mmx2=no ;;
|
|
|
|
|
|
|
|
--enable-win32) _win32=yes ;;
|
|
|
|
--disable-win32) _win32=no _dshow=no ;;
|
|
|
|
--enable-dshow) _win32=yes _dshow=yes ;;
|
|
|
|
--disable-dshow) _dshow=no ;;
|
2001-04-15 20:31:58 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
--with-x11incdir=*)
|
|
|
|
_inc_x11=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
|
|
|
|
;;
|
|
|
|
--with-x11libdir=*)
|
|
|
|
_ld_x11=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
|
|
|
|
;;
|
2002-02-12 22:03:44 +00:00
|
|
|
--with-xvidcore=*)
|
|
|
|
_xvidcore=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2001-11-17 03:53:05 +00:00
|
|
|
--with-sdl-config=*)
|
|
|
|
_sdlconfig=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
|
|
|
--with-gtk-config=*)
|
|
|
|
_gtkconfig=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
|
|
|
--with-glib-config=*)
|
|
|
|
_glibconfig=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
|
|
|
--with-madlibdir=*)
|
|
|
|
_ld_mad=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
|
|
|
|
;;
|
2001-04-15 20:31:58 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
--prefix=*)
|
|
|
|
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
|
|
|
--datadir=*)
|
|
|
|
_datadir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2001-12-25 21:58:10 +00:00
|
|
|
--confdir=*)
|
|
|
|
_confdir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2001-04-15 20:31:58 +00:00
|
|
|
|
2001-11-17 11:26:26 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
*)
|
|
|
|
echo "Unknown parameter: $ac_option"
|
|
|
|
;;
|
2001-04-15 20:31:58 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
esac
|
|
|
|
done
|
2001-10-22 07:43:32 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Atmos: moved this here, to be correct, if --prefix is specified
|
2002-02-05 22:57:17 +00:00
|
|
|
test -z "$_datadir" && _datadir="$_prefix/share/mplayer"
|
|
|
|
test -z "$_confdir" && _confdir="$_datadir"
|
|
|
|
test -z "$_libdir" && _libdir="$_prefix/lib/mplayer"
|
|
|
|
test -z "$_mlibdir" && _mlibdir="$MLIBHOME"
|
2001-10-10 13:07:42 +00:00
|
|
|
|
2001-11-19 12:04:19 +00:00
|
|
|
if x86 ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
# 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'`
|
|
|
|
echocheck "assembler ($_as $as_version)"
|
2001-10-10 13:07:42 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
_pref_as_version='2.9.1'
|
|
|
|
echo 'nop' > $TMPS
|
|
|
|
if test "$_mmx" = yes ; then
|
|
|
|
echo 'emms' >> $TMPS
|
|
|
|
fi
|
|
|
|
if test "$_3dnow" = yes ; then
|
|
|
|
_pref_as_version='2.10.1'
|
|
|
|
echo 'femms' >> $TMPS
|
|
|
|
fi
|
|
|
|
if test "$_3dnowex" = yes ; then
|
|
|
|
_pref_as_version='2.10.1'
|
|
|
|
echo 'pswapd %mm0, %mm0' >> $TMPS
|
|
|
|
fi
|
|
|
|
if test "$_mmx2" = yes ; then
|
|
|
|
_pref_as_version='2.10.1'
|
|
|
|
echo 'movntq %mm0, (%eax)' >> $TMPS
|
|
|
|
fi
|
|
|
|
if test "$_sse" = yes ; then
|
|
|
|
_pref_as_version='2.10.1'
|
|
|
|
echo 'xorps %xmm0, %xmm0' >> $TMPS
|
|
|
|
fi
|
|
|
|
#if test "$_sse2" = yes ; then
|
|
|
|
# _pref_as_version='2.11'
|
|
|
|
# echo 'xorpd %xmm0, %xmm0' >> $TMPS
|
|
|
|
#fi
|
|
|
|
$_as $TMPS -o $TMPO > /dev/null 2>&1 || as_verc_fail=yes
|
|
|
|
|
|
|
|
if test "$as_verc_fail" != yes ; then
|
|
|
|
echores "ok"
|
|
|
|
else
|
|
|
|
echores "failed"
|
|
|
|
echo "Upgrade binutils to ${_pref_as_version} ..."
|
|
|
|
die "obsolete binutils version"
|
|
|
|
fi
|
2001-06-21 00:06:40 +00:00
|
|
|
fi
|
2001-04-15 20:31:58 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_mmx='#undef HAVE_MMX'
|
|
|
|
test "$_mmx" = yes && _def_mmx='#define HAVE_MMX 1'
|
|
|
|
_def_mmx2='#undef HAVE_MMX2'
|
|
|
|
test "$_mmx2" = yes && _def_mmx2='#define HAVE_MMX2 1'
|
|
|
|
_def_3dnow='#undef HAVE_3DNOW'
|
|
|
|
test "$_3dnow" = yes && _def_3dnow='#define HAVE_3DNOW 1'
|
|
|
|
_def_3dnowex='#undef HAVE_3DNOWEX'
|
|
|
|
test "$_3dnowex" = yes && _def_3dnowex='#define HAVE_3DNOWEX 1'
|
|
|
|
_def_sse='#undef HAVE_SSE'
|
|
|
|
test "$_sse" = yes && _def_sse='#define HAVE_SSE 1'
|
2001-12-28 18:29:12 +00:00
|
|
|
_def_sse2='#undef HAVE_SSE2'
|
|
|
|
test "$_sse2" = yes && _def_sse2='#define HAVE_SSE2 1'
|
2001-03-08 12:30:42 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Checking kernel version...
|
2001-11-19 12:04:19 +00:00
|
|
|
if x86 && linux ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
_k_verc_problem=no
|
|
|
|
kernel_version=`uname -r 2>&1`
|
|
|
|
echocheck "$system_name kernel version"
|
|
|
|
case "$kernel_version" in
|
|
|
|
'') kernel_version="?.??"; _k_verc_fail=yes;;
|
|
|
|
[0-1].[0-9].[0-9]*|2.[0-3].[0-9]*)
|
|
|
|
_k_verc_problem=yes;;
|
|
|
|
esac
|
|
|
|
if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
|
|
|
|
_k_verc_fail=yes
|
|
|
|
fi
|
|
|
|
if test "$_k_verc_fail" ; then
|
|
|
|
echores "$kernel_version, fail"
|
|
|
|
echo "WARNING! If you want to run mplayer on this system, get prepared for problems!"
|
2001-11-26 00:46:44 +00:00
|
|
|
echo "2.2.x has limited SSE support. Upgrade kernel or use --disable-sse if you"
|
|
|
|
echo "experience crashes. MPlayer tries to autodetect if your kernel correctly supports"
|
2002-04-20 19:42:47 +00:00
|
|
|
echo "SSE, but you have been warned! If you are using kernel older than 2.2.x you must"
|
2001-11-26 00:46:44 +00:00
|
|
|
echo "upgrade it to get SSE support!"
|
|
|
|
# die "old kernel for this cpu" # works fine on some 2.2.x so don't die (later check will test)
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
echores "$kernel_version, ok"
|
|
|
|
fi
|
|
|
|
fi
|
2001-03-28 19:58:45 +00:00
|
|
|
|
2002-01-15 14:49:36 +00:00
|
|
|
# checking for a working awk, I'm using mawk first, because it's fastest - atmos
|
|
|
|
_awk=
|
2002-01-12 15:53:26 +00:00
|
|
|
if test "$_vidix" = yes ; then
|
2002-01-15 22:30:56 +00:00
|
|
|
_awk_verc_fail=yes
|
|
|
|
echocheck "awk"
|
2002-01-15 14:49:36 +00:00
|
|
|
for _awk in mawk gawk nawk awk; do
|
2002-01-15 22:48:27 +00:00
|
|
|
if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
|
2002-01-15 22:30:56 +00:00
|
|
|
_awk_verc_fail=no
|
2002-01-15 14:49:36 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2002-01-15 22:30:56 +00:00
|
|
|
test "$_awk_verc_fail" = yes && _awk=no
|
|
|
|
echores "$_awk"
|
|
|
|
if test "$_awk_verc_fail" = yes; then
|
2002-01-15 14:49:36 +00:00
|
|
|
echo "VIDIX needs Awk, but there was no working implementation found!"
|
|
|
|
echo "Try the GNU implementation, which can be downloaded from:"
|
2002-01-12 21:07:17 +00:00
|
|
|
echo "ftp://ftp.gnu.org/gnu/gawk/"
|
2002-01-15 14:49:36 +00:00
|
|
|
echo "If you don't need vidix, you can use configure --disable-vidix instead."
|
2002-01-12 15:53:26 +00:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
2001-03-28 19:58:45 +00:00
|
|
|
|
2001-08-25 21:05:23 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
######################
|
|
|
|
# MAIN TESTS GO HERE #
|
|
|
|
######################
|
2001-08-25 21:05:23 +00:00
|
|
|
|
|
|
|
|
2001-11-28 17:52:25 +00:00
|
|
|
echocheck "extra headers"
|
2002-03-26 03:09:57 +00:00
|
|
|
if test "$_inc_extra" ; then
|
|
|
|
echores "$_inc_extra"
|
2001-11-28 17:52:25 +00:00
|
|
|
else
|
|
|
|
echores "none"
|
|
|
|
fi
|
2001-08-06 00:07:53 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
2001-11-28 17:52:25 +00:00
|
|
|
echocheck "extra libs"
|
2002-03-26 03:09:57 +00:00
|
|
|
if test "$_ld_extra" ; then
|
|
|
|
echores "$_ld_extra"
|
2001-11-28 17:52:25 +00:00
|
|
|
else
|
|
|
|
echores "none"
|
|
|
|
fi
|
2001-08-20 21:20:03 +00:00
|
|
|
|
2001-08-24 16:20:04 +00:00
|
|
|
|
2002-03-15 20:48:42 +00:00
|
|
|
# Checking for localization ...
|
|
|
|
# CSAK EGY MARADHAT - A HEGYLAKO
|
|
|
|
echocheck "i18n"
|
|
|
|
if test "$_i18n" = auto ; then
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <libintl.h>
|
|
|
|
int main(void) { gettext("test"); return 0; }
|
|
|
|
EOF
|
|
|
|
_i18n=no
|
|
|
|
cc_check && _i18n=yes
|
|
|
|
fi
|
|
|
|
if test "$_i18n" = yes ; then
|
|
|
|
_def_i18n='#define USE_I18N 1'
|
|
|
|
LINGUAS='en' # force help_mp-en.h
|
|
|
|
else
|
|
|
|
_def_i18n='#undef USE_I18N'
|
|
|
|
fi
|
|
|
|
echores "$_i18n"
|
|
|
|
|
|
|
|
|
|
|
|
echocheck "language"
|
|
|
|
test -z "$LINGUAS" && LINGUAS="en"
|
|
|
|
if test -f "help_mp-${LINGUAS}.h" ; then
|
|
|
|
echores "using ${LINGUAS}"
|
|
|
|
else
|
|
|
|
echores "${LINGUAS} not found, using en"
|
|
|
|
LINGUAS="en"
|
|
|
|
fi
|
|
|
|
_mp_help="help_mp-${LINGUAS}.h"
|
|
|
|
test -f help_mp-${LINGUAS}.h || die "help_mp-${LINGUAS}.h not found"
|
|
|
|
|
2002-03-27 03:45:55 +00:00
|
|
|
echocheck "enable sighandler"
|
|
|
|
if test "$_sighandler" = yes ; then
|
|
|
|
_def_sighandler='#define ENABLE_SIGHANDLER 1'
|
|
|
|
else
|
|
|
|
_def_sighandler='#undef ENABLE_SIGHANDLER'
|
|
|
|
fi
|
|
|
|
echores "$_sighandler"
|
2002-03-15 20:48:42 +00:00
|
|
|
|
2002-03-15 22:16:02 +00:00
|
|
|
echocheck "runtime cpudetection"
|
|
|
|
if test "$_runtime_cpudetection" = yes ; then
|
|
|
|
_def_runtime_cpudetection='#define RUNTIME_CPUDETECT 1'
|
|
|
|
else
|
|
|
|
_def_runtime_cpudetection='#undef RUNTIME_CPUDETECT'
|
|
|
|
fi
|
|
|
|
echores "$_runtime_cpudetection"
|
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "kstat"
|
2001-08-24 16:20:04 +00:00
|
|
|
cat > $TMPC << EOF
|
2001-11-20 16:16:47 +00:00
|
|
|
#include <kstat.h>
|
|
|
|
int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
|
2001-08-24 16:20:04 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_kstat=no
|
|
|
|
cc_check -lkstat && _kstat=yes
|
|
|
|
if test "$_kstat" = yes ; then
|
2001-11-22 10:06:30 +00:00
|
|
|
_ld_arch="-lkstat $_ld_arch"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
if test "$_kstat" = yes ; then
|
|
|
|
_def_kstat="#define HAVE_LIBKSTAT 1"
|
|
|
|
else
|
|
|
|
_def_kstat="#undef HAVE_LIBKSTAT"
|
|
|
|
fi
|
|
|
|
echores "$_kstat"
|
2001-08-24 16:20:04 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "posix4"
|
2001-11-20 16:16:47 +00:00
|
|
|
# required for nanosleep on some systems
|
2001-11-17 11:46:09 +00:00
|
|
|
cat > $TMPC << EOF
|
2001-11-20 16:16:47 +00:00
|
|
|
#include <time.h>
|
|
|
|
int main(void) { (void) nanosleep(0, 0); return 0; }
|
2001-11-17 11:46:09 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_posix4=no
|
|
|
|
cc_check -lposix4 && _posix4=yes
|
|
|
|
if test "$_posix4" = yes ; then
|
2001-11-22 10:06:30 +00:00
|
|
|
_ld_arch="-lposix4 $_ld_arch"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_posix4"
|
2001-06-05 18:40:44 +00:00
|
|
|
|
2001-08-24 16:20:04 +00:00
|
|
|
|
2001-11-23 18:25:09 +00:00
|
|
|
echocheck "nanosleep"
|
|
|
|
# also check for nanosleep
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <time.h>
|
|
|
|
int main(void) { (void) nanosleep(0, 0); return 0; }
|
|
|
|
EOF
|
|
|
|
_nanosleep=no
|
|
|
|
cc_check $_ld_arch && _nanosleep=yes
|
|
|
|
if test "$_nanosleep" = yes ; then
|
|
|
|
_def_nanosleep='#define HAVE_NANOSLEEP 1'
|
|
|
|
else
|
|
|
|
_def_nanosleep='#undef HAVE_NANOSLEEP'
|
|
|
|
fi
|
|
|
|
echores "$_nanosleep"
|
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "socklib"
|
|
|
|
# for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
|
|
|
|
cat > $TMPC << EOF
|
2001-11-20 16:16:47 +00:00
|
|
|
#include <netdb.h>
|
|
|
|
int main(void) { (void) gethostbyname(0); return 0; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
2001-12-29 00:09:10 +00:00
|
|
|
cc_check -lsocket && _ld_sock="-lsocket"
|
|
|
|
cc_check -lnsl && _ld_sock="-lnsl"
|
|
|
|
cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl"
|
2001-11-17 09:57:54 +00:00
|
|
|
if test "$_ld_sock" ; then
|
2001-12-01 17:17:32 +00:00
|
|
|
echores "yes (using $_ld_sock)"
|
2001-11-17 09:57:54 +00:00
|
|
|
else
|
2001-12-01 17:17:32 +00:00
|
|
|
echores "no"
|
2001-11-17 09:57:54 +00:00
|
|
|
fi
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
2001-12-30 19:38:28 +00:00
|
|
|
echocheck "inet_pton()"
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
int main(void) { (void) inet_pton(0, 0, 0); return 0; }
|
|
|
|
EOF
|
|
|
|
if cc_check $_ld_sock ; then
|
|
|
|
# NOTE: Linux has libresolv but does not need it
|
|
|
|
:
|
|
|
|
echores "yes (using $_ld_sock)"
|
|
|
|
elif cc_check $_ld_sock -lresolv ; then
|
|
|
|
# NOTE: needed for SunOS at least
|
|
|
|
_ld_sock="$_ld_sock -lresolv"
|
|
|
|
echores "yes (using $_ld_sock)"
|
|
|
|
else
|
|
|
|
echores "no (=> streaming support disabled)"
|
|
|
|
_streaming=no
|
|
|
|
fi
|
|
|
|
|
2002-03-15 20:48:42 +00:00
|
|
|
|
2002-01-06 13:06:51 +00:00
|
|
|
echocheck "inttypes.h (required)"
|
2001-12-31 15:29:46 +00:00
|
|
|
cat > $TMPC << EOF
|
2002-01-06 13:06:51 +00:00
|
|
|
#include <inttypes.h>
|
2001-12-31 15:29:46 +00:00
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
2002-01-06 13:06:51 +00:00
|
|
|
_inttypes=no
|
|
|
|
cc_check && _inttypes=yes
|
|
|
|
if test "$_inttypes" = yes ; then
|
|
|
|
# nothing to do
|
|
|
|
:
|
2001-12-31 15:29:46 +00:00
|
|
|
else
|
2002-03-15 20:48:42 +00:00
|
|
|
die "cannot find header inttypes.h (see in DOCS/faq.html)"
|
2001-12-31 15:29:46 +00:00
|
|
|
fi
|
2002-01-06 13:06:51 +00:00
|
|
|
echores "$_inttypes"
|
2001-12-31 15:29:46 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "malloc.h"
|
2001-07-12 15:35:52 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <malloc.h>
|
2001-11-20 16:16:47 +00:00
|
|
|
int main(void) { (void) malloc(0); return 0; }
|
2001-07-12 15:35:52 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_malloc=no
|
|
|
|
cc_check && _malloc=yes
|
|
|
|
if test "$_malloc" = yes ; then
|
|
|
|
_def_malloc='#define HAVE_MALLOC_H 1'
|
|
|
|
else
|
|
|
|
_def_malloc='#undef HAVE_MALLOC_H'
|
|
|
|
fi
|
|
|
|
# malloc.h emits a warning in FreeBSD
|
|
|
|
freebsd && _def_malloc='#undef HAVE_MALLOC_H'
|
|
|
|
echores "$_malloc"
|
2001-11-09 02:02:58 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "memalign()"
|
2001-11-09 02:02:58 +00:00
|
|
|
# XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
|
|
|
|
cat > $TMPC << EOF
|
2001-08-24 14:49:05 +00:00
|
|
|
#include <malloc.h>
|
2001-11-20 16:16:47 +00:00
|
|
|
int main (void) { (void) memalign(64, sizeof(char)); return 0; }
|
2001-08-24 14:49:05 +00:00
|
|
|
EOF
|
2001-11-09 02:02:58 +00:00
|
|
|
_memalign=no
|
|
|
|
cc_check && _memalign=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_memalign" = yes ; then
|
|
|
|
_def_memalign='#define HAVE_MEMALIGN 1'
|
|
|
|
else
|
|
|
|
_def_memalign='#undef HAVE_MEMALIGN'
|
|
|
|
fi
|
|
|
|
echores "$_memalign"
|
2001-11-09 02:02:58 +00:00
|
|
|
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "alloca.h"
|
2001-07-12 15:35:52 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <alloca.h>
|
2001-11-20 16:16:47 +00:00
|
|
|
int main(void) { (void) alloca(0); return 0; }
|
2001-07-12 15:35:52 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_alloca=no
|
|
|
|
cc_check && _alloca=yes
|
|
|
|
if cc_check ; then
|
|
|
|
_def_alloca='#define HAVE_ALLOCA_H 1'
|
|
|
|
else
|
|
|
|
_def_alloca='#undef HAVE_ALLOCA_H'
|
|
|
|
fi
|
|
|
|
echores "$_alloca"
|
2001-07-12 15:35:52 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "mman.h"
|
2001-07-12 15:35:52 +00:00
|
|
|
cat > $TMPC << EOF
|
2001-07-12 16:11:55 +00:00
|
|
|
#include <sys/types.h>
|
2001-07-12 15:35:52 +00:00
|
|
|
#include <sys/mman.h>
|
2001-11-20 16:16:47 +00:00
|
|
|
int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
|
2001-07-12 15:35:52 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_mman=no
|
|
|
|
cc_check && _mman=yes
|
|
|
|
if test "$_mman" = yes ; then
|
|
|
|
_def_mman='#define HAVE_SYS_MMAN_H 1'
|
|
|
|
else
|
|
|
|
_def_mman='#undef HAVE_SYS_MMAN_H'
|
|
|
|
fi
|
|
|
|
echores "$_mman"
|
2001-07-12 15:35:52 +00:00
|
|
|
|
|
|
|
|
2001-11-18 17:45:23 +00:00
|
|
|
echocheck "dynamic loader"
|
2001-07-12 15:35:52 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <dlfcn.h>
|
2001-11-18 17:45:23 +00:00
|
|
|
int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
|
2001-07-12 15:35:52 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_dl=no
|
2001-11-18 17:45:23 +00:00
|
|
|
if cc_check ; then
|
|
|
|
_dl=yes
|
|
|
|
elif cc_check -ldl ; then
|
|
|
|
_dl=yes
|
|
|
|
_ld_dl='-ldl'
|
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_dl" = yes ; then
|
|
|
|
_def_dl='#define HAVE_LIBDL 1'
|
|
|
|
else
|
|
|
|
_def_dl='#undef HAVE_LIBDL'
|
|
|
|
fi
|
|
|
|
echores "$_dl"
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-19 15:54:43 +00:00
|
|
|
|
2001-11-22 01:56:10 +00:00
|
|
|
#echocheck "dynamic linking"
|
2001-11-22 10:06:30 +00:00
|
|
|
# FIXME !! make this dynamic detection to work and modify at the end (search _ld_dl_dynamic)
|
2001-11-20 15:11:49 +00:00
|
|
|
# also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
|
|
|
|
#cat > $TMPC << EOF
|
|
|
|
#int main(void) { return 0; }
|
|
|
|
#EOF
|
|
|
|
#if cc_check -rdynamic ; then
|
|
|
|
# _ld_dl_dynamic='-rdynamic'
|
|
|
|
#elif cc_check -Bdynamic ; then
|
|
|
|
# _ld_dl_dynamic='-Bdynamic'
|
|
|
|
#elif cc_check ; then
|
|
|
|
# _ld_dl_dynamic=''
|
|
|
|
#fi
|
2001-11-22 01:56:10 +00:00
|
|
|
#echores "using $_ld_dl_dynamic"
|
2001-11-20 15:11:49 +00:00
|
|
|
|
|
|
|
|
2001-11-18 17:45:23 +00:00
|
|
|
echocheck "pthread"
|
|
|
|
cat > $TMPC << EOF
|
2001-11-19 14:11:57 +00:00
|
|
|
#include <pthread.h>
|
2001-12-15 18:35:06 +00:00
|
|
|
void* func(void *arg) { return arg; }
|
|
|
|
int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
|
2001-11-18 17:45:23 +00:00
|
|
|
EOF
|
2001-12-15 18:35:06 +00:00
|
|
|
if ( cc_check && $TMPO ) ; then # QNX
|
2001-11-19 17:15:35 +00:00
|
|
|
_ld_pthread=''
|
2001-12-15 18:35:06 +00:00
|
|
|
elif ( cc_check -lpthread && $TMPO ) ; then
|
2001-11-18 17:45:23 +00:00
|
|
|
_ld_pthread='-lpthread'
|
2001-12-15 18:35:06 +00:00
|
|
|
elif ( cc_check -pthread && $TMPO ) ; then
|
2001-11-18 17:45:23 +00:00
|
|
|
_ld_pthread='-pthread'
|
|
|
|
else
|
2002-01-17 01:12:01 +00:00
|
|
|
if test "$_ld_static" ; then
|
|
|
|
# for crosscompilation, we cannot execute the program, be happy if we can link statically
|
|
|
|
if ( cc_check -lpthread ) ; then
|
|
|
|
_ld_pthread='-lpthread'
|
|
|
|
elif ( cc_check -pthread ) ; then
|
|
|
|
_ld_pthread='-pthread'
|
|
|
|
else
|
|
|
|
die "Static lib pthread not found. (needed by windows and networking stuff)"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
die "Lib pthread not found. (needed by windows and networking stuff)"
|
|
|
|
fi
|
2001-11-18 17:45:23 +00:00
|
|
|
fi
|
2001-12-01 17:17:32 +00:00
|
|
|
echores "yes (using $_ld_pthread)"
|
2001-11-18 17:45:23 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "sys/soundcard.h"
|
2001-06-08 23:30:09 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <sys/soundcard.h>
|
2001-11-17 03:53:05 +00:00
|
|
|
int main(void) { return 0; }
|
2001-06-08 23:30:09 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_sys_soundcard=no
|
|
|
|
cc_check && _sys_soundcard=yes
|
|
|
|
if test "$_sys_soundcard" = yes ; then
|
|
|
|
_def_sys_soundcard='#define HAVE_SYS_SOUNDCARD_H 1'
|
|
|
|
else
|
|
|
|
_def_sys_soundcard='#undef HAVE_SYS_SOUNDCARD_H'
|
|
|
|
fi
|
|
|
|
echores "$_sys_soundcard"
|
2001-06-08 23:30:09 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
echocheck "termcap"
|
2001-11-17 11:46:09 +00:00
|
|
|
if test "$_termcap" = auto ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC <<EOF
|
|
|
|
int main(void) { return 0; }
|
2001-11-14 19:02:39 +00:00
|
|
|
EOF
|
2001-11-27 17:58:29 +00:00
|
|
|
_termcap=no
|
2001-11-17 11:46:09 +00:00
|
|
|
cc_check -ltermcap && _termcap=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
if test "$_termcap" = yes ; then
|
|
|
|
_def_termcap='#define USE_TERMCAP 1'
|
|
|
|
_ld_termcap='-ltermcap'
|
|
|
|
else
|
|
|
|
_def_termcap='#undef USE_TERMCAP'
|
|
|
|
fi
|
|
|
|
echores "$_termcap"
|
2001-11-14 19:02:39 +00:00
|
|
|
|
2001-06-08 23:30:09 +00:00
|
|
|
|
2001-11-19 16:42:01 +00:00
|
|
|
echocheck "termios"
|
|
|
|
if test "$_termios" = auto ; then
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <sys/termios.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
2001-11-27 17:58:29 +00:00
|
|
|
_termios=no
|
2001-11-19 16:42:01 +00:00
|
|
|
cc_check && _termios=yes
|
2001-12-03 15:22:03 +00:00
|
|
|
_def_termios_h_name='sys/termios.h'
|
2001-11-19 16:42:01 +00:00
|
|
|
fi
|
2001-12-03 15:22:03 +00:00
|
|
|
# second test:
|
|
|
|
if test "$_termios" = no ; then
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <termios.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
_termios=no
|
|
|
|
cc_check && _termios=yes
|
|
|
|
_def_termios_h_name='termios.h'
|
|
|
|
fi
|
|
|
|
|
2001-11-19 16:42:01 +00:00
|
|
|
if test "$_termios" = yes ; then
|
2001-11-20 19:28:16 +00:00
|
|
|
_def_termios='#define HAVE_TERMIOS 1'
|
2001-12-03 15:22:03 +00:00
|
|
|
_def_termios_h='#undef HAVE_TERMIOS_H'
|
|
|
|
_def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H'
|
|
|
|
|
|
|
|
if test "$_def_termios_h_name" = 'sys/termios.h' ; then
|
|
|
|
_def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1'
|
|
|
|
elif test "$_def_termios_h_name" = 'termios.h' ; then
|
|
|
|
_def_termios_h='#define HAVE_TERMIOS_H 1'
|
|
|
|
fi
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using $_def_termios_h_name)"
|
2001-12-03 15:22:03 +00:00
|
|
|
else
|
2001-11-20 19:28:16 +00:00
|
|
|
_def_termios='#undef HAVE_TERMIOS'
|
2001-12-03 15:22:03 +00:00
|
|
|
_def_termios_h_name=''
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no"
|
2001-11-19 16:42:01 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2001-11-19 15:54:43 +00:00
|
|
|
echocheck "shm"
|
2001-11-19 16:06:33 +00:00
|
|
|
if test "$_shm" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
2001-11-19 16:42:01 +00:00
|
|
|
#include <sys/types.h>
|
2001-11-19 15:54:43 +00:00
|
|
|
#include <sys/shm.h>
|
|
|
|
int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
|
|
|
|
EOF
|
2001-11-27 17:58:29 +00:00
|
|
|
_shm=no
|
2001-11-19 16:06:33 +00:00
|
|
|
cc_check && _shm=yes
|
|
|
|
fi
|
2001-11-19 15:54:43 +00:00
|
|
|
if test "$_shm" = yes ; then
|
|
|
|
_def_shm='#define HAVE_SHM 1'
|
|
|
|
else
|
|
|
|
_def_shm='#undef HAVE_SHM'
|
|
|
|
fi
|
|
|
|
echores "$_shm"
|
|
|
|
|
2002-03-15 20:48:42 +00:00
|
|
|
|
2002-02-22 13:47:31 +00:00
|
|
|
# XXX: FIXME, add runtime checking
|
|
|
|
echocheck "linux devfs"
|
|
|
|
echores "$_linux_devfs"
|
2001-11-19 15:54:43 +00:00
|
|
|
|
2001-06-04 18:23:10 +00:00
|
|
|
|
2002-03-29 21:24:36 +00:00
|
|
|
echocheck "strsep()"
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <string.h>
|
|
|
|
int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
|
|
|
|
EOF
|
|
|
|
_strsep=no
|
|
|
|
cc_check && _strsep=yes
|
|
|
|
if test "$_strsep" = yes ; then
|
|
|
|
_def_strsep='#define HAVE_STRSEP 1'
|
|
|
|
else
|
|
|
|
_def_strsep='#undef HAVE_STRSEP'
|
|
|
|
fi
|
|
|
|
echores "$_strsep"
|
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "vsscanf()"
|
2001-06-05 10:16:32 +00:00
|
|
|
cat > $TMPC << EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
int main(void) { vsscanf(); return 0; }
|
2001-06-05 10:16:32 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_vsscanf=no
|
|
|
|
cc_check && _vsscanf=yes
|
|
|
|
if test "$_vsscanf" = yes ; then
|
|
|
|
_def_vsscanf='#define HAVE_VSSCANF 1'
|
|
|
|
else
|
|
|
|
_def_vsscanf='#undef HAVE_VSSCANF'
|
|
|
|
fi
|
|
|
|
echores "$_vsscanf"
|
2001-06-05 10:16:32 +00:00
|
|
|
|
2001-10-25 11:46:50 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "X11 headers"
|
2001-12-15 18:35:06 +00:00
|
|
|
if test -z "$_inc_x11" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do
|
|
|
|
if test -d "$I/X11" ; then
|
2001-12-15 18:35:06 +00:00
|
|
|
_inc_x11="-I$I"
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using $I)"
|
2001-11-17 03:53:05 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2001-12-15 18:35:06 +00:00
|
|
|
if test -z "$_inc_x11" ; then
|
|
|
|
_x11=no
|
|
|
|
echores "not found"
|
|
|
|
fi
|
|
|
|
else
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using $_inc_x11)"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2001-12-15 18:35:06 +00:00
|
|
|
if test "$_inc_x11" = "-I/usr/include" ; then
|
|
|
|
_inc_x11=""
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2001-10-25 11:46:50 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "X11 libs"
|
2001-12-15 18:35:06 +00:00
|
|
|
if test -z "$_ld_x11" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do
|
|
|
|
if test -d "$I" ; then
|
2001-12-15 18:35:06 +00:00
|
|
|
_ld_x11="-L$I"
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using $I)"
|
2001-11-17 03:53:05 +00:00
|
|
|
break;
|
|
|
|
fi
|
|
|
|
done
|
2001-12-15 18:35:06 +00:00
|
|
|
if test -z "$_ld_x11" ; then
|
|
|
|
_x11=no
|
|
|
|
echores "not found"
|
|
|
|
fi
|
|
|
|
else
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using $_ld_x11)"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2001-12-15 18:35:06 +00:00
|
|
|
_ld_x11="$_ld_x11 -lX11 -lXext $_ld_sock"
|
2001-10-25 11:46:50 +00:00
|
|
|
|
2001-06-05 10:16:32 +00:00
|
|
|
|
2001-11-17 11:26:26 +00:00
|
|
|
#########
|
|
|
|
# VIDEO #
|
|
|
|
#########
|
|
|
|
|
2002-03-15 20:48:42 +00:00
|
|
|
|
|
|
|
echocheck "3dfx"
|
|
|
|
if test "$_3dfx" = yes ; then
|
|
|
|
_def_3dfx='#define HAVE_3DFX 1'
|
|
|
|
_vosrc="$_vosrc vo_3dfx.c"
|
|
|
|
_vomodules="3dfx $_vomodules"
|
|
|
|
else
|
|
|
|
_def_3dfx='#undef HAVE_3DFX'
|
|
|
|
_novomodules="3dfx $_novomodules"
|
|
|
|
fi
|
|
|
|
echores "$_3dfx"
|
|
|
|
|
|
|
|
|
|
|
|
echocheck "tdfxfb"
|
|
|
|
if test "$_tdfxfb" = yes ; then
|
|
|
|
_def_tdfxfb='#define HAVE_TDFXFB 1'
|
|
|
|
_vosrc="$_vosrc vo_tdfxfb.c"
|
|
|
|
_vomodules="tdfxfb $_vomodules"
|
|
|
|
else
|
|
|
|
_def_tdfxfb='#undef HAVE_TDFXFB'
|
|
|
|
_novomodules="tdfxfb $_novomodules"
|
|
|
|
fi
|
|
|
|
echores "$_tdfxfb"
|
|
|
|
|
|
|
|
|
|
|
|
echocheck "DirectFB"
|
|
|
|
if test "$_directfb" = auto ; then
|
|
|
|
_directfb=no
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <directfb.h>
|
|
|
|
int main(void) { IDirectFB *foo; return 0; }
|
|
|
|
EOF
|
|
|
|
linux && test -c /dev/fb0 && cc_check -ldirectfb && _directfb=yes
|
|
|
|
fi
|
|
|
|
if test "$_directfb" = yes ; then
|
|
|
|
_def_directfb='#define HAVE_DIRECTFB 1'
|
|
|
|
_vosrc="$_vosrc vo_directfb.c"
|
|
|
|
_vomodules="directfb $_vomodules"
|
|
|
|
_ld_directfb='-ldirectfb'
|
|
|
|
else
|
|
|
|
_def_directfb='#undef HAVE_DIRECTFB'
|
|
|
|
_novomodules="directfb $_novomodules"
|
|
|
|
fi
|
|
|
|
echores "$_directfb"
|
|
|
|
|
|
|
|
if test "$_directfb" = yes; then
|
|
|
|
echocheck "DirectFB >= 0.9.9"
|
|
|
|
_directfb099=no
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <directfb.h>
|
|
|
|
int main(void) { IDirectFBEventBuffer *foo; return 0; }
|
|
|
|
EOF
|
|
|
|
cc_check -ldirectfb && _directfb099=yes
|
|
|
|
if test "$_directfb099" = yes ; then
|
|
|
|
_def_directfb099='#define HAVE_DIRECTFB099 1'
|
|
|
|
else
|
|
|
|
_def_directfb099='#undef HAVE_DIRECTFB099'
|
|
|
|
fi
|
|
|
|
echores "$_directfb099"
|
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "X11"
|
2001-11-19 12:29:48 +00:00
|
|
|
if test "$_x11" = auto || test "$_x11" = yes ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC <<EOF
|
2001-11-19 00:38:41 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
|
2001-10-23 18:32:55 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_x11=no
|
2001-11-19 00:38:41 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 && _x11=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
if test "$_x11" = yes ; then
|
|
|
|
_def_x11='#define HAVE_X11 1'
|
|
|
|
_vosrc="$_vosrc vo_x11.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="x11 $_vomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_x11='#undef HAVE_X11'
|
2001-11-19 12:29:48 +00:00
|
|
|
_inc_x11=''
|
|
|
|
_ld_x11=''
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="x11 $_novomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_x11"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-06-05 18:40:44 +00:00
|
|
|
|
2001-11-17 09:57:54 +00:00
|
|
|
echocheck "DPMS"
|
2001-11-17 03:53:05 +00:00
|
|
|
_xdpms3=no
|
|
|
|
if test "$_x11" = yes ; then
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <X11/Xmd.h>
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#include <X11/extensions/dpms.h>
|
2001-11-19 17:15:35 +00:00
|
|
|
int main(void) {
|
|
|
|
(void) DPMSQueryExtension(0, 0, 0);
|
|
|
|
}
|
2001-06-04 08:07:57 +00:00
|
|
|
EOF
|
2001-11-19 00:38:41 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 -lXdpms && _xdpms3=yes
|
2001-06-04 08:07:57 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
_xdpms4=no
|
|
|
|
if test "$_x11" = yes ; then
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/dpms.h>
|
|
|
|
int main(void) {
|
|
|
|
(void) DPMSQueryExtension(0, 0, 0);
|
|
|
|
}
|
2001-06-04 08:07:57 +00:00
|
|
|
EOF
|
2001-11-17 09:57:54 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 && _xdpms4=yes
|
2001-06-04 09:38:18 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_xdpms4" = yes ; then
|
|
|
|
_def_xdpms='#define HAVE_XDPMS 1'
|
2001-12-01 17:17:32 +00:00
|
|
|
echores "yes (using Xdpms 4)"
|
2001-11-17 03:53:05 +00:00
|
|
|
elif test "$_xdpms3" = yes ; then
|
|
|
|
_def_xdpms='#define HAVE_XDPMS 1'
|
2001-11-20 12:31:35 +00:00
|
|
|
_ld_x11="$_ld_x11 -lXdpms"
|
2001-12-01 17:17:32 +00:00
|
|
|
echores "yes (using Xdpms 3)"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_xdpms='#undef HAVE_XDPMS'
|
|
|
|
echores "no"
|
2001-06-04 08:07:57 +00:00
|
|
|
fi
|
2001-06-04 20:12:41 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "Xv"
|
2001-11-21 21:09:03 +00:00
|
|
|
if test "$_x11" = yes && test "$_xv" != no ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC <<EOF
|
2001-11-20 16:16:47 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/Xvlib.h>
|
|
|
|
int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
|
2001-06-04 08:07:57 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_xv=no
|
2001-11-19 00:38:41 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 -lXv && _xv=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_xv=no
|
2001-06-04 08:07:57 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_xv" = yes ; then
|
|
|
|
_def_xv='#define HAVE_XV 1'
|
|
|
|
_ld_xv='-lXv'
|
|
|
|
_vosrc="$_vosrc vo_xv.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="xv $_vomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_xv='#undef HAVE_XV'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="xv $_novomodules"
|
2001-06-04 08:07:57 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_xv"
|
2001-06-04 08:07:57 +00:00
|
|
|
|
2001-07-28 21:35:55 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "Xinerama"
|
2001-11-21 21:09:03 +00:00
|
|
|
if test "$_x11" = yes && test "$_xinerama" != no ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC <<EOF
|
2001-11-20 16:16:47 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/Xinerama.h>
|
|
|
|
int main(void) { (void) XineramaIsActive(0); return 0; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
|
|
|
_xinerama=no
|
2001-11-19 00:38:41 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 -lXinerama && _xinerama=yes
|
2001-07-28 21:35:55 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_xinerama=no
|
2001-07-28 21:35:55 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_xinerama" = yes ; then
|
|
|
|
_def_xinerama='#define HAVE_XINERAMA 1'
|
|
|
|
_ld_xinerama='-lXinerama'
|
|
|
|
else
|
|
|
|
_def_xinerama='#undef HAVE_XINERAMA'
|
2001-07-28 21:35:55 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_xinerama"
|
2001-07-28 21:35:55 +00:00
|
|
|
|
2001-06-04 08:07:57 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Note: the -lXxf86vm library is the VideoMode extension and though it's not
|
|
|
|
# needed for DGA, AFAIK every distribution packages together with DGA stuffs
|
|
|
|
# named 'X extensions' or something similar.
|
|
|
|
# This check may be useful for future mplayer versions (to change resolution)
|
|
|
|
# If you run into problems, remove '-lXxf86vm'.
|
|
|
|
echocheck "Xxf86vm"
|
2001-11-21 21:09:03 +00:00
|
|
|
if test "$_x11" = yes && test "$_vm" != no ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC <<EOF
|
2001-11-20 16:16:47 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/xf86vmode.h>
|
|
|
|
int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
|
|
|
_vm=no
|
2001-11-19 00:38:41 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 -lXxf86vm && _vm=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_vm=no
|
2001-04-15 20:31:58 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_vm" = yes ; then
|
|
|
|
_def_vm='#define HAVE_XF86VM 1'
|
|
|
|
_ld_vm='-lXxf86vm'
|
|
|
|
else
|
|
|
|
_def_vm='#undef HAVE_XF86VM'
|
|
|
|
fi
|
|
|
|
echores "$_vm"
|
2001-04-15 20:31:58 +00:00
|
|
|
|
2001-08-29 12:15:09 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "DGA"
|
2001-11-29 18:56:08 +00:00
|
|
|
# Version 2 is preferred to version 1 if available
|
|
|
|
if test "$_dga" = auto ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/xf86dga.h>
|
2001-11-29 18:56:08 +00:00
|
|
|
int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
|
2001-08-29 12:15:09 +00:00
|
|
|
EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
_dga=no
|
2001-11-29 18:56:08 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 -lXxf86dga -lXxf86vm && _dga=1
|
2001-08-29 12:15:09 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/xf86dga.h>
|
2001-11-29 18:56:08 +00:00
|
|
|
int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
2001-11-29 18:56:08 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 -lXxf86dga && _dga=2
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2001-11-29 18:56:08 +00:00
|
|
|
|
|
|
|
_def_dga='#undef HAVE_DGA'
|
|
|
|
_def_dga2='#undef HAVE_DGA2'
|
|
|
|
if test "$_dga" = 1 ; then
|
|
|
|
_def_dga='#define HAVE_DGA 1'
|
2001-11-29 23:12:19 +00:00
|
|
|
_ld_dga='-lXxf86dga'
|
2001-11-29 18:56:08 +00:00
|
|
|
_vosrc="$_vosrc vo_dga.c"
|
|
|
|
_vomodules="dga $_vomodules"
|
2001-12-01 17:17:32 +00:00
|
|
|
echores "yes (using DGA 1.0)"
|
2001-11-29 18:56:08 +00:00
|
|
|
elif test "$_dga" = 2 ; then
|
2001-11-29 23:12:19 +00:00
|
|
|
_def_dga='#define HAVE_DGA 1'
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_dga2='#define HAVE_DGA2 1'
|
2001-11-29 18:56:08 +00:00
|
|
|
_ld_dga='-lXxf86dga'
|
2001-11-17 03:53:05 +00:00
|
|
|
_vosrc="$_vosrc vo_dga.c"
|
2001-11-29 18:56:08 +00:00
|
|
|
_vomodules="dga $_vomodules"
|
2001-12-01 17:17:32 +00:00
|
|
|
echores "yes (using DGA 2.0)"
|
2001-11-29 18:56:08 +00:00
|
|
|
elif test "$_dga" = no ; then
|
|
|
|
echores "no"
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="dga $_novomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
2001-11-29 18:56:08 +00:00
|
|
|
die "DGA version must be 1 or 2"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2001-08-25 21:05:23 +00:00
|
|
|
|
2001-10-26 19:54:43 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "OpenGL"
|
2001-11-20 09:26:44 +00:00
|
|
|
#Note: this test is run even with --enable-gl since we autodetect $_ld_gl
|
|
|
|
if test "$_x11" = yes && test "$_gl" != no ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <GL/gl.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
_gl=no
|
2001-11-19 00:38:41 +00:00
|
|
|
if cc_check $_inc_x11 $_ld_x11 -lGL -lm ; then
|
|
|
|
_gl=yes
|
2001-12-06 22:26:41 +00:00
|
|
|
_ld_gl="-lGL"
|
2001-11-19 00:38:41 +00:00
|
|
|
elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then
|
|
|
|
_gl=yes
|
2001-12-06 22:26:41 +00:00
|
|
|
_ld_gl="-lGL $_ld_pthread"
|
2001-11-05 00:00:25 +00:00
|
|
|
fi
|
2001-11-19 12:29:48 +00:00
|
|
|
else
|
|
|
|
_gl=no
|
2001-10-31 18:25:28 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_gl" = yes ; then
|
|
|
|
_def_gl='#define HAVE_GL 1'
|
|
|
|
_vosrc="$_vosrc vo_gl.c vo_gl2.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="opengl $_vomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_gl='#undef HAVE_GL'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="opengl $_novomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_gl"
|
2001-08-25 21:05:23 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "/dev/mga_vid"
|
|
|
|
if test "$_mga" = auto ; then
|
|
|
|
_mga=no
|
|
|
|
test -c /dev/mga_vid && _mga=yes
|
|
|
|
fi
|
|
|
|
if test "$_mga" = yes ; then
|
|
|
|
_def_mga='#define HAVE_MGA 1'
|
|
|
|
_vosrc="$_vosrc vo_mga.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="mga $_vomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_mga='#undef HAVE_MGA'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="mga $_novomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_mga"
|
2001-08-25 21:05:23 +00:00
|
|
|
|
|
|
|
|
2002-04-13 17:28:33 +00:00
|
|
|
# echocheck "syncfb"
|
|
|
|
# _syncfb=no
|
|
|
|
# test "$_mga" = yes && _syncfb=yes
|
|
|
|
# if test "$_syncfb" = yes ; then
|
|
|
|
# _def_syncfb='#define HAVE_SYNCFB 1'
|
|
|
|
# _vosrc="$_vosrc vo_syncfb.c"
|
|
|
|
# else
|
|
|
|
# _def_syncfb='#undef HAVE_SYNCFB'
|
|
|
|
# fi
|
|
|
|
# echores "$_syncfb"
|
2001-08-25 21:05:23 +00:00
|
|
|
|
2001-10-13 16:53:37 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "xmga"
|
|
|
|
if test "$_xmga" = auto ; then
|
|
|
|
_xmga=no
|
|
|
|
test "$_x11" = yes && test "$_mga" = yes && _xmga=yes
|
2001-08-25 21:05:23 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_xmga" = yes ; then
|
|
|
|
_def_xmga='#define HAVE_XMGA 1'
|
|
|
|
_vosrc="$_vosrc vo_xmga.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="xmga $_vomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_xmga='#undef HAVE_XMGA'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="xmga $_novomodules"
|
2001-06-08 23:30:09 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_xmga"
|
2001-06-08 23:30:09 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
echocheck "GGI"
|
|
|
|
if test "$_ggi" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <ggi/ggi.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
_ggi=no
|
2001-11-21 21:09:03 +00:00
|
|
|
cc_check -lggi && _ggi=yes
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_ggi" = yes ; then
|
|
|
|
_def_ggi='#define HAVE_GGI 1'
|
|
|
|
_ld_ggi='-lggi'
|
|
|
|
_vosrc="$_vosrc vo_ggi.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="ggi $_vomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_ggi='#undef HAVE_GGI'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="ggi $_novomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_ggi"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-08-20 21:20:03 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "AA"
|
|
|
|
if test "$_aa" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <aalib.h>
|
2001-11-20 16:16:47 +00:00
|
|
|
int main(void) { (void) aa_init(0, 0, 0); return 0; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
|
|
|
_aa=no
|
|
|
|
cc_check -laa && _aa=yes
|
|
|
|
fi
|
|
|
|
if test "$_aa" = yes ; then
|
|
|
|
_def_aa='#define HAVE_AA 1'
|
|
|
|
_ld_aa='-laa'
|
|
|
|
_vosrc="$_vosrc vo_aa.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="aa $_vomodules"
|
2001-08-20 21:20:03 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_aa='#undef HAVE_AA'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="aa $_novomodules"
|
2001-08-20 21:20:03 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_aa"
|
|
|
|
|
2001-08-20 21:20:03 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "SVGAlib"
|
|
|
|
if test "$_svga" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <vga.h>
|
|
|
|
#include <vgagl.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
_svga=no
|
|
|
|
cc_check -lvgagl -lvga && _svga=yes
|
2001-04-17 22:04:44 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_svga" = yes ; then
|
|
|
|
_def_svga='#define HAVE_SVGALIB 1'
|
|
|
|
_ld_svga='-lvgagl -lvga'
|
|
|
|
_vosrc="$_vosrc vo_svga.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="svga $_vomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_svga='#undef HAVE_SVGALIB'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="svga $_novomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_svga"
|
2001-04-17 22:04:44 +00:00
|
|
|
|
2001-08-14 18:28:56 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "FBDev"
|
|
|
|
if test "$_fbdev" = auto ; then
|
|
|
|
_fbdev=no
|
2002-01-06 22:57:58 +00:00
|
|
|
linux && test -c /dev/fb0 && _fbdev=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
if test "$_fbdev" = yes ; then
|
|
|
|
_def_fbdev='#define HAVE_FBDEV 1'
|
|
|
|
_vosrc="$_vosrc vo_fbdev.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="fbdev $_vomodules"
|
2002-01-17 01:12:01 +00:00
|
|
|
|
|
|
|
if test "$_fbdev_nocopy" = yes ; then
|
|
|
|
_def_fbdev_nocopy='#define USE_CONVERT2FB 1'
|
|
|
|
fi
|
2001-04-24 22:51:55 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_fbdev='#undef HAVE_FBDEV'
|
2002-01-17 01:12:01 +00:00
|
|
|
_def_fbdev_nocopy='#undef USE_CONVERT2FB'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="fbdev $_novomodules"
|
2001-04-24 22:51:55 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_fbdev"
|
2001-04-24 22:51:55 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
2002-01-17 01:12:01 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "DVB"
|
|
|
|
if test "$_dvb" != no ; then
|
|
|
|
_dvb=no
|
|
|
|
test -c /dev/ost/video && _dvb=yes
|
2002-04-04 13:21:13 +00:00
|
|
|
cat >$TMPC << EOF
|
|
|
|
#include <sys/poll.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include <ost/dmx.h>
|
|
|
|
#include <ost/frontend.h>
|
|
|
|
#include <ost/sec.h>
|
|
|
|
#include <ost/video.h>
|
|
|
|
#include <ost/audio.h>
|
|
|
|
int main(void) {return 0;}
|
|
|
|
EOF
|
|
|
|
if cc_check ; then
|
|
|
|
_dvb=yes
|
|
|
|
echores "yes"
|
|
|
|
else
|
|
|
|
if cc_check -I/usr/src/DVB/ost/include ; then
|
|
|
|
_dvb=yes
|
|
|
|
echores "yes (using source from /usr/src/DVB/ost/include)"
|
|
|
|
_inc_dvb="-I/usr/src/DVB/ost/include"
|
|
|
|
else
|
|
|
|
if cc_check $_inc_extra/ost/include ; then
|
|
|
|
_dvb=yes
|
|
|
|
echores "yes (using source from $_inc_extra/ost/include)"
|
|
|
|
_inc_dvb="$_inc_extra/ost/include"
|
|
|
|
else
|
|
|
|
_dvb=no
|
|
|
|
echores "no (driver source not in /usr/src/DVB/ost/include, please add path with --with-extraincdir=DIR)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echores "no"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
if test "$_dvb" = yes ; then
|
|
|
|
_def_dvb='#define HAVE_DVB 1'
|
2001-12-04 22:04:14 +00:00
|
|
|
_vomodules="mpegpes(dvb) $_vomodules"
|
2001-11-03 21:25:55 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_dvb='#undef HAVE_DVB'
|
2001-12-04 22:04:14 +00:00
|
|
|
_vomodules="mpegpes(file) $_vomodules"
|
2001-11-03 21:25:55 +00:00
|
|
|
fi
|
|
|
|
|
2002-02-01 13:10:35 +00:00
|
|
|
|
2001-11-17 11:26:26 +00:00
|
|
|
echocheck "PNG support"
|
|
|
|
if test "$_png" = auto ; then
|
|
|
|
_png=no
|
|
|
|
if irix ; then
|
|
|
|
# Don't check for -lpng on irix since it has its own libpng
|
|
|
|
# incompatible with the GNU libpng
|
|
|
|
echores "disabled on irix (not GNU libpng)"
|
|
|
|
else
|
2001-11-19 09:43:55 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <png.h>
|
2002-02-01 13:10:35 +00:00
|
|
|
#include <string.h>
|
|
|
|
int main(void) {
|
|
|
|
printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
|
|
|
|
printf("libpng: %s\n", png_get_libpng_ver(NULL));
|
|
|
|
return (strcmp(PNG_LIBPNG_VER_STRING, png_get_libpng_ver(NULL)));
|
|
|
|
}
|
2001-11-19 09:43:55 +00:00
|
|
|
EOF
|
2002-02-01 13:10:35 +00:00
|
|
|
if cc_check -lpng -lz -lm ; then
|
|
|
|
if "$TMPO" >> "$TMPLOG" ; then
|
|
|
|
_png=yes
|
|
|
|
echores yes
|
|
|
|
else
|
|
|
|
echores "no (mismatch of library and header versions)"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echores no
|
|
|
|
fi
|
2001-11-17 11:26:26 +00:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echores "$_png"
|
|
|
|
fi
|
|
|
|
if test "$_png" = yes ; then
|
|
|
|
_def_png='#define HAVE_PNG 1'
|
|
|
|
_ld_png='-lpng -lz'
|
|
|
|
_vosrc="$_vosrc vo_png.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_vomodules="png $_vomodules"
|
2002-02-11 09:15:59 +00:00
|
|
|
_mkf_png="yes"
|
2001-11-17 11:26:26 +00:00
|
|
|
else
|
|
|
|
_def_png='#undef HAVE_PNG'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="png $_novomodules"
|
2002-02-11 09:15:59 +00:00
|
|
|
_mkf_png="no"
|
2001-11-17 11:26:26 +00:00
|
|
|
fi
|
|
|
|
|
2002-03-10 22:49:18 +00:00
|
|
|
echocheck "JPEG support"
|
|
|
|
if test "$_jpg" = auto ; then
|
|
|
|
_jpg=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <jpeglib.h>
|
|
|
|
int main(void) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
if cc_check -ljpeg -lm ; then
|
|
|
|
if "$TMPO" >> "$TMPLOG" ; then
|
|
|
|
_jpg=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2002-03-11 00:13:05 +00:00
|
|
|
echores "$_jpg"
|
|
|
|
|
2002-03-10 22:49:18 +00:00
|
|
|
if test "$_jpg" = yes ; then
|
|
|
|
_def_jpg='#define HAVE_JPEG 1'
|
2002-04-16 11:21:59 +00:00
|
|
|
_vosrc="$_vosrc vo_jpeg.c"
|
|
|
|
_vomodules="jpeg $_vomodules"
|
2002-03-11 00:13:05 +00:00
|
|
|
_ld_jpg="-ljpeg"
|
2002-03-10 22:49:18 +00:00
|
|
|
_mkf_jpg="yes"
|
|
|
|
else
|
|
|
|
_def_jpg='#undef HAVE_JPEG'
|
2002-04-16 11:21:59 +00:00
|
|
|
_novomodules="jpeg $_novomodules"
|
2002-03-10 22:49:18 +00:00
|
|
|
_mkf_jpg="no"
|
|
|
|
fi
|
|
|
|
|
2001-11-17 11:26:26 +00:00
|
|
|
|
2002-02-07 02:21:39 +00:00
|
|
|
if test "$_vesa" != no ; then
|
2001-11-28 17:52:25 +00:00
|
|
|
echocheck "VESA support"
|
|
|
|
if x86 && linux ; then
|
2002-02-07 02:29:55 +00:00
|
|
|
_def_vesa='#define HAVE_VESA 1'
|
2001-11-28 17:52:25 +00:00
|
|
|
_vosrc="$_vosrc vo_vesa.c vesa_lvo.c"
|
|
|
|
_vomodules="vesa $_vomodules"
|
2001-12-01 17:17:32 +00:00
|
|
|
echores "yes"
|
2001-11-28 17:52:25 +00:00
|
|
|
else
|
2002-02-07 02:29:55 +00:00
|
|
|
_def_vesa='#undef HAVE_VESA'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="vesa $_novomodules"
|
2001-12-06 23:26:58 +00:00
|
|
|
echores "no (not supported on this OS/architecture)"
|
2001-11-28 17:52:25 +00:00
|
|
|
fi
|
2002-02-07 02:32:53 +00:00
|
|
|
else
|
2002-02-07 02:29:55 +00:00
|
|
|
_def_vesa='#undef HAVE_VESA'
|
2002-02-07 02:21:39 +00:00
|
|
|
fi
|
2001-11-28 17:52:25 +00:00
|
|
|
|
|
|
|
|
2001-11-17 11:26:26 +00:00
|
|
|
#################
|
|
|
|
# VIDEO + AUDIO #
|
|
|
|
#################
|
|
|
|
|
|
|
|
|
|
|
|
echocheck "SDL"
|
|
|
|
if test -z "$_sdlconfig" ; then
|
|
|
|
if ( sdl-config --version ) >/dev/null 2>&1 ; then
|
|
|
|
_sdlconfig="sdl-config"
|
|
|
|
elif ( sdl11-config --version ) >/dev/null 2>&1 ; then
|
|
|
|
_sdlconfig="sdl11-config"
|
|
|
|
else
|
|
|
|
_sdlconfig=false
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$_sdl" = auto || test "$_sdl" = yes ; then
|
2001-11-17 11:46:09 +00:00
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <SDL.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
2001-11-17 11:26:26 +00:00
|
|
|
_sdl=no
|
|
|
|
if "$_sdlconfig" --version >/dev/null 2>&1 ; then
|
|
|
|
if cc_check `$_sdlconfig --cflags` `$_sdlconfig --libs` ; then
|
|
|
|
_sdlversion=`$_sdlconfig --version | sed 's/[^0-9]//g'`
|
|
|
|
if test "$_sdlversion" -gt 116 ; then
|
|
|
|
if test "$_sdlversion" -lt 121 ; then
|
|
|
|
_def_sdlbuggy='#define BUGGY_SDL'
|
|
|
|
else
|
|
|
|
_def_sdlbuggy='#undef BUGGY_SDL'
|
|
|
|
fi
|
|
|
|
_sdl=yes
|
|
|
|
else
|
|
|
|
_sdl=outdated
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$_sdl" = yes ; then
|
|
|
|
_def_sdl='#define HAVE_SDL 1'
|
|
|
|
_ld_sdl=`$_sdlconfig --libs`
|
|
|
|
_inc_sdl=`$_sdlconfig --cflags`
|
|
|
|
_vosrc="$_vosrc vo_sdl.c"
|
2001-11-28 17:52:25 +00:00
|
|
|
_vomodules="sdl $_vomodules"
|
2001-11-17 11:26:26 +00:00
|
|
|
_aosrc="$_aosrc ao_sdl.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_aomodules="sdl $_aomodules"
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using $_sdlconfig)"
|
2001-11-17 11:26:26 +00:00
|
|
|
else
|
|
|
|
_def_sdl='#undef HAVE_SDL'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="sdl $_novomodules"
|
|
|
|
_noaomodules="sdl $_noaomodules"
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no"
|
2001-11-17 11:26:26 +00:00
|
|
|
fi
|
|
|
|
|
2001-12-03 01:13:48 +00:00
|
|
|
echocheck "NAS"
|
|
|
|
if test "$_nas" = auto || test "$_nas" = yes ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <audio/audiolib.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
_nas=no
|
2001-12-15 18:35:06 +00:00
|
|
|
cc_check -laudio $_inc_x11 $_ld_x11 -lXt -lm && _nas=yes
|
2001-12-03 01:13:48 +00:00
|
|
|
fi
|
|
|
|
if test "$_nas" = yes ; then
|
|
|
|
_def_nas='#define HAVE_NAS 1'
|
2001-12-15 18:35:06 +00:00
|
|
|
_ld_nas="-laudio $_ld_x11 -lXt"
|
2001-12-03 01:13:48 +00:00
|
|
|
_aosrc="$_aosrc ao_nas.c"
|
|
|
|
_aomodules="nas $_aomodules"
|
|
|
|
else
|
2002-03-12 07:16:29 +00:00
|
|
|
_noaomodules="nas $_noaomodules"
|
2001-12-03 01:13:48 +00:00
|
|
|
_def_nas='#undef HAVE_NAS'
|
|
|
|
fi
|
|
|
|
echores "$_nas"
|
2001-12-01 15:05:08 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "DXR3/H+"
|
|
|
|
if test "$_dxr3" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
2001-12-04 23:10:59 +00:00
|
|
|
#include <linux/em8300.h>
|
2001-11-17 03:53:05 +00:00
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
_dxr3=no
|
2001-12-04 23:10:59 +00:00
|
|
|
cc_check && _dxr3=yes
|
2001-07-06 03:22:14 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_dxr3" = yes ; then
|
|
|
|
_def_dxr3='#define HAVE_DXR3 1'
|
|
|
|
_vosrc="$_vosrc vo_dxr3.c"
|
2001-11-29 19:18:48 +00:00
|
|
|
_vomodules="dxr3 $_vomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_dxr3='#undef HAVE_DXR3'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="dxr3 $_novomodules"
|
2001-12-28 21:07:39 +00:00
|
|
|
if test "$_mp1e" = auto ; then
|
|
|
|
# we don't need mp1e
|
|
|
|
_mp1e=no
|
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_dxr3"
|
2001-07-06 03:22:14 +00:00
|
|
|
|
2001-12-28 21:07:39 +00:00
|
|
|
echocheck "libmp1e"
|
|
|
|
if test "$_mmx" = no ; then
|
|
|
|
# mp1e REQUIRES mmx!
|
|
|
|
_mp1e=no
|
|
|
|
fi
|
|
|
|
if test "$_mp1e" != no ; then
|
|
|
|
_mp1e=yes
|
|
|
|
_def_mp1e='#define USE_MP1E'
|
|
|
|
_ld_mp1e="-Llibmp1e -lmp1e"
|
|
|
|
_dep_mp1e='libmp1e/libmp1e.a'
|
|
|
|
else
|
|
|
|
_mp1e=no
|
|
|
|
_def_mp1e='#undef USE_MP1E'
|
|
|
|
_ld_mp1e=""
|
|
|
|
_dep_mp1e=''
|
|
|
|
fi
|
|
|
|
echores "$_mp1e"
|
2001-11-17 03:53:05 +00:00
|
|
|
|
2001-11-17 11:26:26 +00:00
|
|
|
#########
|
|
|
|
# AUDIO #
|
|
|
|
#########
|
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "OSS Audio"
|
|
|
|
if test "$_ossaudio" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <sys/soundcard.h>
|
|
|
|
int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
|
|
|
|
EOF
|
|
|
|
_ossaudio=no
|
|
|
|
cc_check && _ossaudio=yes
|
|
|
|
fi
|
|
|
|
if test "$_ossaudio" = yes ; then
|
2001-11-27 17:58:29 +00:00
|
|
|
_def_ossaudio='#define USE_OSS_AUDIO 1'
|
|
|
|
_aosrc="$_aosrc ao_oss.c"
|
|
|
|
_aomodules="oss $_aomodules"
|
2002-02-22 13:47:31 +00:00
|
|
|
if test "$_linux_devfs" = yes; then
|
2002-03-30 19:25:11 +00:00
|
|
|
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound/dsp"'
|
2002-02-22 13:47:31 +00:00
|
|
|
_def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/sound/mixer"'
|
|
|
|
else
|
|
|
|
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
|
|
|
|
_def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/mixer"'
|
|
|
|
fi
|
2001-04-26 20:23:24 +00:00
|
|
|
else
|
2001-11-27 17:58:29 +00:00
|
|
|
_def_ossaudio='#undef USE_OSS_AUDIO'
|
2002-02-22 13:47:31 +00:00
|
|
|
_def_ossaudio_devdsp='#define PATH_DEV_DSP ""'
|
|
|
|
_def_ossaudio_devmixer='#define PATH_DEV_MIXER ""'
|
2002-03-12 07:16:29 +00:00
|
|
|
_noaomodules="oss $_noaomodules"
|
2001-04-26 20:23:24 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_ossaudio"
|
2001-04-26 20:23:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
echocheck "ALSA audio"
|
|
|
|
if test "$_alsa" = auto || test "$_alsa" = yes; then
|
|
|
|
_alsa=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <sys/asoundlib.h>
|
|
|
|
int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==5)); }
|
|
|
|
EOF
|
2001-11-18 17:45:23 +00:00
|
|
|
cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.5.x'
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <sys/asoundlib.h>
|
|
|
|
int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
|
|
|
|
EOF
|
2001-11-18 17:45:23 +00:00
|
|
|
cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.9.x'
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_alsaver" ; then
|
|
|
|
_alsa=yes
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using alsa $_alsaver)"
|
2001-04-10 21:25:09 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "no"
|
2001-04-10 21:25:09 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
echores "no"
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_alsa5='#undef HAVE_ALSA5'
|
|
|
|
_def_alsa9='#undef HAVE_ALSA9'
|
|
|
|
if test "$_alsa" = yes ; then
|
|
|
|
if test "$_alsaver" = '0.5.x' ; then
|
|
|
|
_aosrc="$_aosrc ao_alsa5.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_aomodules="alsa5 $_aomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_alsa5='#define HAVE_ALSA5 1'
|
|
|
|
elif test "$_alsaver" = '0.9.x' ; then
|
|
|
|
_aosrc="$_aosrc ao_alsa9.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_aomodules="alsa9 $_aomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_alsa9='#define HAVE_ALSA9 1'
|
|
|
|
fi
|
|
|
|
_ld_alsa='-lasound'
|
2002-03-12 07:16:29 +00:00
|
|
|
else
|
|
|
|
_noaomodules="alsa $_noaomodules"
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
|
|
|
|
2001-10-10 01:48:54 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "Sun audio"
|
|
|
|
if test "$_sunaudio" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/audioio.h>
|
2001-11-20 16:16:47 +00:00
|
|
|
int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
|
|
|
_sunaudio=no
|
|
|
|
cc_check && _sunaudio=yes
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_sunaudio" = yes ; then
|
|
|
|
_def_sunaudio='#define USE_SUN_AUDIO 1'
|
|
|
|
_aosrc="$_aosrc ao_sun.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_aomodules="sun $_aomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_sunaudio='#undef USE_SUN_AUDIO'
|
2002-03-12 07:16:29 +00:00
|
|
|
_noaomodules="sun $_noaomodules"
|
2001-06-15 16:32:21 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_sunaudio"
|
2001-06-15 16:32:21 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
echocheck "Sun mediaLib"
|
|
|
|
if test "$_mlib" = auto ; then
|
|
|
|
_mlib=no
|
|
|
|
test -z "$_mlibdir" && _mlibdir=/opt/SUNWmlib
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <mlib.h>
|
|
|
|
int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
|
|
|
|
EOF
|
|
|
|
cc_check -I${_mlibdir}/include -L${_mlibdir}/lib -lmlib && _mlib=yes
|
2001-02-27 01:09:22 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_mlib" = yes ; then
|
|
|
|
_def_mlib='#define HAVE_MLIB 1'
|
|
|
|
_inc_mlib=" -I${_mlibdir}/include "
|
2001-11-20 19:35:03 +00:00
|
|
|
_ld_mlib=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib "
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_mlib='#undef HAVE_MLIB'
|
|
|
|
fi
|
|
|
|
echores "$_mlib"
|
2001-02-27 01:09:22 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
echocheck "SGI Audio"
|
|
|
|
if test "$_sgiaudio" = auto ; then
|
|
|
|
# check for SGI audio
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <dmedia/audio.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
_sgiaudio=no
|
|
|
|
cc_check && _sgiaudio=yes
|
2001-04-05 19:02:02 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_sgiaudio" = "yes" ; then
|
|
|
|
_def_sgiaudio='#define USE_SGI_AUDIO 1'
|
|
|
|
_ld_sgiaudio='-laudio'
|
|
|
|
_aosrc="$_aosrc ao_sgi.c"
|
2001-11-27 17:58:29 +00:00
|
|
|
_aomodules="sgi $_aomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_sgiaudio='#undef USE_SGI_AUDIO'
|
2002-03-12 07:16:29 +00:00
|
|
|
_noaomodules="sgi $_noaomodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_sgiaudio"
|
2001-04-05 19:02:02 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
2001-11-27 23:17:58 +00:00
|
|
|
echocheck "VCD support"
|
|
|
|
if linux || bsdos || freebsd || sunos ; then
|
|
|
|
_inputmodules="vcd $_inputmodules"
|
2001-12-01 23:38:57 +00:00
|
|
|
_def_vcd='#define HAVE_VCD 1'
|
2001-11-27 23:17:58 +00:00
|
|
|
echores "ok"
|
|
|
|
else
|
2001-12-01 23:38:57 +00:00
|
|
|
_def_vcd='#undef HAVE_VCD'
|
2002-03-12 07:16:29 +00:00
|
|
|
_noinputmodules="vcd $_noinputmodules"
|
2001-11-27 23:17:58 +00:00
|
|
|
echores "not supported on this OS"
|
|
|
|
fi
|
|
|
|
|
2002-04-21 21:18:28 +00:00
|
|
|
echocheck "DVD support (libmpdvdkit)"
|
|
|
|
if test "$_dvdkit" = auto ; then
|
|
|
|
_dvdkit=no
|
|
|
|
test -f "./libmpdvdkit/Makefile" && _dvdkit=yes
|
|
|
|
fi
|
|
|
|
if test "$_dvdkit" = yes ; then
|
|
|
|
echores "yes"
|
|
|
|
_inputmodules="mpdvdkit $_inputmodules"
|
|
|
|
_dvdread=included
|
|
|
|
else
|
|
|
|
echores "no"
|
|
|
|
_noinputmodules="mpdvdkit $_noinputmodules"
|
|
|
|
fi
|
2002-01-04 13:08:14 +00:00
|
|
|
|
|
|
|
echocheck "DVD support (libcss - old style)"
|
|
|
|
if test "$_css" = auto ; then
|
|
|
|
cat > $TMPC <<EOF
|
2002-01-05 12:29:25 +00:00
|
|
|
#include <sys/types.h>
|
2002-01-04 13:08:14 +00:00
|
|
|
#include <css.h>
|
|
|
|
int main(void) { (void) CSSisEncrypted(0); return 0; }
|
|
|
|
EOF
|
|
|
|
_css=no
|
|
|
|
cc_check -lcss $_ld_dl && _css=yes
|
|
|
|
fi
|
|
|
|
if test "$_css" = yes ; then
|
|
|
|
_def_css='#define HAVE_LIBCSS 1'
|
|
|
|
test "$_csslibdir" && _ld_css="-L${_csslibdir} $_ld_css"
|
|
|
|
_inputmodules="dvdcss $_inputmodules"
|
|
|
|
_largefiles=yes
|
|
|
|
echores "yes"
|
|
|
|
else
|
|
|
|
_def_css='#undef HAVE_LIBCSS'
|
2002-03-12 07:16:29 +00:00
|
|
|
_noinputmodules="dvdcss $_noinputmodules"
|
2002-01-04 13:08:14 +00:00
|
|
|
echores "no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echocheck "DVD support (libdvdread - new style)"
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_dvdread" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <dvdread/dvd_reader.h>
|
|
|
|
#include <dvdread/ifo_types.h>
|
|
|
|
#include <dvdread/ifo_read.h>
|
|
|
|
#include <dvdread/nav_read.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
_dvdread=no
|
2001-12-17 12:04:20 +00:00
|
|
|
if test "$_dl" = yes; then
|
|
|
|
cc_check \
|
|
|
|
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \
|
|
|
|
_dvdread=yes
|
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2002-04-21 21:18:28 +00:00
|
|
|
case "$_dvdread" in
|
|
|
|
yes)
|
|
|
|
_largefiles=yes
|
|
|
|
_def_dvdread='#define USE_DVDREAD 1'
|
|
|
|
_ld_css='-ldvdread'
|
|
|
|
_inputmodules="dvdread $_inputmodules"
|
|
|
|
echores "yes"
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
_def_dvdread='#undef USE_DVDREAD'
|
|
|
|
_noinputmodules="dvdread $_noinputmodules"
|
|
|
|
echores "no"
|
|
|
|
;;
|
|
|
|
included)
|
|
|
|
_largefiles=yes
|
|
|
|
_def_dvdread='#define USE_DVDREAD 1'
|
|
|
|
_ld_css='-Llibmpdvdkit -lmpdvdkit'
|
|
|
|
_noinputmodules="dvdread $_noinputmodules"
|
|
|
|
echores "disabled by libmpdvdkit"
|
|
|
|
;;
|
|
|
|
esac
|
2001-02-27 01:09:22 +00:00
|
|
|
|
2002-04-22 09:31:13 +00:00
|
|
|
echocheck "DVD support (libdvdnav)"
|
2002-03-28 20:40:21 +00:00
|
|
|
if test "$_dvdnav" = yes ; then
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <dvdnav.h>
|
|
|
|
int main(void) { dvdnav_t *dvd=0; return 0; }
|
|
|
|
EOF
|
|
|
|
_dvdnav=no
|
2002-04-21 21:18:28 +00:00
|
|
|
test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
|
|
|
|
_used_css=
|
|
|
|
test "$_dvdkit" = no && _used_css=$_ld_css
|
|
|
|
cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl && _dvdnav=yes
|
2002-03-28 20:40:21 +00:00
|
|
|
fi
|
|
|
|
if test "$_dvdnav" = yes ; then
|
|
|
|
_largefiles=yes
|
|
|
|
_def_dvdnav='#define USE_DVDNAV 1'
|
2002-04-16 17:29:04 +00:00
|
|
|
_ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
|
|
|
|
if test -n "$_dvdnavdir" ; then
|
|
|
|
_inc_extra="$_inc_extra -I$_dvdnavdir"
|
|
|
|
fi
|
2002-03-28 20:40:21 +00:00
|
|
|
_inputmodules="dvdnav $_inputmodules"
|
|
|
|
echores "yes"
|
|
|
|
else
|
|
|
|
_def_dvdnav='#undef USE_DVDNAV'
|
|
|
|
_noinputmodules="dvdnav $_noinputmodules"
|
|
|
|
echores "no"
|
|
|
|
fi
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "zlib"
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <zlib.h>
|
2001-11-18 21:36:30 +00:00
|
|
|
int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
|
|
|
_zlib=no
|
|
|
|
cc_check -lz && _zlib=yes
|
|
|
|
if test "$_zlib" = yes ; then
|
|
|
|
_def_zlib='#define HAVE_ZLIB 1'
|
|
|
|
_ld_zlib='-lz'
|
2001-02-24 20:28:24 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_zlib='#undef HAVE_ZLIB'
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_zlib"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-07-03 14:22:23 +00:00
|
|
|
|
2001-11-20 07:53:20 +00:00
|
|
|
echocheck "RTC"
|
|
|
|
if linux ; then
|
|
|
|
if test "$_rtc" = auto ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <linux/rtc.h>
|
|
|
|
int main(void) { return RTC_IRQP_READ; }
|
|
|
|
EOF
|
|
|
|
_rtc=no
|
|
|
|
cc_check && _rtc=yes
|
|
|
|
fi
|
|
|
|
echores "$_rtc"
|
|
|
|
else
|
|
|
|
_rtc=no
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no (Linux specific feature)"
|
2001-11-20 07:53:20 +00:00
|
|
|
fi
|
|
|
|
if test "$_rtc" = yes ; then
|
|
|
|
_def_rtc='#define HAVE_RTC 1'
|
|
|
|
else
|
|
|
|
_def_rtc='#undef HAVE_RTC'
|
|
|
|
fi
|
|
|
|
|
2001-11-20 09:26:44 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "mad support"
|
|
|
|
if test "$_mad" = auto ; then
|
|
|
|
_mad=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <mad.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
2001-11-19 00:38:41 +00:00
|
|
|
cc_check $_madlibdir -lmad && _mad=yes
|
2001-04-19 19:59:11 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_mad" = yes ; then
|
|
|
|
_def_mad='#define USE_LIBMAD 1'
|
|
|
|
_ld_mad='-lmad'
|
2002-04-21 02:44:25 +00:00
|
|
|
_codecmodules="libmad $_codecmodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
|
|
|
_def_mad='#undef USE_LIBMAD'
|
2002-04-22 09:31:13 +00:00
|
|
|
_nocodecmodules="libmad $_nocodecmodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
echores "$_mad"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-10-23 13:59:10 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "OggVorbis support"
|
|
|
|
if test "$_vorbis" = auto ; then
|
|
|
|
_vorbis=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <vorbis/codec.h>
|
2002-03-26 12:43:01 +00:00
|
|
|
int main(void) { vorbis_packet_blocksize(0,0); return 0; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
2001-11-19 00:38:41 +00:00
|
|
|
cc_check -lvorbis -logg -lm && _vorbis=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$_vorbis" = yes ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_vorbis='#define HAVE_OGGVORBIS 1'
|
2001-12-06 22:26:41 +00:00
|
|
|
_ld_vorbis='-lvorbis -logg'
|
2002-04-21 02:44:25 +00:00
|
|
|
_codecmodules="libvorbis $_codecmodules"
|
2001-09-01 19:36:44 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_vorbis='#undef HAVE_OGGVORBIS'
|
2002-04-22 09:31:13 +00:00
|
|
|
_nocodecmodules="libvorbis $_nocodecmodules"
|
2001-09-01 19:36:44 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_vorbis"
|
2001-09-01 19:36:44 +00:00
|
|
|
|
2001-06-05 11:20:14 +00:00
|
|
|
|
2002-03-18 23:30:04 +00:00
|
|
|
echocheck "FAAD (AAC) support"
|
|
|
|
if test "$_faad" = auto ; then
|
|
|
|
_faad=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <faad.h>
|
2002-03-20 17:53:44 +00:00
|
|
|
int main(void) { faacDecHandle testhand; testhand = faacDecOpen(); return 0; }
|
2002-03-18 23:30:04 +00:00
|
|
|
EOF
|
|
|
|
cc_check -lfaad -lm && _faad=yes
|
|
|
|
fi
|
|
|
|
if test "$_faad" = yes ; then
|
|
|
|
_def_faad='#define HAVE_FAAD 1'
|
|
|
|
_ld_faad='-lfaad'
|
|
|
|
else
|
|
|
|
_def_faad='#undef HAVE_FAAD'
|
|
|
|
fi
|
|
|
|
echores "$_faad"
|
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "Win32 DLL support"
|
2001-12-29 00:09:10 +00:00
|
|
|
qnx && _win32=no
|
2001-12-28 23:44:12 +00:00
|
|
|
if test "$_win32" = auto ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
_win32=no
|
2001-11-19 12:04:19 +00:00
|
|
|
if x86 ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
if test -z "$_win32libdir" ; then
|
|
|
|
for I in /usr/local/lib/win32 /usr/lib/win32 ; do
|
|
|
|
if test -d "$I" ; then
|
|
|
|
_win32libdir="$I"
|
|
|
|
break;
|
|
|
|
fi;
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
test "$_win32libdir" && _win32=yes
|
|
|
|
fi
|
2001-06-05 18:40:44 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_win32" = yes ; then
|
|
|
|
_def_win32='#define USE_WIN32DLL 1'
|
|
|
|
_ld_win32='-Lloader -lloader'
|
|
|
|
_dep_win32='loader/libloader.a'
|
2001-11-27 21:54:27 +00:00
|
|
|
_codecmodules="win32 $_codecmodules"
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using $_win32libdir)"
|
2001-06-05 18:40:44 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_win32='#undef USE_WIN32DLL'
|
2002-03-12 07:16:29 +00:00
|
|
|
_nocodecmodules="win32 $_nocodecmodules"
|
2001-12-10 22:40:14 +00:00
|
|
|
_dshow=no
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no"
|
2001-06-05 18:40:44 +00:00
|
|
|
fi
|
|
|
|
|
2001-12-10 22:40:14 +00:00
|
|
|
|
2001-12-30 19:17:10 +00:00
|
|
|
echocheck "DirectShow"
|
2001-12-10 22:40:14 +00:00
|
|
|
if false ; then
|
|
|
|
|
|
|
|
if test "$_dshow" != no ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
_dshow=no
|
|
|
|
# check if compiler supports C++ and C++-libs are installed correctly
|
|
|
|
cat > "$TMPCPP" << EOF
|
|
|
|
#include <string>
|
|
|
|
class myclass {
|
|
|
|
private: int ret;
|
|
|
|
public: int myreturn(void);
|
|
|
|
};
|
|
|
|
int myclass::myreturn(void) { ret = 0; return ret ; }
|
|
|
|
int main(void) { myclass myobject; return myobject.myreturn(); }
|
|
|
|
EOF
|
|
|
|
echo "------------------------------------------------" >> "$TMPLOG"
|
|
|
|
cat "$TMPCPP" >> "$TMPLOG"
|
|
|
|
if ( "$_cc" "$TMPCPP" -o "$TMPO" && "$TMPO" ) >> "$TMPLOG" 2>&1 ; then
|
|
|
|
_dshow=yes
|
|
|
|
echores "yes (C++ is ok)"
|
|
|
|
else
|
|
|
|
echores "no"
|
|
|
|
cat << EOF
|
2001-06-08 23:30:09 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
Your C++ runtime environment is broken.
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
Hints: Does $_cc support C++ ? Have you a C++ compiler installed ?
|
|
|
|
Are the C++ libraries correctly installed ?
|
|
|
|
Check for libstdc++ and in (/etc/)ld.so.conf
|
2001-09-13 07:28:11 +00:00
|
|
|
|
2001-11-27 17:58:29 +00:00
|
|
|
If you do not need DirectShow support, you can also use:
|
2001-11-17 03:53:05 +00:00
|
|
|
./configure --disable-dshow <your-normal-configure-options>
|
|
|
|
to disable building of the C++ based DirectShow code.
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
|
|
|
die "$_cc's C++ is broken"
|
|
|
|
fi
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
2001-12-10 22:40:14 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
echores "$_dshow"
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_dshow" = yes ; then
|
|
|
|
_def_dshow='#define USE_DIRECTSHOW 1'
|
2001-12-10 22:40:14 +00:00
|
|
|
_ld_dshow='-Lloader/dshow -lDS_Filter'
|
|
|
|
_dep_dshow='loader/dshow/libDS_Filter.a'
|
2001-11-27 21:54:27 +00:00
|
|
|
_codecmodules="directshow $_codecmodules"
|
2001-07-12 15:35:52 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_dshow='#undef USE_DIRECTSHOW'
|
2002-03-12 07:16:29 +00:00
|
|
|
_nocodecmodules="directshow $_nocodecmodules"
|
2001-07-12 15:35:52 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
echocheck "XAnim DLL"
|
|
|
|
if test "$_xanim" = auto ; then
|
|
|
|
_xanim=no
|
2001-11-18 17:45:23 +00:00
|
|
|
if test "$_dl" = yes ; then
|
2001-12-01 14:41:54 +00:00
|
|
|
if test -z "$_xanimlibdir" ; then
|
2002-03-15 22:16:02 +00:00
|
|
|
for I in /usr/local/lib/xanim/mods /usr/lib/xanim/mods /usr/lib/xanim $XANIM_MOD_DIR ; do
|
2001-11-17 03:53:05 +00:00
|
|
|
if test -d "$I" ; then
|
|
|
|
_xanimlibdir="$I"
|
|
|
|
break;
|
|
|
|
fi;
|
|
|
|
done
|
|
|
|
fi
|
2001-12-01 14:41:54 +00:00
|
|
|
test "$_xanimlibdir" && _xanim=yes
|
2001-12-06 23:23:06 +00:00
|
|
|
if test "$_xanim" = yes ; then
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using $_xanimlibdir)"
|
2001-12-05 16:48:36 +00:00
|
|
|
else
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no (no suitable directory found - see DOCS/codecs.html)"
|
2001-12-05 16:48:36 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
else
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no (dynamic loader support needed)"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2001-10-26 13:50:05 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_xanim"
|
2001-10-26 13:50:05 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_xanim" = yes ; then
|
|
|
|
_def_xanim='#define USE_XANIM 1'
|
|
|
|
_def_xanim_path="#define XACODEC_PATH \"$_xanimlibdir\""
|
2001-11-27 21:54:27 +00:00
|
|
|
_codecmodules="xanim $_codecmodules"
|
2001-11-14 19:02:39 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_xanim='#undef USE_XANIM'
|
|
|
|
_def_xanim_path='#undef XACODEC_PATH'
|
2002-03-12 07:16:29 +00:00
|
|
|
_nocodecmodules="xanim $_nocodecmodules"
|
2001-11-14 19:02:39 +00:00
|
|
|
fi
|
|
|
|
|
2001-10-13 16:53:37 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "iconv"
|
|
|
|
if test "$_iconv" = auto ; then
|
|
|
|
if freebsd ; then
|
|
|
|
_iconv_tmp='#include <giconv.h>'
|
|
|
|
else
|
|
|
|
_iconv_tmp='#include <iconv.h>'
|
|
|
|
fi
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
$_iconv_tmp
|
|
|
|
#define INBUFSIZE 1024
|
|
|
|
#define OUTBUFSIZE 4096
|
2001-06-21 22:28:50 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
char inbuffer[INBUFSIZE];
|
|
|
|
char outbuffer[OUTBUFSIZE];
|
2001-10-11 12:25:20 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
int main(void) {
|
|
|
|
ssize_t numread;
|
|
|
|
iconv_t icdsc;
|
|
|
|
char *tocode="UTF-8";
|
|
|
|
char *fromcode="cp1250";
|
|
|
|
if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
|
|
|
|
while ((numread = read (0, inbuffer, INBUFSIZE))) {
|
|
|
|
char *iptr=inbuffer;
|
|
|
|
char *optr=outbuffer;
|
|
|
|
size_t inleft=numread;
|
|
|
|
size_t outleft=OUTBUFSIZE;
|
|
|
|
if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
|
|
|
|
!= (size_t)(-1)) {
|
|
|
|
write (1, outbuffer, OUTBUFSIZE - outleft);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (iconv_close(icdsc) == -1)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
_iconv=no
|
|
|
|
if freebsd ; then
|
|
|
|
cc_check -lm -lgiconv && _iconv=yes
|
|
|
|
elif bsdos ; then
|
|
|
|
cc_check -lm -liconv && _iconv=yes
|
|
|
|
else
|
|
|
|
cc_check -lm && _iconv=yes
|
2001-08-20 21:20:03 +00:00
|
|
|
fi
|
2001-07-31 23:18:16 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_iconv" = yes ; then
|
|
|
|
_def_iconv='#define USE_ICONV 1'
|
|
|
|
freebsd && _ld_iconv='-lgiconv'
|
|
|
|
bsdos && _ld_iconv='-liconv'
|
2001-02-24 20:28:24 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_iconv='#undef USE_ICONV'
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_iconv"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-04-11 12:47:45 +00:00
|
|
|
|
2001-12-29 00:40:04 +00:00
|
|
|
echocheck "FFmpeg libavcodec (static)"
|
2001-12-29 23:34:53 +00:00
|
|
|
if test "$_libavcodec" = auto ; then
|
2001-11-22 10:06:30 +00:00
|
|
|
# Note: static linking is preferred to dynamic linking
|
2001-11-17 03:53:05 +00:00
|
|
|
_libavcodec=no
|
2001-12-30 04:03:27 +00:00
|
|
|
if test -d libavcodec && test -f libavcodec/utils.c ; then
|
|
|
|
if grep avcodec_find_encoder_by_name libavcodec/utils.c > /dev/null 2>&1 ; then
|
2001-12-29 00:40:04 +00:00
|
|
|
_libavcodec=yes
|
|
|
|
echores "yes"
|
|
|
|
else
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no (old ffmpeg version, use CVS !)"
|
2001-12-29 00:40:04 +00:00
|
|
|
fi
|
|
|
|
else
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no (see DOCS/codecs.html)"
|
2001-12-29 00:40:04 +00:00
|
|
|
fi
|
|
|
|
else
|
2001-12-29 23:34:53 +00:00
|
|
|
echores "$_libavcodec"
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
2001-12-29 23:34:53 +00:00
|
|
|
|
2001-12-30 13:19:53 +00:00
|
|
|
if test "$_libavcodec" != yes ; then
|
2001-12-29 00:40:04 +00:00
|
|
|
echocheck "FFmpeg libavcodec (dynamic)"
|
2001-12-30 13:19:53 +00:00
|
|
|
if test "$_libavcodecso" = auto ; then
|
2001-11-17 09:57:54 +00:00
|
|
|
_libavcodecso=no
|
2001-12-30 13:19:53 +00:00
|
|
|
# FIXME : check for avcodec_find_encoder_by_name() for mencoder
|
2001-11-17 03:53:05 +00:00
|
|
|
cat > $TMPC << EOF
|
2001-12-29 00:40:04 +00:00
|
|
|
#define FF_POSTPROCESS 1
|
2001-11-17 03:53:05 +00:00
|
|
|
#include <libffmpeg/avcodec.h>
|
2001-12-29 00:40:04 +00:00
|
|
|
int quant_store[MBR+1][MBC+1];
|
2001-11-17 03:53:05 +00:00
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
2001-12-29 00:40:04 +00:00
|
|
|
if cc_check -lffmpeg -lm ; then
|
|
|
|
_libavcodecso=yes
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "yes (using libffmpeg.so)"
|
2001-12-29 00:40:04 +00:00
|
|
|
else
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "no (libffmpeg.so is broken/obsolete)"
|
2001-12-29 00:40:04 +00:00
|
|
|
fi
|
|
|
|
else
|
2001-12-30 13:19:53 +00:00
|
|
|
echores "$_libavcodecso"
|
|
|
|
fi
|
2001-05-09 07:54:56 +00:00
|
|
|
fi
|
2001-12-30 13:19:53 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_libavcodec='#undef USE_LIBAVCODEC'
|
2001-11-17 09:57:54 +00:00
|
|
|
_def_libavcodecso='#undef USE_LIBAVCODEC_SO'
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_ffpostprocess='#undef FF_POSTPROCESS'
|
|
|
|
if test "$_libavcodec" = yes ; then
|
|
|
|
_def_libavcodec='#define USE_LIBAVCODEC 1'
|
|
|
|
_ld_libavcodec='-Llibavcodec -lavcodec'
|
|
|
|
_dep_libavcodec='libavcodec/libavcodec.a'
|
|
|
|
_def_ffpostprocess='#define FF_POSTPROCESS 1'
|
2001-11-27 21:54:27 +00:00
|
|
|
_codecmodules="libavcodec $_codecmodules"
|
2001-11-17 09:57:54 +00:00
|
|
|
elif test "$_libavcodecso" = yes ; then
|
|
|
|
_def_libavcodecso='#define USE_LIBAVCODEC_SO 1'
|
2001-11-17 03:53:05 +00:00
|
|
|
_ld_libavcodec='-lffmpeg'
|
|
|
|
_def_ffpostprocess='#define FF_POSTPROCESS 1'
|
2001-11-27 21:54:27 +00:00
|
|
|
_codecmodules="libavcodec.so $_codecmodules"
|
2002-03-12 07:16:29 +00:00
|
|
|
else
|
|
|
|
_nocodecmodules="libavcodec $_nocodecmodules"
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
|
|
|
|
2002-04-13 16:51:01 +00:00
|
|
|
echocheck "libdv-0.9.5 (for mencoder)"
|
|
|
|
if test "$_libdv" = auto ; then
|
|
|
|
_libdv=no
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <libdv/dv.h>
|
|
|
|
int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
|
|
|
|
EOF
|
|
|
|
cc_check -ldv -lm && _libdv=yes
|
|
|
|
fi
|
|
|
|
if test "$_libdv" = yes ; then
|
|
|
|
_def_libdv='#define HAVE_LIBDV095 1'
|
|
|
|
_ld_libdv="-ldv"
|
|
|
|
else
|
|
|
|
_def_libdv='#undef HAVE_LIBDV095'
|
|
|
|
fi
|
|
|
|
echores "$_libdv"
|
2002-02-12 22:03:44 +00:00
|
|
|
|
2002-01-26 00:47:26 +00:00
|
|
|
echocheck "zr"
|
|
|
|
if test "$_zr" = yes ; then
|
|
|
|
if test "$_libavcodec" = yes ; then
|
|
|
|
_def_zr='#define HAVE_ZR 1'
|
|
|
|
_vosrc="$_vosrc vo_zr.c jpeg_enc.c"
|
|
|
|
_vomodules="zr $_vomodules"
|
|
|
|
echores "$_zr"
|
|
|
|
else
|
|
|
|
echores "libavcodec (static) is required by zr, sorry"
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="zr $_novomodules"
|
2002-01-26 00:47:26 +00:00
|
|
|
_def_zr='#undef HAVE_ZR'
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
_def_zr='#undef HAVE_ZR'
|
2002-03-12 07:16:29 +00:00
|
|
|
_novomodules="zr $_novomodules"
|
2002-01-26 00:47:26 +00:00
|
|
|
echores "$_zr"
|
|
|
|
fi
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2002-02-12 22:03:44 +00:00
|
|
|
|
2002-03-06 02:22:46 +00:00
|
|
|
echocheck "XviD/DivX4linux/DivX5linux/OpenDivX decore"
|
|
|
|
# DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
|
2002-02-12 22:03:44 +00:00
|
|
|
cat > $TMPC << EOF
|
2001-11-17 03:53:05 +00:00
|
|
|
#include <decore.h>
|
2001-11-20 16:16:47 +00:00
|
|
|
int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
2002-02-12 22:03:44 +00:00
|
|
|
if test "$_xvidcore" && cc_check -lm "$_xvidcore" ; then
|
|
|
|
_xvid=yes
|
|
|
|
_divx4linux=no
|
|
|
|
_opendivx=no
|
|
|
|
_ld_decore="$_xvidcore"
|
|
|
|
_def_decore='#define NEW_DECORE 1'
|
|
|
|
_def_divx='#define USE_DIVX'
|
2002-03-06 02:22:46 +00:00
|
|
|
_def_divx5='#undef DECORE_DIVX5'
|
2002-02-12 22:03:44 +00:00
|
|
|
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
|
|
|
|
_codecmodules="xvid $_codecmodules"
|
|
|
|
echores "XviD (with $_xvidcore)"
|
|
|
|
elif test "$_xvid" != no && cc_check -lm -lxvidcore ; then
|
|
|
|
_xvid=yes
|
|
|
|
_divx4linux=no
|
|
|
|
_opendivx=no
|
|
|
|
_ld_decore='-lxvidcore'
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_decore='#define NEW_DECORE 1'
|
2002-02-12 22:03:44 +00:00
|
|
|
_def_divx='#define USE_DIVX'
|
2002-03-06 02:22:46 +00:00
|
|
|
_def_divx5='#undef DECORE_DIVX5'
|
2002-02-12 22:03:44 +00:00
|
|
|
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
|
|
|
|
_codecmodules="xvid $_codecmodules"
|
|
|
|
echores "XviD (with libxvidcore.so)"
|
|
|
|
elif test "$_divx4linux" != no && cc_check -lm -ldivxdecore -lm ; then
|
|
|
|
_xvid=no
|
|
|
|
_divx4linux=yes
|
|
|
|
_opendivx=no
|
2002-04-13 17:44:14 +00:00
|
|
|
_ld_decore='-ldivxdecore'
|
2002-02-12 22:03:44 +00:00
|
|
|
_def_decore='#define NEW_DECORE 1'
|
2002-02-03 00:52:51 +00:00
|
|
|
_def_divx='#define USE_DIVX'
|
2002-03-06 02:22:46 +00:00
|
|
|
_def_divx5='#undef DECORE_DIVX5'
|
2002-04-13 17:44:14 +00:00
|
|
|
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
|
2001-11-27 21:54:27 +00:00
|
|
|
_codecmodules="divx4linux $_codecmodules"
|
2002-03-12 07:16:29 +00:00
|
|
|
_nocodecmodules="xvid $_nocodecmodules"
|
2002-03-06 02:22:46 +00:00
|
|
|
echores "DivX4linux (with libdivxdecore.so)"
|
|
|
|
elif test "$_divx4linux" != no ; then
|
|
|
|
# DivX5 check
|
|
|
|
# OdivxPP disabled because of:
|
|
|
|
# ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <decore.h>
|
|
|
|
int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_MEMORY_REQS; }
|
|
|
|
EOF
|
|
|
|
if cc_check -lm -ldivxdecore -lm ; then
|
|
|
|
_xvid=no
|
|
|
|
_divx4linux=yes
|
|
|
|
_opendivx=no
|
|
|
|
# _ld_decore='-ldivxdecore opendivx/postprocess.o'
|
|
|
|
_ld_decore='-ldivxdecore'
|
|
|
|
_def_decore='#define NEW_DECORE 1'
|
|
|
|
_def_divx='#define USE_DIVX'
|
|
|
|
_def_divx5='#define DECORE_DIVX5 1'
|
|
|
|
# _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
|
|
|
|
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
|
|
|
|
_codecmodules="divx5linux $_codecmodules"
|
2002-03-12 07:16:29 +00:00
|
|
|
_nocodecmodules="divx4linux $_nocodecmodules"
|
2002-03-06 02:22:46 +00:00
|
|
|
echores "DivX5linux (with libdivxdecore.so)"
|
2002-02-12 22:03:44 +00:00
|
|
|
elif test "$_opendivx" != no ; then
|
|
|
|
_xvid=no
|
|
|
|
_divx4linux=no
|
|
|
|
_opendivx=yes
|
|
|
|
_ld_decore='-Lopendivx -ldecore'
|
|
|
|
_def_decore='#undef NEW_DECORE'
|
|
|
|
_def_divx='#define USE_DIVX'
|
2002-03-06 02:22:46 +00:00
|
|
|
_def_divx5='#undef DECORE_DIVX5'
|
2002-02-12 22:03:44 +00:00
|
|
|
_def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
|
|
|
|
_codecmodules="opendivx $_codecmodules"
|
2002-03-12 07:16:29 +00:00
|
|
|
_nocodecmodules="divx5linux $_nocodecmodules"
|
2002-02-12 22:03:44 +00:00
|
|
|
echores "OpenDivX"
|
2001-12-29 00:03:47 +00:00
|
|
|
else
|
2002-02-12 22:03:44 +00:00
|
|
|
_xvid=no
|
|
|
|
_divx4linux=no
|
|
|
|
_opendivx=no
|
|
|
|
_ld_decore=''
|
|
|
|
_def_decore='#undef NEW_DECORE'
|
|
|
|
_def_divx='#undef USE_DIVX'
|
2002-03-06 02:22:46 +00:00
|
|
|
_def_divx5='#undef DECORE_DIVX5'
|
2002-02-12 22:03:44 +00:00
|
|
|
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
|
2002-03-12 07:16:29 +00:00
|
|
|
_nocodecmodules="opendivx $_nocodecmodules"
|
2002-02-12 22:03:44 +00:00
|
|
|
echores "no"
|
2002-03-06 02:22:46 +00:00
|
|
|
fi # DivX5 check
|
2001-11-23 00:21:51 +00:00
|
|
|
fi
|
|
|
|
|
2002-02-12 22:03:44 +00:00
|
|
|
|
2001-12-30 13:19:53 +00:00
|
|
|
# mencoder requires (optional) those libs: libmp3lame and divx4linux encore
|
2001-12-10 12:07:03 +00:00
|
|
|
if test "$_mencoder" != no ; then
|
|
|
|
|
2001-12-30 19:11:11 +00:00
|
|
|
echocheck "libmp3lame (for mencoder)"
|
2001-12-10 12:07:03 +00:00
|
|
|
_mp3lame=no
|
2001-12-06 22:26:41 +00:00
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <lame/lame.h>
|
|
|
|
int main(void) { (void) lame_init(); return 0; }
|
|
|
|
EOF
|
|
|
|
# Note: libmp3lame usually depends on vorbis
|
2001-12-10 12:07:03 +00:00
|
|
|
cc_check -lmp3lame $_ld_vorbis -lm && _mp3lame=yes
|
|
|
|
if test "$_mp3lame" = yes ; then
|
2001-12-06 22:26:41 +00:00
|
|
|
_def_mp3lame='#define HAVE_MP3LAME 1'
|
|
|
|
_ld_mp3lame="-lmp3lame $_ld_vorbis"
|
2001-12-10 12:07:03 +00:00
|
|
|
else
|
2001-12-06 22:26:41 +00:00
|
|
|
_def_mp3lame='#undef HAVE_MP3LAME'
|
2001-12-10 12:07:03 +00:00
|
|
|
fi
|
|
|
|
echores "$_mp3lame"
|
2001-12-06 22:26:41 +00:00
|
|
|
|
2002-02-12 22:03:44 +00:00
|
|
|
|
|
|
|
echocheck "XviD/DivX4linux encore (for mencoder)"
|
|
|
|
cat > $TMPC << EOF
|
2001-11-23 00:21:51 +00:00
|
|
|
#include <encore2.h>
|
2001-12-06 22:26:41 +00:00
|
|
|
int main(void) { (void) encore(0, 0, 0, 0); return 0; }
|
2001-11-23 00:21:51 +00:00
|
|
|
EOF
|
2002-02-12 22:03:44 +00:00
|
|
|
if test "$_xvid" != no && test "$_xvidcore" && cc_check -lm "$_xvidcore" ; then
|
|
|
|
_def_encore='#define HAVE_DIVX4ENCORE 1'
|
2002-04-13 16:51:01 +00:00
|
|
|
_ld_encore="$_xvidcore"
|
2002-02-12 22:03:44 +00:00
|
|
|
echores "XviD (with $_xvidcore)"
|
|
|
|
elif test "$_xvid" != no && cc_check -lm -lxvidcore ; then
|
2001-12-30 13:19:53 +00:00
|
|
|
_def_encore='#define HAVE_DIVX4ENCORE 1'
|
2002-04-13 16:51:01 +00:00
|
|
|
_ld_encore='-lxvidcore'
|
2002-02-12 22:03:44 +00:00
|
|
|
echores "XviD (with libxvidcore.so)"
|
|
|
|
elif test "$_divx4linux" != no && cc_check -lm -ldivxencore ; then
|
|
|
|
_def_encore='#define HAVE_DIVX4ENCORE 1'
|
2002-04-13 16:51:01 +00:00
|
|
|
_ld_encore='-ldivxencore'
|
2002-02-12 22:03:44 +00:00
|
|
|
echores "DivX4linux (with libdivxencore.so)"
|
2001-12-10 12:07:03 +00:00
|
|
|
else
|
2001-12-30 13:19:53 +00:00
|
|
|
_def_encore='#undef HAVE_DIVX4ENCORE'
|
2002-02-12 22:03:44 +00:00
|
|
|
echores "no"
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
2001-08-14 12:30:56 +00:00
|
|
|
fi
|
2001-12-10 12:07:03 +00:00
|
|
|
|
2002-01-15 17:03:19 +00:00
|
|
|
echocheck "mencoder"
|
|
|
|
_mencoder_flag='#undef HAVE_MENCODER'
|
|
|
|
if test "$_mencoder" = yes ; then
|
|
|
|
_mencoder_flag='#define HAVE_MENCODER'
|
|
|
|
fi
|
|
|
|
echores "$_mencoder"
|
2001-08-14 12:30:56 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "fastmemcpy"
|
2001-11-18 17:45:23 +00:00
|
|
|
# fastmemcpy check is done earlier with tests of CPU & binutils features
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_fastmemcpy" = yes ; then
|
|
|
|
_def_fastmemcpy='#define USE_FASTMEMCPY 1'
|
2001-02-24 20:28:24 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_fastmemcpy='#undef USE_FASTMEMCPY'
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_fastmemcpy"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "TV interface"
|
|
|
|
if test "$_tv" = yes ; then
|
|
|
|
_def_tv='#define USE_TV 1'
|
2001-12-01 14:41:54 +00:00
|
|
|
_inputmodules="tv $_inputmodules"
|
2001-02-24 20:28:24 +00:00
|
|
|
else
|
2002-03-12 07:16:29 +00:00
|
|
|
_noinputmodules="tv $_noinputmodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_tv='#undef USE_TV'
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_tv"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2002-03-15 16:10:29 +00:00
|
|
|
echocheck "*BSD BrookTree 848 TV interface"
|
|
|
|
if test "$_tv_bsdbt848" = auto ; then
|
|
|
|
_tv_bsdbt848=no
|
|
|
|
if test "$_tv" = yes ; then
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <machine/ioctl_bt848.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
cc_check && _tv_bsdbt848=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$_tv_bsdbt848" = yes ; then
|
|
|
|
_def_tv_bsdbt848='#define HAVE_TV_BSDBT848 1'
|
|
|
|
_inputmodules="tv-bsdbt848 $_inputmodules"
|
|
|
|
else
|
|
|
|
_def_tv_bsdbt848='#undef HAVE_TV_BSDBT848'
|
2002-03-15 20:48:42 +00:00
|
|
|
_noinputmodules="tv-bsdbt848 $_noinputmodules"
|
2002-03-15 16:10:29 +00:00
|
|
|
fi
|
|
|
|
echores "$_tv_bsdbt848"
|
|
|
|
|
2001-12-01 15:05:08 +00:00
|
|
|
echocheck "Video 4 Linux TV interface"
|
2001-12-25 22:08:22 +00:00
|
|
|
if test "$_tv_v4l" = auto ; then
|
|
|
|
_tv_v4l=no
|
|
|
|
if test "$_tv" = yes && linux ; then
|
|
|
|
if test -c /dev/video0 || test -c /dev/video ; then
|
2001-12-01 15:05:08 +00:00
|
|
|
cat > $TMPC <<EOF
|
2001-12-28 18:14:23 +00:00
|
|
|
#include <stdlib.h>
|
2001-12-01 15:05:08 +00:00
|
|
|
#include <linux/videodev.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
cc_check && _tv_v4l=yes
|
|
|
|
fi
|
2001-12-25 22:08:22 +00:00
|
|
|
fi
|
2001-12-01 15:05:08 +00:00
|
|
|
fi
|
|
|
|
if test "$_tv_v4l" = yes ; then
|
|
|
|
_def_tv_v4l='#define HAVE_TV_V4L 1'
|
|
|
|
_inputmodules="tv-v4l $_inputmodules"
|
|
|
|
else
|
2002-03-12 07:16:29 +00:00
|
|
|
_noinputmodules="tv-v4l $_noinputmodules"
|
2001-12-01 15:05:08 +00:00
|
|
|
_def_tv_v4l='#undef HAVE_TV_V4L'
|
|
|
|
fi
|
|
|
|
echores "$_tv_v4l"
|
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-29 18:56:08 +00:00
|
|
|
echocheck "select"
|
|
|
|
if test "$_select" = no ; then
|
|
|
|
_def_select='#undef HAVE_AUDIO_SELECT'
|
|
|
|
elif test "$_select" = yes ; then
|
|
|
|
_def_select='#define HAVE_AUDIO_SELECT 1'
|
|
|
|
fi
|
|
|
|
echores "$_select"
|
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "streaming"
|
|
|
|
# FIXME streaming check
|
2001-12-23 22:45:21 +00:00
|
|
|
if test "$_streaming" != no ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_streaming='#define STREAMING 1'
|
2001-12-31 15:29:46 +00:00
|
|
|
_ld_streaming="$_ld_sock"
|
2001-11-27 21:54:27 +00:00
|
|
|
_inputmodules="network $_inputmodules"
|
2001-06-15 16:32:21 +00:00
|
|
|
else
|
2002-03-12 07:16:29 +00:00
|
|
|
_noinputmodules="network $_noinputmodules"
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_streaming='#undef STREAMING'
|
2001-06-15 16:32:21 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
echores "$_streaming"
|
2001-06-15 16:32:21 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# --------------- GUI specific tests begin -------------------
|
|
|
|
echocheck "GUI"
|
|
|
|
echo "$_gui"
|
|
|
|
if test "$_gui" = yes ; then
|
2001-03-24 21:37:25 +00:00
|
|
|
|
2001-11-29 16:47:07 +00:00
|
|
|
# Required libraries
|
2002-04-17 07:43:56 +00:00
|
|
|
test "$_png" != yes && die "PNG support required for GUI compilation, please install libpng or libpng-dev packages."
|
2001-11-29 16:47:07 +00:00
|
|
|
test "$_x11" != yes && die "X11 support required for GUI compilation"
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echocheck "XShape extension"
|
|
|
|
_xshape=no
|
|
|
|
if test "$_x11" = yes ; then
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xproto.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/extensions/shape.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
int main(void) {
|
|
|
|
char *name = ":0.0";
|
|
|
|
Display *wsDisplay;
|
|
|
|
int exitvar = 0;
|
|
|
|
int eventbase, errorbase;
|
|
|
|
if (getenv("DISPLAY"))
|
|
|
|
name=getenv("DISPLAY");
|
|
|
|
wsDisplay=XOpenDisplay(name);
|
|
|
|
if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
|
|
|
|
exitvar=1;
|
|
|
|
XCloseDisplay(wsDisplay);
|
|
|
|
return exitvar;
|
|
|
|
}
|
|
|
|
EOF
|
2001-11-19 00:38:41 +00:00
|
|
|
cc_check $_inc_x11 $_ld_x11 && _xshape=yes
|
2001-11-17 03:53:05 +00:00
|
|
|
fi
|
|
|
|
if test "$_xshape" = yes ; then
|
|
|
|
_def_xshape='#define HAVE_XSHAPE 1'
|
|
|
|
else
|
|
|
|
die "the GUI requires the X11 extension XShape (which was not found)"
|
|
|
|
fi
|
|
|
|
echores "$_xshape"
|
2001-10-10 01:48:54 +00:00
|
|
|
|
2001-06-21 15:16:52 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Check for GTK:
|
|
|
|
echocheck "gtk version"
|
|
|
|
if test -z "$_gtkconfig" ; then
|
|
|
|
if ( gtk-config --version ) >/dev/null 2>&1 ; then
|
|
|
|
_gtkconfig="gtk-config"
|
|
|
|
elif ( gtk12-config --version ) >/dev/null 2>&1 ; then
|
|
|
|
_gtkconfig="gtk12-config"
|
|
|
|
else
|
|
|
|
die "the GUI requires GTK (which was not found)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
_gtk=`$_gtkconfig --version 2>&1`
|
|
|
|
_inc_gtk=`$_gtkconfig --cflags 2>&1`
|
|
|
|
_ld_gtk=`$_gtkconfig --libs 2>&1`
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "$_gtk (using $_gtkconfig)"
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
# Check for GLIB
|
|
|
|
echocheck "glib version"
|
|
|
|
if test -z "$_glibconfig" ; then
|
|
|
|
if ( glib-config --version ) >/dev/null 2>&1 ; then
|
|
|
|
_glibconfig="glib-config"
|
|
|
|
elif ( glib12-config --version ) >/dev/null 2>&1 ; then
|
|
|
|
_glibconfig="glib12-config"
|
|
|
|
else
|
|
|
|
die "the GUI requires GLIB (which was not found)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
_glib=`$_glibconfig --version 2>&1`
|
|
|
|
_inc_glib=`$_glibconfig --cflags 2>&1`
|
|
|
|
_ld_glib=`$_glibconfig --libs 2>&1`
|
2001-12-30 19:17:10 +00:00
|
|
|
echores "$_glib (using $_glibconfig)"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_gui='#define HAVE_NEW_GUI 1'
|
2001-12-10 00:54:50 +00:00
|
|
|
_ld_gui='$(GTKLIB) $(GLIBLIB)'
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-18 21:36:30 +00:00
|
|
|
echo "Creating Gui/config.mak"
|
2001-11-18 17:45:23 +00:00
|
|
|
cat > Gui/config.mak << EOF
|
|
|
|
# -------- Generated by configure -----------
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
GTKINC = $_inc_gtk
|
|
|
|
GTKLIBS = $_ld_gtk
|
|
|
|
GLIBINC = $_inc_glib
|
|
|
|
GLIBLIBS = $_ld_glib
|
2001-09-27 12:23:54 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
2001-04-05 19:02:02 +00:00
|
|
|
|
2001-02-27 00:23:54 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
_def_gui='#undef HAVE_NEW_GUI'
|
2001-02-27 00:23:54 +00:00
|
|
|
fi
|
2001-11-17 03:53:05 +00:00
|
|
|
# --------------- GUI specific tests end -------------------
|
2001-02-27 00:23:54 +00:00
|
|
|
|
2001-03-28 19:58:45 +00:00
|
|
|
|
2001-08-25 21:05:23 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#############################################################################
|
2001-03-28 12:08:44 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Checking for CFLAGS
|
|
|
|
if test "$_profile" || test "$_debug" ; then
|
|
|
|
CFLAGS="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
|
|
|
|
elif test -z "$CFLAGS" ; then
|
2001-11-19 12:04:19 +00:00
|
|
|
if test "$host_arch" != "mips" ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
CFLAGS="-O4 $_march $_mcpu -pipe -ffast-math -fomit-frame-pointer"
|
|
|
|
else
|
|
|
|
CFLAGS="-O4 $_march $_mcpu -ffast-math -fomit-frame-pointer"
|
|
|
|
fi
|
2001-11-05 21:49:20 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
cat <<EOF
|
2001-11-05 21:49:20 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
MPlayer compilation will use CFLAGS set by you, but:
|
|
|
|
DO NOT BUGREPORT IF IT DOES NOT WORK
|
2001-11-11 04:26:54 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
It is strongly recommended you let MPlayer choose the correct CFLAGS!
|
|
|
|
To do so, execute 'CFLAGS= ./configure <options>'
|
2001-11-14 10:49:12 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
EOF
|
2001-11-03 02:36:02 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Thread support
|
|
|
|
if linux ; then
|
|
|
|
CFLAGS="$CFLAGS -D_REENTRANT"
|
|
|
|
elif bsd ; then
|
|
|
|
# FIXME bsd needs this so maybe other OS'es
|
|
|
|
CFLAGS="$CFLAGS -D_THREAD_SAFE"
|
2001-05-08 12:17:03 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# 64 bit file offsets?
|
2001-12-04 23:10:59 +00:00
|
|
|
if test "$_largefiles" = yes || freebsd ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
2001-12-04 23:10:59 +00:00
|
|
|
if test "$_dvdread" = yes ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
# dvdread support requires this (for off64_t)
|
|
|
|
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
|
|
|
|
fi
|
2001-07-31 22:20:43 +00:00
|
|
|
fi
|
|
|
|
|
2002-04-12 10:40:38 +00:00
|
|
|
echocheck "ftello()"
|
|
|
|
# if we dont have ftello map it to ftell
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
int main (void) { ftello(stdin); return 0; }
|
|
|
|
EOF
|
|
|
|
_ftello=no
|
|
|
|
cc_check && _ftello=yes
|
|
|
|
if test "$_ftello" = yes ; then
|
|
|
|
_def_ftello='#define HAVE_FTELLO 1'
|
|
|
|
else
|
|
|
|
_def_ftello='#undef HAVE_FTELLO'
|
|
|
|
fi
|
|
|
|
echores "$_ftello"
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
# Determine OS dependent libs
|
2001-11-18 17:45:23 +00:00
|
|
|
if cygwin ; then
|
|
|
|
_confcygwin='TARGET_CYGWIN = yes'
|
|
|
|
_def_confwin32='#define WIN32'
|
2001-08-17 00:38:10 +00:00
|
|
|
else
|
2001-11-18 17:45:23 +00:00
|
|
|
_confcygwin="TARGET_CYGWIN = no"
|
2001-08-17 00:38:10 +00:00
|
|
|
fi
|
2001-07-03 07:50:52 +00:00
|
|
|
|
2001-11-22 10:06:30 +00:00
|
|
|
# Dynamic linking flags
|
|
|
|
# (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
|
|
|
|
_ld_dl_dynamic=''
|
|
|
|
bsd && _ld_dl_dynamic='-rdynamic'
|
|
|
|
test "$_xanim" = yes && _ld_dl_dynamic='-rdynamic'
|
|
|
|
|
|
|
|
_ld_arch="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
|
2001-11-17 03:53:05 +00:00
|
|
|
bsdos && _ld_arch="$_ld_arch -ldvd"
|
|
|
|
|
|
|
|
_def_debug='#undef MP_DEBUG'
|
|
|
|
test "$_debug" && _def_debug='#define MP_DEBUG 1'
|
|
|
|
|
|
|
|
_def_linux='#undef TARGET_LINUX'
|
|
|
|
linux && _def_linux='#define TARGET_LINUX 1'
|
2001-07-03 07:50:52 +00:00
|
|
|
|
2002-01-15 12:13:53 +00:00
|
|
|
# TODO cleanup the vidix stuff here
|
2002-01-11 17:20:43 +00:00
|
|
|
_def_vidix='#define CONFIG_VIDIX 1'
|
|
|
|
test "$_vidix" = no && _def_vidix='#undef CONFIG_VIDIX'
|
2002-01-15 12:13:53 +00:00
|
|
|
if test "$_vidix" = yes && test "$_x11" = yes; then
|
2002-01-15 12:35:16 +00:00
|
|
|
_vosrc="$_vosrc vo_xvidix.c"
|
2002-01-15 12:13:53 +00:00
|
|
|
_vomodules="xvidix $_vomodules"
|
2002-03-12 07:16:29 +00:00
|
|
|
else
|
|
|
|
_novomodules="xvidix $_novomodules"
|
2002-01-15 12:13:53 +00:00
|
|
|
fi
|
2002-01-11 17:20:43 +00:00
|
|
|
echo Checking for vidix ... "$_vidix"
|
2002-02-03 12:43:18 +00:00
|
|
|
|
|
|
|
_def_new_input='#undef HAVE_NEW_INPUT'
|
|
|
|
_def_joystick='#undef HAVE_JOYSTICK'
|
|
|
|
echo Checking for new input ... "$_new_input"
|
|
|
|
if test "$_new_input" = yes ; then
|
|
|
|
_def_new_input='#define HAVE_NEW_INPUT 1'
|
2002-02-23 21:20:16 +00:00
|
|
|
_ld_new_input="-Linput -linput"
|
2002-02-03 12:43:18 +00:00
|
|
|
if test "$_joystick" = yes ; then
|
|
|
|
if linux ; then
|
|
|
|
# TODO add some check
|
|
|
|
_def_joystick='#define HAVE_JOYSTICK 1'
|
|
|
|
else
|
|
|
|
_joystick="no (unsupported under $system_name)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
echo Checking for joystick ... "$_joystick"
|
|
|
|
fi
|
|
|
|
|
2002-02-23 21:20:16 +00:00
|
|
|
echocheck "lirc"
|
|
|
|
if test "$_lirc" = auto ; then
|
|
|
|
_lirc=no
|
|
|
|
if test -c /dev/lirc ; then
|
|
|
|
cat > $TMPC <<EOF
|
|
|
|
#include <lirc/lirc_client.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
cc_check -llirc_client && _lirc=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$_lirc" = yes ; then
|
|
|
|
_def_lirc='#define HAVE_LIRC 1'
|
|
|
|
if test "$_new_input" = yes ; then
|
2002-03-17 20:28:19 +00:00
|
|
|
_ld_new_input="$_ld_new_input -llirc_client"
|
2002-02-23 21:20:16 +00:00
|
|
|
else
|
|
|
|
_ld_lirc='-llirc_client'
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
_def_lirc='#undef HAVE_LIRC'
|
|
|
|
fi
|
|
|
|
echores "$_lirc"
|
|
|
|
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#############################################################################
|
2001-11-18 17:45:23 +00:00
|
|
|
echo "Creating config.mak"
|
|
|
|
cat > config.mak << EOF
|
|
|
|
# -------- Generated by configure -----------
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
LANG = C
|
|
|
|
TARGET_OS = $system_name
|
2001-07-03 07:50:52 +00:00
|
|
|
prefix = $_prefix
|
2001-12-25 21:58:10 +00:00
|
|
|
DATADIR = $_datadir
|
|
|
|
CONFDIR = $_confdir
|
2002-03-16 21:20:03 +00:00
|
|
|
LIBDIR = $_libdir
|
2001-11-17 03:53:05 +00:00
|
|
|
AR = ar
|
|
|
|
CC = $_cc
|
2002-01-15 14:49:36 +00:00
|
|
|
AWK = $_awk
|
2001-11-17 03:53:05 +00:00
|
|
|
# OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu -pipe -fomit-frame-pointer -ffast-math
|
2002-01-26 00:47:26 +00:00
|
|
|
OPTFLAGS = $CFLAGS
|
2001-11-17 03:53:05 +00:00
|
|
|
EXTRA_INC = $_inc_extra $_inc_gtk
|
|
|
|
WIN32_PATH = -DWIN32_PATH=\\"$_win32libdir\\"
|
|
|
|
|
|
|
|
STREAMING = $_streaming
|
2001-12-31 15:29:46 +00:00
|
|
|
STREAMING_LIB = $_ld_streaming
|
2002-01-11 17:20:43 +00:00
|
|
|
VIDIX = $_vidix
|
2001-11-17 03:53:05 +00:00
|
|
|
|
2002-02-03 00:52:51 +00:00
|
|
|
OPENDIVX = $_opendivx
|
|
|
|
|
2001-11-17 11:26:26 +00:00
|
|
|
VO2 = $_vo2
|
|
|
|
|
2002-02-11 09:15:59 +00:00
|
|
|
PNG = $_mkf_png
|
2002-03-10 22:49:18 +00:00
|
|
|
JPEG = $_mkf_jpg
|
2002-02-11 09:15:59 +00:00
|
|
|
|
2001-11-27 17:58:29 +00:00
|
|
|
EXTRA_LIB = $_ld_extra
|
|
|
|
Z_LIB = $_ld_static $_ld_zlib
|
2001-11-29 19:00:48 +00:00
|
|
|
HAVE_MLIB = $_mlib
|
2001-11-27 17:58:29 +00:00
|
|
|
STATIC_LIB = $_ld_static
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
X11_INC = $_inc_x11
|
2001-11-27 17:58:29 +00:00
|
|
|
X11DIR = $_ld_x11
|
|
|
|
|
|
|
|
# video output
|
2001-12-05 16:48:36 +00:00
|
|
|
X_LIB = $_ld_x11 $_ld_gl $_ld_dga $_ld_xv $_ld_vm $_ld_xinerama $_ld_mad $_ld_sock
|
2001-11-27 17:58:29 +00:00
|
|
|
GGI_LIB = $_ld_ggi
|
|
|
|
MLIB_LIB = $_ld_mlib
|
2001-11-29 19:00:48 +00:00
|
|
|
MLIB_INC = $_inc_mlib
|
2002-04-04 13:21:13 +00:00
|
|
|
DVB_INC = $_inc_dvb
|
2001-11-27 17:58:29 +00:00
|
|
|
PNG_LIB = $_ld_png
|
2002-03-10 22:49:18 +00:00
|
|
|
JPEG_LIB = $_ld_jpg
|
2001-11-27 17:58:29 +00:00
|
|
|
SDL_LIB = $_ld_sdl
|
|
|
|
SVGA_LIB = $_ld_svga
|
|
|
|
AA_LIB = $_ld_aa
|
|
|
|
|
|
|
|
# audio output
|
|
|
|
ALSA_LIB = $_ld_alsa
|
2001-12-03 01:13:48 +00:00
|
|
|
NAS_LIB = $_ld_nas
|
2001-11-27 17:58:29 +00:00
|
|
|
MAD_LIB = $_ld_mad
|
|
|
|
VORBIS_LIB = $_ld_vorbis
|
2002-03-18 23:30:04 +00:00
|
|
|
FAAD_LIB = $_ld_faad
|
2001-11-27 17:58:29 +00:00
|
|
|
SGIAUDIO_LIB = $_ld_sgiaudio
|
2001-11-17 03:53:05 +00:00
|
|
|
|
2001-11-27 17:58:29 +00:00
|
|
|
# input
|
|
|
|
TERMCAP_LIB = $_ld_termcap
|
|
|
|
LIRC_LIB = $_ld_lirc
|
2001-11-17 03:53:05 +00:00
|
|
|
CSS_USE = $_css
|
2001-11-27 17:58:29 +00:00
|
|
|
CSS_LIB = $_ld_css
|
2002-04-21 21:18:28 +00:00
|
|
|
DVDKIT = $_dvdkit
|
2001-11-17 03:53:05 +00:00
|
|
|
SDL_INC = $_inc_sdl
|
|
|
|
W32_DEP = $_dep_win32
|
2001-11-27 17:58:29 +00:00
|
|
|
W32_LIB = $_ld_win32
|
2001-11-17 03:53:05 +00:00
|
|
|
DS_DEP = $_dep_dshow
|
2001-11-27 17:58:29 +00:00
|
|
|
DS_LIB = $_ld_dshow
|
2001-11-17 13:23:13 +00:00
|
|
|
AV_DEP = $_dep_libavcodec
|
2001-11-27 17:58:29 +00:00
|
|
|
AV_LIB = $_ld_libavcodec
|
2001-12-10 14:41:44 +00:00
|
|
|
MP1E_DEP = $_dep_mp1e
|
|
|
|
MP1E_LIB = $_ld_mp1e
|
2001-11-27 17:58:29 +00:00
|
|
|
ARCH_LIB = $_ld_arch $_ld_iconv
|
|
|
|
DIVX4LINUX = $_divx4linux
|
2002-02-12 22:03:44 +00:00
|
|
|
XVID = $_xvid
|
2001-11-27 17:58:29 +00:00
|
|
|
DECORE_LIB = $_ld_decore
|
2001-11-23 00:21:51 +00:00
|
|
|
MENCODER = $_mencoder
|
2002-04-13 16:51:01 +00:00
|
|
|
ENCORE_LIB = $_ld_encore $_ld_mp3lame $_ld_libdv
|
2001-12-03 01:09:36 +00:00
|
|
|
DIRECTFB_LIB = $_ld_directfb
|
2002-02-23 21:20:16 +00:00
|
|
|
NEW_INPUT_LIB = $_ld_new_input
|
2001-07-03 07:50:52 +00:00
|
|
|
|
|
|
|
# --- Some stuff for autoconfigure ----
|
2001-07-12 15:35:52 +00:00
|
|
|
$_target_arch
|
2001-08-03 18:34:59 +00:00
|
|
|
$_confcygwin
|
2001-07-03 07:50:52 +00:00
|
|
|
TARGET_CPU=$iproc
|
2001-11-17 03:53:05 +00:00
|
|
|
TARGET_MMX = $_mmx
|
|
|
|
TARGET_MMX2 = $_mmx2
|
|
|
|
TARGET_3DNOW = $_3dnow
|
|
|
|
TARGET_3DNOWEX = $_3dnowex
|
|
|
|
TARGET_SSE = $_sse
|
2001-08-25 21:05:23 +00:00
|
|
|
|
|
|
|
# --- GUI stuff ---
|
2001-11-19 00:38:41 +00:00
|
|
|
GTKLIB = $_ld_static $_ld_gtk
|
|
|
|
GLIBLIB = $_ld_static $_ld_glib
|
2001-12-10 00:54:50 +00:00
|
|
|
GTK_LIBS = $_ld_static $_ld_gui
|
2001-11-17 03:53:05 +00:00
|
|
|
GUI = $_gui
|
|
|
|
DEBUG = -DDEBUG
|
2001-08-25 21:05:23 +00:00
|
|
|
|
2001-07-03 07:50:52 +00:00
|
|
|
EOF
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#############################################################################
|
2001-11-18 17:45:23 +00:00
|
|
|
echo "Creating config.h"
|
|
|
|
cat > config.h << EOF
|
2001-12-10 12:07:03 +00:00
|
|
|
/* -------- This file has been automatically generated by configure ---------
|
|
|
|
Note: Any changes in it will be lost when you run configure again. */
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2002-03-15 20:48:42 +00:00
|
|
|
/* use GNU internationalisation */
|
|
|
|
$_def_i18n
|
|
|
|
|
2002-03-15 22:16:02 +00:00
|
|
|
/* Runtime Cpudetection */
|
|
|
|
$_def_runtime_cpudetection
|
|
|
|
|
2002-03-16 21:20:03 +00:00
|
|
|
#define PREFIX "$_prefix"
|
2002-01-13 14:44:04 +00:00
|
|
|
|
2001-11-19 01:57:27 +00:00
|
|
|
/* define this to use simple idct with patched libavcodec */
|
|
|
|
#define SIMPLE_IDCT 1
|
2001-11-19 01:52:40 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#define USE_OSD 1
|
|
|
|
#define USE_SUB 1
|
2001-07-30 02:00:54 +00:00
|
|
|
|
2002-03-27 03:45:55 +00:00
|
|
|
/* enable/disable SIGHANDLER */
|
|
|
|
$_def_sighandler
|
|
|
|
|
2001-12-10 12:07:03 +00:00
|
|
|
/* Toggles debugging informations */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_debug
|
2001-08-17 00:38:10 +00:00
|
|
|
|
2001-12-10 12:07:03 +00:00
|
|
|
/* Indicates is Ogle's libdvdread is available for DVD playback */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_dvdread
|
2001-08-20 21:20:03 +00:00
|
|
|
|
2001-07-20 00:01:09 +00:00
|
|
|
/* Common data directory (for fonts, etc) */
|
|
|
|
#define DATADIR "$_datadir"
|
2001-12-25 21:58:10 +00:00
|
|
|
#define CONFDIR "$_confdir"
|
2002-01-13 14:44:04 +00:00
|
|
|
#define LIBDIR "$_libdir"
|
2001-07-20 00:01:09 +00:00
|
|
|
|
2001-10-28 22:56:44 +00:00
|
|
|
/* Define this to compile stream-caching support, it can be enabled via
|
|
|
|
-cache <kilobytes> */
|
2001-11-17 03:53:05 +00:00
|
|
|
#define USE_STREAM_CACHE 1
|
2001-10-28 22:56:44 +00:00
|
|
|
|
2002-02-12 22:03:44 +00:00
|
|
|
/* Define to include support for XviD/Divx4Linux/OpenDivx */
|
2002-02-03 00:52:51 +00:00
|
|
|
$_def_divx
|
|
|
|
|
2002-02-12 22:03:44 +00:00
|
|
|
/* Define for using new XviD/DivX4Linux library, instead of open-source OpenDivX */
|
2001-07-19 22:43:19 +00:00
|
|
|
/* You have to change DECORE_LIBS in config.mak too! */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_decore
|
2001-12-10 12:07:03 +00:00
|
|
|
|
2002-03-06 02:22:46 +00:00
|
|
|
/* Define if you are using DivX5Linux Decore library */
|
|
|
|
$_def_divx5
|
|
|
|
|
2002-04-13 16:51:01 +00:00
|
|
|
/* Define to include support for libdv-0.9.5 */
|
|
|
|
$_def_libdv
|
|
|
|
|
2002-01-15 17:03:19 +00:00
|
|
|
/* If build mencoder */
|
|
|
|
$_mencoder_flag
|
|
|
|
|
2002-02-12 22:03:44 +00:00
|
|
|
/* Indicates if XviD/Divx4linux encore is available
|
2001-12-30 19:11:11 +00:00
|
|
|
Note: for mencoder */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_encore
|
2001-07-19 22:43:19 +00:00
|
|
|
|
2001-12-10 12:07:03 +00:00
|
|
|
/* Indicates if libmp3lame is available
|
2001-12-30 19:11:11 +00:00
|
|
|
Note: for mencoder */
|
2001-12-06 22:26:41 +00:00
|
|
|
$_def_mp3lame
|
|
|
|
|
2002-01-12 21:07:17 +00:00
|
|
|
/* Define libmp1e for realtime mpeg encoding (for DXR3 and DVB cards) */
|
2001-12-10 14:41:44 +00:00
|
|
|
$_def_mp1e
|
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
/* Define this to enable avg. byte/sec-based AVI sync method by default:
|
2001-08-21 10:17:52 +00:00
|
|
|
(use -bps or -nobps commandline option for run-time method selection)
|
|
|
|
-bps gives better sync for vbr mp3 audio, it is now default */
|
2001-11-17 03:53:05 +00:00
|
|
|
#define AVI_SYNC_BPS 1
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-27 17:58:29 +00:00
|
|
|
/* Undefine this if you do not want to select mono audio (left or right)
|
2001-05-08 21:49:00 +00:00
|
|
|
with a stereo MPEG layer 2/3 audio stream. The command-line option
|
|
|
|
-stereo has three possible values (0 for stereo, 1 for left-only, 2 for
|
|
|
|
right-only), with 0 being the default.
|
|
|
|
*/
|
2001-11-17 03:53:05 +00:00
|
|
|
#define USE_FAKE_MONO 1
|
2001-05-08 21:49:00 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
/* Undefine this if your soundcard driver has no working select().
|
|
|
|
If you have kernel Oops, player hangups, or just no audio, you should
|
|
|
|
try to recompile MPlayer with this option disabled! */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_select
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-10-10 13:07:42 +00:00
|
|
|
/* define this to use iconv(3) function to codepage conversions */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_iconv
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-20 07:53:20 +00:00
|
|
|
/* define this to use RTC (/dev/rtc) for video timers (LINUX only) */
|
|
|
|
$_def_rtc
|
|
|
|
|
2001-05-10 18:46:33 +00:00
|
|
|
/* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
|
|
|
|
#define MAX_OUTBURST 65536
|
|
|
|
|
2001-04-23 03:39:34 +00:00
|
|
|
/* set up audio OUTBURST. Do not change this! */
|
|
|
|
#define OUTBURST 512
|
|
|
|
|
2001-06-08 23:30:09 +00:00
|
|
|
/* Define this if your system has the header file for the OSS sound interface */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_sys_soundcard
|
2001-06-08 23:30:09 +00:00
|
|
|
|
2002-04-12 10:40:38 +00:00
|
|
|
/* Define this if your system uses ftello() for off_t seeking */
|
|
|
|
|
|
|
|
$_def_ftello
|
|
|
|
#ifndef HAVE_FTELLO
|
|
|
|
# define ftello(a) ftell(a)
|
|
|
|
#endif
|
|
|
|
|
2001-07-12 15:35:52 +00:00
|
|
|
/* Define this if your system has the "malloc.h" header file */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_malloc
|
2001-06-08 23:30:09 +00:00
|
|
|
|
2001-11-09 02:02:58 +00:00
|
|
|
/* memalign is mapped to malloc if unsupported */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_memalign
|
2001-11-09 02:02:58 +00:00
|
|
|
#ifndef HAVE_MEMALIGN
|
|
|
|
# define memalign(a,b) malloc(b)
|
|
|
|
#endif
|
2001-08-24 14:49:05 +00:00
|
|
|
|
2001-07-12 15:35:52 +00:00
|
|
|
/* Define this if your system has the "alloca.h" header file */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_alloca
|
2001-07-12 15:35:52 +00:00
|
|
|
|
|
|
|
/* Define this if your system has the "sys/mman.h" header file */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_mman
|
2001-07-03 14:22:23 +00:00
|
|
|
|
2001-07-12 15:35:52 +00:00
|
|
|
/* Define this if you have the elf dynamic linker -ldl library */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_dl
|
2001-07-12 15:35:52 +00:00
|
|
|
|
|
|
|
/* Define this if you have the kstat kernel statistics library */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_kstat
|
2001-07-12 15:35:52 +00:00
|
|
|
|
2001-10-26 13:50:05 +00:00
|
|
|
/* Define this if you have zlib */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_zlib
|
2001-10-26 13:50:05 +00:00
|
|
|
|
2001-11-19 15:54:43 +00:00
|
|
|
/* Define this if you have shm support */
|
|
|
|
$_def_shm
|
|
|
|
|
2002-03-29 21:24:36 +00:00
|
|
|
/* Define this if your system has strsep */
|
|
|
|
$_def_strsep
|
|
|
|
|
2001-11-14 19:02:39 +00:00
|
|
|
/* Define this if your system has vsscanf */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_vsscanf
|
2001-11-14 19:02:39 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
/* LIRC (remote control, see www.lirc.org) support: */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_lirc
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-04-17 22:04:44 +00:00
|
|
|
/* DeCSS support using libcss */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_css
|
2001-04-17 22:04:44 +00:00
|
|
|
|
2002-03-28 20:40:21 +00:00
|
|
|
/* DVD navigation support using libdvdnav */
|
|
|
|
$_def_dvdnav
|
|
|
|
|
2001-03-05 23:02:30 +00:00
|
|
|
/* Define this to enable MPEG 1/2 image postprocessing (requires FAST cpu!) */
|
2001-11-17 03:53:05 +00:00
|
|
|
#define MPEG12_POSTPROC 1
|
2001-03-05 23:02:30 +00:00
|
|
|
|
2001-10-16 23:30:38 +00:00
|
|
|
/* Define this to enable image postprocessing in libavcodec (requires FAST cpu!) */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_ffpostprocess
|
2001-10-16 23:30:38 +00:00
|
|
|
|
2002-02-03 00:52:51 +00:00
|
|
|
/* Define to include support for OpenDivx postprocessing */
|
|
|
|
$_def_odivx_postprocess
|
2001-10-13 15:33:13 +00:00
|
|
|
|
2001-08-14 18:28:56 +00:00
|
|
|
/* Win32 DLL support */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_win32
|
2001-08-14 18:28:56 +00:00
|
|
|
|
2001-04-24 22:51:55 +00:00
|
|
|
/* DirectShow support */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_dshow
|
2001-04-24 22:51:55 +00:00
|
|
|
|
2001-07-06 03:22:14 +00:00
|
|
|
/* ffmpeg's libavcodec support (requires libavcodec source) */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_libavcodec
|
2001-11-17 09:57:54 +00:00
|
|
|
$_def_libavcodecso
|
2001-11-17 03:53:05 +00:00
|
|
|
|
2002-01-12 21:07:17 +00:00
|
|
|
/* Use libavcodec's decoders */
|
2001-11-17 03:53:05 +00:00
|
|
|
#define CONFIG_DECODERS 1
|
2002-01-12 21:07:17 +00:00
|
|
|
/* Use libavcodec's encoders */
|
2001-12-22 15:14:10 +00:00
|
|
|
#define CONFIG_ENCODERS 1
|
2001-07-06 03:22:14 +00:00
|
|
|
|
2001-11-03 21:25:55 +00:00
|
|
|
/* XAnim DLL support */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_xanim
|
2002-01-12 21:07:17 +00:00
|
|
|
/* Default search path */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_xanim_path
|
2001-11-03 21:25:55 +00:00
|
|
|
|
2001-04-26 20:23:24 +00:00
|
|
|
/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_fastmemcpy
|
2001-04-26 20:23:24 +00:00
|
|
|
|
2001-05-08 12:17:03 +00:00
|
|
|
/* gui support, please do not edit this option */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_gui
|
2001-05-08 12:17:03 +00:00
|
|
|
|
2002-01-12 21:07:17 +00:00
|
|
|
/* Audio output drivers */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_ossaudio
|
2002-02-22 13:47:31 +00:00
|
|
|
$_def_ossaudio_devdsp
|
|
|
|
$_def_ossaudio_devmixer
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_alsa5
|
|
|
|
$_def_alsa9
|
|
|
|
$_def_sunaudio
|
|
|
|
$_def_sgiaudio
|
2001-12-03 01:13:48 +00:00
|
|
|
$_def_nas
|
|
|
|
|
2001-06-02 16:02:38 +00:00
|
|
|
/* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
|
|
|
|
#undef FAST_OSD
|
|
|
|
#undef FAST_OSD_TABLE
|
|
|
|
|
2001-11-11 04:26:54 +00:00
|
|
|
/* Enable TV Interface support */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_tv
|
2001-11-11 04:26:54 +00:00
|
|
|
|
2001-12-01 15:05:08 +00:00
|
|
|
/* Enable Video 4 Linux TV interface support */
|
|
|
|
$_def_tv_v4l
|
|
|
|
|
2002-03-15 16:10:29 +00:00
|
|
|
/* Enable *BSD BrookTree TV interface support */
|
|
|
|
$_def_tv_bsdbt848
|
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
/* Define if your processor stores words with the most significant
|
|
|
|
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_words_endian
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_arch
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
/* Define this for Cygwin build for win32 */
|
|
|
|
$_def_confwin32
|
2001-08-05 12:39:34 +00:00
|
|
|
|
2001-05-22 07:45:35 +00:00
|
|
|
/* Define this to any prefered value from 386 up to infinity with step 100 */
|
|
|
|
#define __CPU__ $iproc
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_linux
|
2001-10-17 18:17:50 +00:00
|
|
|
|
2001-12-01 23:38:57 +00:00
|
|
|
$_def_vcd
|
|
|
|
|
2001-08-12 13:34:24 +00:00
|
|
|
#ifdef sun
|
|
|
|
#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
|
2001-08-21 17:17:03 +00:00
|
|
|
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
|
2001-08-12 13:34:24 +00:00
|
|
|
#else
|
|
|
|
#define DEFAULT_CDROM_DEVICE "/dev/cdrom"
|
2001-08-21 17:17:03 +00:00
|
|
|
#define DEFAULT_DVD_DEVICE "/dev/dvd"
|
2001-08-12 13:34:24 +00:00
|
|
|
#endif
|
|
|
|
|
2001-08-20 21:20:03 +00:00
|
|
|
|
2001-05-22 07:45:35 +00:00
|
|
|
/*----------------------------------------------------------------------------
|
|
|
|
**
|
|
|
|
** NOTE: Instead of modifying these definitions here, use the
|
|
|
|
** --enable/--disable options of the ./configure script!
|
|
|
|
** See ./configure --help for details.
|
|
|
|
**
|
|
|
|
*---------------------------------------------------------------------------*/
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-23 18:25:09 +00:00
|
|
|
/* nanosleep support */
|
|
|
|
$_def_nanosleep
|
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
/* termcap flag for getch2.c */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_termcap
|
2001-06-08 23:30:09 +00:00
|
|
|
|
2001-11-19 16:42:01 +00:00
|
|
|
/* termios flag for getch2.c */
|
|
|
|
$_def_termios
|
2001-12-03 15:22:03 +00:00
|
|
|
$_def_termios_h
|
|
|
|
$_def_termios_sys_h
|
2001-11-19 16:42:01 +00:00
|
|
|
|
2001-09-01 19:36:44 +00:00
|
|
|
/* enable PNG support */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_png
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2002-03-10 22:49:18 +00:00
|
|
|
/* enable JPEG support */
|
|
|
|
$_def_jpg
|
|
|
|
|
2001-10-23 13:59:10 +00:00
|
|
|
/* libmad support */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_mad
|
2001-10-23 13:59:10 +00:00
|
|
|
|
2001-09-01 19:36:44 +00:00
|
|
|
/* enable OggVorbis support */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_vorbis
|
2001-09-01 19:36:44 +00:00
|
|
|
|
2002-03-18 23:30:04 +00:00
|
|
|
/* enable FAAD (AAC) support */
|
|
|
|
$_def_faad
|
|
|
|
|
2002-01-12 21:07:17 +00:00
|
|
|
/* enable streaming */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_streaming
|
2001-06-08 23:30:09 +00:00
|
|
|
|
2002-01-11 17:20:43 +00:00
|
|
|
/* enables / disables vidix usage */
|
|
|
|
$_def_vidix
|
|
|
|
|
2002-02-03 12:43:18 +00:00
|
|
|
/* enables / disables new input */
|
|
|
|
$_def_new_input
|
|
|
|
|
|
|
|
/* enables / disables new input joystick support */
|
|
|
|
$_def_joystick
|
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
/* Extension defines */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
|
|
|
|
$_def_3dnowex // only define if you have 3DNOWEX (AMD Athlon, etc.)
|
|
|
|
$_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
|
|
|
|
$_def_mmx2 // only define if you have MMX2 (Athlon/PIII/4/CelII)
|
|
|
|
$_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
|
2001-12-28 18:29:12 +00:00
|
|
|
$_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-08-03 18:50:54 +00:00
|
|
|
#ifdef HAVE_MMX
|
2001-11-17 03:53:05 +00:00
|
|
|
#define USE_MMX_IDCT 1
|
2001-08-03 18:50:54 +00:00
|
|
|
#endif
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_mlib // Sun mediaLib, available only on solaris
|
2001-08-27 16:51:10 +00:00
|
|
|
|
2001-08-24 16:20:04 +00:00
|
|
|
/* libmpeg2 uses a different feature test macro for mediaLib */
|
|
|
|
#ifdef HAVE_MLIB
|
2001-11-17 03:53:05 +00:00
|
|
|
#define LIBMPEG2_MLIB 1
|
2001-08-24 16:20:04 +00:00
|
|
|
#endif
|
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
/* libvo options */
|
2001-11-17 22:50:30 +00:00
|
|
|
#define SCREEN_SIZE_X 1
|
|
|
|
#define SCREEN_SIZE_Y 1
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_x11
|
|
|
|
$_def_xv
|
|
|
|
$_def_vm
|
|
|
|
$_def_xinerama
|
|
|
|
$_def_gl
|
|
|
|
$_def_dga
|
|
|
|
$_def_dga2
|
|
|
|
$_def_sdl
|
2001-05-05 21:37:37 +00:00
|
|
|
/* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_sdlbuggy
|
|
|
|
$_def_ggi
|
|
|
|
$_def_3dfx
|
|
|
|
$_def_tdfxfb
|
2001-12-03 01:09:36 +00:00
|
|
|
$_def_directfb
|
2002-03-10 23:55:36 +00:00
|
|
|
$_def_directfb099
|
2002-01-17 01:27:20 +00:00
|
|
|
$_def_zr
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_mga
|
|
|
|
$_def_xmga
|
|
|
|
$_def_syncfb
|
|
|
|
$_def_fbdev
|
2002-01-17 01:12:01 +00:00
|
|
|
$_def_fbdev_nocopy
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_dxr3
|
|
|
|
$_def_dvb
|
|
|
|
$_def_svga
|
2002-02-07 02:29:55 +00:00
|
|
|
$_def_vesa
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_xdpms
|
|
|
|
$_def_aa
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-08-25 21:05:23 +00:00
|
|
|
/* used by GUI: */
|
2001-11-17 03:53:05 +00:00
|
|
|
$_def_xshape
|
2001-08-25 21:05:23 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
|
|
|
|
#define X11_FULLSCREEN 1
|
2001-02-24 20:28:24 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#############################################################################
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2001-11-18 17:45:23 +00:00
|
|
|
echo "Creating libvo/config.mak"
|
2001-02-24 20:28:24 +00:00
|
|
|
_voobj=`echo $_vosrc | sed -e 's/\.c/\.o/g'`
|
2001-11-18 17:45:23 +00:00
|
|
|
cat > libvo/config.mak << EOF
|
2001-02-24 20:28:24 +00:00
|
|
|
include ../config.mak
|
2001-11-17 03:53:05 +00:00
|
|
|
OPTIONAL_SRCS = $_vosrc
|
|
|
|
OPTIONAL_OBJS = $_voobj
|
2001-02-24 20:28:24 +00:00
|
|
|
EOF
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#############################################################################
|
2001-06-03 10:46:42 +00:00
|
|
|
|
2001-12-29 00:03:47 +00:00
|
|
|
if test -d "libvo2" ; then
|
|
|
|
|
2001-11-18 17:45:23 +00:00
|
|
|
echo "Creating libvo2/config.mak"
|
2001-11-17 11:26:26 +00:00
|
|
|
_vo2obj=`echo $_vo2src | sed -e 's/\.c/\.o/g'`
|
2001-11-18 17:45:23 +00:00
|
|
|
cat > libvo2/config.mak << EOF
|
2001-11-17 11:26:26 +00:00
|
|
|
include ../config.mak
|
|
|
|
OPTIONAL_SRCS = $_vo2src
|
|
|
|
OPTIONAL_OBJS = $_vo2obj
|
|
|
|
EOF
|
|
|
|
|
2001-12-29 00:03:47 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-17 11:26:26 +00:00
|
|
|
#############################################################################
|
|
|
|
|
2001-11-18 17:45:23 +00:00
|
|
|
echo "Creating libao2/config.mak"
|
2001-06-03 10:46:42 +00:00
|
|
|
_aoobj=`echo $_aosrc | sed -e 's/\.c/\.o/g'`
|
2001-11-18 17:45:23 +00:00
|
|
|
cat > libao2/config.mak << EOF
|
2001-06-03 10:46:42 +00:00
|
|
|
include ../config.mak
|
2001-11-17 03:53:05 +00:00
|
|
|
OPTIONAL_SRCS = $_aosrc
|
|
|
|
OPTIONAL_OBJS = $_aoobj
|
|
|
|
EOF
|
2001-06-03 10:46:42 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#############################################################################
|
2001-06-03 10:46:42 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
echo "Creating help_mp.h"
|
|
|
|
cat > help_mp.h << EOF
|
|
|
|
#include "$_mp_help"
|
2001-06-03 10:46:42 +00:00
|
|
|
EOF
|
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
#############################################################################
|
|
|
|
|
2001-11-27 21:54:27 +00:00
|
|
|
#FIXME: add something like "Optimizing for: i686 mmx mmx2 sse"
|
2001-02-24 20:28:24 +00:00
|
|
|
cat << EOF
|
|
|
|
|
|
|
|
Config files successfully generated by ./configure !
|
2001-10-13 16:53:37 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
Install prefix: $_prefix
|
|
|
|
Data directory: $_datadir
|
2001-12-25 21:58:10 +00:00
|
|
|
Config direct.: $_confdir
|
2001-11-29 01:18:05 +00:00
|
|
|
|
|
|
|
Enabled optional drivers:
|
|
|
|
Input: $_inputmodules
|
|
|
|
Codecs: $_codecmodules
|
|
|
|
Audio output: $_aomodules
|
|
|
|
Video output: $_vomodules
|
2002-03-12 07:16:29 +00:00
|
|
|
Disabled optional drivers:
|
|
|
|
Input: $_noinputmodules
|
|
|
|
Codecs: $_nocodecmodules
|
|
|
|
Audio output: $_noaomodules
|
|
|
|
Video output: $_novomodules
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
'config.h' and 'config.mak' contain your configuration options.
|
|
|
|
Note: if you alter theses files (for instance CFLAGS) MPlayer may no longer
|
|
|
|
compile *** DON'T BUGREPORT if you tweak these files ***
|
|
|
|
|
|
|
|
'make' will now compile MPlayer and 'make install' will install it.
|
2001-10-13 16:53:37 +00:00
|
|
|
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2001-08-22 08:51:19 +00:00
|
|
|
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$_mtrr" = yes ; then
|
2001-11-17 03:53:05 +00:00
|
|
|
echo "Please check mtrr settings at /proc/mtrr (see DOCS/video.html#2.2.1.1)"
|
|
|
|
echo
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
|
|
|
|
2001-10-11 23:41:43 +00:00
|
|
|
if test "$_sdl" = "outdated" ; then
|
2001-10-13 16:53:37 +00:00
|
|
|
cat <<EOF
|
|
|
|
You have an outdated version of libSDL installed (older than v1.1.7) and SDL
|
|
|
|
support has therefore been disabled.
|
|
|
|
|
|
|
|
Please upgrade to a more recent version (version 1.1.8 and above are known to
|
|
|
|
work). You may get this library from: http://www.libsdl.org
|
|
|
|
|
|
|
|
You need to re-run ./configure and recompile after updating SDL. If you are
|
|
|
|
only interested in the libSDL audio drivers, then older version might work.
|
|
|
|
|
|
|
|
Use --enable-sdl to force usage of libSDL.
|
|
|
|
EOF
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-19 12:04:19 +00:00
|
|
|
if x86 ; then
|
2001-10-23 14:56:58 +00:00
|
|
|
if test "$_win32" = no ; then
|
|
|
|
if test "$_win32libdir" ; then
|
|
|
|
cat <<EOF
|
2001-10-13 16:53:37 +00:00
|
|
|
Failed to find a WIN32 codecs dir at $_win32libdir!
|
|
|
|
Create it and copy the DLL files there! (You can get them from your windows
|
|
|
|
directory or download them from:
|
2001-10-16 17:51:26 +00:00
|
|
|
ftp://ftp.MPlayerHQ.hu/MPlayer/releases/w32codec.zip
|
2001-10-13 16:53:37 +00:00
|
|
|
EOF
|
2001-10-23 14:56:58 +00:00
|
|
|
fi
|
2001-10-13 16:53:37 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
if test "$_win32libdir" ; then
|
2001-11-28 17:52:25 +00:00
|
|
|
# echo "Ok, found Win32 codecs directory at $_win32libdir."
|
|
|
|
:
|
2001-10-23 15:13:51 +00:00
|
|
|
else
|
|
|
|
cat <<EOF
|
2001-10-31 18:25:28 +00:00
|
|
|
Failed to find a WIN32 codecs dir!
|
2001-10-23 15:13:51 +00:00
|
|
|
Create it and copy the DLL files there! (You can get them from your windows
|
|
|
|
directory or download them from:
|
|
|
|
ftp://ftp.MPlayerHQ.hu/MPlayer/releases/w32codec.zip
|
|
|
|
EOF
|
|
|
|
fi
|
2001-10-13 16:53:37 +00:00
|
|
|
fi
|
2001-02-24 20:28:24 +00:00
|
|
|
else
|
2001-11-17 03:53:05 +00:00
|
|
|
cat <<EOF
|
2001-10-13 16:53:37 +00:00
|
|
|
NOTE: WIN32 codec DLLs are not supported on your CPU ($host_arch).
|
|
|
|
You may encounter a few AVI files that cannot be played due to missing
|
|
|
|
opensource video/audio codec support.
|
|
|
|
EOF
|
2001-02-24 20:28:24 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-28 17:52:25 +00:00
|
|
|
|
2001-11-17 03:53:05 +00:00
|
|
|
cat <<EOF
|
|
|
|
|
2002-01-07 12:17:21 +00:00
|
|
|
Check $TMPLOG if you wonder why an autodetection failed (check whether the
|
|
|
|
development headers/packages are installed).
|
|
|
|
|
|
|
|
If you suspect a bug, please read DOCS/bugreports.html.
|
2001-11-17 03:53:05 +00:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2002-01-11 17:20:43 +00:00
|
|
|
if test "$_vidix" = no ; then
|
|
|
|
cat <<EOF
|
|
|
|
You've disabled VIDIX. Although it would be better to PORT it instead.
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2002-01-12 21:07:17 +00:00
|
|
|
Also currently the only driver in VIDIX is for ATI Radeon and Rage128.
|
|
|
|
Matrox G200/400 needs to be ported.
|
2002-01-11 17:20:43 +00:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2001-06-05 02:36:12 +00:00
|
|
|
# Last move:
|
2001-10-13 16:53:37 +00:00
|
|
|
rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
|
2001-06-05 02:36:12 +00:00
|
|
|
|