2001-10-25 13:46:50 +02:00
#! /bin/sh
2001-06-04 10:07:57 +02:00
#
2001-11-17 04:53:05 +01:00
# Original version (C) 2000 Pontscho/fresh!mindworkz
# pontscho@makacs.poliod.hu
2001-05-30 22:23:20 +02:00
#
2001-11-17 04:53:05 +01:00
# History / Contributors: check the cvs log !
2001-07-04 12:45:20 +02:00
#
2001-11-17 04:53:05 +01:00
# Cleanups all over the place (c) 2001 pl
2001-05-22 09:45:35 +02:00
#
2001-04-18 00:04:44 +02:00
#
2001-11-17 04:53:05 +01: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 02:44:29 +02:00
#
2002-02-05 23:57:17 +01:00
# In this file, a tab is 8 chars and indentation shift is 2 characters
#
2001-11-17 04:53:05 +01:00
# GOTCHAS:
# - config files are currently:
2002-08-28 18:09:31 +02:00
# config.h config.mak libvo/config.mak libao2/config.mak Gui/config.mak
2001-03-24 22:37:25 +01:00
#
2001-11-17 04:53:05 +01:00
#############################################################################
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
# Prefer these macros to full length text !
# These macros only return an error code - NO display is done
2001-10-13 22:14:05 +02:00
cc_check() {
2001-11-19 01:38:41 +01:00
echo >> "$TMPLOG"
2001-11-17 04:53:05 +01:00
cat "$TMPC" >> "$TMPLOG"
echo >> "$TMPLOG"
2003-03-23 18:14:28 +01:00
echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
2002-05-10 03:23:15 +02:00
rm -f "$TMPO"
2003-03-23 18:14:28 +01:00
( $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
2001-11-19 01:38:41 +01:00
TMP="$?"
echo >> "$TMPLOG"
echo "ldd $TMPO" >> "$TMPLOG"
2003-04-24 20:55:43 +02:00
( $_ldd "$TMPO" ) >> "$TMPLOG" 2>&1
2001-11-19 01:38:41 +01:00
echo >> "$TMPLOG"
return "$TMP"
2001-10-13 18:53:37 +02:00
}
2001-11-17 04:53:05 +01:00
# Display error message, flushes tempfile, exit
2001-10-13 22:14:05 +02:00
die () {
2001-11-17 04:53:05 +01:00
echo
echo "Error: $@" >&2
echo >&2
rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
2003-01-18 06:41:41 +01:00
echo "Check \"$TMPLOG\" if you do not understand why it failed."
2001-11-17 04:53:05 +01:00
exit 1
2001-10-13 18:53:37 +02:00
}
2001-11-17 04:53:05 +01:00
# OS test booleans functions
2001-12-01 18:17:32 +01: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 "$?" ; }
2002-08-09 23:30:21 +02:00
hpux() { issystem "HP-UX" ; return "$?" ; }
2001-12-01 18:17:32 +01:00
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 19:25:28 +01:00
bsd() { freebsd || netbsd || bsdos || openbsd ; return "$?" ; }
2001-12-01 18:17:32 +01:00
qnx() { issystem "QNX" ; return "$?" ; }
2002-05-03 21:00:54 +02:00
darwin() { issystem "Darwin" ; return "$?" ; }
2002-11-01 01:05:56 +01:00
gnu() { issystem "GNU" ; return "$?" ; }
2003-04-21 23:07:35 +02:00
mingw32() { issystem "MINGW32" ; return "$?" ; }
2001-10-13 18:53:37 +02:00
2001-11-19 13:04:19 +01:00
# arch test boolean functions
2002-05-23 16:38:40 +02:00
# x86/x86pc is used by QNX
2001-11-19 13:04:19 +01:00
x86() {
case "$host_arch" in
2002-06-14 00:44:28 +02:00
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) return 0 ;;
2001-11-19 13:04:19 +01:00
*) return 1 ;;
esac
}
2002-06-06 18:46:05 +02:00
ppc() {
case "$host_arch" in
ppc) return 0;;
*) return 1;;
esac
}
2003-01-04 20:26:04 +01:00
# not boolean test: implement the posix shell "!" operator for a
# non-posix /bin/sh.
# usage: not {command}
# returns exit status "success" when the execution of "command"
# fails.
not() {
eval "$@"
test $? -ne 0
}
2001-11-17 04:53:05 +01:00
# Use this before starting a check
echocheck() {
echo "============ Checking for $@ ============" >> "$TMPLOG"
2002-02-05 23:57:17 +01:00
echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
2001-11-17 04:53:05 +01:00
}
# Use this to echo the results of a check
echores() {
2001-11-17 23:50:30 +01:00
echo "Result is: $@" >> "$TMPLOG"
2001-11-17 04:53:05 +01:00
echo "##########################################" >> "$TMPLOG"
echo "" >> "$TMPLOG"
echo "$@"
}
#############################################################################
2001-02-24 21:28:24 +01:00
2001-06-05 20:40:44 +02:00
# Check how echo works in this /bin/sh
case `echo -n` in
2002-02-05 23:57:17 +01:00
-n) _echo_n= _echo_c='\c' ;; # SysV echo
*) _echo_n='-n ' _echo_c= ;; # BSD echo
2001-06-05 20:40:44 +02:00
esac
2002-12-29 00:52:22 +01:00
LANGUAGES=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s/help\/help_mp-\(..\).h/\1/g" |sed "s/help\/help_mp-\(.....\).h/\1/g"`
2001-06-05 20:40:44 +02:00
2001-07-24 11:16:53 +02:00
for parm in "$@" ; do
2001-10-23 20:32:55 +02:00
if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
cat << EOF
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
Usage: $0 [OPTIONS]...
2001-02-24 21:28:24 +01:00
2001-10-23 20:32:55 +02:00
Configuration:
-h, --help display this help and exit
Installation directories:
2001-10-13 18:53:37 +02:00
--prefix=DIR use this prefix for installing mplayer [/usr/local]
2002-09-01 16:40:09 +02:00
--bindir=DIR use this prefix for installing mplayer binary
[PREFIX/bin]
2001-10-13 18:53:37 +02:00
--datadir=DIR use this prefix for installing machine independent
2001-12-25 22:58:10 +01:00
data files (fonts, skins) [PREFIX/share/mplayer]
2002-09-09 21:23:06 +02:00
--mandir=DIR use this prefix for installing manpages [PREFIX/man]
2001-12-25 22:58:10 +01:00
--confdir=DIR use this prefix for installing configuration files
2003-02-02 12:46:57 +01:00
[PREFIX/etc/mplayer]
2002-09-09 21:23:06 +02:00
--libdir=DIR use this prefix for object code libraries [PREFIX/lib]
2001-10-23 20:32:55 +02:00
Optional features:
2002-09-09 21:23:06 +02:00
--disable-mencoder disable mencoder (a/v encoder) compilation [enable]
--enable-gui enable gmplayer compilation (gtk-1.2 GUI) [disable]
--enable-largefiles enable support for files > 2 GBytes [disable]
2002-02-22 14:47:31 +01:00
--enable-linux-devfs set default devices to devfs ones [disable]
2001-11-17 10:57:54 +01:00
--enable-termcap use termcap database for key codes [autodetect]
2002-09-09 21:23:06 +02:00
--disable-iconv do not use iconv(3) function [autodetect]
--disable-setlocale disable setlocale using in mplayer [autodetect]
2001-11-17 12:26:26 +01:00
--enable-lirc enable LIRC (remote control) support [autodetect]
2003-05-30 20:23:55 +02:00
--enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
2002-09-09 21:23:06 +02:00
--enable-joystick enable joystick support [disable]
2001-12-01 16:05:08 +01:00
--disable-tv disable TV Interface (tv/dvb grabbers) [enable]
2002-09-09 21:23:06 +02:00
--disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
2002-05-23 16:38:40 +02:00
--disable-tv-bsdbt848 disable BSD BT848 Interface support [autodetect]
2002-12-23 01:33:22 +01:00
--disable-edl disable EDL (edit decision list) support [enable]
2002-09-09 21:23:06 +02:00
--disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
2003-05-17 14:24:01 +02:00
--disable-network disable network support (for: http/mms/rtp) [enable]
2003-06-11 18:48:09 +02:00
--enable-winsock2 enable winsock2 usage [autodetect]
2003-03-21 17:06:11 +01:00
--enable-smb enable Samba (SMB) input support [autodetect]
2002-09-09 21:23:06 +02:00
--enable-live enable LIVE.COM Streaming Media support [disable]
2003-01-23 01:37:32 +01:00
--enable-dvdnav enable dvdnav support [disable]
2002-09-09 21:23:06 +02:00
--disable-dvdread Disable libdvdread support [autodetect]
--disable-mpdvdkit Disable mpdvdkit/mpdvdkit2 support [autodetect]
--disable-css Disable old-style libcss DVD support [autodetect]
--disable-cdparanoia Disable cdparanoia support [autodetect]
2002-12-29 00:52:22 +01:00
--disable-freetype Disable freetype2 font rendering support [autodetect]
2002-09-20 03:26:39 +02:00
--disable-unrarlib Disable Unique RAR File Library [enabled]
2002-12-07 00:54:02 +01:00
--disable-new-conf Disable new experimental config parser code [enabled]
2003-01-04 03:40:49 +01:00
--enable-menu Enable osd menu support (needs new config) [disabled]
2002-12-05 01:05:57 +01:00
--disable-sortsub Disable subtitles sorting [enabled]
2003-03-21 17:54:03 +01:00
--enable-fribidi Enable using the FriBiDi libs [disabled]
2003-02-19 18:26:59 +01:00
--disable-macosx Disable Mac OS X specific features [autodetect]
2003-03-26 12:35:13 +01:00
--disable-inet6 Disable IPv6 support [autodetect]
--disable-gethostbyname2
gethostbyname() is not provided by the c library [autodetect]
2002-09-09 21:23:06 +02:00
Codecs:
2003-01-28 01:12:23 +01:00
--enable-gif enable gif support [autodetect]
2002-09-09 21:23:06 +02:00
--enable-png enable png input/output support [autodetect]
--enable-jpeg enable jpeg input/output support [autodetect]
2002-10-29 17:50:34 +01:00
--enable-liblzo enable external liblzo support [autodetect]
2001-10-23 20:32:55 +02:00
--disable-win32 disable Win32 DLL support [autodetect]
2002-09-09 21:23:06 +02:00
--disable-dshow disable Win32/DirectShow support [autodetect]
2003-05-29 13:50:23 +02:00
--disable-qtx disable Quicktime codecs [autodetect]
2001-11-03 22:25:55 +01:00
--disable-xanim disable XAnim DLL support [autodetect]
2002-06-13 02:14:28 +02:00
--disable-real disable RealPlayer DLL support [autodetect]
2002-02-12 23:03:44 +01:00
--disable-xvid disable XviD codec [autodetect]
2002-09-09 21:23:06 +02:00
--disable-divx4linux disable DivX4linux/Divx5linux codec [autodetect]
2002-04-13 19:28:33 +02:00
--enable-opendivx enable _old_ OpenDivx codec [disable]
2002-04-26 19:18:02 +02:00
--disable-libavcodec disable libavcodec [autodetect]
2002-08-04 00:48:41 +02:00
--enable-libfame enable libfame realtime encoder [autodetect]
2001-10-23 20:32:55 +02:00
--enable-vorbis build with OggVorbis support [autodetect]
2002-12-04 21:27:36 +01:00
--enable-tremor build with integer-only OggVorbis support [disabled]
2003-05-11 20:29:07 +02:00
--enable-theora build with OggTheora support [autodetect]
2003-04-30 13:39:32 +02:00
--enable-matroska build with Matroska support [autodetect]
2002-09-09 21:23:06 +02:00
--enable-faad build with FAAD2 (MP4/AAC) support [autodetect]
--disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
--disable-mad disable libmad (mpeg audio) support [autodetect]
2002-12-22 22:01:01 +01:00
--enable-xmms build with XMMS inputplugin support [disabled]
2002-04-16 19:29:04 +02:00
2002-09-09 21:23:06 +02:00
Video output:
--disable-vidix disable VIDIX stuff [enable on x86 *nix]
2001-10-13 18:53:37 +02:00
--enable-gl build with OpenGL render support [autodetect]
2001-11-29 19:56:08 +01:00
--enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
2002-02-07 03:21:39 +01:00
--enable-vesa build with VESA support [autodetect]
2001-10-13 18:53:37 +02: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]
2002-09-28 21:03:50 +02:00
--enable-directx build with Directx support [autodetect]
2002-05-13 15:15:40 +02:00
--enable-dxr2 build with DXR2 render support [autodetect]
2001-12-24 03:56:02 +01:00
--enable-dxr3 build with DXR3/H+ render support [autodetect]
--enable-dvb build with support for output via DVB-Card [autodetect]
2002-09-09 21:23:06 +02:00
--enable-mga build with mga_vid (for Matrox G200/G4x0/G550) support
2001-10-23 20:32:55 +02: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 18:53:37 +02:00
--enable-xv build with Xv render support for X 4.x [autodetect]
2003-06-21 03:47:26 +02:00
--enable-xvmc build with XvMC acceleration for X 4.x [autodetect]
2001-12-24 03:56:02 +01:00
--enable-vm build with XF86VidMode support for X11 [autodetect]
--enable-xinerama build with Xinerama support for X11 [autodetect]
2001-10-13 18:53:37 +02:00
--enable-x11 build with X11 render support [autodetect]
2002-01-06 23:57:58 +01:00
--enable-fbdev build with FBDev render support [autodetect]
2002-02-05 23:57:17 +01:00
--enable-fbdev=nocopy yuv12 converts directly into framebuffer
2001-11-23 16:34:03 +01:00
--enable-mlib build with MLIB support (Solaris only) [autodetect]
2002-09-09 21:23:06 +02:00
--enable-3dfx build with obsolete /dev/3dfx support [disable]
--enable-tdfxfb build with tdfxfb (Voodoo 3/banshee) support [disable]
2001-12-03 02:09:36 +01:00
--enable-directfb build with DirectFB support [autodetect]
2002-08-06 16:23:23 +02:00
--enable-zr build with ZR360[56]7/ZR36060 support [autodetect]
2002-09-09 00:41:53 +02:00
--enable-bl build with Blinkenlights support [disable]
2003-03-07 19:45:02 +01:00
--enable-tdfxvid build with tdfx vid support [disable]
2001-10-13 18:53:37 +02:00
2002-09-09 21:23:06 +02:00
Audio output:
2001-10-13 18:53:37 +02:00
--disable-ossaudio disable OSS sound support [autodetect]
2002-05-28 03:52:40 +02:00
--disable-arts disable aRts sound support [autodetect]
2002-12-27 17:02:57 +01:00
--disable-esd disable esd sound support [autodetect]
2001-10-13 18:53:37 +02:00
--disable-alsa disable alsa sound support [autodetect]
--disable-sunaudio disable Sun sound support [autodetect]
2003-02-08 23:27:04 +01:00
--disable-nas disable NAS sound support [autodetect]
2002-12-29 20:58:56 +01:00
--disable-win32waveout disable Windows waveout sound support [autodetect]
2002-05-10 03:50:17 +02:00
--disable-select disable using select() on audio device [enable]
2001-10-13 18:53:37 +02:00
2001-10-31 19:25:28 +01:00
Miscellaneous options:
2002-09-09 21:23:06 +02:00
--enable-runtime-cpudetection Enable runtime CPU detection [disable]
2001-10-25 00:41:17 +02:00
--cc=COMPILER use this C compiler to build MPlayer [gcc]
2001-10-23 20:32:55 +02:00
--target=PLATFORM target platform (i386-linux, arm-linux, etc)
2002-08-04 00:48:41 +02:00
--enable-static build a statically linked binary. Set further linking
options with --enable-static="-lslang -lncurses"
2003-02-21 00:32:47 +01:00
--language=list a white space or comma separated list of languages
for translated man pages, the first language is the
primary and therefore used for translated messages
and GUI (also the environment variable \$LINGUAS is
honored) [en]
(Available: $LANGUAGES all)
2002-11-02 17:14:42 +01:00
--enable-shared-pp install & use shared postprocessing lib
2002-12-05 00:29:41 +01:00
--install-path=PATH the path to a custom install program (useful if
your OS uses a GNU-incompatible install utility by
default and you want to point to the GNU version)
2001-10-23 20:32:55 +02:00
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 19:29:12 +01:00
--enable-sse2 build with sse2 support [autodetect]
2001-10-23 20:32:55 +02:00
--disable-fastmemcpy disable 3dnow/sse/mmx optimized memcpy() [enable]
2002-09-09 21:23:06 +02:00
--disable-big-endian Force byte order to little endian [autodetect]
--enable-big-endian Force byte order to big endian [autodetect]
2001-10-23 20:32:55 +02:00
--enable-debug[=1-3] compile debugging information into mplayer [disable]
--enable-profile compile profiling information into mplayer [disable]
2002-03-27 04:45:55 +01:00
--disable-sighandler disable sighandler for crashes [enable]
2002-10-02 11:24:34 +02:00
--enable-i18n _experimental_ gnu gettext() support [autodetect]
2002-11-11 19:25:02 +01:00
--enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
2001-10-23 20:32:55 +02:00
2002-08-04 00:48:41 +02:00
Hazardous options a.k.a. "DO NOT REPORT ANY BUGS!"
2002-02-10 12:25:14 +01:00
--disable-gcc-checking disable gcc version checking [enable]
2001-10-23 20:32:55 +02:00
Use these options if autodetection fails:
2001-11-17 04:53:05 +01: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 20:32:55 +02:00
--with-x11incdir=DIR X headers in DIR
2001-11-17 04:53:05 +01:00
--with-x11libdir=DIR X library files in DIR
2002-05-13 15:15:40 +02:00
--with-dxr2incdir=DIR DXR2 headers in DIR
2001-11-19 01:38:41 +01:00
--with-csslibdir=DIR libcss in DIR
2002-08-04 00:48:41 +02:00
--with-madlibdir=DIR libmad (libmad shared library) in DIR
2002-02-05 23:57:17 +01:00
--with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
2002-03-28 21:40:21 +01:00
--with-libdvdnav=DIR libdvdnav in DIR
2003-05-18 12:49:54 +02:00
--with-codecsdir=DIR Binary codec files in DIR
2001-10-23 20:32:55 +02:00
--with-win32libdir=DIR W*ndows DLL files in DIR
2001-11-03 22:25:55 +01:00
--with-xanimlibdir=DIR XAnim DLL files in DIR
2002-06-13 02:14:28 +02:00
--with-reallibdir=DIR RealPlayer DLL files in DIR
2003-06-21 03:47:26 +02:00
--with-xvmclib=PATH path to adapter specific XvMCxxxxx.so (e.g. NVIDIA)
2002-10-21 03:52:14 +02:00
--with-xvidcore=PATH path to XviD libxvidcore.a
(e.g. /opt/lib/libxvidcore.a)
2002-08-04 00:48:41 +02:00
--with-sdl-config=PATH path to sdl*-config (e.g. /opt/bin/sdl-config)
2002-09-02 20:43:01 +02:00
--with-freetype-config=PATH path to freetype-config
(e.g. /opt/bin/freetype-config)
2002-08-04 00:48:41 +02:00
--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)
2002-06-16 01:55:06 +02:00
--with-dvdnav-config=PATH path to dvdnav-config
2002-09-02 20:43:01 +02:00
--with-livelibdir=DIR path to LIVE.COM Streaming Media libraries
2002-12-22 22:01:01 +01:00
--with-xmmsplugindir=DIR path to xmms plugins
--with-xmmslibdir=DIR path to libxmms.so.1
2003-02-08 10:57:54 +01:00
--with-cdparanoiaincdir=DIR cdparanoia headers in DIR
--with-cdparanoialibdir=DIR cdparanoia libraries (libcdda_*) in DIR
2003-03-21 17:54:03 +01:00
--with-fribidi-config=PATH path to fribidi-config
(e.g. /opt/bin/fribidi-config)
2001-10-23 20:32:55 +02:00
2001-02-24 21:28:24 +01:00
EOF
2001-10-23 20:32:55 +02:00
exit 0
fi
2001-07-24 11:16:53 +02:00
done # for parm in ...
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
# 1st pass checking for vital options
2002-12-05 00:29:41 +01:00
_install=install
_ranlib=ranlib
2001-10-23 20:32:55 +02:00
_cc=gcc
test "$CC" && _cc="$CC"
2001-07-28 07:36:45 +02:00
_as=auto
2002-04-24 22:33:12 +02:00
_runtime_cpudetection=no
2001-07-30 13:14:59 +02:00
for ac_option do
2001-11-17 04:53:05 +01:00
case "$ac_option" in
2001-07-28 07:36:45 +02:00
--target=*)
2001-11-17 04:53:05 +01:00
_target=`echo $ac_option | cut -d '=' -f 2`
;;
2001-07-28 07:36:45 +02:00
--cc=*)
2001-11-17 04:53:05 +01:00
_cc=`echo $ac_option | cut -d '=' -f 2`
;;
2001-07-28 07:36:45 +02:00
--as=*)
2001-11-17 04:53:05 +01:00
_as=`echo $ac_option | cut -d '=' -f 2`
;;
2002-02-10 12:25:14 +01:00
--enable-gcc-checking)
_skip_cc_check=no
;;
2001-07-28 07:36:45 +02:00
--disable-gcc-checking)
2001-11-17 04:53:05 +01:00
_skip_cc_check=yes
;;
2001-11-19 01:38:41 +01: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 07:36:45 +02:00
--with-extraincdir=*)
2001-11-17 04:53:05 +01: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-04-28 00:42:27 +02:00
# _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -Wl\,-R,g'`" -L"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
2001-11-17 04:53:05 +01:00
;;
2002-03-19 19:42:27 +01:00
--enable-runtime-cpudetection)
_runtime_cpudetection=yes
;;
--disable-runtime-cpudetection)
_runtime_cpudetection=no
;;
2002-12-05 00:29:41 +01:00
--install-path=*)
_install=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install"
;;
2001-11-17 04:53:05 +01:00
esac
2001-07-28 07:36:45 +02:00
done
2001-07-12 17:35:52 +02:00
2001-07-14 19:05:23 +02:00
# Determine our OS name and CPU architecture
2001-10-12 01:41:43 +02:00
if test -z "$_target" ; then
2001-11-17 04:53:05 +01:00
# OS name
system_name=`( uname -s ) 2>&1`
case "$system_name" in
2002-11-01 01:05:56 +01:00
Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
2001-11-17 04:53:05 +01:00
;;
IRIX*)
system_name=IRIX
;;
2002-08-09 23:30:21 +02:00
HP-UX*)
system_name=HP-UX
;;
2001-11-17 04:53:05 +01:00
[cC][yY][gG][wW][iI][nN]*)
system_name=CYGWIN
;;
2003-04-21 23:07:35 +02:00
MINGW32*)
system_name=MINGW32
;;
2001-11-17 04:53:05 +01:00
*)
system_name="$system_name-UNKNOWN"
;;
esac
2001-10-31 19:25:28 +01:00
2001-07-28 07:36:45 +02:00
2001-11-17 04:53:05 +01:00
# host's CPU/instruction set
2001-10-31 19:25:28 +01:00
host_arch=`( uname -p ) 2>&1`
2001-07-28 07:36:45 +02:00
case "$host_arch" in
2001-10-31 19:25:28 +01:00
i386|sparc|ppc|alpha|arm|mips)
2001-11-17 04:53:05 +01:00
;;
2002-05-03 21:00:54 +02:00
powerpc) # Darwin returns 'powerpc'
host_arch=ppc
;;
2001-11-17 04:53:05 +01:00
*) # uname -p on Linux returns 'unknown' for the processor type,
# OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
2001-07-29 15:24:23 +02:00
2001-11-17 04:53:05 +01:00
# Maybe uname -m (machine hardware name) returns something we
# recognize.
2002-05-23 16:38:40 +02:00
# x86/x86pc is used by QNX
2001-11-17 04:53:05 +01:00
case "`( uname -m ) 2>&1`" in
2002-11-01 01:05:56 +01:00
i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;;
2002-05-23 16:38:40 +02:00
ia64) host_arch=ia64 ;;
x86_64) host_arch=x86_64 ;;
2001-11-18 18:45:23 +01:00
ppc) host_arch=ppc ;;
alpha) host_arch=alpha ;;
sparc*) host_arch=sparc ;;
2002-08-09 23:30:21 +02:00
9000*) host_arch=hppa ;;
2001-11-18 18:45:23 +01:00
arm*) host_arch=arm ;;
2002-05-23 16:38:40 +02:00
s390) host_arch=s390 ;;
s390x) host_arch=s390x ;;
2002-08-05 03:31:47 +02:00
mips) host_arch=mips ;;
2001-11-18 18:45:23 +01:00
*) host_arch=UNKNOWN ;;
2001-11-17 04:53:05 +01:00
esac
;;
esac
2001-06-21 02:06:40 +02:00
else
2001-11-17 04:53:05 +01:00
system_name=`echo $_target | cut -d '-' -f 2`
2002-04-24 03:54:37 +02:00
case "`echo $system_name | tr A-Z a-z`" in
linux) system_name=Linux ;;
freebsd) system_name=FreeBSD ;;
netbsd) system_name=NetBSD ;;
bsd/os) system_name=BSD/OS ;;
openbsd) system_name=OpenBSD ;;
sunos) system_name=SunOS ;;
qnx) system_name=QNX ;;
esac
2002-06-14 00:44:28 +02:00
# We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
host_arch=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
2001-06-21 02:06:40 +02:00
fi
2001-11-17 04:53:05 +01:00
echo "Detected operating system: $system_name"
echo "Detected host architecture: $host_arch"
2001-10-05 02:39:54 +02:00
2001-02-24 21:28:24 +01:00
# LGB: temporary files
2001-10-13 18:53:37 +02:00
for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
2001-11-17 04:53:05 +01:00
test "$I" && break
2001-10-13 18:53:37 +02:00
done
2001-02-24 21:28:24 +01:00
2001-11-18 22:36:30 +01:00
TMPLOG="configure.log"
rm -f "$TMPLOG"
2001-11-17 04:53:05 +01: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 21:28:24 +01:00
# config files
2001-06-21 02:06:40 +02:00
2001-11-17 04:53:05 +01: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
2002-08-04 00:48:41 +02:00
# resonable to have only /usr/include or only /usr/local/include.
2001-10-28 22:44:23 +01:00
if freebsd ; then
2001-11-17 04:53:05 +01:00
_ld_extra="$_ld_extra -L/usr/local/lib"
_inc_extra="$_inc_extra -I/usr/local/include"
2001-10-28 22:44:23 +01:00
fi
2003-04-24 20:55:43 +02:00
_ldd=ldd
if darwin; then
_ldd="otool -L"
fi
2001-06-05 20:40:44 +02:00
2001-06-05 09:10:00 +02:00
# Checking CC version...
2001-10-12 01:41:43 +02:00
if test "$_skip_cc_check" != yes ; then
2003-01-26 16:42:11 +01:00
for _cc in "$_cc" gcc-3.1 gcc3 gcc-3.0 cc ; do
2001-11-17 04:53:05 +01:00
echocheck "$_cc version"
2003-07-03 19:36:52 +02:00
cc_name=`( $_cc -v ) 2>&1 | tail -1 | cut -d ' ' -f 1`
2002-06-03 16:18:13 +02:00
cc_version=`( $_cc -dumpversion ) 2>&1`
2002-06-07 00:58:18 +02:00
if test "$?" -gt 0; then
cc_version="not found"
fi
2001-11-17 04:53:05 +01:00
case $cc_version in
'')
cc_version="v. ?.??, bad"
cc_verc_fail=yes
;;
2002-10-24 01:12:09 +02:00
2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9])
2003-02-24 00:44:16 +01:00
_cc_major=`echo $cc_version | cut -d '.' -f 1`
_cc_minor=`echo $cc_version | cut -d '.' -f 2`
_cc_mini=`echo $cc_version | cut -d '.' -f 3`
2001-11-17 04:53:05 +01:00
cc_version="$cc_version, ok"
2002-01-25 14:14:40 +01:00
cc_verc_fail=no
2001-11-17 04:53:05 +01:00
;;
2002-06-07 00:58:18 +02:00
'not found')
cc_verc_fail=yes
;;
2001-11-17 04:53:05 +01:00
*)
cc_version="$cc_version, bad"
cc_verc_fail=yes
;;
esac
echores "$cc_version"
2002-05-03 21:00:54 +02:00
(test "$cc_verc_fail" = "no") && break
done
2002-01-25 14:14:40 +01:00
if test "$cc_verc_fail" = yes ; then
2001-11-17 04:53:05 +01:00
cat <<EOF
2001-08-30 13:08:36 +02:00
2002-08-04 00:48:41 +02:00
*** Please downgrade/upgrade C compiler to version gcc-2.95.x or gcc-3.x! ***
2001-11-14 23:18:16 +01:00
2002-08-04 00:48:41 +02:00
You are not using a supported compiler. We do not have the time to make sure
everything works with compilers other than the ones we use. Use either the
same compiler as we do, or use --disable-gcc-checking but DO *NOT* REPORT BUGS
unless you can reproduce them after recompiling with a 2.95.x or 3.x version!
2001-11-14 23:18:16 +01:00
2002-08-04 00:48:41 +02:00
Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
2001-11-17 04:53:05 +01:00
mplayer and lame (which is used for mencoder). If you get compile errors,
2002-08-04 00:48:41 +02:00
first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
2001-11-17 04:53:05 +01:00
bugs!
GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
2003-06-13 03:25:11 +02:00
*** For details please read DOCS/en/users_against_developers.html ***
2001-10-24 05:09:23 +02:00
2001-08-30 13:08:36 +02:00
EOF
2001-11-17 04:53:05 +01:00
die "Bad gcc version"
fi
2001-06-04 22:12:41 +02:00
else
2001-10-06 17:38:56 +02:00
cat <<EOF
2001-11-14 23:18:16 +01:00
******************************************************************************
2001-10-06 17:38:56 +02:00
2001-11-14 23:18:16 +01:00
Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
2003-06-13 03:25:11 +02:00
Ok. You know. Do it. Did you read DOCS/en/users_against_developers.html???
2001-10-24 05:04:14 +02:00
2001-11-17 04:53:05 +01:00
DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
2001-10-24 05:04:14 +02:00
Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
2001-11-17 04:53:05 +01:00
Lame which is used by mencoder produces weird errors, too.
2001-10-24 05:04:14 +02:00
2002-08-04 00:48:41 +02:00
If you have any problem, install a GCC 2.95.x or 3.x version and try again.
2003-06-13 03:25:11 +02:00
If the problem _still_ exists, then read DOCS/en/bugreports.html !
2001-11-14 23:18:16 +01:00
2002-08-04 00:48:41 +02:00
*** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
2001-11-17 04:53:05 +01:00
2001-11-14 23:18:16 +01:00
******************************************************************************
2001-10-06 17:38:56 +02:00
EOF
read _answer
2001-06-04 11:38:18 +02:00
fi
2001-02-24 21:28:24 +01:00
# ---
2001-07-04 12:45:20 +02: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-12 01:41:43 +02:00
if test "$_as" = auto ; then
2001-07-04 12:45:20 +02:00
_as=`$_cc -print-prog-name=as`
2001-11-17 04:53:05 +01:00
test -z "$_as" && _as=as
fi
# Try to find the available options for the current CPU
2002-06-06 18:46:05 +02:00
if x86 || ppc; then
2001-11-17 04:53:05 +01:00
if test -r /proc/cpuinfo ; then
2003-01-31 02:47:55 +01:00
# Linux with /proc mounted, extract CPU information from it
2001-11-17 04:53:05 +01:00
_cpuinfo="cat /proc/cpuinfo"
elif test -r /compat/linux/proc/cpuinfo ; then
2003-01-31 02:47:55 +01:00
# FreeBSD with Linux emulation /proc mounted,
# extract CPU information from it
2001-11-17 04:53:05 +01:00
_cpuinfo="cat /compat/linux/proc/cpuinfo"
2002-06-07 00:58:18 +02:00
elif x86; then
2003-01-31 02:47:55 +01:00
# all other OSes try to extract CPU information from a small helper
2001-11-17 04:53:05 +01:00
# program TOOLS/cpuinfo instead
$_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c
_cpuinfo="TOOLS/cpuinfo"
2001-07-04 12:45:20 +02:00
fi
2001-02-24 21:28:24 +01:00
2003-07-03 19:36:52 +02: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 21:28:24 +01:00
2003-07-03 19:36:52 +02:00
pparam=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | head -1`
2001-11-17 04:53:05 +01:00
if test -z "$pparam" ; then
2003-07-03 19:36:52 +02:00
pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | head -1`
2001-11-17 04:53:05 +01:00
fi
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
_mmx=no
_3dnow=no
_3dnowex=no
_mmx2=no
_sse=no
_sse2=no
2001-12-16 12:35:14 +01:00
_mtrr=no
2002-11-11 10:37:29 +01:00
_altivec=no
2001-11-17 04:53:05 +01:00
for i in $pparam ; do
case "$i" in
3dnow) _3dnow=yes ;;
3dnowext) _3dnow=yes _3dnowex=yes ;;
mmx) _mmx=yes ;;
2002-11-11 10:37:29 +01:00
altivec) _altivec=yes ;;
2001-11-17 04:53:05 +01:00
mmxext) _mmx2=yes ;;
2002-09-05 03:28:10 +02:00
mtrr|k6_mtrr|cyrix_arr) _mtrr=yes ;;
xmm|sse|kni) _sse=yes _mmx2=yes ;;
2001-12-28 19:01:56 +01:00
sse2) _sse2=yes ;;
2001-11-17 04:53:05 +01:00
esac
2001-11-03 22:25:55 +01:00
done
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
echocheck "CPU vendor"
echores "$pvendor ($pfamily:$pmodel:$pstepping)"
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
echocheck "CPU type"
echores "$pname"
2001-02-24 21:28:24 +01:00
2003-01-31 02:47:55 +01:00
# leaving this here because of the non-x86 optimizations
2002-03-19 19:42:27 +01:00
if test "$_runtime_cpudetection" = yes ; then
2003-01-19 17:42:25 +01:00
if x86; then
_mmx=yes
_3dnow=yes
_3dnowex=yes
_mmx2=yes
_sse=yes
_sse2=yes
_mtrr=yes
fi
2002-05-03 11:43:36 +02:00
_optimizing="Runtime CPU-Detection enabled"
2002-03-19 19:42:27 +01:00
fi
2001-11-05 22:49:20 +01:00
fi
2001-11-13 13:44:32 +01:00
2002-01-17 10:32:22 +01: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 12:16:18 +01:00
case `"$TMPO"` in
2002-01-17 10:32:22 +01: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 19:41:54 +02:00
2002-05-23 16:38:40 +02:00
# x86/x86pc is used by QNX
2001-07-12 17:35:52 +02:00
case "$host_arch" in
2002-06-14 00:44:28 +02:00
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
2001-11-17 04:53:05 +01:00
_def_arch="#define ARCH_X86 1"
_target_arch="TARGET_ARCH_X86 = yes"
case "$pvendor" in
AuthenticAMD)
case "$pfamily" in
3) proc=i386 iproc=386 ;;
4) proc=i486 iproc=486 ;;
2002-06-15 12:08:33 +02:00
5) iproc=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
2003-05-25 02:14:16 +02:00
# K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
2002-06-14 00:44:28 +02:00
proc=k6-3
elif test "$pmodel" -ge 8; then
proc=k6-2
elif test "$pmodel" -ge 6; then
proc=k6
else
proc=i586
iproc=586
fi
;;
6) iproc=686
if test "$pmodel" -ge 7; then
2002-07-09 01:29:02 +02:00
proc=athlon-4
2002-06-14 00:44:28 +02:00
elif test "$pmodel" -ge 6; then
2002-07-09 01:29:02 +02:00
# only Athlon XP supports ssem MP, Duron etc not
2003-01-31 02:47:55 +01:00
# but most of them are CPUID 666, so check if sse detected
2002-07-09 01:29:02 +02:00
# btw. there is also athlon-mp opt, but we need extended
2003-01-31 02:47:55 +01:00
# CPUID to detect if CPU is SMP capable -> athlon-mp ::atmos
2002-07-09 01:29:02 +02:00
if test "$_sse" = yes && test "$pstepping" -ge 2; then
2002-06-14 00:44:28 +02:00
proc=athlon-xp
else
proc=athlon-4
fi
elif test "$pmodel" -ge 4; then
proc=athlon-tbird
else
proc=athlon # TODO: should the Duron Spitfire be considered a Thunderbird instead?
fi
;;
*) proc=athlon-xp iproc=686 ;;
2001-11-17 04:53:05 +01:00
esac
;;
GenuineIntel)
case "$pfamily" in
3) proc=i386 iproc=386 ;;
4) proc=i486 iproc=486 ;;
2002-06-14 00:44:28 +02:00
5) iproc=586
2002-06-15 11:32:11 +02:00
if test "$pmodel" -eq 4 || test "$pmodel" -eq 8; then
2002-06-14 00:44:28 +02:00
proc=pentium-mmx # 4 is desktop, 8 is mobile
else
proc=i586
fi
;;
6) iproc=686
if test "$pmodel" -ge 7; then
proc=pentium3
elif test "$pmodel" -ge 3; then
proc=pentium2
else
proc=i686
fi
;;
15) proc=pentium4 iproc=686 ;;
*) proc=pentium4 iproc=686 ;;
2001-11-17 04:53:05 +01:00
esac
;;
unknown)
case "$pfamily" in
3) proc=i386 iproc=386 ;;
4) proc=i486 iproc=486 ;;
2002-06-14 00:44:28 +02:00
*) proc=i586 iproc=586 ;;
2001-07-12 17:35:52 +02:00
esac
2001-11-17 04:53:05 +01:00
;;
*)
2002-06-14 00:44:28 +02:00
proc=i586 iproc=586 ;;
2001-11-17 04:53:05 +01:00
esac
2001-02-24 21:28:24 +01:00
2003-01-31 02:47:55 +01:00
# check that gcc supports our CPU, if not, fall back to earlier ones
2001-07-12 17:35:52 +02:00
# LGB: check -mcpu and -march swithing step by step with enabling
# to fall back till 386.
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
echocheck "GCC & CPU optimization abilities"
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
2002-03-20 16:28:26 +01:00
if test "$_runtime_cpudetection" = no ; then
2002-06-14 00:44:28 +02:00
if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" || test "$proc" = "athlon-tbird"; then
2001-11-17 04:53:05 +01:00
cc_check -march=$proc -mcpu=$proc || proc=athlon
2001-07-12 17:35:52 +02:00
fi
2002-06-14 00:44:28 +02:00
if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then
cc_check -march=$proc -mcpu=$proc || proc=k6
2001-07-12 17:35:52 +02:00
fi
2002-06-14 00:44:28 +02:00
if test "$proc" = "k6"; then
2003-01-04 20:26:04 +01:00
if not cc_check -march=$proc -mcpu=$proc; then
2002-06-14 00:44:28 +02:00
if cc_check -march=i586 -mcpu=i686; then
proc=i586-i686
else
proc=i586
fi
fi
2001-07-12 17:35:52 +02:00
fi
2002-06-14 00:44:28 +02:00
if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then
cc_check -march=$proc -mcpu=$proc || proc=i686
2001-07-12 17:35:52 +02:00
fi
2002-06-14 00:44:28 +02:00
if test "$proc" = "i686" || test "$proc" = "pentium-mmx"; then
cc_check -march=$proc -mcpu=$proc || proc=i586
2001-07-12 17:35:52 +02:00
fi
2002-06-14 00:44:28 +02:00
if test "$proc" = "i586" ; then
2001-11-17 04:53:05 +01:00
cc_check -march=$proc -mcpu=$proc || proc=i486
2001-07-12 17:35:52 +02:00
fi
2001-10-12 01:41:43 +02:00
if test "$proc" = "i486" ; then
2001-11-17 04:53:05 +01:00
cc_check -march=$proc -mcpu=$proc || proc=i386
2001-07-12 17:35:52 +02:00
fi
2001-10-12 01:41:43 +02:00
if test "$proc" = "i386" ; then
2001-11-17 04:53:05 +01:00
cc_check -march=$proc -mcpu=$proc || proc=error
2001-07-12 17:35:52 +02:00
fi
2001-10-12 01:41:43 +02:00
if test "$proc" = "error" ; then
2003-01-31 02:47:55 +01:00
echores "Your $_cc does not even support \"i386\" for '-march' and '-mcpu'."
2002-03-19 19:42:27 +01:00
_mcpu=""
_march=""
2002-06-14 00:44:28 +02:00
_optimizing=""
elif test "$proc" = "i586-i686"; then
_march="-march=i586"
_mcpu="-mcpu=i686"
_optimizing="$proc"
2002-03-19 19:42:27 +01:00
else
_march="-march=$proc"
_mcpu="-mcpu=$proc"
2002-05-03 11:43:36 +02:00
_optimizing="$proc"
2001-07-12 17:35:52 +02:00
fi
2002-03-19 19:42:27 +01:00
else
2003-01-31 02:47:55 +01:00
# i686 is probably the most common CPU - optimize for it
2002-03-19 19:42:27 +01:00
_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 01:33:39 +01:00
## Gabucino : --target takes effect here (hopefully...) by overwriting
2001-11-17 04:53:05 +01:00
## autodetected mcpu/march parameters
2001-11-14 01:33:39 +01:00
if test "$_target" ; then
2003-01-31 02:47:55 +01:00
# TODO: it may be a good idea to check GCC and fall back in all cases
2002-06-14 00:44:28 +02:00
if test "$host_arch" = "i586-i686"; then
_march="-march=i586"
_mcpu="-mcpu=i686"
else
_march="-march=$host_arch"
_mcpu="-mcpu=$host_arch"
fi
proc="$host_arch"
2002-02-10 12:25:14 +01:00
case "$proc" in
2002-06-14 00:44:28 +02:00
i386) iproc=386 ;;
i486) iproc=486 ;;
i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx) iproc=586 ;;
i686|athlon*|pentium*) iproc=686 ;;
2002-02-10 12:25:14 +01:00
*) iproc=586 ;;
esac
2001-11-14 01:33:39 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$proc"
2001-07-12 17:35:52 +02:00
;;
2002-05-23 16:38:40 +02:00
ia64)
_def_arch='#define ARCH_IA64 1'
_target_arch='TARGET_ARCH_IA64 = yes'
iproc='ia64'
proc=''
_march=''
_mcpu=''
;;
x86_64)
_def_arch='#define ARCH_X86_64 1'
_target_arch='TARGET_ARCH_X86_64 = yes'
iproc='x86_64'
proc=''
_march=''
_mcpu=''
;;
2001-11-17 04:53:05 +01:00
sparc)
_def_arch='#define ARCH_SPARC 1'
_target_arch='TARGET_ARCH_SPARC = yes'
iproc='sparc'
proc='v8'
_march=''
2001-07-12 17:35:52 +02:00
_mcpu="-mcpu=$proc"
;;
2003-06-24 17:54:35 +02:00
arm|armv4l|armv5tel)
2003-06-20 15:18:31 +02:00
_def_arch='#define ARCH_ARMV4L 1'
_target_arch='TARGET_ARCH_ARMV4L = yes'
2001-07-28 07:36:45 +02:00
iproc=arm
2001-11-17 04:53:05 +01:00
proc=''
_march=''
_mcpu=''
2001-07-28 07:36:45 +02:00
;;
2001-11-17 04:53:05 +01:00
ppc)
2002-11-11 10:37:29 +01:00
_def_arch='#define ARCH_POWERPC 1'
_target_arch='TARGET_ARCH_POWERPC = yes'
2001-11-17 04:53:05 +01:00
iproc='ppc'
proc=''
_march=''
_mcpu=''
2003-07-07 18:26:27 +02:00
# XXX: this should be removed imho...
2002-06-06 18:46:05 +02:00
cpu750=`$_cpuinfo | grep "cpu.*750"`
if test -n "$cpu750"; then
2002-06-07 04:44:16 +02:00
_march='-mcpu=750'
_mcpu='-mtune=750'
2002-06-06 18:46:05 +02:00
fi
2003-07-01 17:33:07 +02:00
if linux ; then
2003-07-07 18:26:27 +02:00
proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | head -1`
2003-07-01 17:33:07 +02:00
if test -n "`$_cpuinfo | grep altivec`"; then
_altivec=yes
fi
fi
2003-04-08 18:10:52 +02:00
if darwin ; then
2003-06-17 18:16:47 +02:00
if [ `sysctl -n hw.vectorunit` -eq 1 ]; then
2003-04-08 18:10:52 +02:00
_altivec=yes
fi
fi
2003-07-07 18:26:27 +02:00
if test -n "$proc"; then
case "$proc" in
601) _march='-mcpu=601' _mcpu='-mtune=601' ;;
603) _march='-mcpu=603' _mcpu='-mtune=603' ;;
603e|603ev) _march='-mcpu=603e' _mcpu='-mtune=603e' ;;
604|604e|604r|604ev) _march='-mcpu=604' _mcpu='-mtune=604' ;;
740|740/750|745/755) _march='-mcpu=740' _mcpu='-mtune=740' ;;
750|750CX) _march='-mcpu=750' _mcpu='-mtune=750' ;;
*) ;;
esac
# gcc 3.1(.1) and up supports 7400 and 7450
if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1"; then
case "$proc" in
7400*|7410*) _march='-mcpu=7400' _mcpu='-mtune=7400' ;;
7450*) _march='-mcpu=7450' _mcpu='-mtune=7450' ;;
*) ;;
esac
fi
fi
2001-08-29 13:18:37 +02:00
;;
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
alpha)
_def_arch='#define ARCH_ALPHA 1'
_target_arch='TARGET_ARCH_ALPHA = yes'
iproc='alpha'
_march=''
2002-01-17 10:32:22 +01: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 15:45:38 +02:00
;;
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
mips)
2002-05-23 16:38:40 +02:00
_def_arch='#define ARCH_SGI_MIPS 1'
_target_arch='TARGET_ARCH_SGI_MIPS = yes'
2001-11-17 04:53:05 +01:00
iproc='sgi-mips'
proc=''
_march=''
_mcpu=''
2001-10-24 16:02:19 +02:00
;;
2002-08-09 23:30:21 +02:00
hppa)
_def_arch='#define ARCH_PA_RISC 1'
_target_arch='TARGET_ARCH_PA_RISC = yes'
iproc='PA-RISC'
proc=''
_march=''
_mcpu=''
;;
2002-05-23 16:38:40 +02:00
s390)
_def_arch='#define ARCH_S390 1'
_target_arch='TARGET_ARCH_S390 = yes'
iproc='390'
proc=''
_march=''
_mcpu=''
;;
s390x)
_def_arch='#define ARCH_S390X 1'
_target_arch='TARGET_ARCH_S390X = yes'
iproc='390x'
proc=''
_march=''
_mcpu=''
;;
2001-11-17 04:53:05 +01:00
*)
2001-07-12 17:35:52 +02:00
echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2002-08-04 00:48:41 +02:00
echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2001-10-13 18:53:37 +02:00
die "unsupported architecture $host_arch"
2001-07-12 17:35:52 +02:00
;;
esac
2002-03-19 19:42:27 +01:00
if x86 && test "$_runtime_cpudetection" = no ; then
2001-11-17 04:53:05 +01:00
extcheck() {
if test "$1" = yes ; then
echocheck "kernel support of $2"
cat > $TMPC <<EOF
2002-05-20 02:01:14 +02:00
#include <signal.h>
void catch() { exit(1); }
int main(void){
signal(SIGILL, catch);
__asm__ __volatile__ ("$3":::"memory");return(0);
}
2001-11-17 04:53:05 +01:00
EOF
if ( cc_check && $TMPO ) > /dev/null 2>&1 ; then
echores "yes"
2002-05-03 11:43:36 +02:00
_optimizing="$_optimizing $2"
2001-11-17 04:53:05 +01:00
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!"
2002-09-09 21:01:34 +02:00
return 1
2001-11-17 04:53:05 +01:00
fi
fi
2002-09-09 21:01:34 +02:00
return 0
2001-11-17 04:53:05 +01:00
}
2001-11-21 17:43:33 +01:00
extcheck $_mmx "mmx" "emms" || _mmx=no
2002-05-03 11:43:36 +02:00
extcheck $_mmx2 "mmx2" "sfence" || _mmx2=no
2001-11-21 17:43:33 +01:00
extcheck $_3dnow "3dnow" "femms" || _3dnow=no
extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex=no
2002-09-09 21:01:34 +02:00
extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no _gcc3_ext="$_gcc3_ext -mno-sse"
extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no _gcc3_ext="$_gcc3_ext -mno-sse2"
2001-11-17 04:53:05 +01:00
echocheck "mtrr support"
echores "$_mtrr"
2002-05-03 11:43:36 +02:00
if test "$_mtrr" = yes ; then
_optimizing="$_optimizing mtrr"
fi
2002-09-09 21:01:34 +02:00
if test "$_gcc3_ext" != ""; then
# if we had to disable sse/sse2 because the active kernel does not
# support this instruction set extension, we also have to tell
# gcc3 to not generate sse/sse2 instructions for normal C code
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext"
fi
2001-11-17 04:53:05 +01:00
fi
2001-04-15 22:31:58 +02:00
2001-11-17 04:53:05 +01:00
_prefix="/usr/local"
2003-06-21 03:47:26 +02:00
_xvmclib="XvMCNVIDIA"
2001-08-14 16:34:27 +02:00
2001-11-29 19:56:08 +01: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 04:53:05 +01:00
_libavcodec=auto
2002-08-14 23:43:49 +02:00
_libavcodecso=auto
2002-04-26 19:18:02 +02:00
_fame=auto
2002-04-13 19:28:33 +02:00
_mp1e=no
2001-12-30 14:55:05 +01:00
_mencoder=yes
2001-11-17 04:53:05 +01:00
_x11=auto
2001-11-29 19:56:08 +01:00
_dga=auto # 1 2 no auto
2001-11-17 04:53:05 +01:00
_xv=auto
2003-06-21 03:47:26 +02:00
_xvmc=no #auto when complete
2001-11-17 04:53:05 +01:00
_sdl=auto
2002-09-28 21:03:50 +02:00
_directx=auto
2002-10-25 18:25:41 +02:00
_win32waveout=auto
2001-12-03 02:13:48 +01:00
_nas=auto
2001-11-17 04:53:05 +01:00
_png=auto
2002-03-10 23:49:18 +01:00
_jpg=auto
2002-05-12 03:07:25 +02:00
_gif=auto
2001-11-17 04:53:05 +01:00
_gl=auto
_ggi=auto
_aa=auto
_svga=auto
2002-02-07 03:21:39 +01:00
_vesa=auto
2002-01-06 23:57:58 +01:00
_fbdev=auto
2002-01-17 02:12:01 +01:00
_fbdev_nocopy=no
2001-11-17 04:53:05 +01:00
_dvb=auto
2002-12-28 13:04:58 +01:00
_dvbhead=auto
2002-05-13 15:15:40 +02:00
_dxr2=auto
2001-11-17 04:53:05 +01:00
_dxr3=auto
_iconv=auto
2001-11-20 08:53:20 +01:00
_rtc=auto
2001-11-17 04:53:05 +01:00
_ossaudio=auto
2002-05-28 03:52:40 +02:00
_arts=auto
2002-12-27 17:02:57 +01:00
_esd=auto
2002-10-29 17:50:34 +01:00
_liblzo=auto
2001-11-17 04:53:05 +01:00
_mad=auto
_vorbis=auto
2003-05-11 20:29:07 +02:00
_theora=auto
2003-04-30 13:39:32 +02:00
_matroska=auto
2002-12-04 21:27:36 +01:00
_tremor=no
2002-03-19 00:30:04 +01:00
_faad=auto
2002-12-22 22:01:01 +01:00
_xmms=no
2001-11-17 04:53:05 +01:00
_css=auto
2003-01-22 07:21:50 +01:00
_dvdnav=no
2001-11-17 04:53:05 +01:00
_dvdread=auto
2002-04-21 23:18:28 +02:00
_dvdkit=auto
2001-11-17 04:53:05 +01:00
_xanim=auto
2002-06-09 03:19:48 +02:00
_real=auto
2002-08-05 02:39:07 +02:00
_live=no
2001-11-17 04:53:05 +01:00
_xinerama=auto
_mga=auto
_xmga=auto
_vm=auto
_mlib=auto
_sgiaudio=auto
_sunaudio=auto
_alsa=auto
_fastmemcpy=yes
2002-09-20 03:26:39 +02:00
_unrarlib=yes
2001-11-17 04:53:05 +01:00
_win32=auto
2001-12-10 23:40:14 +01:00
_dshow=yes
2001-11-29 19:56:08 +01:00
_select=yes
2001-12-01 16:05:08 +01:00
_tv=yes
_tv_v4l=auto
2002-03-15 17:10:29 +01:00
_tv_bsdbt848=auto
2002-12-23 01:33:22 +01:00
_edl=yes
2003-05-17 14:24:01 +02:00
_network=yes
2003-06-11 18:48:09 +02:00
_winsock2=auto
2003-03-21 17:06:11 +01:00
_smbsupport=auto
2002-04-24 04:02:50 +02:00
_vidix=auto
2002-02-03 13:43:18 +01:00
_joystick=no
2002-02-12 23:03:44 +01:00
_xvid=auto
2001-11-17 04:53:05 +01:00
_divx4linux=auto
2002-04-10 12:19:43 +02:00
_opendivx=no
2001-11-17 12:26:26 +01:00
_lirc=auto
2003-05-30 20:23:55 +02:00
_lircc=auto
2001-11-17 04:53:05 +01:00
_gui=no
2001-11-17 10:57:54 +01:00
_termcap=auto
2001-11-19 17:42:01 +01:00
_termios=auto
2001-11-17 04:53:05 +01:00
_3dfx=no
_tdfxfb=no
2003-03-07 19:45:02 +01:00
_tdfxvid=no
2001-12-03 02:09:36 +01:00
_directfb=auto
2002-08-06 16:23:23 +02:00
_zr=auto
2002-09-09 00:41:53 +02:00
_bl=no
2001-11-17 23:50:30 +01:00
_largefiles=no
2003-02-21 00:32:47 +01:00
#_language=en
2001-11-19 16:54:43 +01:00
_shm=auto
2002-02-22 14:47:31 +01:00
_linux_devfs=no
2002-10-02 11:24:34 +02:00
_i18n=auto
2002-11-11 19:25:02 +01:00
_dynamic_plugins=no
2002-08-16 00:52:52 +02:00
_setlocale=auto
2002-03-27 04:45:55 +01:00
_sighandler=yes
2002-04-13 18:51:01 +02:00
_libdv=auto
2002-06-11 16:29:51 +02:00
_cdparanoia=auto
2002-08-05 03:31:47 +02:00
_big_endian=auto
2002-12-29 00:52:22 +01:00
_freetype=auto
2002-10-28 20:31:04 +01:00
_shared_pp=no
2002-12-07 00:54:02 +01:00
_new_conf=yes
2002-11-15 00:49:05 +01:00
_menu=no
2003-05-29 13:50:23 +02:00
_qtx=auto
2003-02-19 18:26:59 +01:00
_macosx=auto
2002-12-05 01:05:57 +01:00
_sortsub=yes
2002-12-29 15:35:18 +01:00
_freetypeconfig='freetype-config'
2003-03-21 17:54:03 +01:00
_fribidi=no
_fribidiconfig='fribidi-config'
2003-03-26 12:35:13 +01:00
_inet6=auto
_gethostbyname2=auto
2001-11-17 04:53:05 +01:00
for ac_option do
case "$ac_option" in
# Skip 1st pass
--target=*) ;;
--cc=*) ;;
--as=*) ;;
2002-02-10 12:25:14 +01:00
--enable-gcc-checking) ;;
2001-11-17 04:53:05 +01:00
--disable-gcc-checking) ;;
2001-11-19 02:03:11 +01:00
--enable-static*) ;;
2001-11-19 01:38:41 +01:00
--disable-static*) ;;
2001-11-17 04:53:05 +01:00
--with-extraincdir=*) ;;
--with-extralibdir=*) ;;
2002-03-19 19:42:27 +01:00
--enable-runtime-cpudetection) ;;
--disable-runtime-cpudetection) ;;
2002-12-05 00:29:41 +01:00
--install-path=*) ;;
2001-11-19 01:38:41 +01:00
2001-11-17 04:53:05 +01:00
# Real 2nd pass
2001-11-23 01:21:51 +01:00
--enable-mencoder) _mencoder=yes ;;
--disable-mencoder) _mencoder=no ;;
2002-03-15 21:48:42 +01:00
--enable-i18n) _i18n=yes ;;
--disable-i18n) _i18n=no ;;
2002-11-11 19:25:02 +01:00
--enable-dynamic-plugins) _dynamic_plugins=yes ;;
--disable-dynamic-plugins) _dynamic_plugins=no ;;
2002-08-16 00:52:52 +02:00
--enable-setlocale) _setlocale=yes ;;
--disable-setlocale) _setlocale=no ;;
2001-11-17 04:53:05 +01:00
--enable-x11) _x11=yes ;;
--disable-x11) _x11=no ;;
--enable-xv) _xv=yes ;;
--disable-xv) _xv=no ;;
2003-06-21 03:47:26 +02:00
--enable-xvmc) _xvmc=yes ;;
--disable-xvmc) _xvmc=no ;;
2001-11-17 04:53:05 +01:00
--enable-sdl) _sdl=yes ;;
--disable-sdl) _sdl=no ;;
2002-09-28 21:03:50 +02:00
--enable-directx) _directx=yes ;;
--disable-directx) _directx=no ;;
2002-10-25 18:25:41 +02:00
--enable-win32waveout) _win32waveout=yes ;;
--disable-win32waveout) _win32waveout=no ;;
2001-12-03 02:13:48 +01:00
--enable-nas) _nas=yes ;;
--disable-nas) _nas=no ;;
2001-11-17 04:53:05 +01:00
--enable-png) _png=yes ;;
--disable-png) _png=no ;;
2002-03-10 23:49:18 +01:00
--enable-jpeg) _jpg=yes ;;
--disable-jpeg) _jpg=no ;;
2002-05-12 03:07:25 +02:00
--enable-gif) _gif=yes ;;
--disable-gif) _gif=no ;;
2001-11-17 04:53:05 +01: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 03:21:39 +01:00
--enable-vesa) _vesa=yes ;;
--disable-vesa) _vesa=no ;;
2001-11-17 04:53:05 +01:00
--enable-fbdev) _fbdev=yes ;;
2002-01-17 02:12:01 +01:00
--enable-fbdev=nocopy) _fbdev=yes; _fbdev_nocopy=yes ;;
2001-11-17 04:53:05 +01:00
--disable-fbdev) _fbdev=no ;;
--enable-dvb) _dvb=yes ;;
--disable-dvb) _dvb=no ;;
2002-12-28 13:04:58 +01:00
--enable-dvbhead) _dvbhead=yes ;;
--disable-dvbhead) _dvbhead=no ;;
2002-05-13 15:15:40 +02:00
--enable-dxr2) _dxr2=yes ;;
--disable-dxr2) _dxr2=no ;;
2001-11-17 04:53:05 +01:00
--enable-dxr3) _dxr3=yes ;;
--disable-dxr3) _dxr3=no ;;
--enable-iconv) _iconv=yes ;;
--disable-iconv) _iconv=no ;;
2001-11-20 08:53:20 +01:00
--enable-rtc) _rtc=yes ;;
--disable-rtc) _rtc=no ;;
2001-12-28 22:07:39 +01:00
--enable-mp1e) _mp1e=yes ;;
2001-12-10 15:41:44 +01:00
--disable-mp1e) _mp1e=no ;;
2002-04-13 18:51:01 +02:00
--enable-libdv) _libdv=yes ;;
--disable-libdv) _libdv=no ;;
2001-11-17 04:53:05 +01:00
--enable-ossaudio) _ossaudio=yes ;;
--disable-ossaudio) _ossaudio=no ;;
2002-05-28 03:52:40 +02:00
--enable-arts) _arts=yes ;;
--disable-arts) _arts=no ;;
2002-12-27 17:02:57 +01:00
--enable-esd) _esd=yes ;;
--disable-esd) _esd=no ;;
2001-11-17 04:53:05 +01:00
--enable-mad) _mad=yes ;;
--disable-mad) _mad=no ;;
2002-10-29 17:50:34 +01:00
--enable-liblzo) _liblzo=yes ;;
--disable-liblzo) _liblzo=no ;;
2001-11-17 04:53:05 +01:00
--enable-vorbis) _vorbis=yes ;;
--disable-vorbis) _vorbis=no ;;
2002-12-04 21:27:36 +01:00
--enable-tremor) _tremor=yes ;;
--disable-tremor) _tremor=no ;;
2003-05-11 20:29:07 +02:00
--enable-theora) _theora=yes ;;
--disable-theora) _theora=no ;;
2003-04-30 13:39:32 +02:00
--enable-matroska) _matroska=yes ;;
--disable-matroska) _matroska=no ;;
2002-03-19 00:30:04 +01:00
--enable-faad) _faad=yes ;;
--disable-faad) _faad=no ;;
2002-12-22 22:01:01 +01:00
--enable-xmms) _xmms=yes ;;
2001-11-17 04:53:05 +01:00
--enable-css) _css=yes ;;
--disable-css) _css=no ;;
--enable-dvdread) _dvdread=yes ;;
--disable-dvdread) _dvdread=no ;;
2002-04-21 23:18:28 +02:00
--enable-mpdvdkit) _dvdkit=yes ;;
--disable-mpdvdkit) _dvdkit=no ;;
2002-04-16 19:29:04 +02:00
--enable-dvdnav) _dvdnav=yes ;;
--disable-dvdnav) _dvdnav=no ;;
2001-11-17 04:53:05 +01:00
--enable-xanim) _xanim=yes ;;
--disable-xanim) _xanim=no ;;
2002-06-09 03:19:48 +02:00
--enable-real) _real=yes ;;
--disable-real) _real=no ;;
2002-08-05 02:39:07 +02:00
--enable-live) _live=yes ;;
--disable-live) _live=no ;;
2001-11-17 04:53:05 +01:00
--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-12-23 01:33:22 +01:00
--enable-edl) _edl=yes ;;
--disable-edl) _edl=no ;;
2002-03-15 17:10:29 +01:00
--enable-tv-bsdbt848) _tv_bsdbt848=yes ;;
--disable-tv-bsdbt848) _tv_bsdbt848=no ;;
2001-12-01 16:05:08 +01:00
--enable-tv-v4l) _tv_v4l=yes ;;
--disable-tv-v4l) _tv_v4l=no ;;
2001-11-17 04:53:05 +01:00
--enable-fastmemcpy) _fastmemcpy=yes ;;
--disable-fastmemcpy) _fastmemcpy=no ;;
2003-05-17 14:24:01 +02:00
--enable-network) _network=yes ;;
--disable-network) _network=no ;;
2003-06-11 18:48:09 +02:00
--enable-winsock2) _winsock2=yes ;;
--disable-winsock2) _winsock2=no ;;
2003-03-21 17:06:11 +01:00
--enable-smb) _smbsupport=yes ;;
--disable-smb) _smbsupport=no ;;
2002-01-11 18:20:43 +01:00
--enable-vidix) _vidix=yes ;;
--disable-vidix) _vidix=no ;;
2002-02-05 23:57:17 +01:00
--enable-joystick) _joystick=yes ;;
--disable-joystick) _joystick=no ;;
2002-02-12 23:03:44 +01:00
--enable-xvid) _xvid=yes ;;
--disable-xvid) _xvid=no ;;
2001-11-17 04:53:05 +01:00
--enable-divx4linux) _divx4linux=yes ;;
--disable-divx4linux) _divx4linux=no ;;
2002-02-03 01:52:51 +01:00
--enable-opendivx) _opendivx=yes ;;
--disable-opendivx) _opendivx=no ;;
2002-04-26 19:18:02 +02:00
--enable-libavcodec) _libavcodec=yes ;;
--disable-libavcodec) _libavcodec=no ;;
--enable-libfame) _fame=yes ;;
--disable-libfame) _fame=no ;;
2001-11-17 04:53:05 +01:00
--enable-lirc) _lirc=yes ;;
--disable-lirc) _lirc=no ;;
2003-05-30 20:23:55 +02:00
--enable-lircc) _lircc=yes ;;
--disable-lircc) _lircc=no ;;
2001-11-17 04:53:05 +01:00
--enable-gui) _gui=yes ;;
--disable-gui) _gui=no ;;
--enable-termcap) _termcap=yes ;;
--disable-termcap) _termcap=no ;;
2001-11-19 17:42:01 +01:00
--enable-termios) _termios=yes ;;
--disable-termios) _termios=no ;;
2001-11-17 04:53:05 +01:00
--enable-3dfx) _3dfx=yes ;;
--disable-3dfx) _3dfx=no ;;
--enable-tdfxfb) _tdfxfb=yes ;;
2003-03-07 19:45:02 +01:00
--disable-tdfxvid) _tdfxvid=no ;;
--enable-tdfxvid) _tdfxvid=yes ;;
2001-11-17 04:53:05 +01:00
--disable-tdfxfb) _tdfxfb=no ;;
2001-12-03 02:09:36 +01:00
--enable-directfb) _directfb=yes ;;
--disable-directfb) _directfb=no ;;
2002-01-17 02:27:20 +01:00
--enable-zr) _zr=yes ;;
2002-02-05 23:57:17 +01:00
--disable-zr) _zr=no ;;
2002-09-09 00:41:53 +02:00
--enable-bl) _bl=yes ;;
--disable-bl) _bl=no ;;
2001-11-17 04:53:05 +01:00
--enable-mtrr) _mtrr=yes ;;
--disable-mtrr) _mtrr=no ;;
2001-11-17 23:50:30 +01:00
--enable-largefiles) _largefiles=yes ;;
2001-11-18 00:19:02 +01:00
--disable-largefiles) _largefiles=no ;;
2001-11-19 16:54:43 +01:00
--enable-shm) _shm=yes ;;
--disable-shm) _shm=no ;;
2001-11-29 19:56:08 +01:00
--enable-select) _select=yes ;;
--disable-select) _select=no ;;
2002-02-22 14:47:31 +01:00
--enable-linux-devfs) _linux_devfs=yes ;;
--disable-linux-devfs) _linux_devfs=no ;;
2002-06-11 16:29:51 +02:00
--enable-cdparanoia) _cdparanoia=yes ;;
--disable-cdparanoia) _cdparanoia=no ;;
2002-08-05 03:31:47 +02:00
--enable-big-endian) _big_endian=yes ;;
--disable-big-endian) _big_endian=no ;;
2002-08-28 22:52:02 +02:00
--enable-freetype) _freetype=yes ;;
--disable-freetype) _freetype=no ;;
2003-01-29 12:45:42 +01:00
--enable-unrarlib) _unrarlib=yes ;;
2002-09-20 03:26:39 +02:00
--disable-unrarlib) _unrarlib=no ;;
2001-11-17 12:26:26 +01:00
2003-03-21 17:54:03 +01:00
--enable-fribidi) _fribidi=yes ;;
--disable-fribidi) _fribidi=no ;;
2003-03-26 12:35:13 +01:00
--enable-inet6) _inet6=yes ;;
--disable-inet6) _inet6=no ;;
--enable-gethostbyname2) _gethostbyname2=yes ;;
--disable-gethostbyname2) _gethostbyname2=no ;;
2001-11-29 19:56:08 +01: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 16:22:23 +02:00
2002-10-28 20:31:04 +01:00
--enable-shared-pp) _shared_pp=yes ;;
--disable-shared-pp) _shared_pp=no ;;
2002-11-12 02:56:42 +01:00
--enable-new-conf) _new_conf=yes ;;
--disable-new-conf) _new_conf=no ;;
2002-11-15 00:49:05 +01:00
--enable-menu) _menu=yes ;;
--disable-menu) _menu=no ;;
2003-05-29 13:50:23 +02:00
--enable-qtx) _qtx=yes ;;
--disable-qtx) _qtx=no ;;
2002-11-16 04:06:55 +01:00
2003-02-19 18:26:59 +01:00
--enable-macosx) _macosx=yes ;;
--disable-macosx) _macosx=no ;;
2002-12-05 01:05:57 +01:00
--enable-sortsub) _sortsub=yes ;;
--disable-sortsub) _sortsub=no ;;
2001-11-17 04:53:05 +01:00
--language=*)
2003-02-21 00:32:47 +01:00
_language=`echo $ac_option | cut -d '=' -f 2`
2001-11-17 04:53:05 +01:00
;;
2002-03-28 21:40:21 +01:00
--with-libdvdnav=*)
_dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
_dvdnav=yes
;;
2001-02-24 21:28:24 +01:00
2003-05-18 12:49:54 +02:00
--with-codecsdir=*)
_win32libdir=`echo $ac_option | cut -d '=' -f 2`
_xanimlibdir=`echo $ac_option | cut -d '=' -f 2`
_reallibdir=`echo $ac_option | cut -d '=' -f 2`
;;
2001-11-17 04:53:05 +01: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
;;
2002-06-13 02:14:28 +02:00
--with-reallibdir=*)
_reallibdir=`echo $ac_option | cut -d '=' -f 2`
_real=yes
;;
2002-08-05 02:39:07 +02:00
--with-livelibdir=*)
_livelibdir=`echo $ac_option | cut -d '=' -f 2`
_live=yes
;;
2001-11-17 04:53:05 +01:00
--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 22:12:41 +02:00
2002-12-22 22:01:01 +01:00
--with-xmmslibdir=*)
_xmmslibdir=`echo $ac_option | cut -d '=' -f 2`
;;
--with-xmmsplugindir=*)
_xmmsplugindir=`echo $ac_option | cut -d '=' -f 2`
;;
2002-02-10 12:25:14 +01:00
--disable-profile)
_profile=
;;
2001-11-17 04:53:05 +01: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 04:45:55 +01:00
--disable-sighandler)
_sighandler=no
;;
2001-06-05 04:26:56 +02:00
2001-11-17 04:53:05 +01:00
--enable-sse) _sse=yes ;;
--disable-sse) _sse=no ;;
2001-12-28 19:29:12 +01:00
--enable-sse2) _sse2=yes ;;
--disable-sse2) _sse2=no ;;
2001-11-17 04:53:05 +01: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 ;;
2002-11-11 10:37:29 +01:00
--enable-altivec) _altivec=yes ;;
--disable-altivec) _altivec=no ;;
2001-11-17 04:53:05 +01:00
--enable-mmx) _mmx=yes ;;
2003-01-31 02:47:55 +01:00
--disable-mmx) # 3Dnow! and MMX2 require MMX
2001-11-17 04:53:05 +01:00
_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 22:31:58 +02:00
2001-11-17 04:53:05 +01: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-05-13 15:15:40 +02:00
--with-dxr2incdir=*)
_inc_dxr2=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
;;
2003-06-21 03:47:26 +02:00
--with-xvmclib=*)
_xvmclib=`echo $ac_option | cut -d '=' -f 2`
;;
2002-02-12 23:03:44 +01:00
--with-xvidcore=*)
_xvidcore=`echo $ac_option | cut -d '=' -f 2`
;;
2001-11-17 04:53:05 +01:00
--with-sdl-config=*)
_sdlconfig=`echo $ac_option | cut -d '=' -f 2`
;;
2002-09-02 20:43:01 +02:00
--with-freetype-config=*)
_freetypeconfig=`echo $ac_option | cut -d '=' -f 2`
;;
2003-03-21 17:54:03 +01:00
--with-fribidi-config=*)
_fribidiconfig=`echo $ac_option | cut -d '=' -f 2`
;;
2001-11-17 04:53:05 +01:00
--with-gtk-config=*)
_gtkconfig=`echo $ac_option | cut -d '=' -f 2`
;;
--with-glib-config=*)
_glibconfig=`echo $ac_option | cut -d '=' -f 2`
;;
2002-06-16 01:55:06 +02:00
--with-dvdnav-config=*)
_dvdnavconfig=`echo $ac_option | cut -d '=' -f 2`
;;
2001-11-17 04:53:05 +01:00
--with-madlibdir=*)
_ld_mad=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
;;
2002-06-11 16:29:51 +02:00
--with-cdparanoiaincdir=*)
_inc_cdparanoia=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
;;
--with-cdparanoialibdir=*)
_ld_cdparanoia=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
;;
2001-04-15 22:31:58 +02:00
2001-11-17 04:53:05 +01:00
--prefix=*)
_prefix=`echo $ac_option | cut -d '=' -f 2`
;;
2002-09-01 16:40:09 +02:00
--bindir=*)
_bindir=`echo $ac_option | cut -d '=' -f 2`
;;
2001-11-17 04:53:05 +01:00
--datadir=*)
_datadir=`echo $ac_option | cut -d '=' -f 2`
;;
2002-09-01 16:40:09 +02:00
--mandir=*)
_mandir=`echo $ac_option | cut -d '=' -f 2`
;;
2001-12-25 22:58:10 +01:00
--confdir=*)
_confdir=`echo $ac_option | cut -d '=' -f 2`
;;
2002-05-08 18:41:44 +02:00
--libdir=*)
_libdir=`echo $ac_option | cut -d '=' -f 2`
;;
2001-11-17 12:26:26 +01:00
2001-11-17 04:53:05 +01:00
*)
echo "Unknown parameter: $ac_option"
2002-11-11 02:11:58 +01:00
exit 1
2001-11-17 04:53:05 +01:00
;;
2001-04-15 22:31:58 +02:00
2001-11-17 04:53:05 +01:00
esac
done
2001-10-22 09:43:32 +02:00
2001-11-17 04:53:05 +01:00
# Atmos: moved this here, to be correct, if --prefix is specified
2002-09-01 16:40:09 +02:00
test -z "$_bindir" && _bindir="$_prefix/bin"
2002-02-05 23:57:17 +01:00
test -z "$_datadir" && _datadir="$_prefix/share/mplayer"
2002-09-01 16:40:09 +02:00
test -z "$_mandir" && _mandir="$_prefix/man"
2002-08-28 13:20:48 +02:00
test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
2002-04-24 22:00:13 +02:00
test -z "$_libdir" && _libdir="$_prefix/lib"
2002-02-05 23:57:17 +01:00
test -z "$_mlibdir" && _mlibdir="$MLIBHOME"
2001-10-10 15:07:42 +02:00
2001-11-19 13:04:19 +01:00
if x86 ; then
2001-11-17 04:53:05 +01: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 15:07:42 +02:00
2001-11-17 04:53:05 +01: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 02:06:40 +02:00
fi
2001-04-15 22:31:58 +02:00
2001-11-17 04:53:05 +01: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 19:29:12 +01:00
_def_sse2='#undef HAVE_SSE2'
test "$_sse2" = yes && _def_sse2='#define HAVE_SSE2 1'
2002-11-11 10:37:29 +01:00
_def_altivec='#undef HAVE_ALTIVEC'
test "$_altivec" = yes && _def_altivec='#define HAVE_ALTIVEC 1'
2001-03-08 13:30:42 +01:00
2001-11-17 04:53:05 +01:00
# Checking kernel version...
2001-11-19 13:04:19 +01:00
if x86 && linux ; then
2001-11-17 04:53:05 +01: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"
2002-08-04 00:48:41 +02:00
echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
echo "supports SSE, but you have been warned! If you are using a kernel older than"
echo "2.2.x you must upgrade it to get SSE support!"
2003-01-31 02:47:55 +01:00
# die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2001-11-17 04:53:05 +01:00
else
echores "$kernel_version, ok"
fi
fi
2001-03-28 21:58:45 +02:00
2002-04-24 04:02:50 +02:00
if test "$_vidix" = auto ; then
_vidix=no
2003-01-31 02:47:55 +01:00
# should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2002-04-24 04:02:50 +02:00
x86 && _vidix=yes
2003-02-15 22:51:24 +01:00
ppc && linux && _vidix=yes
2002-04-26 17:35:00 +02:00
cygwin && _vidix=no
2003-04-21 23:07:35 +02:00
mingw32 && _vidix=no
2002-06-13 13:53:22 +02:00
qnx && _vidix=no
2002-10-24 20:12:40 +02:00
sunos && _vidix=no
2002-04-24 04:02:50 +02:00
fi
2002-11-07 22:15:47 +01:00
# On QNX we must link to libph - Gabucino
if qnx ; then
_ld_arch="$_ld_arch -lph"
fi
2002-01-15 15:49:36 +01:00
# checking for a working awk, I'm using mawk first, because it's fastest - atmos
_awk=
2002-01-12 16:53:26 +01:00
if test "$_vidix" = yes ; then
2002-01-15 23:30:56 +01:00
_awk_verc_fail=yes
echocheck "awk"
2002-01-15 15:49:36 +01:00
for _awk in mawk gawk nawk awk; do
2002-01-15 23:48:27 +01:00
if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2002-01-15 23:30:56 +01:00
_awk_verc_fail=no
2002-01-15 15:49:36 +01:00
break
fi
done
2002-01-15 23:30:56 +01:00
test "$_awk_verc_fail" = yes && _awk=no
echores "$_awk"
if test "$_awk_verc_fail" = yes; then
2002-08-04 00:48:41 +02:00
echo "VIDIX needs awk, but no working implementation was found!"
echo "Try the GNU version, which can be downloaded from:"
2002-01-12 22:07:17 +01:00
echo "ftp://ftp.gnu.org/gnu/gawk/"
2002-08-04 00:48:41 +02:00
echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2002-04-24 04:02:50 +02:00
die "no awk"
2002-01-12 16:53:26 +01:00
fi
fi
2001-03-28 21:58:45 +02:00
2002-12-05 00:29:41 +01:00
# If IRIX we must use ar instead of ranlib (not present on IRIX systems)
if irix ; then
_ranlib='ar -r'
fi
2001-08-25 23:05:23 +02:00
2001-11-17 04:53:05 +01:00
######################
# MAIN TESTS GO HERE #
######################
2001-08-25 23:05:23 +02:00
2001-11-28 18:52:25 +01:00
echocheck "extra headers"
2002-03-26 04:09:57 +01:00
if test "$_inc_extra" ; then
echores "$_inc_extra"
2001-11-28 18:52:25 +01:00
else
echores "none"
fi
2001-08-06 02:07:53 +02:00
2001-11-17 04:53:05 +01:00
2001-11-28 18:52:25 +01:00
echocheck "extra libs"
2002-03-26 04:09:57 +01:00
if test "$_ld_extra" ; then
echores "$_ld_extra"
2001-11-28 18:52:25 +01:00
else
echores "none"
fi
2001-08-20 23:20:03 +02:00
2001-08-24 18:20:04 +02:00
2002-03-15 21:48:42 +01:00
# Checking for localization ...
# CSAK EGY MARADHAT - A HEGYLAKO
echocheck "i18n"
2003-02-07 19:56:55 +01:00
if test "$_i18n" != no ; then
2002-03-15 21:48:42 +01:00
cat > $TMPC <<EOF
#include <libintl.h>
int main(void) { gettext("test"); return 0; }
EOF
_i18n=no
2003-02-07 19:56:55 +01:00
_i18n_libs=""
2003-02-07 23:39:56 +01:00
if test "$_i18n" = auto ; then
cc_check && _i18n=yes
else
for i18n_lib in "" "-lintl"; do
cc_check $i18n_lib && _i18n=yes && _i18n_libs=$i18n_lib && break
done
fi
2002-03-15 21:48:42 +01:00
fi
if test "$_i18n" = yes ; then
_def_i18n='#define USE_I18N 1'
else
_def_i18n='#undef USE_I18N'
fi
2003-02-13 20:13:50 +01:00
if test -z "$_i18n_libs" ; then
2003-02-07 19:56:55 +01:00
echores "$_i18n"
else
echores "$_i18n (using $_i18n_libs)"
fi
2002-03-15 21:48:42 +01:00
2002-08-16 00:52:52 +02:00
# Checking for setlocale() ...
# CSAK EGY MARADHAT - A HEGYLAKO
# Nemnem. a TV Maci !
echocheck "setlocale()"
if test "$_setlocale" = auto ; then
cat > $TMPC <<EOF
#include <locale.h>
int main(void) { setlocale( LC_ALL,"" ); return 0; }
EOF
_setlocale=no
cc_check && _setlocale=yes
fi
if test "$_setlocale" = yes ; then
_def_setlocale='#define USE_SETLOCALE 1'
else
_def_setlocale='#undef USE_SETLOCALE'
fi
echores "$_setlocale"
2002-03-15 21:48:42 +01:00
echocheck "language"
2003-02-21 00:32:47 +01:00
test -z "$_language" && _language=$LINGUAS
_language=`echo $_language | sed 's/,/ /g'`
2003-03-13 00:57:23 +01:00
echo $_language | grep all > /dev/null || LANGUAGES="$_language en"
2003-02-21 00:32:47 +01:00
for i in $_language ; do
test "$i" = all && i=en
if test -f "help/help_mp-${i}.h" ; then
_language=$i
break
else
echo -n "$i not found, "
_language=`echo $_language | sed "s/$i *//g"`
fi
done
test -z "$_language" && _language=en
for i in $LANGUAGES ; do
if test -f "DOCS/$i/mplayer.1" ; then
LANGUAGES=`echo $LANGUAGES | sed "s/$i *//2" | sed 's/ *$//'`
else
LANGUAGES=`echo $LANGUAGES | sed "s/$i *//g" | sed 's/ *$//'`
fi
done
echores "using $_language (man pages: $LANGUAGES)"
_mp_help="help/help_mp-${_language}.h"
2002-09-22 18:31:21 +02:00
test -f $_mp_help || die "$_mp_help not found"
2002-03-15 21:48:42 +01:00
2002-03-27 04:45:55 +01: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 21:48:42 +01:00
2002-03-15 23:16:02 +01: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"
2002-11-11 19:25:02 +01:00
2002-07-06 17:20:10 +02:00
echocheck "restrict keyword"
for restrict_keyword in restrict __restrict __restrict__ ; do
echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
if cc_check; then
_def_restrict_keyword=$restrict_keyword
break;
fi
done
if [ -n "$_def_restrict_keyword" ]; then
echores "$_def_restrict_keyword"
else
echores "none"
fi
2002-03-15 23:16:02 +01:00
2002-11-11 19:25:02 +01:00
2001-11-17 04:53:05 +01:00
echocheck "kstat"
2001-08-24 18:20:04 +02:00
cat > $TMPC << EOF
2001-11-20 17:16:47 +01:00
#include <kstat.h>
int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2001-08-24 18:20:04 +02:00
EOF
2001-11-17 04:53:05 +01:00
_kstat=no
cc_check -lkstat && _kstat=yes
if test "$_kstat" = yes ; then
2001-11-22 11:06:30 +01:00
_ld_arch="-lkstat $_ld_arch"
2001-11-17 04:53:05 +01: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 18:20:04 +02:00
2001-11-17 04:53:05 +01:00
echocheck "posix4"
2001-11-20 17:16:47 +01:00
# required for nanosleep on some systems
2001-11-17 12:46:09 +01:00
cat > $TMPC << EOF
2001-11-20 17:16:47 +01:00
#include <time.h>
int main(void) { (void) nanosleep(0, 0); return 0; }
2001-11-17 12:46:09 +01:00
EOF
2001-11-17 04:53:05 +01:00
_posix4=no
cc_check -lposix4 && _posix4=yes
if test "$_posix4" = yes ; then
2001-11-22 11:06:30 +01:00
_ld_arch="-lposix4 $_ld_arch"
2001-11-17 04:53:05 +01:00
fi
echores "$_posix4"
2001-06-05 20:40:44 +02:00
2001-08-24 18:20:04 +02:00
2002-11-05 08:34:55 +01:00
echocheck "lrintf"
cat > $TMPC << EOF
#include <math.h>
int main(void) { (void) lrintf(0.0); return 0; }
EOF
_lrintf=no
cc_check -lm && _lrintf=yes
if test "$_lrintf" = yes ; then
_def_lrintf="#define HAVE_LRINTF 1"
else
_def_lrintf="#undef HAVE_LRINTF"
fi
echores "$_lrintf"
2001-11-23 19:25:09 +01: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 04:53:05 +01:00
echocheck "socklib"
# for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
cat > $TMPC << EOF
2001-11-20 17:16:47 +01:00
#include <netdb.h>
int main(void) { (void) gethostbyname(0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
2001-12-29 01:09:10 +01:00
cc_check -lsocket && _ld_sock="-lsocket"
cc_check -lnsl && _ld_sock="-lnsl"
cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl"
2003-06-11 18:48:09 +02:00
if test $_winsock2 = auto && not cygwin ; then
_winsock2=no
cat > $TMPC << EOF
#include <winsock2.h>
int main(void) { (void) gethostbyname(0); return 0; }
EOF
cc_check -lws2_32 && _ld_sock="-lws2_32" && _winsock2=yes
fi
2001-11-17 10:57:54 +01:00
if test "$_ld_sock" ; then
2001-12-01 18:17:32 +01:00
echores "yes (using $_ld_sock)"
2001-11-17 10:57:54 +01:00
else
2001-12-01 18:17:32 +01:00
echores "no"
2001-11-17 10:57:54 +01:00
fi
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
2003-06-11 18:48:09 +02:00
if test $_winsock2 = yes ; then
_ld_sock="-lws2_32"
_def_winsock2='#define HAVE_WINSOCK2 1'
else
_def_winsock2='#undef HAVE_WINSOCK2'
fi
2002-08-29 09:07:12 +02:00
_use_aton=no
2001-12-30 20:38:28 +01: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
2003-06-11 18:48:09 +02:00
if test "$_winsock2" = yes ; then
echores "not needed (using winsock2 functions)"
elif cc_check $_ld_sock ; then
2001-12-30 20:38:28 +01:00
# 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
2002-08-29 09:07:12 +02:00
echores "no (=> i'll try inet_aton next)"
echocheck "inet_aton()"
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int main(void) { (void) inet_aton(0, 0); return 0; }
EOF
_use_aton=yes
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
_use_aton=no
2003-05-17 14:24:01 +02:00
_network=no
echores "no (=> network support disabled)"
2002-08-29 09:07:12 +02:00
fi
2001-12-30 20:38:28 +01:00
fi
2002-08-29 09:07:12 +02:00
_def_use_aton='#undef USE_ATON'
if test "$_use_aton" != no; then
_def_use_aton='#define USE_ATON 1'
fi
2002-03-15 21:48:42 +01:00
2002-11-11 19:25:02 +01:00
2002-01-06 14:06:51 +01:00
echocheck "inttypes.h (required)"
2001-12-31 16:29:46 +01:00
cat > $TMPC << EOF
2002-01-06 14:06:51 +01:00
#include <inttypes.h>
2001-12-31 16:29:46 +01:00
int main(void) { return 0; }
EOF
2002-01-06 14:06:51 +01:00
_inttypes=no
cc_check && _inttypes=yes
if test "$_inttypes" = yes ; then
# nothing to do
:
2001-12-31 16:29:46 +01:00
else
2003-06-13 03:25:11 +02:00
die "cannot find header inttypes.h (see DOCS/en/faq.html)"
2001-12-31 16:29:46 +01:00
fi
2002-01-06 14:06:51 +01:00
echores "$_inttypes"
2001-12-31 16:29:46 +01:00
2002-11-11 19:25:02 +01:00
2002-09-16 21:37:57 +02:00
echocheck "word size"
_mp_wordsize="#undef MP_WORDSIZE"
cat > $TMPC << EOF
#include <stdio.h>
#include <sys/types.h>
int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
EOF
cc_check && _wordsize=`$TMPO` && _mp_wordsize="#define MP_WORDSIZE $_wordsize"
echores "$_wordsize"
2001-12-31 16:29:46 +01:00
2002-11-11 19:25:02 +01:00
2002-04-23 18:29:13 +02:00
echocheck "stddef.h"
cat > $TMPC << EOF
#include <stddef.h>
int main(void) { return 0; }
EOF
_stddef=no
cc_check && _stddef=yes
if test "$_stddef" = yes ; then
_def_stddef='#define HAVE_STDDEF_H 1'
else
_def_stddef='#undef HAVE_STDDEF_H'
fi
echores "$_stddef"
2001-11-17 04:53:05 +01:00
echocheck "malloc.h"
2001-07-12 17:35:52 +02:00
cat > $TMPC << EOF
#include <malloc.h>
2001-11-20 17:16:47 +01:00
int main(void) { (void) malloc(0); return 0; }
2001-07-12 17:35:52 +02:00
EOF
2001-11-17 04:53:05 +01: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
2002-07-04 00:17:33 +02:00
# malloc.h emits a warning in FreeBSD and OpenBSD
2002-05-12 04:18:52 +02:00
(freebsd || openbsd) && _def_malloc='#undef HAVE_MALLOC_H'
2001-11-17 04:53:05 +01:00
echores "$_malloc"
2001-11-09 03:02:58 +01:00
2001-11-17 04:53:05 +01:00
echocheck "memalign()"
2001-11-09 03:02:58 +01:00
# XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
cat > $TMPC << EOF
2001-08-24 16:49:05 +02:00
#include <malloc.h>
2001-11-20 17:16:47 +01:00
int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2001-08-24 16:49:05 +02:00
EOF
2001-11-09 03:02:58 +01:00
_memalign=no
cc_check && _memalign=yes
2001-11-17 04:53:05 +01:00
if test "$_memalign" = yes ; then
_def_memalign='#define HAVE_MEMALIGN 1'
else
_def_memalign='#undef HAVE_MEMALIGN'
fi
echores "$_memalign"
2001-11-09 03:02:58 +01:00
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
echocheck "alloca.h"
2001-07-12 17:35:52 +02:00
cat > $TMPC << EOF
#include <alloca.h>
2001-11-20 17:16:47 +01:00
int main(void) { (void) alloca(0); return 0; }
2001-07-12 17:35:52 +02:00
EOF
2001-11-17 04:53:05 +01: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 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
echocheck "mman.h"
2001-07-12 17:35:52 +02:00
cat > $TMPC << EOF
2001-07-12 18:11:55 +02:00
#include <sys/types.h>
2001-07-12 17:35:52 +02:00
#include <sys/mman.h>
2001-11-20 17:16:47 +01:00
int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2001-07-12 17:35:52 +02:00
EOF
2001-11-17 04:53:05 +01: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 17:35:52 +02:00
2003-06-09 14:09:39 +02:00
if ppc && test "$_altivec" = "yes" ; then
echocheck "altivec.h"
cat > $TMPC << EOF
#include <altivec.h>
int main(void) { return 0; }
EOF
2003-06-17 23:46:18 +02:00
_have_altivec_h=no
cc_check && _have_altivec_h=yes
if test "$_have_altivec_h" = yes ; then
2003-06-09 14:09:39 +02:00
_def_altivec_h='#define HAVE_ALTIVEC_H 1'
else
_def_altivec_h='#undef HAVE_ALTIVEC_H'
fi
2003-06-17 23:46:18 +02:00
echores "$_have_altivec_h"
2003-06-09 14:09:39 +02:00
else
_def_altivec_h='#undef HAVE_ALTIVEC_H'
fi
2001-07-12 17:35:52 +02:00
2001-11-18 18:45:23 +01:00
echocheck "dynamic loader"
2001-07-12 17:35:52 +02:00
cat > $TMPC << EOF
#include <dlfcn.h>
2001-11-18 18:45:23 +01:00
int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2001-07-12 17:35:52 +02:00
EOF
2001-11-17 04:53:05 +01:00
_dl=no
2001-11-18 18:45:23 +01:00
if cc_check ; then
_dl=yes
elif cc_check -ldl ; then
_dl=yes
_ld_dl='-ldl'
fi
2001-11-17 04:53:05 +01:00
if test "$_dl" = yes ; then
_def_dl='#define HAVE_LIBDL 1'
else
_def_dl='#undef HAVE_LIBDL'
fi
echores "$_dl"
2001-07-12 17:35:52 +02:00
2001-11-19 16:54:43 +01:00
2002-11-11 19:25:02 +01:00
echocheck "dynamic a/v plugins support"
if test "$_dl" = no ; then
2003-04-21 18:08:06 +02:00
_dynamic_plugins=no
2002-11-11 19:25:02 +01:00
fi
if test "$_dynamic_plugins" = yes ; then
_def_dynamic_plugins='#define DYNAMIC_PLUGINS 1'
else
_def_dynamic_plugins='#undef DYNAMIC_PLUGINS'
fi
echores "$_dynamic_plugins"
2001-11-22 02:56:10 +01:00
#echocheck "dynamic linking"
2002-08-04 00:48:41 +02:00
# FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
2001-11-20 16:11:49 +01: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 02:56:10 +01:00
#echores "using $_ld_dl_dynamic"
2001-11-20 16:11:49 +01:00
2001-11-18 18:45:23 +01:00
echocheck "pthread"
cat > $TMPC << EOF
2001-11-19 15:11:57 +01:00
#include <pthread.h>
2001-12-15 19:35:06 +01: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 18:45:23 +01:00
EOF
2003-04-21 23:07:35 +02:00
if mingw32 ; then
_ld_pthread=''
elif ( cc_check && $TMPO ) ; then # QNX
2001-11-19 18:15:35 +01:00
_ld_pthread=''
2001-12-15 19:35:06 +01:00
elif ( cc_check -lpthread && $TMPO ) ; then
2001-11-18 18:45:23 +01:00
_ld_pthread='-lpthread'
2001-12-15 19:35:06 +01:00
elif ( cc_check -pthread && $TMPO ) ; then
2001-11-18 18:45:23 +01:00
_ld_pthread='-pthread'
else
2002-01-17 02:12:01 +01: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
2002-08-04 00:48:41 +02:00
die "Static lib pthread not found (needed by Windows and networking stufff)."
2002-01-17 02:12:01 +01:00
fi
else
2002-08-04 00:48:41 +02:00
die "Lib pthread not found (needed by Windows and networking stuff)."
2002-01-17 02:12:01 +01:00
fi
2001-11-18 18:45:23 +01:00
fi
2001-12-01 18:17:32 +01:00
echores "yes (using $_ld_pthread)"
2001-11-18 18:45:23 +01:00
2001-11-17 04:53:05 +01:00
echocheck "sys/soundcard.h"
2001-06-09 01:30:09 +02:00
cat > $TMPC << EOF
#include <sys/soundcard.h>
2001-11-17 04:53:05 +01:00
int main(void) { return 0; }
2001-06-09 01:30:09 +02:00
EOF
2001-11-17 04:53:05 +01:00
_sys_soundcard=no
cc_check && _sys_soundcard=yes
if test "$_sys_soundcard" = yes ; then
_def_sys_soundcard='#define HAVE_SYS_SOUNDCARD_H 1'
2002-04-28 00:42:27 +02:00
_inc_soundcard='#include <sys/soundcard.h>'
2001-11-17 04:53:05 +01:00
else
_def_sys_soundcard='#undef HAVE_SYS_SOUNDCARD_H'
fi
echores "$_sys_soundcard"
2001-06-09 01:30:09 +02:00
2002-04-28 00:42:27 +02:00
if test "$_sys_soundcard" != yes ; then
echocheck "soundcard.h"
cat > $TMPC << EOF
#include <soundcard.h>
int main(void) { return 0; }
EOF
_soundcard=no
cc_check && _soundcard=yes
2002-12-17 11:38:48 +01:00
if linux || test "$_ossaudio" != no ; then
2003-01-31 02:47:55 +01:00
# use soundcard.h on Linux, or when OSS support is enabled
2002-12-17 11:38:48 +01:00
echores "$_soundcard"
else
2003-01-31 02:47:55 +01:00
# we don't want to use soundcard.h on non-Linux if OSS support not enabled!
2002-10-30 00:07:41 +01:00
echores "$_soundcard, but ignored!"
_soundcard=no
fi
2002-04-28 00:42:27 +02:00
if test "$_soundcard" = yes ; then
_def_soundcard='#define HAVE_SOUNDCARD_H 1'
_inc_soundcard='#include <soundcard.h>'
else
_def_soundcard='#undef HAVE_SOUNDCARD_H'
fi
2002-07-04 00:17:33 +02:00
else
_def_soundcard='#undef HAVE_SOUNDCARD_H'
2002-04-28 00:42:27 +02:00
fi
2001-11-17 04:53:05 +01:00
2002-11-11 19:25:02 +01:00
2002-04-23 18:29:13 +02:00
echocheck "sys/dvdio.h"
cat > $TMPC << EOF
2002-04-25 11:30:47 +02:00
#include <unistd.h>
2002-04-23 18:29:13 +02:00
#include <sys/dvdio.h>
int main(void) { return 0; }
EOF
_dvdio=no
cc_check && _dvdio=yes
if test "$_dvdio" = yes ; then
_def_dvdio='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
else
_def_dvdio='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
fi
echores "$_dvdio"
echocheck "sys/cdio.h"
cat > $TMPC << EOF
2002-06-08 00:41:26 +02:00
#include <unistd.h>
2002-04-23 18:29:13 +02:00
#include <sys/cdio.h>
int main(void) { return 0; }
EOF
_cdio=no
cc_check && _cdio=yes
if test "$_cdio" = yes ; then
_def_cdio='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
else
_def_cdio='#undef DVD_STRUCT_IN_SYS_CDIO_H'
fi
echores "$_cdio"
echocheck "linux/cdrom.h"
cat > $TMPC << EOF
2002-05-02 13:50:39 +02:00
#include <sys/types.h>
2002-04-23 18:29:13 +02:00
#include <linux/cdrom.h>
int main(void) { return 0; }
EOF
_cdrom=no
cc_check && _cdrom=yes
if test "$_cdrom" = yes ; then
_def_cdrom='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
else
_def_cdrom='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
fi
echores "$_cdrom"
echocheck "dvd.h"
cat > $TMPC << EOF
#include <dvd.h>
int main(void) { return 0; }
EOF
_dvd=no
cc_check && _dvd=yes
if test "$_dvd" = yes ; then
_def_dvd='#define DVD_STRUCT_IN_DVD_H 1'
else
_def_dvd='#undef DVD_STRUCT_IN_DVD_H'
fi
echores "$_dvd"
2002-05-09 11:04:08 +02:00
echocheck "BSDI dvd.h"
2002-04-23 18:29:13 +02:00
cat > $TMPC << EOF
2002-05-09 11:04:08 +02:00
#include <dvd.h>
2002-04-23 18:29:13 +02:00
int main(void) { return 0; }
EOF
_bsdi_dvd=no
cc_check && _bsdi_dvd=yes
if test "$_bsdi_dvd" = yes ; then
_def_bsdi_dvd='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
else
_def_bsdi_dvd='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
fi
echores "$_bsdi_dvd"
2002-09-14 00:04:11 +02:00
echocheck "HPUX SCSI header"
cat > $TMPC << EOF
#include <sys/scsi.h>
int main(void) { return 0; }
EOF
_hpux_scsi_h=no
cc_check && _hpux_scsi_h=yes
if test "$_hpux_scsi_h" = yes ; then
2003-02-23 21:31:59 +01:00
_def_hpux_scsi_h='#define HPUX_SCTL_IO 1'
2002-09-14 00:04:11 +02:00
else
2003-02-23 21:31:59 +01:00
_def_hpux_scsi_h='#undef HPUX_SCTL_IO'
2002-09-14 00:04:11 +02:00
fi
echores "$_hpux_scsi_h"
2002-04-27 03:25:32 +02:00
echocheck "userspace SCSI headers (Solaris)"
2002-04-23 18:29:13 +02:00
cat > $TMPC << EOF
# include <unistd.h>
# include <stropts.h>
# include <sys/scsi/scsi_types.h>
# include <sys/scsi/impl/uscsi.h>
int main(void) { return 0; }
EOF
_sol_scsi_h=no
cc_check && _sol_scsi_h=yes
if test "$_sol_scsi_h" = yes ; then
_def_sol_scsi_h='#define SOLARIS_USCSI 1'
else
_def_sol_scsi_h='#undef SOLARIS_USCSI'
fi
echores "$_sol_scsi_h"
2001-11-17 04:53:05 +01:00
echocheck "termcap"
2001-11-17 12:46:09 +01:00
if test "$_termcap" = auto ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
int main(void) { return 0; }
2001-11-14 20:02:39 +01:00
EOF
2001-11-27 18:58:29 +01:00
_termcap=no
2001-11-17 12:46:09 +01:00
cc_check -ltermcap && _termcap=yes
2001-11-17 04:53:05 +01: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 20:02:39 +01:00
2001-06-09 01:30:09 +02:00
2001-11-19 17:42:01 +01:00
echocheck "termios"
if test "$_termios" = auto ; then
cat > $TMPC <<EOF
#include <sys/termios.h>
int main(void) { return 0; }
EOF
2001-11-27 18:58:29 +01:00
_termios=no
2001-11-19 17:42:01 +01:00
cc_check && _termios=yes
2001-12-03 16:22:03 +01:00
_def_termios_h_name='sys/termios.h'
2001-11-19 17:42:01 +01:00
fi
2001-12-03 16:22:03 +01: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 17:42:01 +01:00
if test "$_termios" = yes ; then
2001-11-20 20:28:16 +01:00
_def_termios='#define HAVE_TERMIOS 1'
2001-12-03 16:22:03 +01: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 20:17:10 +01:00
echores "yes (using $_def_termios_h_name)"
2001-12-03 16:22:03 +01:00
else
2001-11-20 20:28:16 +01:00
_def_termios='#undef HAVE_TERMIOS'
2001-12-03 16:22:03 +01:00
_def_termios_h_name=''
2001-12-30 20:17:10 +01:00
echores "no"
2001-11-19 17:42:01 +01:00
fi
2001-11-19 16:54:43 +01:00
echocheck "shm"
2001-11-19 17:06:33 +01:00
if test "$_shm" = auto ; then
cat > $TMPC << EOF
2001-11-19 17:42:01 +01:00
#include <sys/types.h>
2001-11-19 16:54:43 +01: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 18:58:29 +01:00
_shm=no
2001-11-19 17:06:33 +01:00
cc_check && _shm=yes
fi
2001-11-19 16:54:43 +01:00
if test "$_shm" = yes ; then
_def_shm='#define HAVE_SHM 1'
else
_def_shm='#undef HAVE_SHM'
fi
echores "$_shm"
2002-03-15 21:48:42 +01:00
2002-02-22 14:47:31 +01:00
# XXX: FIXME, add runtime checking
echocheck "linux devfs"
echores "$_linux_devfs"
2001-11-19 16:54:43 +01:00
2001-06-04 20:23:10 +02:00
2002-11-26 19:34:09 +01:00
echocheck "scandir()"
cat > $TMPC << EOF
int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
EOF
_scandir=no
cc_check && _scandir=yes
if test "$_scandir" = yes ; then
_def_scandir='#define HAVE_SCANDIR 1'
else
_def_scandir='#undef HAVE_SCANDIR'
fi
echores "$_scandir"
2002-03-29 22:24:36 +01: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 04:53:05 +01:00
echocheck "vsscanf()"
2001-06-05 12:16:32 +02:00
cat > $TMPC << EOF
2001-11-17 04:53:05 +01:00
#include <stdarg.h>
int main(void) { vsscanf(); return 0; }
2001-06-05 12:16:32 +02:00
EOF
2001-11-17 04:53:05 +01: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 12:16:32 +02:00
2003-04-04 21:15:24 +02:00
echocheck "posix select()"
cat > $TMPC << EOF
2003-04-11 18:33:29 +02:00
#include <stdio.h>
#include <stdlib.h>
2003-04-04 21:15:24 +02:00
#include <sys/types.h>
2003-04-11 18:33:29 +02:00
#include <string.h>
#include <sys/time.h>
2003-04-04 21:15:24 +02:00
#include <unistd.h>
int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
EOF
_posix_select=no
cc_check && _posix_select=yes
if test "$_posix_select" = no ; then
_def_no_posix_select='#define HAVE_NO_POSIX_SELECT 1'
else
_def_no_posix_select='#undef HAVE_NO_POSIX_SELECT'
fi
echores "$_posix_select"
echocheck "gettimeofday()"
cat > $TMPC << EOF
#include <stdio.h>
#include <sys/time.h>
int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
EOF
_gettimeofday=no
cc_check && _gettimeofday=yes
if test "$_gettimeofday" = yes ; then
_def_gettimeofday='#define HAVE_GETTIMEOFDAY 1'
else
_def_gettimeofday='#undef HAVE_GETTIMEOFDAY'
fi
echores "$_gettimeofday"
echocheck "glob()"
cat > $TMPC << EOF
#include <stdio.h>
#include <glob.h>
int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
EOF
_glob=no
cc_check && _glob=yes
if test "$_glob" = yes ; then
_def_glob='#define HAVE_GLOB 1'
else
_def_glob='#undef HAVE_GLOB'
fi
echores "$_glob"
2002-08-21 23:31:20 +02:00
echocheck "sys/sysinfo.h"
cat > $TMPC << EOF
#include <sys/sysinfo.h>
int main(void) {
struct sysinfo s_info;
sysinfo(&s_info);
return 0;
}
EOF
_sys_sysinfo=no
cc_check && _sys_sysinfo=yes
if test "$_sys_sysinfo" = yes ; then
_def_sys_sysinfo='#define HAVE_SYS_SYSINFO_H 1'
_inc_sysinfo='#include <sys/sysinfo.h>'
else
_def_sys_sysinfo='#undef HAVE_SYS_SYSINFO_H'
fi
echores "$_sys_sysinfo"
2001-10-25 13:46:50 +02:00
2003-02-19 18:26:59 +01:00
echocheck "Mac OS X APIs"
if test "$_macosx" = auto ; then
if darwin && ppc; then
_macosx=yes
else
_macosx=no
2003-04-08 18:10:52 +02:00
_def_macosx='#undef MACOSX'
2003-05-21 23:15:46 +02:00
_noaomodules="macosx $_noaomodules"
2003-02-19 18:26:59 +01:00
fi
fi
if test "$_macosx" = yes ; then
cat > $TMPC <<EOF
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
2003-05-21 23:15:46 +02:00
#include <CoreAudio/CoreAudio.h>
2003-04-08 18:10:52 +02:00
int main(void) {
EnterMovies();
ExitMovies();
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
2003-02-19 18:26:59 +01:00
}
EOF
2003-05-21 23:15:46 +02:00
if cc_check -framework Carbon -framework QuickTime -framework CoreAudio; then
2003-02-19 18:26:59 +01:00
_macosx=yes
2003-05-21 23:15:46 +02:00
_macosx_frameworks="-framework Carbon -framework QuickTime -framework CoreAudio"
2003-04-08 18:10:52 +02:00
_def_macosx='#define MACOSX 1'
2003-05-23 14:37:58 +02:00
_aosrc="$_aosrc ao_macosx.c"
2003-05-21 23:15:46 +02:00
_aomodules="macosx $_aomodules"
2003-02-19 18:26:59 +01:00
else
_macosx=no
_def_macosx='#undef MACOSX'
2003-05-21 23:15:46 +02:00
_noaomodules="macosx $_noaomodules"
2003-04-08 18:10:52 +02:00
fi
2003-02-19 18:26:59 +01:00
fi
echores "$_macosx"
2003-03-21 17:06:11 +01:00
echocheck "Samba support (libsmbclient)"
if test "$_smbsupport" = auto; then
_smbsupport=no
cat > $TMPC << EOF
#include <libsmbclient.h>
int main(void) { smbc_opendir("smb://"); return 0; }
EOF
2003-03-21 19:21:00 +01:00
if cc_check -lsmbclient ; then
2003-03-21 17:06:11 +01:00
# this is not working for me becouse it needs -ldl and some NIS (YP) libs
# $_ld_dl and -lyp ? should be added
_smbsupport=yes
fi
fi
if test "$_smbsupport" = yes; then
2003-03-21 19:21:00 +01:00
_ld_smb="-lsmbclient"
2003-03-21 17:06:11 +01:00
_def_smbsupport="#define LIBSMBCLIENT"
_inputmodules="smb $_inputmodules"
else
_def_smbsupport="#undef LIBSMBCLIENT"
_noinputmodules="smb $_noinputmodules"
fi
echores "$_smbsupport"
2001-11-17 12:26:26 +01:00
#########
# VIDEO #
#########
2002-03-15 21:48:42 +01: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"
2003-03-07 19:45:02 +01:00
echocheck "tdfxvid"
if test "$_tdfxvid" = yes ; then
_def_tdfxvid='#define HAVE_TDFX_VID 1'
_vosrc="$_vosrc vo_tdfx_vid.c"
_vomodules="tdfx_vid $_vomodules"
else
_def_tdfxvid='#undef HAVE_TDFX_VID'
_novomodules="tdfx_vid $_novomodules"
fi
echores "$_tdfxfb"
2002-03-15 21:48:42 +01:00
2002-06-02 00:20:19 +02:00
echocheck "DirectFB headers presence"
if test -z "$_inc_directfb" ; then
for I in /usr/include /usr/local/include; do
if test -d "$I/directfb" && test -f "$I/directfb/directfb.h" ; then
_inc_directfb="-I$I/directfb"
echores "yes (using $_inc_directfb)"
break
fi
if test -d "$I" && test -f "$I/directfb.h" ; then
_inc_directfb="-I$I"
echores "yes (using $_inc_directfb)"
break
fi
done
if test -z "$_inc_directfb" ; then
_directfb=no
echores "not found"
fi
else
echores "yes (using $_inc_directfb)"
fi
if test "$_inc_directfb" = "-I/usr/include" ; then
_inc_directfb=""
fi
2002-03-15 21:48:42 +01:00
echocheck "DirectFB"
if test "$_directfb" = auto ; then
_directfb=no
cat > $TMPC <<EOF
#include <directfb.h>
int main(void) { IDirectFB *foo; return 0; }
EOF
2002-06-02 00:20:19 +02:00
linux && test -c /dev/fb0 && cc_check $_inc_directfb -ldirectfb && _directfb=yes
2002-03-15 21:48:42 +01:00
fi
2002-08-05 13:42:29 +02:00
if test "$_directfb" = yes; then
cat > $TMPC <<EOF
#include <directfb.h>
int main(void) {
printf ("%i",(directfb_major_version*100+directfb_minor_version)*100+directfb_micro_version);
return 0;
}
EOF
if cc_check $_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then
_directfb_version=`"$TMPO"`
_def_directfb_version="#define DIRECTFBVERSION $_directfb_version"
echores "yes ($_directfb_version)"
else
_directfb=no
echores "no (failed to get version)"
fi
else
echores "$_directfb"
fi
2002-03-15 21:48:42 +01:00
if test "$_directfb" = yes ; then
_def_directfb='#define HAVE_DIRECTFB 1'
2002-08-09 19:20:46 +02:00
if test "$_directfb_version" -ge 913; then
_vosrc="$_vosrc vo_directfb2.c"
else
_vosrc="$_vosrc vo_directfb.c"
fi
2002-03-15 21:48:42 +01:00
_vomodules="directfb $_vomodules"
_ld_directfb='-ldirectfb'
2002-11-01 00:54:26 +01:00
2003-05-01 22:35:56 +02:00
if test "$_directfb_version" -ge 915; then
2002-11-01 00:54:26 +01:00
_vosrc="$_vosrc vo_dfbmga.c"
_vomodules="dfbmga $_vomodules"
fi
2002-03-15 21:48:42 +01:00
else
_def_directfb='#undef HAVE_DIRECTFB'
_novomodules="directfb $_novomodules"
2002-06-02 00:20:19 +02:00
_inc_directfb=""
2002-03-15 21:48:42 +01:00
fi
2002-05-25 23:43:02 +02:00
echocheck "X11 headers presence"
if test -z "$_inc_x11" ; then
2003-02-08 23:27:04 +01:00
for I in /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/include /usr/openwin/include ; do
2002-05-25 23:43:02 +02:00
if test -d "$I/X11" && test -f "$I/X11/Xlib.h" ; then
_inc_x11="-I$I"
echores "yes (using $I)"
break
fi
done
if test -z "$_inc_x11" ; then
_x11=no
echores "not found (check if the dev(el) packages are installed)"
fi
else
echores "yes (using $_inc_x11)"
fi
if test "$_inc_x11" = "-I/usr/include" ; then
_inc_x11=""
fi
echocheck "X11 libs presence"
if test -z "$_ld_x11" ; then
2002-09-07 23:53:43 +02:00
for I in /usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 ; do
2002-05-25 23:43:02 +02:00
if test -d "$I" && ( test -f "$I/libX11.so" || test -f "$I/libX11.a" ) ; then
_ld_x11="-L$I"
echores "yes (using $I)"
break;
fi
done
if test -z "$_ld_x11" ; then
_x11=no
echores "not found (check if the dev(el) packages are installed)"
fi
else
echores "yes (using $_ld_x11)"
fi
2002-10-02 00:36:25 +02:00
_ld_x11="$_ld_x11 -lXext -lX11 $_ld_sock"
2002-05-25 23:43:02 +02:00
2001-11-17 04:53:05 +01:00
echocheck "X11"
2002-05-25 23:43:02 +02:00
if test "$_x11" != no ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2001-11-19 01:38:41 +01: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 20:32:55 +02:00
EOF
2001-11-17 04:53:05 +01:00
_x11=no
2001-11-19 01:38:41 +01:00
cc_check $_inc_x11 $_ld_x11 && _x11=yes
2001-11-17 04:53:05 +01:00
fi
if test "$_x11" = yes ; then
_def_x11='#define HAVE_X11 1'
2003-03-12 16:04:05 +01:00
_vosrc="$_vosrc x11_common.c vo_x11.c vo_xover.c"
_vomodules="x11 xover $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_x11='#undef HAVE_X11'
2001-11-19 13:29:48 +01:00
_inc_x11=''
_ld_x11=''
2002-03-12 08:16:29 +01:00
_novomodules="x11 $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_x11"
2001-02-24 21:28:24 +01:00
2001-06-05 20:40:44 +02:00
2001-11-17 10:57:54 +01:00
echocheck "DPMS"
2001-11-17 04:53:05 +01: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 18:15:35 +01:00
int main(void) {
(void) DPMSQueryExtension(0, 0, 0);
}
2001-06-04 10:07:57 +02:00
EOF
2002-10-02 00:36:25 +02:00
cc_check $_inc_x11 -lXdpms $_ld_x11 && _xdpms3=yes
2001-06-04 10:07:57 +02:00
fi
2001-11-17 04:53:05 +01: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 10:07:57 +02:00
EOF
2001-11-17 10:57:54 +01:00
cc_check $_inc_x11 $_ld_x11 && _xdpms4=yes
2001-06-04 11:38:18 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xdpms4" = yes ; then
_def_xdpms='#define HAVE_XDPMS 1'
2001-12-01 18:17:32 +01:00
echores "yes (using Xdpms 4)"
2001-11-17 04:53:05 +01:00
elif test "$_xdpms3" = yes ; then
_def_xdpms='#define HAVE_XDPMS 1'
2002-10-02 00:36:25 +02:00
_ld_x11="-lXdpms $_ld_x11"
2001-12-01 18:17:32 +01:00
echores "yes (using Xdpms 3)"
2001-11-17 04:53:05 +01:00
else
_def_xdpms='#undef HAVE_XDPMS'
echores "no"
2001-06-04 10:07:57 +02:00
fi
2001-06-04 22:12:41 +02:00
2001-11-17 04:53:05 +01:00
echocheck "Xv"
2001-11-21 22:09:03 +01:00
if test "$_x11" = yes && test "$_xv" != no ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2001-11-20 17:16:47 +01:00
#include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
2001-06-04 10:07:57 +02:00
EOF
2001-11-17 04:53:05 +01:00
_xv=no
2002-10-02 00:36:25 +02:00
cc_check $_inc_x11 -lXv $_ld_x11 && _xv=yes
2001-11-17 04:53:05 +01:00
else
_xv=no
2001-06-04 10:07:57 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xv" = yes ; then
_def_xv='#define HAVE_XV 1'
_ld_xv='-lXv'
_vosrc="$_vosrc vo_xv.c"
2001-11-27 18:58:29 +01:00
_vomodules="xv $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_xv='#undef HAVE_XV'
2002-03-12 08:16:29 +01:00
_novomodules="xv $_novomodules"
2001-06-04 10:07:57 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_xv"
2001-06-04 10:07:57 +02:00
2001-07-28 23:35:55 +02:00
2003-06-21 03:47:26 +02:00
echocheck "XvMC"
if test "$_x11" = yes && test "$_xv" && test "$_xvmc" != no ; then
_xvmc=no
cat > $TMPC <<EOF
#include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
#include <X11/extensions/XvMClib.h>
int main(void) {
(void) XvMCQueryExtension(0,0,0);
(void) XvMCCreateContext(0,0,0,0,0,0,0);
return 0; }
EOF
cc_check $_inc_x11 $_ld_x11 $_ld_xv -lXvMC -l$_xvmclib && _xvmc=yes
fi
if test "$_xvmc" = yes ; then
_def_xvmc='#define HAVE_XVMC 1'
_ld_xvmc="-lXvMC -l$_xvmclib"
_vosrc="$_vosrc vo_xvmc.c"
_vomodules="xvmc $_vomodules"
else
_def_xvmc='#undef HAVE_XVMC'
_novomodules="xvmc $_novomodules"
fi
echores "$_xvmc"
2001-11-17 04:53:05 +01:00
echocheck "Xinerama"
2001-11-21 22:09:03 +01:00
if test "$_x11" = yes && test "$_xinerama" != no ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2001-11-20 17:16:47 +01:00
#include <X11/Xlib.h>
#include <X11/extensions/Xinerama.h>
int main(void) { (void) XineramaIsActive(0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_xinerama=no
2002-10-02 00:36:25 +02:00
cc_check $_inc_x11 -lXinerama $_ld_x11 && _xinerama=yes
2001-07-28 23:35:55 +02:00
else
2001-11-17 04:53:05 +01:00
_xinerama=no
2001-07-28 23:35:55 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xinerama" = yes ; then
_def_xinerama='#define HAVE_XINERAMA 1'
_ld_xinerama='-lXinerama'
else
_def_xinerama='#undef HAVE_XINERAMA'
2001-07-28 23:35:55 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_xinerama"
2001-07-28 23:35:55 +02:00
2001-06-04 10:07:57 +02:00
2001-11-17 04:53:05 +01: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 22:09:03 +01:00
if test "$_x11" = yes && test "$_vm" != no ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC <<EOF
2001-11-20 17:16:47 +01:00
#include <X11/Xlib.h>
#include <X11/extensions/xf86vmode.h>
2003-04-07 23:08:56 +02:00
#include <X11/XF86keysym.h>
2001-11-20 17:16:47 +01:00
int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_vm=no
2002-10-02 00:36:25 +02:00
cc_check $_inc_x11 -lXxf86vm $_ld_x11 && _vm=yes
2001-11-17 04:53:05 +01:00
else
_vm=no
2001-04-15 22:31:58 +02:00
fi
2001-11-17 04:53:05 +01: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 22:31:58 +02:00
2001-08-29 14:15:09 +02:00
2001-11-17 04:53:05 +01:00
echocheck "DGA"
2001-11-29 19:56:08 +01:00
# Version 2 is preferred to version 1 if available
if test "$_dga" = auto ; then
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <X11/Xlib.h>
#include <X11/extensions/xf86dga.h>
2001-11-29 19:56:08 +01:00
int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
2001-08-29 14:15:09 +02:00
EOF
2001-11-17 04:53:05 +01:00
_dga=no
2002-10-02 00:36:25 +02:00
cc_check $_inc_x11 -lXxf86dga -lXxf86vm $_ld_x11 && _dga=1
2001-08-29 14:15:09 +02:00
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <X11/Xlib.h>
#include <X11/extensions/xf86dga.h>
2001-11-29 19:56:08 +01:00
int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
2002-10-02 00:36:25 +02:00
cc_check $_inc_x11 -lXxf86dga $_ld_x11 && _dga=2
2001-11-17 04:53:05 +01:00
fi
2001-11-29 19:56:08 +01:00
_def_dga='#undef HAVE_DGA'
_def_dga2='#undef HAVE_DGA2'
if test "$_dga" = 1 ; then
_def_dga='#define HAVE_DGA 1'
2001-11-30 00:12:19 +01:00
_ld_dga='-lXxf86dga'
2001-11-29 19:56:08 +01:00
_vosrc="$_vosrc vo_dga.c"
_vomodules="dga $_vomodules"
2001-12-01 18:17:32 +01:00
echores "yes (using DGA 1.0)"
2001-11-29 19:56:08 +01:00
elif test "$_dga" = 2 ; then
2001-11-30 00:12:19 +01:00
_def_dga='#define HAVE_DGA 1'
2001-11-17 04:53:05 +01:00
_def_dga2='#define HAVE_DGA2 1'
2001-11-29 19:56:08 +01:00
_ld_dga='-lXxf86dga'
2001-11-17 04:53:05 +01:00
_vosrc="$_vosrc vo_dga.c"
2001-11-29 19:56:08 +01:00
_vomodules="dga $_vomodules"
2001-12-01 18:17:32 +01:00
echores "yes (using DGA 2.0)"
2001-11-29 19:56:08 +01:00
elif test "$_dga" = no ; then
echores "no"
2002-03-12 08:16:29 +01:00
_novomodules="dga $_novomodules"
2001-11-17 04:53:05 +01:00
else
2001-11-29 19:56:08 +01:00
die "DGA version must be 1 or 2"
2001-11-17 04:53:05 +01:00
fi
2001-08-25 23:05:23 +02:00
2001-10-26 21:54:43 +02:00
2001-11-17 04:53:05 +01:00
echocheck "OpenGL"
2002-12-29 20:58:56 +01:00
cygwin && _gl=no
2001-11-20 10:26:44 +01: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 04:53:05 +01:00
cat > $TMPC << EOF
#include <GL/gl.h>
int main(void) { return 0; }
EOF
_gl=no
2001-11-19 01:38:41 +01:00
if cc_check $_inc_x11 $_ld_x11 -lGL -lm ; then
_gl=yes
2001-12-06 23:26:41 +01:00
_ld_gl="-lGL"
2001-11-19 01:38:41 +01:00
elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then
_gl=yes
2001-12-06 23:26:41 +01:00
_ld_gl="-lGL $_ld_pthread"
2001-11-05 01:00:25 +01:00
fi
2001-11-19 13:29:48 +01:00
else
_gl=no
2001-10-31 19:25:28 +01:00
fi
2001-11-17 04:53:05 +01:00
if test "$_gl" = yes ; then
_def_gl='#define HAVE_GL 1'
_vosrc="$_vosrc vo_gl.c vo_gl2.c"
2001-11-27 18:58:29 +01:00
_vomodules="opengl $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_gl='#undef HAVE_GL'
2002-03-12 08:16:29 +01:00
_novomodules="opengl $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_gl"
2001-08-25 23:05:23 +02:00
2001-11-17 04:53:05 +01: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 18:58:29 +01:00
_vomodules="mga $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_mga='#undef HAVE_MGA'
2002-03-12 08:16:29 +01:00
_novomodules="mga $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_mga"
2001-08-25 23:05:23 +02:00
2002-04-13 19:28:33 +02: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 23:05:23 +02:00
2001-10-13 18:53:37 +02:00
2001-11-17 04:53:05 +01:00
echocheck "xmga"
if test "$_xmga" = auto ; then
_xmga=no
test "$_x11" = yes && test "$_mga" = yes && _xmga=yes
2001-08-25 23:05:23 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xmga" = yes ; then
_def_xmga='#define HAVE_XMGA 1'
_vosrc="$_vosrc vo_xmga.c"
2001-11-27 18:58:29 +01:00
_vomodules="xmga $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_xmga='#undef HAVE_XMGA'
2002-03-12 08:16:29 +01:00
_novomodules="xmga $_novomodules"
2001-06-09 01:30:09 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_xmga"
2001-06-09 01:30:09 +02:00
2001-11-17 04:53:05 +01: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 22:09:03 +01:00
cc_check -lggi && _ggi=yes
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
if test "$_ggi" = yes ; then
_def_ggi='#define HAVE_GGI 1'
_ld_ggi='-lggi'
_vosrc="$_vosrc vo_ggi.c"
2001-11-27 18:58:29 +01:00
_vomodules="ggi $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_ggi='#undef HAVE_GGI'
2002-03-12 08:16:29 +01:00
_novomodules="ggi $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_ggi"
2001-02-24 21:28:24 +01:00
2001-08-20 23:20:03 +02:00
2001-11-17 04:53:05 +01:00
echocheck "AA"
if test "$_aa" = auto ; then
cat > $TMPC << EOF
#include <aalib.h>
2001-11-20 17:16:47 +01:00
int main(void) { (void) aa_init(0, 0, 0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_aa=no
cc_check -laa && _aa=yes
fi
if test "$_aa" = yes ; then
_def_aa='#define HAVE_AA 1'
2002-11-18 02:02:27 +01:00
if cygwin ; then
_ld_aa=`aalib-config --libs | cut -d " " -f 2,5,6`
else
_ld_aa='-laa'
fi
2001-11-17 04:53:05 +01:00
_vosrc="$_vosrc vo_aa.c"
2001-11-27 18:58:29 +01:00
_vomodules="aa $_vomodules"
2001-08-20 23:20:03 +02:00
else
2001-11-17 04:53:05 +01:00
_def_aa='#undef HAVE_AA'
2002-03-12 08:16:29 +01:00
_novomodules="aa $_novomodules"
2001-08-20 23:20:03 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_aa"
2001-08-20 23:20:03 +02:00
2001-11-17 04:53:05 +01: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
2003-02-08 14:47:19 +01:00
cc_check -lvgagl -lvga -lm && _svga=yes
2001-04-18 00:04:44 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_svga" = yes ; then
_def_svga='#define HAVE_SVGALIB 1'
2003-02-08 14:47:19 +01:00
_ld_svga='-lvgagl -lvga -lm'
2001-11-17 04:53:05 +01:00
_vosrc="$_vosrc vo_svga.c"
2001-11-27 18:58:29 +01:00
_vomodules="svga $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_svga='#undef HAVE_SVGALIB'
2002-03-12 08:16:29 +01:00
_novomodules="svga $_novomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_svga"
2001-04-18 00:04:44 +02:00
2001-08-14 20:28:56 +02:00
2001-11-17 04:53:05 +01:00
echocheck "FBDev"
if test "$_fbdev" = auto ; then
_fbdev=no
2002-01-06 23:57:58 +01:00
linux && test -c /dev/fb0 && _fbdev=yes
2001-11-17 04:53:05 +01:00
fi
if test "$_fbdev" = yes ; then
_def_fbdev='#define HAVE_FBDEV 1'
_vosrc="$_vosrc vo_fbdev.c"
2001-11-27 18:58:29 +01:00
_vomodules="fbdev $_vomodules"
2002-01-17 02:12:01 +01:00
if test "$_fbdev_nocopy" = yes ; then
_def_fbdev_nocopy='#define USE_CONVERT2FB 1'
fi
2001-04-25 00:51:55 +02:00
else
2001-11-17 04:53:05 +01:00
_def_fbdev='#undef HAVE_FBDEV'
2002-01-17 02:12:01 +01:00
_def_fbdev_nocopy='#undef USE_CONVERT2FB'
2002-03-12 08:16:29 +01:00
_novomodules="fbdev $_novomodules"
2001-04-25 00:51:55 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_fbdev"
2001-04-25 00:51:55 +02:00
2001-11-17 04:53:05 +01:00
2002-01-17 02:12:01 +01:00
2001-11-17 04:53:05 +01:00
echocheck "DVB"
if test "$_dvb" != no ; then
_dvb=no
2002-04-04 15:21:13 +02: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
2002-04-27 03:25:32 +02:00
for I in "-I/usr/src/DVB/ost/include" "$_inc_extra/ost/include" ; do
if cc_check "$I" ; then
_dvb=yes
_inc_dvb="$I"
echores "yes (using $_inc_dvb)"
break
fi
done
test "$_dvb" = no && echores "no (specify path to DVB/ost/include with --with-extraincdir=DIR)"
2002-04-04 15:21:13 +02:00
fi
else
echores "no"
2001-11-17 04:53:05 +01:00
fi
if test "$_dvb" = yes ; then
_def_dvb='#define HAVE_DVB 1'
2003-03-16 21:13:28 +01:00
_def_dvb_in='#define HAS_DVBIN_SUPPORT 1'
2002-05-14 11:39:13 +02:00
_aomodules="mpegpes(dvb) $_aomodules"
2001-12-04 23:04:14 +01:00
_vomodules="mpegpes(dvb) $_vomodules"
2002-12-28 13:04:58 +01:00
fi
if test "$_dvbhead" != no ; then
echocheck "DVB HEAD"
if test "$_dvbhead" != no ; then
_dvbhead=no
cat >$TMPC << EOF
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <linux/dvb/dmx.h>
#include <linux/dvb/frontend.h>
#include <linux/dvb/video.h>
#include <linux/dvb/audio.h>
int main(void) {return 0;}
EOF
if cc_check ; then
_dvbhead=yes
echores "yes"
else
for I in "-I/usr/src/DVB/include" "$_inc_extra/include/linux" ; do
if cc_check "$I" ; then
_dvbhead=yes
_inc_dvb="$I"
echores "yes (using $_inc_dvb)"
break
fi
done
test "$_dvbhead" = no && echores "no (specify path to DVB/include (HEAD Version) with --with-extraincdir=DIR)"
fi
else
echores "no"
fi
if test "$_dvbhead" = yes ; then
_def_dvb='#define HAVE_DVB_HEAD 1'
2003-03-16 21:13:28 +01:00
_def_dvb_in='#define HAS_DVBIN_SUPPORT 1'
2002-12-28 13:04:58 +01:00
_aomodules="mpegpes(dvb) $_aomodules"
_vomodules="mpegpes(dvb) $_vomodules"
fi
fi
if test "$_dvbhead" = no && test "$_dvb" = no ; then
2001-11-17 04:53:05 +01:00
_def_dvb='#undef HAVE_DVB'
2003-03-16 21:13:28 +01:00
_def_dvb_in='#undef HAS_DVBIN_SUPPORT '
2002-05-14 11:39:13 +02:00
_aomodules="mpegpes(file) $_aomodules"
2002-12-28 13:04:58 +01:00
_vomodules="mpegpes(file) $_vomodules"
2001-11-03 22:25:55 +01:00
fi
2003-03-22 20:15:23 +01:00
if test "$_dvb" = yes || test "$_dvbhead" = yes ; then
_dvbin=yes
else
_dvbin=no
fi
2002-02-01 14:10:35 +01:00
2001-11-17 12:26:26 +01: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 10:43:55 +01:00
cat > $TMPC << EOF
#include <png.h>
2002-02-01 14:10:35 +01:00
#include <string.h>
int main(void) {
printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
2002-04-29 18:24:22 +02:00
printf("libpng: %s\n", png_libpng_ver);
return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
2002-02-01 14:10:35 +01:00
}
2001-11-19 10:43:55 +01:00
EOF
2002-02-01 14:10:35 +01: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 12:26:26 +01: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 18:58:29 +01:00
_vomodules="png $_vomodules"
2002-02-11 10:15:59 +01:00
_mkf_png="yes"
2001-11-17 12:26:26 +01:00
else
_def_png='#undef HAVE_PNG'
2002-03-12 08:16:29 +01:00
_novomodules="png $_novomodules"
2002-02-11 10:15:59 +01:00
_mkf_png="no"
2001-11-17 12:26:26 +01:00
fi
2002-03-10 23:49:18 +01: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 01:13:05 +01:00
echores "$_jpg"
2002-03-10 23:49:18 +01:00
if test "$_jpg" = yes ; then
_def_jpg='#define HAVE_JPEG 1'
2002-04-16 13:21:59 +02:00
_vosrc="$_vosrc vo_jpeg.c"
_vomodules="jpeg $_vomodules"
2002-03-11 01:13:05 +01:00
_ld_jpg="-ljpeg"
2002-03-10 23:49:18 +01:00
_mkf_jpg="yes"
else
_def_jpg='#undef HAVE_JPEG'
2002-04-16 13:21:59 +02:00
_novomodules="jpeg $_novomodules"
2002-03-10 23:49:18 +01:00
_mkf_jpg="no"
fi
2002-05-13 14:28:00 +02:00
2003-01-28 01:12:23 +01:00
echocheck "GIF support"
2002-05-12 03:07:25 +02:00
if test "$_gif" = auto ; then
_gif=no
cat > $TMPC << EOF
#include <gif_lib.h>
int main(void) {
return 0;
}
EOF
2003-02-19 17:55:14 +01:00
if cc_check -lungif && "$TMPO" >> "$TMPLOG" ; then
2002-05-18 11:21:35 +02:00
_gif=yes
2002-05-23 22:38:27 +02:00
_ld_gif="-lungif"
elif cc_check -lungif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
_gif=yes
_ld_gif="-lungif $_ld_x11"
2003-02-19 17:55:14 +01:00
elif cc_check -lgif && "$TMPO" >> "$TMPLOG" ; then
_gif=yes
_ld_gif="-lgif"
elif cc_check -lgif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
_gif=yes
_ld_gif="-lgif $_ld_x11"
2002-05-13 14:28:00 +02:00
fi
2002-05-12 03:07:25 +02:00
fi
if test "$_gif" = yes ; then
_def_gif='#define HAVE_GIF 1'
_vosrc="$_vosrc vo_gif89a.c"
2003-01-28 01:12:23 +01:00
_codecmodules="gif $_codecmodules"
2002-05-12 03:07:25 +02:00
_vomodules="gif89a $_vomodules"
_mkf_gif="yes"
2003-01-28 01:12:23 +01:00
_gif="yes (old version, some encoding functions disabled)"
2002-05-13 22:52:10 +02:00
_def_gif_4='#undef HAVE_GIF_4'
cat > $TMPC << EOF
2002-05-23 22:38:27 +02:00
#include <signal.h>
2002-05-13 22:52:10 +02:00
#include <gif_lib.h>
2002-05-23 22:38:27 +02:00
void catch() { exit(1); }
2002-05-13 22:52:10 +02:00
int main(void) {
2002-05-23 22:38:27 +02:00
signal(SIGSEGV, catch); // catch segfault
2002-05-13 22:52:10 +02:00
printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
return 0;
}
EOF
if cc_check "$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
_def_gif_4='#define HAVE_GIF_4 1'
_gif="yes"
fi
2002-05-12 03:07:25 +02:00
else
_def_gif='#undef HAVE_GIF'
2002-05-13 22:52:10 +02:00
_def_gif_4='#undef HAVE_GIF_4'
2002-05-12 03:07:25 +02:00
_novomodules="gif89a $_novomodules"
2003-01-28 01:12:23 +01:00
_nocodecmodules="gif $_codecmodules"
2002-05-12 03:07:25 +02:00
_mkf_gif="no"
fi
2002-05-13 22:52:10 +02:00
echores "$_gif"
2002-05-12 03:07:25 +02:00
2001-11-17 12:26:26 +01:00
2003-03-05 11:28:32 +01:00
case "$_gif" in yes*)
2003-02-19 17:55:14 +01:00
echocheck "broken giflib workaround"
_def_gif_tvt_hack='#define HAVE_GIF_TVT_HACK 1'
cat > $TMPC << EOF
#include <gif_lib.h>
int main(void) {
GifFileType gif;
printf("UserData is at address %p\n", gif.UserData);
return 0;
}
EOF
if cc_check "$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
_def_gif_tvt_hack='#undef HAVE_GIF_TVT_HACK'
echores "disabled"
else
echores "enabled"
fi
2003-03-05 11:28:32 +01:00
;;
esac
2003-02-19 17:55:14 +01:00
2002-02-07 03:21:39 +01:00
if test "$_vesa" != no ; then
2001-11-28 18:52:25 +01:00
echocheck "VESA support"
if x86 && linux ; then
2002-02-07 03:29:55 +01:00
_def_vesa='#define HAVE_VESA 1'
2001-11-28 18:52:25 +01:00
_vosrc="$_vosrc vo_vesa.c vesa_lvo.c"
_vomodules="vesa $_vomodules"
2001-12-01 18:17:32 +01:00
echores "yes"
2001-11-28 18:52:25 +01:00
else
2002-02-07 03:29:55 +01:00
_def_vesa='#undef HAVE_VESA'
2002-03-12 08:16:29 +01:00
_novomodules="vesa $_novomodules"
2001-12-07 00:26:58 +01:00
echores "no (not supported on this OS/architecture)"
2001-11-28 18:52:25 +01:00
fi
2002-02-07 03:32:53 +01:00
else
2002-02-07 03:29:55 +01:00
_def_vesa='#undef HAVE_VESA'
2002-02-07 03:21:39 +01:00
fi
2001-11-28 18:52:25 +01:00
2001-11-17 12:26:26 +01:00
#################
# VIDEO + AUDIO #
#################
echocheck "SDL"
if test -z "$_sdlconfig" ; then
2002-05-03 22:29:20 +02:00
if ( sdl-config --version ) >>"$TMPLOG" 2>&1 ; then
2001-11-17 12:26:26 +01:00
_sdlconfig="sdl-config"
2002-05-03 22:29:20 +02:00
elif ( sdl11-config --version ) >>"$TMPLOG" 2>&1 ; then
2001-11-17 12:26:26 +01:00
_sdlconfig="sdl11-config"
else
_sdlconfig=false
fi
fi
if test "$_sdl" = auto || test "$_sdl" = yes ; then
2001-11-17 12:46:09 +01:00
cat > $TMPC << EOF
#include <SDL.h>
2002-05-03 22:29:20 +02:00
int main(int argc, char *argv[]) { return 0; }
2001-11-17 12:46:09 +01:00
EOF
2001-11-17 12:26:26 +01:00
_sdl=no
2002-05-03 22:29:20 +02:00
if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
if cc_check `$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
2001-11-17 12:26:26 +01:00
_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'
2002-11-18 02:02:27 +01:00
if cygwin ; then
_ld_sdl=`$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`
_inc_sdl=`$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`
else
_ld_sdl=`$_sdlconfig --libs`
_inc_sdl=`$_sdlconfig --cflags`
fi
2001-11-17 12:26:26 +01:00
_vosrc="$_vosrc vo_sdl.c"
2001-11-28 18:52:25 +01:00
_vomodules="sdl $_vomodules"
2001-11-17 12:26:26 +01:00
_aosrc="$_aosrc ao_sdl.c"
2001-11-27 18:58:29 +01:00
_aomodules="sdl $_aomodules"
2001-12-30 20:17:10 +01:00
echores "yes (using $_sdlconfig)"
2001-11-17 12:26:26 +01:00
else
_def_sdl='#undef HAVE_SDL'
2002-03-12 08:16:29 +01:00
_novomodules="sdl $_novomodules"
_noaomodules="sdl $_noaomodules"
2001-12-30 20:17:10 +01:00
echores "no"
2001-11-17 12:26:26 +01:00
fi
2002-12-29 20:58:56 +01:00
echocheck "Windows waveout"
2002-10-25 18:25:41 +02:00
if test "$_win32waveout" = auto ; then
cat > $TMPC << EOF
#include <windows.h>
#include <mmsystem.h>
int main(void) { return 0; }
EOF
_win32waveout=no
cc_check -lwinmm && _win32waveout=yes
fi
if test "$_win32waveout" = yes ; then
_def_win32waveout='#define HAVE_WIN32WAVEOUT 1'
_ld_win32libs="-lwinmm $_ld_win32libs"
_aosrc="$_aosrc ao_win32.c"
_aomodules="win32 $_aomodules"
else
_def_win32waveout='#undef HAVE_WIN32WAVEOUT'
_noaomodules="win32 $_noaomodules"
fi
echores "$_win32waveout"
2002-09-28 21:03:50 +02:00
echocheck "Directx"
if test "$_directx" = auto ; then
cat > $TMPC << EOF
#include <windows.h>
#include <ddraw.h>
int main(void) { return 0; }
EOF
_directx=no
2002-10-25 18:25:41 +02:00
cc_check -lgdi32 && _directx=yes
2002-09-28 21:03:50 +02:00
fi
if test "$_directx" = yes ; then
_def_directx='#define HAVE_DIRECTX 1'
2002-10-25 18:25:41 +02:00
_ld_win32libs="-lgdi32 $_ld_win32libs"
2002-09-28 21:03:50 +02:00
_vosrc="$_vosrc vo_directx.c"
_vomodules="directx $_vomodules"
else
_def_directx='#undef HAVE_DIRECTX'
_novomodules="directx $_novomodules"
fi
echores "$_directx"
2001-12-03 02:13:48 +01: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
2002-10-02 00:36:25 +02:00
cc_check -laudio $_inc_x11 -lXt $_ld_x11 -lm && _nas=yes
2001-12-03 02:13:48 +01:00
fi
if test "$_nas" = yes ; then
_def_nas='#define HAVE_NAS 1'
2002-10-02 00:36:25 +02:00
_ld_nas="-laudio -lXt $_ld_x11"
2001-12-03 02:13:48 +01:00
_aosrc="$_aosrc ao_nas.c"
_aomodules="nas $_aomodules"
else
2002-03-12 08:16:29 +01:00
_noaomodules="nas $_noaomodules"
2001-12-03 02:13:48 +01:00
_def_nas='#undef HAVE_NAS'
fi
echores "$_nas"
2001-12-01 16:05:08 +01:00
2002-05-13 15:15:40 +02:00
echocheck "DXR2"
if test "$_dxr2" = auto; then
_dxr2=no
for _inc_dxr2 in "$_inc_dxr2" \
2003-03-12 16:04:05 +01:00
"-I/usr/local/include/dxr2" \
"-I/usr/include/dxr2"; do
2002-05-13 15:15:40 +02:00
cat > $TMPC << EOF
#include <dxr2ioctl.h>
int main(void) { return 0; }
EOF
cc_check $_inc_dxr2 && _dxr2=yes && break
done
fi
if test "$_dxr2" = yes; then
_def_dxr2='#define HAVE_DXR2 1'
_vosrc="$_vosrc vo_dxr2.c"
_aosrc="$_aosrc ao_dxr2.c"
_aomodules="dxr2 $_aomodules"
_vomodules="dxr2 $_vomodules"
echores "yes (using $_inc_dxr2)"
else
_def_dxr2='#undef HAVE_DXR2'
_noaomodules="dxr2 $_noaomodules"
_novomodules="dxr2 $_novomodules"
2002-05-14 14:37:37 +02:00
_inc_dxr2=""
2002-05-13 15:15:40 +02:00
echores "no"
fi
2001-11-17 04:53:05 +01:00
echocheck "DXR3/H+"
if test "$_dxr3" = auto ; then
cat > $TMPC << EOF
2001-12-05 00:10:59 +01:00
#include <linux/em8300.h>
2001-11-17 04:53:05 +01:00
int main(void) { return 0; }
EOF
_dxr3=no
2001-12-05 00:10:59 +01:00
cc_check && _dxr3=yes
2001-07-06 05:22:14 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_dxr3" = yes ; then
_def_dxr3='#define HAVE_DXR3 1'
_vosrc="$_vosrc vo_dxr3.c"
2001-11-29 20:18:48 +01:00
_vomodules="dxr3 $_vomodules"
2001-11-17 04:53:05 +01:00
else
_def_dxr3='#undef HAVE_DXR3'
2002-03-12 08:16:29 +01:00
_novomodules="dxr3 $_novomodules"
2001-12-28 22:07:39 +01:00
if test "$_mp1e" = auto ; then
# we don't need mp1e
_mp1e=no
fi
2001-11-17 04:53:05 +01:00
fi
echores "$_dxr3"
2001-07-06 05:22:14 +02:00
2001-12-28 22:07:39 +01: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'
2002-08-29 23:30:57 +02:00
_ld_mp1e='libmp1e/libmp1e.a'
2001-12-28 22:07:39 +01:00
_dep_mp1e='libmp1e/libmp1e.a'
else
_mp1e=no
_def_mp1e='#undef USE_MP1E'
_ld_mp1e=""
_dep_mp1e=''
fi
echores "$_mp1e"
2001-11-17 04:53:05 +01:00
2002-05-04 00:13:06 +02:00
echocheck "libfame"
if test "$_fame" = auto ; then
_fame=no
2002-05-13 15:15:40 +02:00
test "$_dxr2" = yes && _fame=auto
2002-05-04 00:13:06 +02:00
test "$_dxr3" = yes && _fame=auto
test "$_dvb" = yes && _fame=auto
fi
if test "$_fame" = auto ; then
_fame=no
if test -d libfame && test -f libfame/fame.h ; then
# disable fame on cygwin as no sense to port - atmos
cygwin || _fame=yes
echores $_fame
else
echores "no (no fame dir)"
fi
else
echores "$_fame"
fi
_def_fame='#undef USE_LIBFAME'
if test "$_fame" = yes ; then
_def_fame='#define USE_LIBFAME 1'
2002-08-29 23:30:57 +02:00
_ld_fame='libfame/libfame.a'
fi
2002-05-04 00:13:06 +02:00
2001-11-17 12:26:26 +01:00
#########
# AUDIO #
#########
2001-11-17 04:53:05 +01:00
echocheck "OSS Audio"
if test "$_ossaudio" = auto ; then
cat > $TMPC << EOF
2002-04-28 19:25:10 +02:00
#include <sys/ioctl.h>
2002-04-28 00:42:27 +02:00
$_inc_soundcard
2001-11-17 04:53:05 +01:00
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 18:58:29 +01:00
_def_ossaudio='#define USE_OSS_AUDIO 1'
_aosrc="$_aosrc ao_oss.c"
_aomodules="oss $_aomodules"
2002-02-22 14:47:31 +01:00
if test "$_linux_devfs" = yes; then
2002-03-30 20:25:11 +01:00
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound/dsp"'
2002-02-22 14:47:31 +01:00
_def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/sound/mixer"'
else
2003-01-19 16:43:12 +01:00
cat > $TMPC << EOF
#include <sys/ioctl.h>
$_inc_soundcard
#ifdef OPEN_SOUND_SYSTEM
int main(void) { return 0; }
#else
#error Not the real thing
#endif
EOF
_real_ossaudio=no
cc_check && _real_ossaudio=yes
if test "$_real_ossaudio" = yes; then
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
elif netbsd || openbsd ; then
2002-04-28 00:42:27 +02:00
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"'
2003-01-19 16:43:12 +01:00
_ld_arch="$_ld_arch -lossaudio"
2002-04-28 00:42:27 +02:00
else
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
fi
2002-02-22 14:47:31 +01:00
_def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/mixer"'
fi
2001-04-26 22:23:24 +02:00
else
2001-11-27 18:58:29 +01:00
_def_ossaudio='#undef USE_OSS_AUDIO'
2002-02-22 14:47:31 +01:00
_def_ossaudio_devdsp='#define PATH_DEV_DSP ""'
_def_ossaudio_devmixer='#define PATH_DEV_MIXER ""'
2002-03-12 08:16:29 +01:00
_noaomodules="oss $_noaomodules"
2001-04-26 22:23:24 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_ossaudio"
2001-04-26 22:23:24 +02:00
2001-11-17 04:53:05 +01:00
2002-05-28 03:52:40 +02:00
echocheck "aRts"
if test "$_arts" = auto ; then
_arts=no
2002-05-28 11:48:45 +02:00
if ( artsc-config --version ) >> "$TMPLOG" 2>&1 ; then
2002-05-29 23:23:19 +02:00
cat > $TMPC << EOF
#include <artsc.h>
int main(void) { return 0; }
EOF
cc_check `artsc-config --libs` `artsc-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _arts=yes
2002-05-28 03:52:40 +02:00
fi
fi
if test "$_arts" = yes ; then
_def_arts='#define USE_ARTS 1'
_aosrc="$_aosrc ao_arts.c"
_aomodules="arts $_aomodules"
_ld_arts=`artsc-config --libs`
_inc_arts=`artsc-config --cflags`
2002-05-30 13:42:55 +02:00
else
_noaomodules="arts $_noaomodules"
2002-05-28 03:52:40 +02:00
fi
echores "$_arts"
2002-12-27 17:02:57 +01:00
echocheck "EsounD"
if test "$_esd" = auto ; then
_esd=no
if ( esd-config --version ) >> "$TMPLOG" 2>&1 ; then
cat > $TMPC << EOF
#include <esd.h>
int main(void) { return 0; }
EOF
cc_check `esd-config --libs` `esd-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _esd=yes
fi
fi
2003-05-30 20:15:59 +02:00
echores "$_esd"
2002-12-27 17:02:57 +01:00
if test "$_esd" = yes ; then
_def_esd='#define USE_ESD 1'
_aosrc="$_aosrc ao_esd.c"
_aomodules="esd $_aomodules"
_ld_esd=`esd-config --libs`
_inc_esd=`esd-config --cflags`
2003-05-30 20:15:59 +02:00
echocheck "esd_get_latency()"
cat > $TMPC << EOF
#include <esd.h>
int main(void) { return esd_get_latency(0); }
EOF
cc_check `esd-config --libs` `esd-config --cflags` && _esd_latency=yes && _def_esd_latency='#define HAVE_ESD_LATENCY'
echores "$_esd_latency"
2002-12-27 17:02:57 +01:00
else
2003-05-30 20:15:59 +02:00
_def_esd='#undef USE_ESD'
_def_esd_latency='#undef HAVE_ESD_LATENCY'
2002-12-27 17:02:57 +01:00
_noaomodules="esd $_noaomodules"
fi
2001-11-17 04:53:05 +01:00
echocheck "ALSA audio"
2002-04-27 03:25:32 +02:00
if test "$_alsa" != no ; then
2001-11-17 04:53:05 +01:00
_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 18:45:23 +01:00
cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.5.x'
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <sys/asoundlib.h>
int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
EOF
2002-04-27 03:25:32 +02:00
cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.9.x-sys'
cat > $TMPC << EOF
#include <alsa/asoundlib.h>
int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
EOF
cc_check -lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver='0.9.x-alsa'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
_def_alsa5='#undef HAVE_ALSA5'
_def_alsa9='#undef HAVE_ALSA9'
2002-04-27 03:25:32 +02:00
_def_sys_asoundlib_h='#undef HAVE_SYS_ASOUNDLIB_H'
_def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H'
if test "$_alsaver" ; then
2001-11-17 04:53:05 +01:00
if test "$_alsaver" = '0.5.x' ; then
_aosrc="$_aosrc ao_alsa5.c"
2001-11-27 18:58:29 +01:00
_aomodules="alsa5 $_aomodules"
2001-11-17 04:53:05 +01:00
_def_alsa5='#define HAVE_ALSA5 1'
2002-04-27 03:25:32 +02:00
_def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
echores "yes (using alsa 0.5.x and sys/asoundlib.h)"
elif test "$_alsaver" = '0.9.x-sys' ; then
2001-11-17 04:53:05 +01:00
_aosrc="$_aosrc ao_alsa9.c"
2001-11-27 18:58:29 +01:00
_aomodules="alsa9 $_aomodules"
2001-11-17 04:53:05 +01:00
_def_alsa9='#define HAVE_ALSA9 1'
2002-04-27 03:25:32 +02:00
_def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
echores "yes (using alsa 0.9.x and sys/asoundlib.h)"
elif test "$_alsaver" = '0.9.x-alsa' ; then
_aosrc="$_aosrc ao_alsa9.c"
_aomodules="alsa9 $_aomodules"
_def_alsa9='#define HAVE_ALSA9 1'
_def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
echores "yes (using alsa 0.9.x and alsa/asoundlib.h)"
2001-11-17 04:53:05 +01:00
fi
2002-04-27 03:25:32 +02:00
_ld_alsa="-lasound $_ld_dl $_ld_pthread"
2002-03-12 08:16:29 +01:00
else
_noaomodules="alsa $_noaomodules"
2002-04-27 03:25:32 +02:00
echores "no"
2001-02-24 21:28:24 +01:00
fi
2001-10-10 03:48:54 +02:00
2001-11-17 04:53:05 +01:00
echocheck "Sun audio"
if test "$_sunaudio" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/audioio.h>
2001-11-20 17:16:47 +01:00
int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
2001-11-17 04:53:05 +01:00
EOF
_sunaudio=no
cc_check && _sunaudio=yes
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
if test "$_sunaudio" = yes ; then
_def_sunaudio='#define USE_SUN_AUDIO 1'
_aosrc="$_aosrc ao_sun.c"
2001-11-27 18:58:29 +01:00
_aomodules="sun $_aomodules"
2001-11-17 04:53:05 +01:00
else
_def_sunaudio='#undef USE_SUN_AUDIO'
2002-03-12 08:16:29 +01:00
_noaomodules="sun $_noaomodules"
2001-06-15 18:32:21 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_sunaudio"
2001-06-15 18:32:21 +02:00
2001-11-17 04:53:05 +01: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 02:09:22 +01:00
fi
2001-11-17 04:53:05 +01:00
if test "$_mlib" = yes ; then
_def_mlib='#define HAVE_MLIB 1'
_inc_mlib=" -I${_mlibdir}/include "
2001-11-20 20:35:03 +01:00
_ld_mlib=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib "
2001-11-17 04:53:05 +01:00
else
_def_mlib='#undef HAVE_MLIB'
fi
echores "$_mlib"
2001-02-27 02:09:22 +01:00
2001-11-17 04:53:05 +01:00
2002-04-27 03:25:32 +02:00
echocheck "SGI audio"
2001-11-17 04:53:05 +01:00
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 21:02:02 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_sgiaudio" = "yes" ; then
_def_sgiaudio='#define USE_SGI_AUDIO 1'
_ld_sgiaudio='-laudio'
_aosrc="$_aosrc ao_sgi.c"
2001-11-27 18:58:29 +01:00
_aomodules="sgi $_aomodules"
2001-11-17 04:53:05 +01:00
else
_def_sgiaudio='#undef USE_SGI_AUDIO'
2002-03-12 08:16:29 +01:00
_noaomodules="sgi $_noaomodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_sgiaudio"
2001-04-05 21:02:02 +02:00
2001-11-17 04:53:05 +01:00
2001-11-28 00:17:58 +01:00
echocheck "VCD support"
2002-04-28 00:42:27 +02:00
if linux || bsdos || freebsd || netbsd || sunos ; then
2001-11-28 00:17:58 +01:00
_inputmodules="vcd $_inputmodules"
2001-12-02 00:38:57 +01:00
_def_vcd='#define HAVE_VCD 1'
2001-11-28 00:17:58 +01:00
echores "ok"
else
2001-12-02 00:38:57 +01:00
_def_vcd='#undef HAVE_VCD'
2002-03-12 08:16:29 +01:00
_noinputmodules="vcd $_noinputmodules"
2001-11-28 00:17:58 +01:00
echores "not supported on this OS"
fi
2002-04-21 23:18:28 +02:00
echocheck "DVD support (libmpdvdkit)"
if test "$_dvdkit" = auto ; then
_dvdkit=no
2003-07-19 23:41:53 +02:00
if linux || freebsd || netbsd || darwin || cygwin || mingw32 || openbsd || sunos || hpux; then
2002-08-17 01:04:29 +02:00
test -f "./libmpdvdkit2/Makefile" && _dvdkit=yes
2002-04-24 21:37:10 +02:00
test -f "./libmpdvdkit/Makefile" && _dvdkit=yes
fi
2002-04-21 23:18:28 +02:00
fi
if test "$_dvdkit" = yes ; then
2003-07-19 23:41:53 +02:00
if test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || test "$_dvdio" = yes || test "$_bsdi_dvd" = yes || test "$_hpux_scsi_h" = yes || darwin || cygwin || mingw32 ; then
2002-08-17 01:04:29 +02:00
if test -f "./libmpdvdkit2/Makefile" ; then
_inputmodules="mpdvdkit2 $_inputmodules"
_dvdread=libmpdvdkit2
2002-08-17 11:34:53 +02:00
_dvdkit2=yes
_dvdkit=no
2002-08-17 01:04:29 +02:00
else
2002-04-23 18:29:13 +02:00
_inputmodules="mpdvdkit $_inputmodules"
2002-08-17 01:04:29 +02:00
_dvdread=libmpdvdkit
fi
2002-07-10 05:02:11 +02:00
else
_noinputmodules="mpdvdkit $_noinputmodules"
2002-04-23 18:29:13 +02:00
fi
2002-04-28 19:34:58 +02:00
_def_dvd_linux='#undef HAVE_LINUX_DVD_STRUCT'
_def_dvd_bsd='#undef HAVE_BSD_DVD_STRUCT'
2002-08-28 02:05:10 +02:00
_dev_dvd_openbsd='#undef HAVE_OPENBSD_DVD_STRUCT'
2002-12-04 22:33:36 +01:00
_def_dvd_darwin='#undef DARWIN_DVD_IOCTL'
2002-04-28 23:05:09 +02:00
if linux || netbsd || openbsd || bsdos ; then
2002-04-28 19:34:58 +02:00
_def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1'
2002-08-28 02:05:10 +02:00
if openbsd ; then
_dev_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1'
fi
2002-04-23 18:29:13 +02:00
else
2002-04-28 23:05:09 +02:00
if freebsd ; then
2002-04-28 19:34:58 +02:00
_def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1'
2002-12-04 22:33:36 +01:00
else
if darwin ; then
_def_dvd_darwin='#define DARWIN_DVD_IOCTL'
fi
2002-04-28 19:34:58 +02:00
fi
2002-04-24 23:34:41 +02:00
fi
2002-04-21 23:18:28 +02:00
else
_noinputmodules="mpdvdkit $_noinputmodules"
fi
2002-08-17 11:34:53 +02:00
if test "$_dvdkit" = yes || test "$_dvdkit2" = yes; then
echores "yes"
else
echores "no"
fi
2002-01-04 14:08:14 +01:00
echocheck "DVD support (libcss - old style)"
if test "$_css" = auto ; then
cat > $TMPC <<EOF
2002-01-05 13:29:25 +01:00
#include <sys/types.h>
2002-01-04 14:08:14 +01: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 08:16:29 +01:00
_noinputmodules="dvdcss $_noinputmodules"
2002-01-04 14:08:14 +01:00
echores "no"
fi
echocheck "DVD support (libdvdread - new style)"
2001-11-17 04:53:05 +01: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 13:04:20 +01: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 04:53:05 +01:00
fi
2002-04-24 23:17:22 +02:00
_def_mpdvdkit="#undef USE_MPDVDKIT"
2002-04-21 23:18:28 +02: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"
;;
2002-08-17 01:04:29 +02:00
libmpdvdkit)
2002-04-21 23:18:28 +02:00
_largefiles=yes
_def_dvdread='#define USE_DVDREAD 1'
_ld_css='-Llibmpdvdkit -lmpdvdkit'
_noinputmodules="dvdread $_noinputmodules"
2002-04-24 23:17:22 +02:00
_def_mpdvdkit="#define USE_MPDVDKIT 1"
2002-04-21 23:18:28 +02:00
echores "disabled by libmpdvdkit"
;;
2002-08-17 01:04:29 +02:00
libmpdvdkit2)
_largefiles=yes
_def_dvdread='#define USE_DVDREAD 1'
_ld_css='-Llibmpdvdkit2 -lmpdvdkit'
_noinputmodules="dvdread $_noinputmodules"
_def_mpdvdkit="#define USE_MPDVDKIT 2"
echores "disabled by libmpdvdkit2"
;;
2002-04-21 23:18:28 +02:00
esac
2001-02-27 02:09:22 +01:00
2002-04-22 11:31:13 +02:00
echocheck "DVD support (libdvdnav)"
2002-03-28 21:40:21 +01: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 23:18:28 +02:00
test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
2002-06-16 01:55:06 +02:00
if test -z "$_dvdnavconfig" ; then
if ( dvdnav-config --version ) >/dev/null 2>&1 ; then
_dvdnavconfig="dvdnav-config"
fi
fi
test -z "$_dvdnavdir" && test -n "$_dvdnavconfig" && _dvdnavdir=`$_dvdnavconfig --cflags`
2002-04-21 23:18:28 +02:00
_used_css=
2002-08-21 22:28:24 +02:00
test "$_dvdkit" = no && test "$_dvdkit2" = no && _used_css=$_ld_css
2002-11-22 11:14:37 +01:00
cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes
2002-03-28 21:40:21 +01:00
fi
if test "$_dvdnav" = yes ; then
_largefiles=yes
_def_dvdnav='#define USE_DVDNAV 1'
2002-06-16 01:55:06 +02:00
if test -n "$_legal_dvdnavdir" ; then
_ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
elif test -n "$_dvdnavconfig" ; then
_ld_css="$_ld_css `$_dvdnavconfig --libs`"
else
_ld_css="$_ld_css -ldvdnav"
fi
2002-08-11 19:14:41 +02:00
if test -n "$_dvdnavconfig" ; then
_dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
_def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
fi
2002-04-16 19:29:04 +02:00
if test -n "$_dvdnavdir" ; then
_inc_extra="$_inc_extra -I$_dvdnavdir"
fi
2002-03-28 21:40:21 +01:00
_inputmodules="dvdnav $_inputmodules"
echores "yes"
else
_def_dvdnav='#undef USE_DVDNAV'
_noinputmodules="dvdnav $_noinputmodules"
echores "no"
fi
2002-06-11 16:29:51 +02:00
echocheck "cdparanoia"
if test "$_cdparanoia" = auto ; then
cat > $TMPC <<EOF
#include <cdda_interface.h>
#include <cdda_paranoia.h>
// This need a better test. How ?
int main(void) { return 1; }
EOF
_cdparanoia=no
2003-02-08 23:29:05 +01:00
if cc_check $_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia -lm ; then
_cdparanoia=yes
else
for I in /usr/include/cdda /usr/local/include/cdda ; do
if cc_check -I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia -lm ; then
_cdparanoia=yes; _inc_cdparanoia="-I$I"; break
fi
done
fi
2002-06-11 16:29:51 +02:00
fi
if test "$_cdparanoia" = yes ; then
_def_cdparanoia='#define HAVE_CDDA'
2002-06-12 00:58:50 +02:00
_inputmodules="cdda $_inputmodules"
2002-06-11 16:29:51 +02:00
_ld_cdparanoia="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia"
2002-09-04 19:46:03 +02:00
openbsd && _ld_cdparanoia="$_ld_cdparanoia -lutil"
2002-06-11 16:29:51 +02:00
else
_def_cdparanoia='#undef HAVE_CDDA'
2002-06-12 00:58:50 +02:00
_noinputmodules="cdda $_noinputmodules"
2002-06-11 16:29:51 +02:00
fi
echores "$_cdparanoia"
2002-09-09 21:23:06 +02:00
echocheck "freetype >= 2.0.9"
2002-12-29 00:52:22 +01:00
if test "$_freetype" = auto ; then
2002-09-02 20:43:01 +02:00
if ( $_freetypeconfig --version ) >/dev/null 2>&1 ; then
2002-08-28 22:52:02 +02:00
cat > $TMPC << EOF
2002-09-02 01:26:37 +02:00
#include <stdio.h>
2002-08-28 22:52:02 +02:00
#include <freetype/freetype.h>
2002-09-09 21:23:06 +02:00
#if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
#error "Need FreeType 2.0.9 or newer"
2002-08-28 22:52:02 +02:00
#endif
int main()
{
2002-09-02 01:26:37 +02:00
FT_Library library;
FT_Int major=-1,minor=-1,patch=-1;
int err=FT_Init_FreeType(&library);
if(err){
printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
exit(err);
}
FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
(int)major,(int)minor,(int)patch );
if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
printf("Library and header version mismatch! Fix it in your distribution!\n");
exit(1);
}
2002-08-28 22:52:02 +02:00
return 0;
}
EOF
_freetype=no
2002-09-02 20:43:01 +02:00
cc_check `$_freetypeconfig --cflags` `$_freetypeconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _freetype=yes
2002-08-28 22:52:02 +02:00
else
_freetype=no
fi
fi
if test "$_freetype" = yes ; then
_def_freetype='#define HAVE_FREETYPE'
2002-09-02 20:43:01 +02:00
_inc_freetype=`$_freetypeconfig --cflags`
_ld_freetype=`$_freetypeconfig --libs`
2002-08-28 22:52:02 +02:00
else
_def_freetype='#undef HAVE_FREETYPE'
fi
echores "$_freetype"
2003-03-21 17:54:03 +01:00
echocheck "fribidi with charsets"
if test "$_fribidi" = yes ; then
if ( $_fribidiconfig --version ) >/dev/null 2>&1 ; then
cat > $TMPC << EOF
#include <stdio.h>
#include <fribidi/fribidi.h>
int main()
{
if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHARSET_UTF8) {
printf("Fribidi headers are not consistents with the library!\n");
exit(1);
}
return 0;
}
EOF
_fribidi=no
cc_check `$_fribidiconfig --cflags` `$_fribidiconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _fribidi=yes
else
_fribidi=no
fi
fi
if test "$_fribidi" = yes ; then
_def_fribidi='#define USE_FRIBIDI'
_inc_fribidi=`$_fribidiconfig --cflags`
_ld_fribidi=`$_fribidiconfig --libs`
else
_def_fribidi='#undef USE_FRIBIDI'
fi
echores "$_fribidi"
2001-11-17 04:53:05 +01:00
echocheck "zlib"
cat > $TMPC << EOF
#include <zlib.h>
2001-11-18 22:36:30 +01:00
int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
2001-11-17 04:53:05 +01: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 21:28:24 +01:00
else
2001-11-17 04:53:05 +01:00
_def_zlib='#undef HAVE_ZLIB'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_zlib"
2001-02-24 21:28:24 +01:00
2001-07-03 16:22:23 +02:00
2001-11-20 08:53:20 +01: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 20:17:10 +01:00
echores "no (Linux specific feature)"
2001-11-20 08:53:20 +01:00
fi
if test "$_rtc" = yes ; then
_def_rtc='#define HAVE_RTC 1'
else
_def_rtc='#undef HAVE_RTC'
fi
2001-11-20 10:26:44 +01:00
2002-10-29 17:50:34 +01:00
echocheck "external liblzo support"
if test "$_liblzo" = auto ; then
_liblzo=no
2002-10-13 23:40:10 +02:00
cat > $TMPC << EOF
#include <lzo1x.h>
int main(void) { lzo_init();return 0; }
EOF
2002-10-29 17:50:34 +01:00
cc_check -llzo && _liblzo=yes
2002-10-13 23:40:10 +02:00
fi
2002-10-29 17:50:34 +01:00
if test "$_liblzo" = yes ; then
_def_liblzo='#define USE_LIBLZO 1'
2002-10-29 23:01:09 +01:00
_ld_liblzo='-llzo'
2002-10-29 17:50:34 +01:00
_codecmodules="liblzo $_codecmodules"
2002-10-13 23:40:10 +02:00
else
2002-10-29 17:50:34 +01:00
_def_liblzo='#undef USE_LIBLZO'
_nocodecmodules="liblzo $_nocodecmodules"
2002-10-13 23:40:10 +02:00
fi
2002-10-29 17:50:34 +01:00
echores "$_liblzo"
2002-10-13 23:40:10 +02:00
2001-11-17 04:53:05 +01: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 01:38:41 +01:00
cc_check $_madlibdir -lmad && _mad=yes
2001-04-19 21:59:11 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_mad" = yes ; then
_def_mad='#define USE_LIBMAD 1'
_ld_mad='-lmad'
2002-04-21 04:44:25 +02:00
_codecmodules="libmad $_codecmodules"
2001-11-17 04:53:05 +01:00
else
_def_mad='#undef USE_LIBMAD'
2002-04-22 11:31:13 +02:00
_nocodecmodules="libmad $_nocodecmodules"
2001-11-17 04:53:05 +01:00
fi
echores "$_mad"
2001-02-24 21:28:24 +01:00
2001-10-23 15:59:10 +02:00
2001-11-17 04:53:05 +01:00
echocheck "OggVorbis support"
if test "$_vorbis" = auto ; then
_vorbis=no
cat > $TMPC << EOF
#include <vorbis/codec.h>
2002-03-26 13:43:01 +01:00
int main(void) { vorbis_packet_blocksize(0,0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
2001-11-19 01:38:41 +01:00
cc_check -lvorbis -logg -lm && _vorbis=yes
2001-11-17 04:53:05 +01:00
fi
2001-10-12 01:41:43 +02:00
if test "$_vorbis" = yes ; then
2001-11-17 04:53:05 +01:00
_def_vorbis='#define HAVE_OGGVORBIS 1'
2002-12-04 21:27:36 +01:00
if test "$_tremor" = yes ; then
_def_tremor='#define TREMOR 1'
2003-01-13 01:45:04 +01:00
_ld_vorbis='-lvorbisidec'
2002-12-04 21:27:36 +01:00
else
_def_tremor='#undef TREMOR'
_ld_vorbis='-lvorbis -logg'
fi
2002-04-21 04:44:25 +02:00
_codecmodules="libvorbis $_codecmodules"
2001-09-01 21:36:44 +02:00
else
2001-11-17 04:53:05 +01:00
_def_vorbis='#undef HAVE_OGGVORBIS'
2002-12-04 21:27:36 +01:00
_def_tremor='#undef TREMOR'
2002-04-22 11:31:13 +02:00
_nocodecmodules="libvorbis $_nocodecmodules"
2001-09-01 21:36:44 +02:00
fi
2001-11-17 04:53:05 +01:00
echores "$_vorbis"
2001-09-01 21:36:44 +02:00
2003-05-11 20:29:07 +02:00
echocheck "OggTheora support"
if test "$_theora" = auto ; then
_theora=no
cat > $TMPC << EOF
#include <theora/theora.h>
int main(void) { theora_version_number (); return 0; }
EOF
cc_check -ltheora -logg -lm && _theora=yes
fi
if test "$_theora" = yes ; then
_def_theora='#define HAVE_OGGTHEORA 1'
_codecmodules="libtheora $_codecmodules"
_ld_theora="-ltheora"
else
_def_theora='#undef HAVE_OGGTHEORA'
_nocodecmodules="libtheora $_nocodecmodules"
fi
echores "$_theora"
2001-06-05 13:20:14 +02:00
2003-07-11 22:24:20 +02:00
echocheck "Matroska support (0.5.0 or later)"
2003-05-03 16:54:08 +02:00
if test "$_matroska" != no ; then
2003-04-30 13:39:32 +02:00
_matroska=no
2003-07-11 22:24:20 +02:00
_TMPC=$TMPC
TMPC=${TMPC}pp
2003-04-30 13:39:32 +02:00
cat > $TMPC << EOF
2003-07-11 22:24:20 +02:00
#include <ebml/EbmlVersion.h>
#include <matroska/KaxVersion.h>
#if LIBEBML_VERSION < 000500
#error libebml is too old
#endif
#if LIBMATROSKA_VERSION < 000500
#error libmatroska is too old
#endif
2003-04-30 13:39:32 +02:00
int main(void) { return 0; }
EOF
2003-07-11 22:24:20 +02:00
cc_check -lmatroska -lebml -lstdc++ && _matroska=yes
2003-04-30 13:39:32 +02:00
if test "$_matroska" = no ; then
_saved_inc_extra=$_inc_extra
2003-07-11 22:24:20 +02:00
_inc_extra="$_inc_extra -I/usr/local/include"
cc_check -lmatroska -lebml -lstdc++ && _matroska=yes
2003-04-30 13:39:32 +02:00
if test "$_matroska" = no ; then
2003-07-11 22:24:20 +02:00
_inc_extra=$_saved_inc_extra
2003-04-30 13:39:32 +02:00
fi
fi
2003-07-11 22:24:20 +02:00
TMPC=$_TMPC
2003-04-30 13:39:32 +02:00
fi
if test "$_matroska" = yes ; then
_def_matroska='#define HAVE_MATROSKA 1'
_inputmodules="matroska $_inputmodules"
_ld_matroska="-lmatroska -lebml -lstdc++"
else
_def_matroska='#undef HAVE_MATROSKA'
_noinputmodules="matroska $_noinputmodules"
fi
echores "$_matroska"
2003-02-07 22:04:35 +01:00
echocheck "faad2 (AAC) support"
2002-03-19 00:30:04 +01:00
if test "$_faad" = auto ; then
_faad=no
cat > $TMPC << EOF
#include <faad.h>
2002-08-30 13:28:43 +02:00
int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; }
2002-03-19 00:30:04 +01:00
EOF
cc_check -lfaad -lm && _faad=yes
fi
if test "$_faad" = yes ; then
_def_faad='#define HAVE_FAAD 1'
_ld_faad='-lfaad'
2003-04-28 17:58:27 +02:00
_codecmodules="faad2 $_codecmodules"
2002-03-19 00:30:04 +01:00
else
_def_faad='#undef HAVE_FAAD'
2003-04-28 17:58:27 +02:00
_nocodecmodules="faad2 $_nocodecmodules"
2002-03-19 00:30:04 +01:00
fi
2003-02-07 22:04:35 +01:00
if test "$_faad" = yes; then
cat > $TMPC <<EOF
#include <faad.h>
#ifndef FAAD_MIN_STREAMSIZE
#error Too old version
#endif
int main(void) {
#ifdef FAAD2_VERSION
printf("%s",FAAD2_VERSION);
#else
printf("1.0");
#endif
return 0;
}
EOF
if cc_check $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then
_faad_version=`"$TMPO"`
2003-02-24 00:48:03 +01:00
_faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'`
2003-02-07 22:04:35 +01:00
_def_faad_version="#define FAADVERSION $_faad_tempversion"
echores "yes ($_faad_version)"
else
_faad=no
echores "no (failed to get version)"
fi
else
echores "$_faad"
fi
2002-03-19 00:30:04 +01:00
2001-12-29 00:44:12 +01:00
if test "$_win32" = auto ; then
2001-11-19 13:04:19 +01:00
if x86 ; then
2003-01-04 20:07:46 +01:00
qnx && _win32=no
else
_win32=no # x86 arch only
fi
fi
if test "$_win32" != no ; then
2001-11-17 04:53:05 +01:00
if test -z "$_win32libdir" ; then
2003-05-11 20:47:18 +02:00
for I in "$_libdir/codecs" "$_libdir/win32" /usr/local/lib/win32 /usr/lib/win32 ; do
2001-11-17 04:53:05 +01:00
if test -d "$I" ; then
_win32libdir="$I"
break;
fi;
done
fi
2003-01-04 20:07:46 +01:00
fi
echocheck "Win32 codec DLL support"
if test "$_win32" = auto ; then
_win32=no
test -n "$_win32libdir" && _win32=yes
2001-06-05 20:40:44 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_win32" = yes ; then
_def_win32='#define USE_WIN32DLL 1'
2003-05-11 20:47:18 +02:00
echores "yes (using $_win32libdir)"
2001-06-05 20:40:44 +02:00
else
2001-11-17 04:53:05 +01:00
_def_win32='#undef USE_WIN32DLL'
2002-03-12 08:16:29 +01:00
_nocodecmodules="win32 $_nocodecmodules"
2001-12-10 23:40:14 +01:00
_dshow=no
2003-01-04 20:07:46 +01:00
echores "no"
2001-06-05 20:40:44 +02:00
fi
2003-02-11 19:56:17 +01:00
if test "$_win32" != no ; then
_def_win32_loader='#undef WIN32_LOADER'
echocheck "Win32 loader support"
2003-05-11 20:53:12 +02:00
if not cygwin && not mingw32 ; then
2003-02-11 19:56:17 +01:00
_ld_win32='loader/libloader.a'
_dep_win32='loader/libloader.a'
_codecmodules="win32 $_codecmodules"
if openbsd ; then
x86 && _ld_win32="$_ld_win32 -li386"
fi
_def_win32_loader='#define WIN32_LOADER 1'
echores "yes"
else
2003-05-11 20:53:12 +02:00
_ld_win32='loader/driver.o loader/vfl.o loader/afl.o'
_dep_win32='loader/driver.o loader/vfl.o loader/afl.o'
_ld_win32libs="$_ld_win32libs -ladvapi32 -lole32"
_codecmodules="win32 $_codecmodules"
2003-02-11 19:56:17 +01:00
echores "no (using native windows)"
fi
fi
2001-12-30 20:17:10 +01:00
echocheck "DirectShow"
2001-12-10 23:40:14 +01:00
if false ; then
if test "$_dshow" != no ; then
2001-11-17 04:53:05 +01: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"
2003-01-26 16:42:11 +01:00
if ( $_cc "$TMPCPP" -o "$TMPO" && "$TMPO" ) >> "$TMPLOG" 2>&1 ; then
2001-11-17 04:53:05 +01:00
_dshow=yes
echores "yes (C++ is ok)"
else
echores "no"
cat << EOF
2001-06-09 01:30:09 +02:00
2001-11-17 04:53:05 +01:00
Your C++ runtime environment is broken.
2001-07-12 17:35:52 +02:00
2002-08-04 00:48:41 +02:00
Hints: Does $_cc support C++? Do you have you a C++ compiler installed?
Are the C++ libraries correctly installed?
Check for libstdc++ and in (/etc/)ld.so.conf.
2001-09-13 09:28:11 +02:00
2001-11-27 18:58:29 +01:00
If you do not need DirectShow support, you can also use:
2001-11-17 04:53:05 +01:00
./configure --disable-dshow <your-normal-configure-options>
2002-08-04 00:48:41 +02:00
to disable building the C++ based DirectShow code.
2001-07-12 17:35:52 +02:00
2001-11-17 04:53:05 +01:00
EOF
die "$_cc's C++ is broken"
fi
2001-07-12 17:35:52 +02:00
fi
2001-12-10 23:40:14 +01:00
fi
echores "$_dshow"
2001-11-17 04:53:05 +01:00
if test "$_dshow" = yes ; then
_def_dshow='#define USE_DIRECTSHOW 1'
2002-11-26 23:55:32 +01:00
_ld_dshow='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
_dep_dshow='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
_codecmodules="dshow/dmo $_codecmodules"
2001-07-12 17:35:52 +02:00
else
2001-11-17 04:53:05 +01:00
_def_dshow='#undef USE_DIRECTSHOW'
2002-11-26 23:55:32 +01:00
_nocodecmodules="dshow/dmo $_nocodecmodules"
2001-07-12 17:35:52 +02:00
fi
2001-11-17 04:53:05 +01:00
echocheck "XAnim DLL"
if test "$_xanim" = auto ; then
_xanim=no
2001-11-18 18:45:23 +01:00
if test "$_dl" = yes ; then
2001-12-01 15:41:54 +01:00
if test -z "$_xanimlibdir" ; then
2003-05-11 20:47:18 +02:00
for I in "$_libdir/codecs" /usr/local/lib/xanim/mods /usr/lib/xanim/mods /usr/lib/xanim $XANIM_MOD_DIR ; do
2001-11-17 04:53:05 +01:00
if test -d "$I" ; then
_xanimlibdir="$I"
break;
fi;
done
fi
2001-12-01 15:41:54 +01:00
test "$_xanimlibdir" && _xanim=yes
2001-12-07 00:23:06 +01:00
if test "$_xanim" = yes ; then
2001-12-30 20:17:10 +01:00
echores "yes (using $_xanimlibdir)"
2001-12-05 17:48:36 +01:00
else
2003-06-13 03:25:11 +02:00
echores "no (no suitable directory found - see DOCS/en/codecs.html)"
2001-12-05 17:48:36 +01:00
fi
2001-11-17 04:53:05 +01:00
else
2001-12-30 20:17:10 +01:00
echores "no (dynamic loader support needed)"
2001-11-17 04:53:05 +01:00
fi
2001-10-26 15:50:05 +02:00
else
2003-06-11 04:20:28 +02:00
echores "$_xanim (using $_xanimlibdir)"
2001-10-26 15:50:05 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_xanim" = yes ; then
_def_xanim='#define USE_XANIM 1'
_def_xanim_path="#define XACODEC_PATH \"$_xanimlibdir\""
2001-11-27 22:54:27 +01:00
_codecmodules="xanim $_codecmodules"
2001-11-14 20:02:39 +01:00
else
2001-11-17 04:53:05 +01:00
_def_xanim='#undef USE_XANIM'
_def_xanim_path='#undef XACODEC_PATH'
2002-03-12 08:16:29 +01:00
_nocodecmodules="xanim $_nocodecmodules"
2001-11-14 20:02:39 +01:00
fi
2002-06-13 02:14:28 +02:00
echocheck "RealPlayer DLL"
2002-06-09 03:19:48 +02:00
if test "$_real" = auto ; then
_real=no
2003-02-11 19:56:17 +01:00
if test "$_dl" = yes || test "$_win32" = yes ; then
# if test "$_dl" = yes ; then
2003-05-11 20:53:12 +02:00
if linux || freebsd || netbsd || cygwin || mingw32 ; then
2002-06-13 02:14:28 +02:00
_real=yes
else
2003-05-11 20:53:12 +02:00
echores "no (tested only on Linux/FreeBSD/NetBSD/Cygwin/MINGW32)"
2002-06-13 02:14:28 +02:00
fi
if test "$_real" = yes ; then
if test -z "$_reallibdir" ; then
2003-07-25 16:56:28 +02:00
for I in "$_libdir/codecs" "$_libdir/real" "$_libdir/win32" /usr/lib/real \
2003-05-13 00:52:23 +02:00
/usr/lib/RealPlayer{9,8,}/Codecs /usr/local/RealPlayer{9,8,}/Codecs \
2003-05-22 23:27:39 +02:00
/usr/local/lib/RealPlayer{9,8,}/Codecs /opt/RealPlayer{9,8,}/{Real/,}Codecs ; do
2002-06-13 02:14:28 +02:00
if test -d "$I" ; then
_reallibdir="$I"
2003-05-13 00:52:23 +02:00
break
fi
2002-06-13 02:14:28 +02:00
done
fi
2002-06-13 13:53:22 +02:00
test "$_reallibdir" || _real=no
if test "$_real" = yes ; then
echores "yes (using $_reallibdir)"
else
2003-06-13 03:25:11 +02:00
echores "no (no suitable directory found - see DOCS/en/codecs.html)"
2002-06-13 13:53:22 +02:00
fi
2002-06-09 03:19:48 +02:00
fi
else
echores "no (dynamic loader support needed)"
fi
else
2003-06-11 04:20:28 +02:00
echores "$_real (using $_reallibdir)"
2002-06-09 03:19:48 +02:00
fi
if test "$_real" = yes ; then
_def_real='#define USE_REALCODECS 1'
2002-06-13 02:14:28 +02:00
_def_real_path="#define REALCODEC_PATH \"$_reallibdir\""
2002-06-09 03:19:48 +02:00
_codecmodules="real $_codecmodules"
else
_def_real='#undef USE_REALCODECS'
2002-06-13 02:14:28 +02:00
_def_real_path="#undef REALCODEC_PATH"
2002-06-09 03:19:48 +02:00
_nocodecmodules="real $_nocodecmodules"
fi
2001-10-13 18:53:37 +02:00
2002-08-05 02:39:07 +02:00
if test -z "$_livelibdir" ; then
2002-10-20 14:33:22 +02:00
for I in $_libdir/live /usr/lib/live /usr/local/live /usr/local/lib/live; do
2002-08-05 02:39:07 +02:00
if test -d "$I" ; then
_livelibdir="$I"
break;
fi;
done
fi
echocheck "LIVE.COM Streaming Media libraries"
2003-05-17 14:24:01 +02:00
if test "$_live" = auto && test "$_network" = yes ; then
2002-08-05 02:39:07 +02:00
_live=yes
test "$_livelibdir" || _live=no
# TODO: deeper, more reliable test of libs, and version!
# (users may have empty live/ dir or something different there, for
# example 'live config files', or they may have old, incompatibel version)
fi
2003-05-17 14:24:01 +02:00
if test "$_live" = yes && test "$_network" = yes ; then
2002-08-05 02:39:07 +02:00
echores "yes (using $_livelibdir)"
_def_live='#define STREAMING_LIVE_DOT_COM 1'
_live_libs_def="# LIVE.COM Streaming Media libraries:
LIVE_LIB_DIR = $_livelibdir
LIVE_LIBS = \$(LIVE_LIB_DIR)/liveMedia/libliveMedia.a
LIVE_LIBS += \$(LIVE_LIB_DIR)/groupsock/libgroupsock.a
LIVE_LIBS += \$(LIVE_LIB_DIR)/UsageEnvironment/libUsageEnvironment.a
LIVE_LIBS += \$(LIVE_LIB_DIR)/BasicUsageEnvironment/libBasicUsageEnvironment.a
LIVE_LIBS += -lstdc++"
_ld_live='$(LIVE_LIBS)'
else
echores "no"
_def_live='#undef STREAMING_LIVE_DOT_COM'
fi
2001-11-17 04:53:05 +01:00
echocheck "iconv"
if test "$_iconv" = auto ; then
2002-08-29 01:00:25 +02:00
_iconv_tmp='#include <iconv.h>'
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
#include <stdio.h>
#include <unistd.h>
$_iconv_tmp
#define INBUFSIZE 1024
#define OUTBUFSIZE 4096
2001-06-22 00:28:50 +02:00
2001-11-17 04:53:05 +01:00
char inbuffer[INBUFSIZE];
char outbuffer[OUTBUFSIZE];
2001-10-11 14:25:20 +02:00
2001-11-17 04:53:05 +01:00
int main(void) {
2003-05-21 19:51:46 +02:00
size_t numread;
2001-11-17 04:53:05 +01:00
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
2002-08-31 04:13:20 +02:00
if cc_check -lm -liconv ; then
_iconv=yes
2002-09-03 19:13:08 +02:00
_ld_iconv='-liconv'
2001-11-17 04:53:05 +01:00
else
cc_check -lm && _iconv=yes
2001-08-20 23:20:03 +02:00
fi
2001-08-01 01:18:16 +02:00
fi
2001-11-17 04:53:05 +01:00
if test "$_iconv" = yes ; then
_def_iconv='#define USE_ICONV 1'
2001-02-24 21:28:24 +01:00
else
2001-11-17 04:53:05 +01:00
_def_iconv='#undef USE_ICONV'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_iconv"
2001-02-24 21:28:24 +01:00
2001-04-11 14:47:45 +02:00
2001-12-29 01:40:04 +01:00
echocheck "FFmpeg libavcodec (static)"
2001-12-30 00:34:53 +01:00
if test "$_libavcodec" = auto ; then
2001-11-22 11:06:30 +01:00
# Note: static linking is preferred to dynamic linking
2001-11-17 04:53:05 +01:00
_libavcodec=no
2001-12-30 05:03:27 +01: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 01:40:04 +01:00
_libavcodec=yes
echores "yes"
else
2001-12-30 20:17:10 +01:00
echores "no (old ffmpeg version, use CVS !)"
2001-12-29 01:40:04 +01:00
fi
else
2003-06-13 03:25:11 +02:00
echores "no (see DOCS/en/codecs.html)"
2001-12-29 01:40:04 +01:00
fi
else
2001-12-30 00:34:53 +01:00
echores "$_libavcodec"
2001-02-24 21:28:24 +01:00
fi
2001-12-30 00:34:53 +01:00
2001-12-30 14:19:53 +01:00
if test "$_libavcodec" != yes ; then
2001-12-29 01:40:04 +01:00
echocheck "FFmpeg libavcodec (dynamic)"
2001-12-30 14:19:53 +01:00
if test "$_libavcodecso" = auto ; then
2001-11-17 10:57:54 +01:00
_libavcodecso=no
2001-12-30 14:19:53 +01:00
# FIXME : check for avcodec_find_encoder_by_name() for mencoder
2001-11-17 04:53:05 +01:00
cat > $TMPC << EOF
2001-12-29 01:40:04 +01:00
#define FF_POSTPROCESS 1
2002-08-14 23:43:49 +02:00
#include <ffmpeg/avcodec.h>
int main(void) {
avcodec_find_encoder_by_name("");
return 0;
}
2001-11-17 04:53:05 +01:00
EOF
2002-08-14 23:43:49 +02:00
if cc_check -lavcodec -lm ; then
2001-12-29 01:40:04 +01:00
_libavcodecso=yes
2002-08-14 23:43:49 +02:00
echores "yes (using libavcodec.so)"
2001-12-29 01:40:04 +01:00
else
2002-08-14 23:43:49 +02:00
echores "no (libavcodec.so is broken/obsolete)"
2001-12-29 01:40:04 +01:00
fi
else
2001-12-30 14:19:53 +01:00
echores "$_libavcodecso"
fi
2001-05-09 09:54:56 +02:00
fi
2001-12-30 14:19:53 +01:00
2001-11-17 04:53:05 +01:00
_def_libavcodec='#undef USE_LIBAVCODEC'
2001-11-17 10:57:54 +01:00
_def_libavcodecso='#undef USE_LIBAVCODEC_SO'
2001-11-17 04:53:05 +01:00
_def_ffpostprocess='#undef FF_POSTPROCESS'
if test "$_libavcodec" = yes ; then
_def_libavcodec='#define USE_LIBAVCODEC 1'
2002-08-29 23:30:57 +02:00
_ld_libavcodec='libavcodec/libavcodec.a'
2001-11-17 04:53:05 +01:00
_dep_libavcodec='libavcodec/libavcodec.a'
_def_ffpostprocess='#define FF_POSTPROCESS 1'
2001-11-27 22:54:27 +01:00
_codecmodules="libavcodec $_codecmodules"
2001-11-17 10:57:54 +01:00
elif test "$_libavcodecso" = yes ; then
2002-08-14 23:43:49 +02:00
_def_libavcodec='#define USE_LIBAVCODEC 1'
2001-11-17 10:57:54 +01:00
_def_libavcodecso='#define USE_LIBAVCODEC_SO 1'
2002-08-14 23:43:49 +02:00
_ld_libavcodec='-lavcodec'
2001-11-17 04:53:05 +01:00
_def_ffpostprocess='#define FF_POSTPROCESS 1'
2001-11-27 22:54:27 +01:00
_codecmodules="libavcodec.so $_codecmodules"
2002-03-12 08:16:29 +01:00
else
_nocodecmodules="libavcodec $_nocodecmodules"
2001-02-24 21:28:24 +01:00
fi
2002-10-04 21:22:29 +02:00
echocheck "libdv-0.9.5+"
2002-04-13 18:51:01 +02:00
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"
2002-10-23 21:19:23 +02:00
_codecmodules="libdv $_codecmodules"
2002-04-13 18:51:01 +02:00
else
_def_libdv='#undef HAVE_LIBDV095'
2002-10-23 21:19:23 +02:00
_nocodecmodules="libdv $_nocodecmodules"
2002-04-13 18:51:01 +02:00
fi
echores "$_libdv"
2002-02-12 23:03:44 +01:00
2002-01-26 01:47:26 +01:00
echocheck "zr"
2002-08-06 16:23:23 +02:00
if test "$_zr" = auto ; then
#36067's seem to identify themselves as 36057PQC's, so the line
#below should work for 36067's and 36057's.
if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc/pci > /dev/null 2>&1; then
_zr=yes
else
_zr=no
fi
fi
2002-01-26 01:47:26 +01:00
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 08:16:29 +01:00
_novomodules="zr $_novomodules"
2002-01-26 01:47:26 +01:00
_def_zr='#undef HAVE_ZR'
fi
else
_def_zr='#undef HAVE_ZR'
2002-03-12 08:16:29 +01:00
_novomodules="zr $_novomodules"
2002-01-26 01:47:26 +01:00
echores "$_zr"
fi
2001-02-24 21:28:24 +01:00
2002-09-09 00:41:53 +02:00
echocheck "bl"
if test "$_bl" = yes ; then
_def_bl='#define HAVE_BL 1'
_vosrc="$_vosrc vo_bl.c"
_vomodules="bl $_vomodules"
else
_def_bl='#undef HAVE_BL'
_novomodules="bl $_novomodules"
fi
echores "$_bl"
2002-07-10 22:56:57 +02:00
echocheck "XviD"
2002-02-12 23:03:44 +01:00
cat > $TMPC << EOF
2002-07-10 22:56:57 +02:00
#include <xvid.h>
int main(void) { xvid_init(0, 0, 0, 0); return 0; }
2001-11-17 04:53:05 +01:00
EOF
2003-02-06 21:24:14 +01:00
if test "$_xvid" != no && cc_check "$_xvidcore" -lm ; then
2002-02-12 23:03:44 +01:00
_xvid=yes
2002-07-10 22:56:57 +02:00
_ld_xvid="$_xvidcore"
_def_xvid='#define HAVE_XVID 1'
2002-02-12 23:03:44 +01:00
_codecmodules="xvid $_codecmodules"
2003-02-06 21:24:14 +01:00
elif test "$_xvid" != no && cc_check -lxvidcore -lm ; then
2002-02-12 23:03:44 +01:00
_xvid=yes
2002-07-10 22:56:57 +02:00
_ld_xvid='-lxvidcore'
_def_xvid='#define HAVE_XVID 1'
_codecmodules="xvid $_codecmodules"
else
_xvid=no
_ld_xvid=''
_def_xvid='#undef HAVE_XVID'
_nocodecmodules="xvid $_nocodecmodules"
fi
echores "$_xvid"
_xvidcompat=no
2003-02-06 21:24:14 +01:00
_def_decore_xvid='#undef DECORE_XVID'
_def_encore_xvid='#undef ENCORE_XVID'
2002-07-10 22:56:57 +02:00
if test "$_xvid" = yes ; then
echocheck "DivX4 compatibility in XviD"
cat > $TMPC << EOF
#include <divx4.h>
int main(void) { (void) decore(0, 0, 0, 0); return 0; }
EOF
2002-07-13 14:02:57 +02:00
cc_check -lm "$_ld_xvid" && _xvidcompat=yes
2002-07-10 22:56:57 +02:00
echores "$_xvidcompat"
fi
2003-02-06 21:24:14 +01:00
2002-07-10 22:56:57 +02:00
echocheck "DivX4linux/DivX5linux/OpenDivX decore"
# DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
cat > $TMPC << EOF
#include <decore.h>
int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
EOF
if test "$_divx4linux" != no && cc_check -lm -ldivxdecore -lm ; then
2002-02-12 23:03:44 +01:00
_opendivx=no
2002-04-13 19:44:14 +02:00
_ld_decore='-ldivxdecore'
2002-02-12 23:03:44 +01:00
_def_decore='#define NEW_DECORE 1'
2002-02-03 01:52:51 +01:00
_def_divx='#define USE_DIVX'
2002-03-06 03:22:46 +01:00
_def_divx5='#undef DECORE_DIVX5'
2002-04-13 19:44:14 +02:00
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
2001-11-27 22:54:27 +01:00
_codecmodules="divx4linux $_codecmodules"
2002-03-06 03:22:46 +01:00
echores "DivX4linux (with libdivxdecore.so)"
2003-02-06 21:24:14 +01:00
else
# if test "$_divx4linux" != no ; then
2002-03-06 03:22:46 +01:00
# 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>
2003-06-06 21:57:37 +02:00
int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; }
2002-03-06 03:22:46 +01:00
EOF
2003-02-06 21:24:14 +01:00
if test "$_divx4linux" != no && cc_check -lm -ldivxdecore -lm ; then
2002-03-06 03:22:46 +01:00
_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 08:16:29 +01:00
_nocodecmodules="divx4linux $_nocodecmodules"
2002-03-06 03:22:46 +01:00
echores "DivX5linux (with libdivxdecore.so)"
2002-02-12 23:03:44 +01:00
elif test "$_opendivx" != no ; then
_opendivx=yes
2002-08-29 23:30:57 +02:00
_ld_decore='opendivx/libdecore.a'
2002-02-12 23:03:44 +01:00
_def_decore='#undef NEW_DECORE'
_def_divx='#define USE_DIVX'
2002-03-06 03:22:46 +01:00
_def_divx5='#undef DECORE_DIVX5'
2002-02-12 23:03:44 +01:00
_def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
_codecmodules="opendivx $_codecmodules"
2002-03-12 08:16:29 +01:00
_nocodecmodules="divx5linux $_nocodecmodules"
2002-02-12 23:03:44 +01:00
echores "OpenDivX"
2003-02-06 21:24:14 +01:00
elif test "$_xvidcompat" = yes ; then
_opendivx=no
_ld_decore=''
_def_decore='#define NEW_DECORE 1'
_def_divx='#define USE_DIVX 1'
_def_divx5='#undef DECORE_DIVX5'
_def_decore_xvid='#define DECORE_XVID 1'
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
_nocodecmodules="opendivx divx5linux divx4linux $_nocodecmodules"
echores "XviD compat."
2001-12-29 01:03:47 +01:00
else
2002-02-12 23:03:44 +01:00
_opendivx=no
_ld_decore=''
_def_decore='#undef NEW_DECORE'
_def_divx='#undef USE_DIVX'
2002-03-06 03:22:46 +01:00
_def_divx5='#undef DECORE_DIVX5'
2002-02-12 23:03:44 +01:00
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
2002-03-12 08:16:29 +01:00
_nocodecmodules="opendivx $_nocodecmodules"
2002-02-12 23:03:44 +01:00
echores "no"
2002-03-06 03:22:46 +01:00
fi # DivX5 check
2001-11-23 01:21:51 +01:00
fi
2002-07-27 20:33:44 +02:00
2002-02-12 23:03:44 +01:00
2001-12-30 14:19:53 +01:00
# mencoder requires (optional) those libs: libmp3lame and divx4linux encore
2001-12-10 13:07:03 +01:00
if test "$_mencoder" != no ; then
2001-12-30 20:11:11 +01:00
echocheck "libmp3lame (for mencoder)"
2001-12-10 13:07:03 +01:00
_mp3lame=no
2001-12-06 23:26:41 +01:00
cat > $TMPC <<EOF
#include <lame/lame.h>
2002-12-21 23:16:49 +01:00
int main(void) { lame_version_t lv; (void) lame_init(); get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor); return 0; }
2001-12-06 23:26:41 +01:00
EOF
# Note: libmp3lame usually depends on vorbis
2003-02-07 01:32:12 +01:00
cc_check -lmp3lame $_ld_vorbis -lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame=yes
2001-12-10 13:07:03 +01:00
if test "$_mp3lame" = yes ; then
2002-12-21 23:16:49 +01:00
_def_mp3lame="#define HAVE_MP3LAME `$TMPO`"
2001-12-06 23:26:41 +01:00
_ld_mp3lame="-lmp3lame $_ld_vorbis"
2001-12-10 13:07:03 +01:00
else
2001-12-06 23:26:41 +01:00
_def_mp3lame='#undef HAVE_MP3LAME'
2001-12-10 13:07:03 +01:00
fi
echores "$_mp3lame"
2001-12-06 23:26:41 +01:00
2002-02-12 23:03:44 +01:00
2003-02-06 21:24:14 +01:00
echocheck "DivX4linux encore (for mencoder)"
2002-02-12 23:03:44 +01:00
cat > $TMPC << EOF
2001-11-23 01:21:51 +01:00
#include <encore2.h>
2001-12-06 23:26:41 +01:00
int main(void) { (void) encore(0, 0, 0, 0); return 0; }
2001-11-23 01:21:51 +01:00
EOF
2003-02-06 21:24:14 +01:00
if test "$_divx4linux" != no && cc_check -ldivxencore -lm ; then
2002-02-12 23:03:44 +01:00
_def_encore='#define HAVE_DIVX4ENCORE 1'
2002-04-13 18:51:01 +02:00
_ld_encore='-ldivxencore'
2002-02-12 23:03:44 +01:00
echores "DivX4linux (with libdivxencore.so)"
2003-02-06 21:24:14 +01:00
elif test "$_xvidcompat" = yes ; then
_def_encore='#define HAVE_DIVX4ENCORE 1'
_ld_encore=''
_def_encore_xvid='#define ENCORE_XVID 1'
echores "XviD compat."
2001-12-10 13:07:03 +01:00
else
2001-12-30 14:19:53 +01:00
_def_encore='#undef HAVE_DIVX4ENCORE'
2002-02-12 23:03:44 +01:00
echores "no"
2001-11-17 04:53:05 +01:00
fi
2003-02-06 21:24:14 +01:00
2001-08-14 14:30:56 +02:00
fi
2001-12-10 13:07:03 +01:00
2002-01-15 18:03:19 +01:00
echocheck "mencoder"
_mencoder_flag='#undef HAVE_MENCODER'
if test "$_mencoder" = yes ; then
_mencoder_flag='#define HAVE_MENCODER'
fi
echores "$_mencoder"
2001-08-14 14:30:56 +02:00
2001-11-17 04:53:05 +01:00
echocheck "fastmemcpy"
2001-11-18 18:45:23 +01:00
# fastmemcpy check is done earlier with tests of CPU & binutils features
2001-11-17 04:53:05 +01:00
if test "$_fastmemcpy" = yes ; then
_def_fastmemcpy='#define USE_FASTMEMCPY 1'
2001-02-24 21:28:24 +01:00
else
2001-11-17 04:53:05 +01:00
_def_fastmemcpy='#undef USE_FASTMEMCPY'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_fastmemcpy"
2001-02-24 21:28:24 +01:00
2002-09-20 03:26:39 +02:00
echocheck "UniquE RAR File Library"
if test "$_unrarlib" = yes ; then
_def_unrarlib='#define USE_UNRARLIB 1'
else
_def_unrarlib='#undef USE_UNRARLIB'
fi
echores "$_unrarlib"
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
echocheck "TV interface"
if test "$_tv" = yes ; then
_def_tv='#define USE_TV 1'
2001-12-01 15:41:54 +01:00
_inputmodules="tv $_inputmodules"
2001-02-24 21:28:24 +01:00
else
2002-03-12 08:16:29 +01:00
_noinputmodules="tv $_noinputmodules"
2001-11-17 04:53:05 +01:00
_def_tv='#undef USE_TV'
2001-02-24 21:28:24 +01:00
fi
2001-11-17 04:53:05 +01:00
echores "$_tv"
2001-02-24 21:28:24 +01:00
2002-12-23 01:33:22 +01:00
echocheck "EDL support"
if test "$_edl" = yes ; then
_def_edl='#define USE_EDL'
_inputmodules="edl $_inputmodules"
else
_noinputmodules="edl $_noinputmodules"
_def_edl='#undef USE_EDL'
fi
echores "$_edl"
2002-03-15 17:10:29 +01: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>
2002-07-04 00:17:33 +02:00
#if defined(__NetBSD__)
2002-04-28 00:42:27 +02:00
#include <dev/ic/bt8xx.h>
#else
2002-03-15 17:10:29 +01:00
#include <machine/ioctl_bt848.h>
2002-04-28 00:42:27 +02:00
#endif
2002-03-15 17:10:29 +01:00
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 21:48:42 +01:00
_noinputmodules="tv-bsdbt848 $_noinputmodules"
2002-03-15 17:10:29 +01:00
fi
echores "$_tv_bsdbt848"
2001-12-01 16:05:08 +01:00
echocheck "Video 4 Linux TV interface"
2001-12-25 23:08:22 +01:00
if test "$_tv_v4l" = auto ; then
_tv_v4l=no
if test "$_tv" = yes && linux ; then
2002-07-12 05:26:46 +02:00
for I in /dev/video /dev/video? ; do
if test -c $I ; then
cat > $TMPC <<EOF
2001-12-28 19:14:23 +01:00
#include <stdlib.h>
2001-12-01 16:05:08 +01:00
#include <linux/videodev.h>
int main(void) { return 0; }
EOF
2002-07-12 05:26:46 +02:00
cc_check && _tv_v4l=yes
break
fi
done
2001-12-25 23:08:22 +01:00
fi
2001-12-01 16:05:08 +01:00
fi
if test "$_tv_v4l" = yes ; then
_def_tv_v4l='#define HAVE_TV_V4L 1'
_inputmodules="tv-v4l $_inputmodules"
else
2002-03-12 08:16:29 +01:00
_noinputmodules="tv-v4l $_noinputmodules"
2001-12-01 16:05:08 +01:00
_def_tv_v4l='#undef HAVE_TV_V4L'
fi
echores "$_tv_v4l"
2001-02-24 21:28:24 +01:00
2002-04-27 03:25:32 +02:00
echocheck "audio select()"
2001-11-29 19:56:08 +01:00
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"
2003-05-17 14:24:01 +02:00
echocheck "network"
# FIXME network check
if test "$_network" != no ; then
_def_network='#define MPLAYER_NETWORK 1'
_ld_network="$_ld_sock"
_inputmodules="network $_inputmodules"
2001-06-15 18:32:21 +02:00
else
2003-05-17 14:24:01 +02:00
_noinputmodules="network $_noinputmodules"
_def_network='#undef MPLAYER_NETWORK'
2001-06-15 18:32:21 +02:00
fi
2003-05-17 14:24:01 +02:00
echores "$_network"
2001-06-15 18:32:21 +02:00
2002-08-05 03:31:47 +02:00
# endian testing
echocheck "byte order"
if test "$_big_endian" = auto ; then
cat > $TMPC <<EOF
#include <inttypes.h>
int main(void) {
volatile uint32_t i=0x01234567;
return (*((uint8_t*)(&i))) == 0x67;
}
EOF
if cc_check ; then
if $TMPO ; then
_big_endian=yes
else
_big_endian=no
fi
else
echo -n "failed to autodetect byte order, defaulting to "
fi
fi
if test "$_big_endian" = yes ; then
_byte_order='Big Endian'
_def_words_endian='#define WORDS_BIGENDIAN 1'
else
_byte_order='Little Endian'
_def_words_endian='#undef WORDS_BIGENDIAN'
fi
echores "$_byte_order"
2001-02-24 21:28:24 +01:00
2002-10-28 20:31:04 +01:00
echocheck "shared postprocess lib"
echores "$_shared_pp"
2002-11-12 02:56:42 +01:00
echocheck "New config"
if test "$_new_conf" = yes ; then
_def_new_conf='#define NEW_CONFIG 1'
else
_def_new_conf='#undef NEW_CONFIG'
fi
echores "$_new_conf"
2002-11-15 00:49:05 +01:00
echocheck "OSD menu"
if test "$_menu" = yes ; then
test "$_new_conf" != yes && die "New config support needed for the OSD menu (--enable-new-conf)."
_def_menu='#define HAVE_MENU 1'
else
_def_menu='#undef HAVE_MENU'
fi
echores "$_menu"
2002-11-16 04:06:55 +01:00
# Check to see if they want QTX codecs enabled
echocheck "QTX codecs"
2003-05-29 13:50:23 +02:00
if test "$_qtx" = auto ; then
_qtx=$_win32
2002-12-05 21:31:05 +01:00
fi
2003-05-29 13:50:23 +02:00
if test "$_qtx" = yes ; then
_def_qtx='#define USE_QTX_CODECS 1'
2002-11-16 09:53:24 +01:00
_codecmodules="qtx $_codecmodules"
2002-11-16 04:06:55 +01:00
else
2003-05-29 13:50:23 +02:00
_def_qtx='#undef USE_QTX_CODECS'
2002-11-16 09:53:24 +01:00
_nocodecmodules="qtx $_nocodecmodules"
2002-11-16 04:06:55 +01:00
fi
2003-05-29 13:50:23 +02:00
echores "$_qtx"
2002-11-16 04:06:55 +01:00
2003-02-19 18:26:59 +01:00
2002-12-05 01:05:57 +01:00
echocheck "Subtitles sorting"
if test "$_sortsub" = yes ; then
_def_sortsub='#define USE_SORTSUB 1'
else
_def_sortsub='#undef USE_SORTSUB'
fi
echores "$_sortsub"
2002-12-22 22:01:01 +01:00
echocheck "XMMS inputplugin support"
if test "$_xmms" = yes ; then
if ( xmms-config --version ) >/dev/null 2>&1 ; then
if test -z "$_xmmsplugindir" ; then
_xmmsplugindir=`xmms-config --input-plugin-dir`
fi
if test -z "$_xmmslibdir" ; then
_xmmslibdir=`xmms-config --exec-prefix`/lib
fi
else
if test -z "$_xmmsplugindir" ; then
_xmmsplugindir=/usr/lib/xmms/Input
fi
if test -z "$_xmmslibdir" ; then
_xmmslibdir=/usr/lib
fi
fi
_def_xmms='#define HAVE_XMMS 1'
_xmms_lib="${_xmmslibdir}/libxmms.so.1 -export-dynamic"
else
_def_xmms='#undef HAVE_XMMS'
fi
echores "$_xmms"
2003-03-26 12:35:13 +01:00
echocheck "inet6"
if test "$_inet6" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/socket.h>
int main(void) { socket(AF_INET6, SOCK_STREAM, AF_INET6); }
EOF
_inet6=no
if cc_check ; then
_inet6=yes
fi
fi
if test "$_inet6" = yes ; then
_def_inet6='#define HAVE_AF_INET6 1'
else
_def_inet6='#undef HAVE_AF_INET6'
fi
echores "$_inet6"
echocheck "gethostbyname2"
if test "$_gethostbyname2" = auto ; then
cat > $TMPC << EOF
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int main(void) { gethostbyname2("", AF_INET); }
EOF
_gethostbyname2=no
if cc_check ; then
_gethostbyname2=yes
fi
fi
2003-04-10 14:12:56 +02:00
if test "$_gethostbyname2" = yes ; then
2003-03-26 12:35:13 +01:00
_def_gethostbyname2='#define HAVE_GETHOSTBYNAME2 1'
else
_def_gethostbyname2='#undef HAVE_GETHOSTBYNAME2'
fi
echores "$_gethostbyname2"
2001-11-17 04:53:05 +01:00
# --------------- GUI specific tests begin -------------------
echocheck "GUI"
echo "$_gui"
if test "$_gui" = yes ; then
2001-03-24 22:37:25 +01:00
2001-11-29 17:47:07 +01:00
# Required libraries
2003-01-20 23:56:00 +01:00
test "$_png" != yes && die "PNG support required for GUI compilation, please install libpng and libpng-dev packages."
2001-11-29 17:47:07 +01:00
test "$_x11" != yes && die "X11 support required for GUI compilation"
2001-11-17 04:53:05 +01: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 01:38:41 +01:00
cc_check $_inc_x11 $_ld_x11 && _xshape=yes
2001-11-17 04:53:05 +01: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 03:48:54 +02:00
2001-06-21 17:16:52 +02:00
2001-11-17 04:53:05 +01: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 20:17:10 +01:00
echores "$_gtk (using $_gtkconfig)"
2001-11-17 04:53:05 +01: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 20:17:10 +01:00
echores "$_glib (using $_glibconfig)"
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
_def_gui='#define HAVE_NEW_GUI 1'
2001-12-10 01:54:50 +01:00
_ld_gui='$(GTKLIB) $(GLIBLIB)'
2001-02-24 21:28:24 +01:00
2001-11-18 22:36:30 +01:00
echo "Creating Gui/config.mak"
2001-11-18 18:45:23 +01:00
cat > Gui/config.mak << EOF
# -------- Generated by configure -----------
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
GTKINC = $_inc_gtk
GTKLIBS = $_ld_gtk
GLIBINC = $_inc_glib
GLIBLIBS = $_ld_glib
2001-09-27 14:23:54 +02:00
2001-11-17 04:53:05 +01:00
EOF
2001-04-05 21:02:02 +02:00
2001-02-27 01:23:54 +01:00
else
2001-11-17 04:53:05 +01:00
_def_gui='#undef HAVE_NEW_GUI'
2001-02-27 01:23:54 +01:00
fi
2001-11-17 04:53:05 +01:00
# --------------- GUI specific tests end -------------------
2001-02-27 01:23:54 +01:00
2001-03-28 21:58:45 +02:00
2001-08-25 23:05:23 +02:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-03-28 14:08:44 +02:00
2001-11-17 04:53:05 +01:00
# Checking for CFLAGS
2002-05-30 16:26:35 +02:00
_stripbinaries=yes
2002-09-03 19:13:08 +02:00
if test "$_profile" != "" || test "$_debug" != "" ; then
2003-02-23 02:45:41 +01:00
CFLAGS="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
2003-02-24 00:44:16 +01:00
if test "$_cc_major" -ge "3" ; then
CFLAGS=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
fi
2002-05-30 16:26:35 +02:00
_stripbinaries=no
2001-11-17 04:53:05 +01:00
elif test -z "$CFLAGS" ; then
2001-11-19 13:04:19 +01:00
if test "$host_arch" != "mips" ; then
2002-11-25 03:19:27 +01:00
CFLAGS="-O4 $_march $_mcpu -pipe -ffast-math -fomit-frame-pointer"
2001-11-17 04:53:05 +01:00
else
2002-11-25 03:19:27 +01:00
CFLAGS="-O4 $_march $_mcpu -ffast-math -fomit-frame-pointer"
2001-11-17 04:53:05 +01:00
fi
2002-05-18 19:45:26 +02:00
# always compile with '-g' if .developer:
if test -f ".developer" ; then
CFLAGS="-g $CFLAGS"
2002-05-30 16:26:35 +02:00
_stripbinaries=no
2002-05-18 19:45:26 +02:00
fi
2001-11-05 22:49:20 +01:00
else
2001-11-17 04:53:05 +01:00
cat <<EOF
2001-11-05 22:49:20 +01:00
2002-08-04 00:48:41 +02:00
MPlayer compilation will use the CFLAGS set by you, but:
2002-05-18 19:45:26 +02:00
2002-08-04 00:48:41 +02:00
*** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
2001-11-11 05:26:54 +01:00
2002-08-04 00:48:41 +02:00
It is strongly recommended to let MPlayer choose the correct CFLAGS!
2001-11-17 04:53:05 +01:00
To do so, execute 'CFLAGS= ./configure <options>'
2001-11-14 11:49:12 +01:00
2001-11-17 04:53:05 +01:00
EOF
2001-11-03 03:36:02 +01:00
fi
2002-05-03 21:00:54 +02:00
if darwin ; then
# use gnu style cpp on Darwin
2002-06-08 00:41:26 +02:00
CFLAGS="$CFLAGS -no-cpp-precomp -DSYS_DARWIN"
2003-01-09 20:01:24 +01:00
# libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
test "$_altivec" = yes && CFLAGS="$CFLAGS -DCONFIG_DARWIN"
2002-05-03 21:00:54 +02:00
fi
2002-08-09 23:30:21 +02:00
if hpux ; then
# use flag for HPUX missing setenv()
CFLAGS="$CFLAGS -DHPUX"
fi
2001-11-17 04:53:05 +01: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 14:17:03 +02:00
fi
2001-11-17 04:53:05 +01:00
# 64 bit file offsets?
2001-12-05 00:10:59 +01:00
if test "$_largefiles" = yes || freebsd ; then
2001-11-17 04:53:05 +01:00
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
2001-12-05 00:10:59 +01:00
if test "$_dvdread" = yes ; then
2001-11-17 04:53:05 +01:00
# dvdread support requires this (for off64_t)
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
fi
2001-08-01 00:20:43 +02:00
fi
2002-04-12 12:40:38 +02: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 04:53:05 +01:00
# Determine OS dependent libs
2001-11-18 18:45:23 +01:00
if cygwin ; then
_confcygwin='TARGET_CYGWIN = yes'
_def_confwin32='#define WIN32'
2002-07-27 20:33:44 +02:00
#CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
# stat.st_size with BIG_TYPES is broken (not set) ::atmos
CFLAGS="$CFLAGS -D__CYGWIN__"
2001-08-17 02:38:10 +02:00
else
2001-11-18 18:45:23 +01:00
_confcygwin="TARGET_CYGWIN = no"
2001-08-17 02:38:10 +02:00
fi
2001-07-03 09:50:52 +02:00
2003-04-21 23:07:35 +02:00
if mingw32 ; then
_confmingw32='TARGET_MINGW32 = yes'
else
_confmingw32='TARGET_MINGW32 = no'
fi
2001-11-22 11:06:30 +01: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'
2002-06-09 03:19:48 +02:00
test "$_real" = yes && _ld_dl_dynamic='-rdynamic'
2001-11-22 11:06:30 +01:00
_ld_arch="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
2001-11-17 04:53:05 +01:00
bsdos && _ld_arch="$_ld_arch -ldvd"
2002-07-04 00:17:33 +02:00
if netbsd ; then
2002-05-10 03:50:17 +02:00
x86 && _ld_arch="$_ld_arch -li386"
fi
2001-11-17 04:53:05 +01:00
_def_debug='#undef MP_DEBUG'
2002-09-03 19:13:08 +02:00
test "$_debug" != "" && _def_debug='#define MP_DEBUG 1'
2001-11-17 04:53:05 +01:00
_def_linux='#undef TARGET_LINUX'
linux && _def_linux='#define TARGET_LINUX 1'
2001-07-03 09:50:52 +02:00
2003-01-31 02:47:55 +01:00
# TODO cleanup the VIDIX stuff here
2002-01-11 18:20:43 +01:00
_def_vidix='#define CONFIG_VIDIX 1'
test "$_vidix" = no && _def_vidix='#undef CONFIG_VIDIX'
2002-01-15 13:13:53 +01:00
if test "$_vidix" = yes && test "$_x11" = yes; then
2002-01-15 13:35:16 +01:00
_vosrc="$_vosrc vo_xvidix.c"
2002-01-15 13:13:53 +01:00
_vomodules="xvidix $_vomodules"
2002-03-12 08:16:29 +01:00
else
_novomodules="xvidix $_novomodules"
2002-01-15 13:13:53 +01:00
fi
2002-01-11 18:20:43 +01:00
echo Checking for vidix ... "$_vidix"
2002-02-03 13:43:18 +01:00
_def_joystick='#undef HAVE_JOYSTICK'
2002-08-28 17:55:58 +02: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)"
2002-02-03 13:43:18 +01:00
fi
fi
2002-08-28 17:55:58 +02:00
echo Checking for joystick ... "$_joystick"
2002-02-03 13:43:18 +01:00
2002-02-23 22:20:16 +01: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'
2002-08-28 17:55:58 +02:00
_ld_lirc='-llirc_client'
2002-02-23 22:20:16 +01:00
else
_def_lirc='#undef HAVE_LIRC'
fi
echores "$_lirc"
2003-05-30 20:23:55 +02:00
echocheck "lircc"
if test "$_lircc" = auto ; then
_lircc=no
cat > $TMPC <<EOF
#include <lirc/lircc.h>
int main(void) { return 0; }
EOF
cc_check -llircc && _lircc=yes
fi
if test "$_lircc" = yes ; then
_def_lircc='#define HAVE_LIRCC 1'
_ld_lircc='-llircc'
else
_def_lircc='#undef HAVE_LIRCC'
fi
echores "$_lircc"
2002-02-23 22:20:16 +01:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-11-18 18:45:23 +01:00
echo "Creating config.mak"
cat > config.mak << EOF
# -------- Generated by configure -----------
2001-11-17 04:53:05 +01:00
LANG = C
2003-02-17 14:06:03 +01:00
LANGUAGES = $LANGUAGES
2001-11-17 04:53:05 +01:00
TARGET_OS = $system_name
2002-06-24 10:23:48 +02:00
DESTDIR =
prefix = \$(DESTDIR)$_prefix
2002-09-01 16:40:09 +02:00
BINDIR = \$(DESTDIR)$_bindir
2002-06-24 10:23:48 +02:00
DATADIR = \$(DESTDIR)$_datadir
2002-09-01 16:40:09 +02:00
MANDIR = \$(DESTDIR)$_mandir
2002-06-24 10:23:48 +02:00
CONFDIR = \$(DESTDIR)$_confdir
LIBDIR = \$(DESTDIR)$_libdir
2002-05-10 03:50:17 +02:00
#AR = ar
2001-11-17 04:53:05 +01:00
CC = $_cc
2002-01-15 15:49:36 +01:00
AWK = $_awk
2002-12-05 00:29:41 +01:00
RANLIB = $_ranlib
INSTALL = $_install
2001-11-17 04:53:05 +01:00
# OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu -pipe -fomit-frame-pointer -ffast-math
2002-01-26 01:47:26 +01:00
OPTFLAGS = $CFLAGS
2001-11-17 04:53:05 +01:00
EXTRA_INC = $_inc_extra $_inc_gtk
2002-05-30 16:26:35 +02:00
STRIPBINARIES = $_stripbinaries
2001-11-17 04:53:05 +01:00
2002-08-05 02:39:07 +02:00
$_live_libs_def
2003-05-17 14:24:01 +02:00
MPLAYER_NETWORK = $_network
2002-08-05 02:39:07 +02:00
STREAMING_LIVE_DOT_COM = $_live
2003-05-17 14:24:01 +02:00
MPLAYER_NETWORK_LIB = $_ld_network $_ld_live
2003-03-22 20:15:23 +01:00
DVBIN = $_dvbin
2002-01-11 18:20:43 +01:00
VIDIX = $_vidix
2002-10-28 20:31:04 +01:00
SHARED_PP = $_shared_pp
2003-02-14 22:45:45 +01:00
CONFIG_PP = yes
2003-01-29 13:16:18 +01:00
CONFIG_RISKY = yes
2002-11-15 00:49:05 +01:00
LIBMENU = $_menu
2003-02-07 19:56:55 +01:00
I18NLIBS = $_i18n_libs
2003-04-30 13:39:32 +02:00
MATROSKA = $_matroska
MATROSKA_LIB = $_ld_matroska
2001-11-17 04:53:05 +01:00
2002-02-03 01:52:51 +01:00
OPENDIVX = $_opendivx
2002-09-20 03:26:39 +02:00
UNRARLIB = $_unrarlib
2002-02-11 10:15:59 +01:00
PNG = $_mkf_png
2002-03-10 23:49:18 +01:00
JPEG = $_mkf_jpg
2002-05-12 03:07:25 +02:00
GIF = $_mkf_gif
2002-02-11 10:15:59 +01:00
2001-11-27 18:58:29 +01:00
EXTRA_LIB = $_ld_extra
Z_LIB = $_ld_static $_ld_zlib
2001-11-29 20:00:48 +01:00
HAVE_MLIB = $_mlib
2002-10-25 18:25:41 +02:00
WIN32_LIB = $_ld_win32libs
2001-11-27 18:58:29 +01:00
STATIC_LIB = $_ld_static
2001-11-17 04:53:05 +01:00
X11_INC = $_inc_x11
2001-11-27 18:58:29 +01:00
X11DIR = $_ld_x11
2002-05-20 05:25:26 +02:00
# for libavcodec:
SRC_PATH=.
2001-11-27 18:58:29 +01:00
# video output
2003-06-21 03:47:26 +02:00
X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_mad $_ld_sock
2001-11-27 18:58:29 +01:00
GGI_LIB = $_ld_ggi
MLIB_LIB = $_ld_mlib
2001-11-29 20:00:48 +01:00
MLIB_INC = $_inc_mlib
2002-05-13 15:15:40 +02:00
DXR2_INC = $_inc_dxr2
2002-04-04 15:21:13 +02:00
DVB_INC = $_inc_dvb
2001-11-27 18:58:29 +01:00
PNG_LIB = $_ld_png
2002-03-10 23:49:18 +01:00
JPEG_LIB = $_ld_jpg
2002-05-12 03:07:25 +02:00
GIF_LIB = $_ld_gif
2001-11-27 18:58:29 +01:00
SDL_LIB = $_ld_sdl
SVGA_LIB = $_ld_svga
AA_LIB = $_ld_aa
# audio output
ALSA_LIB = $_ld_alsa
2001-12-03 02:13:48 +01:00
NAS_LIB = $_ld_nas
2002-05-28 03:52:40 +02:00
ARTS_LIB = $_ld_arts
ARTS_INC = $_inc_arts
2002-12-27 17:02:57 +01:00
ESD_LIB = $_ld_esd
ESD_INC = $_inc_esd
2001-11-27 18:58:29 +01:00
SGIAUDIO_LIB = $_ld_sgiaudio
2001-11-17 04:53:05 +01:00
2002-10-23 16:45:01 +02:00
# input/demuxer/codecs
2001-11-27 18:58:29 +01:00
TERMCAP_LIB = $_ld_termcap
LIRC_LIB = $_ld_lirc
2003-05-30 20:23:55 +02:00
LIRCC_LIB = $_ld_lircc
2001-11-17 04:53:05 +01:00
CSS_USE = $_css
2001-11-27 18:58:29 +01:00
CSS_LIB = $_ld_css
2002-04-21 23:18:28 +02:00
DVDKIT = $_dvdkit
2002-08-17 11:34:53 +02:00
DVDKIT2 = $_dvdkit2
2002-04-24 22:00:13 +02:00
DVDKIT_SHARED = no
2001-11-17 04:53:05 +01:00
SDL_INC = $_inc_sdl
W32_DEP = $_dep_win32
2001-11-27 18:58:29 +01:00
W32_LIB = $_ld_win32
2001-11-17 04:53:05 +01:00
DS_DEP = $_dep_dshow
2001-11-27 18:58:29 +01:00
DS_LIB = $_ld_dshow
2001-11-17 14:23:13 +01:00
AV_DEP = $_dep_libavcodec
2001-11-27 18:58:29 +01:00
AV_LIB = $_ld_libavcodec
2002-04-26 19:18:02 +02:00
FAME = $_fame
FAME_LIB = $_ld_fame
2001-12-10 15:41:44 +01:00
MP1E_DEP = $_dep_mp1e
MP1E_LIB = $_ld_mp1e
2001-11-27 18:58:29 +01:00
ARCH_LIB = $_ld_arch $_ld_iconv
2002-02-12 23:03:44 +01:00
XVID = $_xvid
2002-07-10 22:56:57 +02:00
XVID_LIB = $_ld_xvid
2002-10-23 16:45:01 +02:00
DECORE_LIB = $_ld_decore
2001-11-23 01:21:51 +01:00
MENCODER = $_mencoder
2002-08-05 19:23:22 +02:00
ENCORE_LIB = $_ld_encore $_ld_mp3lame
2002-06-02 00:20:19 +02:00
DIRECTFB_INC = $_inc_directfb
2001-12-03 02:09:36 +01:00
DIRECTFB_LIB = $_ld_directfb
2002-08-28 22:52:02 +02:00
CDPARANOIA_INC = $_inc_cdparanoia
2002-06-11 16:29:51 +02:00
CDPARANOIA_LIB = $_ld_cdparanoia
2002-08-28 22:52:02 +02:00
FREETYPE_INC = $_inc_freetype
FREETYPE_LIB = $_ld_freetype
2003-03-21 17:54:03 +01:00
FRIBIDI_INC = $_inc_fribidi
FRIBIDI_LIB = $_ld_fribidi
2002-10-29 17:50:34 +01:00
LIBLZO_LIB= $_ld_liblzo
2002-10-23 16:45:01 +02:00
MAD_LIB = $_ld_mad
VORBIS_LIB = $_ld_vorbis $_ld_libdv
2003-05-11 20:29:07 +02:00
THEORA_LIB = $_ld_theora
2002-10-23 16:45:01 +02:00
FAAD_LIB = $_ld_faad
2003-03-21 17:06:11 +01:00
SMBSUPPORT_LIB = $_ld_smb
2002-12-22 22:01:01 +01:00
XMMS_PLUGINS = $_xmms
XMMS_LIB = $_xmms_lib
2003-02-19 18:26:59 +01:00
MACOSX = $_macosx
MACOSX_FRAMEWORKS = $_macosx_frameworks
2001-07-03 09:50:52 +02:00
# --- Some stuff for autoconfigure ----
2001-07-12 17:35:52 +02:00
$_target_arch
2001-08-03 20:34:59 +02:00
$_confcygwin
2003-04-21 23:07:35 +02:00
$_confmingw32
2001-07-03 09:50:52 +02:00
TARGET_CPU=$iproc
2001-11-17 04:53:05 +01:00
TARGET_MMX = $_mmx
TARGET_MMX2 = $_mmx2
TARGET_3DNOW = $_3dnow
TARGET_3DNOWEX = $_3dnowex
TARGET_SSE = $_sse
2002-11-11 10:37:29 +01:00
TARGET_ALTIVEC = $_altivec
2001-08-25 23:05:23 +02:00
# --- GUI stuff ---
2001-11-19 01:38:41 +01:00
GTKLIB = $_ld_static $_ld_gtk
GLIBLIB = $_ld_static $_ld_glib
2001-12-10 01:54:50 +01:00
GTK_LIBS = $_ld_static $_ld_gui
2001-11-17 04:53:05 +01:00
GUI = $_gui
DEBUG = -DDEBUG
2001-08-25 23:05:23 +02:00
2001-07-03 09:50:52 +02:00
EOF
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-11-18 18:45:23 +01:00
echo "Creating config.h"
cat > config.h << EOF
2001-12-10 13:07:03 +01: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 21:28:24 +01:00
2002-08-04 00:48:41 +02:00
/* use GNU internationalization */
2002-03-15 21:48:42 +01:00
$_def_i18n
2002-08-16 00:52:52 +02:00
/* use setlocale() function */
$_def_setlocale
2002-08-04 00:48:41 +02:00
/* Runtime CPU detection */
2002-03-15 23:16:02 +01:00
$_def_runtime_cpudetection
2002-11-11 19:25:02 +01:00
/* Dynamic a/v plugins */
$_def_dynamic_plugins
2002-07-06 17:20:10 +02:00
/* "restrict" keyword */
#define restrict $_def_restrict_keyword
2002-03-16 22:20:03 +01:00
#define PREFIX "$_prefix"
2002-01-13 15:44:04 +01:00
2001-11-19 02:57:27 +01:00
/* define this to use simple idct with patched libavcodec */
#define SIMPLE_IDCT 1
2001-11-19 02:52:40 +01:00
2001-11-17 04:53:05 +01:00
#define USE_OSD 1
#define USE_SUB 1
2001-07-30 04:00:54 +02:00
2002-03-27 04:45:55 +01:00
/* enable/disable SIGHANDLER */
$_def_sighandler
2001-12-10 13:07:03 +01:00
/* Toggles debugging informations */
2001-11-17 04:53:05 +01:00
$_def_debug
2001-08-17 02:38:10 +02:00
2002-04-24 23:17:22 +02:00
/* Indicates that Ogle's libdvdread is available for DVD playback */
2001-11-17 04:53:05 +01:00
$_def_dvdread
2001-08-20 23:20:03 +02:00
2002-04-24 23:17:22 +02:00
/* Indicates that dvdread is from libmpdvdkit */
$_def_mpdvdkit
2002-04-23 18:29:13 +02:00
/* Additional options for libmpdvdkit*/
$_def_dvd
$_def_cdrom
$_def_cdio
$_def_dvdio
$_def_bsdi_dvd
$_def_dvd_bsd
2002-04-24 23:34:41 +02:00
$_def_dvd_linux
2002-08-28 02:05:10 +02:00
$_dev_dvd_openbsd
2002-12-04 22:33:36 +01:00
$_def_dvd_darwin
2002-04-23 18:29:13 +02:00
$_def_sol_scsi_h
2002-09-14 00:04:11 +02:00
$_def_hpux_scsi_h
2002-04-23 18:29:13 +02:00
$_def_stddef
2001-07-20 02:01:09 +02:00
/* Common data directory (for fonts, etc) */
2003-06-09 14:15:48 +02:00
#define MPLAYER_DATADIR "$_datadir"
#define MPLAYER_CONFDIR "$_confdir"
#define MPLAYER_LIBDIR "$_libdir"
2001-07-20 02:01:09 +02:00
2001-10-28 23:56:44 +01:00
/* Define this to compile stream-caching support, it can be enabled via
-cache <kilobytes> */
2003-06-09 12:44:34 +02:00
#define USE_STREAM_CACHE 1
2001-10-28 23:56:44 +01:00
2002-02-12 23:03:44 +01:00
/* Define to include support for XviD/Divx4Linux/OpenDivx */
2002-02-03 01:52:51 +01:00
$_def_divx
2002-08-04 00:48:41 +02:00
/* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */
/* You have to change DECORE_LIBS in config.mak, too! */
2001-11-17 04:53:05 +01:00
$_def_decore
2001-12-10 13:07:03 +01:00
2002-03-06 03:22:46 +01:00
/* Define if you are using DivX5Linux Decore library */
$_def_divx5
2002-07-10 22:56:57 +02:00
/* Define if you are using XviD library */
$_def_xvid
2003-02-06 21:24:14 +01:00
$_def_decore_xvid
$_def_encore_xvid
2002-07-10 22:56:57 +02:00
2002-04-13 18:51:01 +02:00
/* Define to include support for libdv-0.9.5 */
$_def_libdv
2002-01-15 18:03:19 +01:00
/* If build mencoder */
$_mencoder_flag
2002-02-12 23:03:44 +01:00
/* Indicates if XviD/Divx4linux encore is available
2001-12-30 20:11:11 +01:00
Note: for mencoder */
2001-11-17 04:53:05 +01:00
$_def_encore
2001-07-20 00:43:19 +02:00
2001-12-10 13:07:03 +01:00
/* Indicates if libmp3lame is available
2001-12-30 20:11:11 +01:00
Note: for mencoder */
2001-12-06 23:26:41 +01:00
$_def_mp3lame
2002-01-12 22:07:17 +01:00
/* Define libmp1e for realtime mpeg encoding (for DXR3 and DVB cards) */
2001-12-10 15:41:44 +01:00
$_def_mp1e
2001-02-24 21:28:24 +01:00
/* Define this to enable avg. byte/sec-based AVI sync method by default:
2001-08-21 12:17:52 +02: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 04:53:05 +01:00
#define AVI_SYNC_BPS 1
2001-02-24 21:28:24 +01:00
2001-11-27 18:58:29 +01:00
/* Undefine this if you do not want to select mono audio (left or right)
2002-08-04 00:48:41 +02:00
with a stereo MPEG layer 2/3 audio stream. The command line option
2001-05-08 23:49:00 +02:00
-stereo has three possible values (0 for stereo, 1 for left-only, 2 for
right-only), with 0 being the default.
*/
2001-11-17 04:53:05 +01:00
#define USE_FAKE_MONO 1
2001-05-08 23:49:00 +02:00
2002-08-04 00:48:41 +02:00
/* Undefine this if your sound card driver has no working select().
2001-02-24 21:28:24 +01:00
If you have kernel Oops, player hangups, or just no audio, you should
try to recompile MPlayer with this option disabled! */
2001-11-17 04:53:05 +01:00
$_def_select
2001-02-24 21:28:24 +01:00
2001-10-10 15:07:42 +02:00
/* define this to use iconv(3) function to codepage conversions */
2001-11-17 04:53:05 +01:00
$_def_iconv
2001-02-24 21:28:24 +01:00
2001-11-20 08:53:20 +01:00
/* define this to use RTC (/dev/rtc) for video timers (LINUX only) */
$_def_rtc
2001-05-10 20:46:33 +02:00
/* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
#define MAX_OUTBURST 65536
2001-04-23 05:39:34 +02:00
/* set up audio OUTBURST. Do not change this! */
#define OUTBURST 512
2001-06-09 01:30:09 +02:00
/* Define this if your system has the header file for the OSS sound interface */
2001-11-17 04:53:05 +01:00
$_def_sys_soundcard
2001-06-09 01:30:09 +02:00
2002-08-04 00:48:41 +02:00
/* Define this if your system has the header file for the OSS sound interface
2002-04-28 00:42:27 +02:00
* in /usr/include */
$_def_soundcard
2002-08-21 23:31:20 +02:00
/* Define this if your system has the sysinfo header */
$_def_sys_sysinfo
2002-04-12 12:40:38 +02: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 17:35:52 +02:00
/* Define this if your system has the "malloc.h" header file */
2001-11-17 04:53:05 +01:00
$_def_malloc
2001-06-09 01:30:09 +02:00
2001-11-09 03:02:58 +01:00
/* memalign is mapped to malloc if unsupported */
2001-11-17 04:53:05 +01:00
$_def_memalign
2001-11-09 03:02:58 +01:00
#ifndef HAVE_MEMALIGN
# define memalign(a,b) malloc(b)
#endif
2001-08-24 16:49:05 +02:00
2001-07-12 17:35:52 +02:00
/* Define this if your system has the "alloca.h" header file */
2001-11-17 04:53:05 +01:00
$_def_alloca
2001-07-12 17:35:52 +02:00
/* Define this if your system has the "sys/mman.h" header file */
2001-11-17 04:53:05 +01:00
$_def_mman
2001-07-03 16:22:23 +02:00
2001-07-12 17:35:52 +02:00
/* Define this if you have the elf dynamic linker -ldl library */
2001-11-17 04:53:05 +01:00
$_def_dl
2001-07-12 17:35:52 +02:00
/* Define this if you have the kstat kernel statistics library */
2001-11-17 04:53:05 +01:00
$_def_kstat
2001-07-12 17:35:52 +02:00
2001-10-26 15:50:05 +02:00
/* Define this if you have zlib */
2001-11-17 04:53:05 +01:00
$_def_zlib
2001-10-26 15:50:05 +02:00
2001-11-19 16:54:43 +01:00
/* Define this if you have shm support */
$_def_shm
2002-11-26 19:34:09 +01:00
/* Define this if your system has scandir & alphasort */
$_def_scandir
2002-03-29 22:24:36 +01:00
/* Define this if your system has strsep */
$_def_strsep
2001-11-14 20:02:39 +01:00
/* Define this if your system has vsscanf */
2001-11-17 04:53:05 +01:00
$_def_vsscanf
2001-11-14 20:02:39 +01:00
2003-04-04 21:15:24 +02:00
/* Define this if your system has no posix select */
$_def_no_posix_select
/* Define this if your system has gettimeofday */
$_def_gettimeofday
/* Define this if your system has glob */
$_def_glob
2001-02-24 21:28:24 +01:00
/* LIRC (remote control, see www.lirc.org) support: */
2001-11-17 04:53:05 +01:00
$_def_lirc
2001-02-24 21:28:24 +01:00
2003-05-30 20:23:55 +02:00
/*
* LIRCCD (LIRC client daemon)
* See http://www.dolda2000.cjb.net/~fredrik/lirccd/
*/
$_def_lircc
2001-04-18 00:04:44 +02:00
/* DeCSS support using libcss */
2001-11-17 04:53:05 +01:00
$_def_css
2001-04-18 00:04:44 +02:00
2002-03-28 21:40:21 +01:00
/* DVD navigation support using libdvdnav */
$_def_dvdnav
2002-08-11 19:14:41 +02:00
$_def_dvdnav_version
2002-03-28 21:40:21 +01:00
2002-08-04 00:48:41 +02:00
/* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
2001-11-17 04:53:05 +01:00
#define MPEG12_POSTPROC 1
2001-03-06 00:02:30 +01:00
2002-08-04 00:48:41 +02:00
/* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
2001-11-17 04:53:05 +01:00
$_def_ffpostprocess
2001-10-17 01:30:38 +02:00
2002-02-03 01:52:51 +01:00
/* Define to include support for OpenDivx postprocessing */
$_def_odivx_postprocess
2001-10-13 17:33:13 +02:00
2001-08-14 20:28:56 +02:00
/* Win32 DLL support */
2001-11-17 04:53:05 +01:00
$_def_win32
2003-02-19 17:49:28 +01:00
#define WIN32_PATH "$_win32libdir"
2001-08-14 20:28:56 +02:00
2001-04-25 00:51:55 +02:00
/* DirectShow support */
2001-11-17 04:53:05 +01:00
$_def_dshow
2001-04-25 00:51:55 +02:00
2003-02-19 18:26:59 +01:00
/* Mac OS X specific features */
$_def_macosx
2003-02-11 19:56:17 +01:00
/* Build our Win32-loader */
$_def_win32_loader
2001-07-06 05:22:14 +02:00
/* ffmpeg's libavcodec support (requires libavcodec source) */
2001-11-17 04:53:05 +01:00
$_def_libavcodec
2001-11-17 10:57:54 +01:00
$_def_libavcodecso
2001-11-17 04:53:05 +01:00
2003-01-29 13:16:18 +01:00
/* risky codecs */
#define CONFIG_RISKY 1
2002-01-12 22:07:17 +01:00
/* Use libavcodec's decoders */
2001-11-17 04:53:05 +01:00
#define CONFIG_DECODERS 1
2002-01-12 22:07:17 +01:00
/* Use libavcodec's encoders */
2001-12-22 16:14:10 +01:00
#define CONFIG_ENCODERS 1
2001-07-06 05:22:14 +02:00
2002-11-01 17:39:39 +01:00
/* Use codec libs included in mplayer CVS / source dist: */
#define USE_MP3LIB
#define USE_LIBA52
#define USE_LIBMPEG2
/* Use the SVQ1 decoder in libmpcodecs - we don't want/need it with libavcodec */
#ifndef USE_LIBAVCODEC
#define USE_SVQ1
#endif
2002-04-26 19:18:02 +02:00
/* Use libfame encoder filter */
$_def_fame
2001-11-03 22:25:55 +01:00
/* XAnim DLL support */
2001-11-17 04:53:05 +01:00
$_def_xanim
2002-01-12 22:07:17 +01:00
/* Default search path */
2001-11-17 04:53:05 +01:00
$_def_xanim_path
2001-11-03 22:25:55 +01:00
2002-06-09 03:19:48 +02:00
/* RealPlayer DLL support */
$_def_real
2002-06-13 02:14:28 +02:00
/* Default search path */
$_def_real_path
2002-06-09 03:19:48 +02:00
2002-08-05 02:39:07 +02:00
/* LIVE.COM Streaming Media library support */
$_def_live
2001-04-26 22:23:24 +02:00
/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
2001-11-17 04:53:05 +01:00
$_def_fastmemcpy
2001-04-26 22:23:24 +02:00
2002-09-20 03:26:39 +02:00
/* Use unrarlib for Vobsubs */
$_def_unrarlib
2001-05-08 14:17:03 +02:00
/* gui support, please do not edit this option */
2001-11-17 04:53:05 +01:00
$_def_gui
2001-05-08 14:17:03 +02:00
2002-01-12 22:07:17 +01:00
/* Audio output drivers */
2001-11-17 04:53:05 +01:00
$_def_ossaudio
2002-02-22 14:47:31 +01:00
$_def_ossaudio_devdsp
$_def_ossaudio_devmixer
2001-11-17 04:53:05 +01:00
$_def_alsa5
$_def_alsa9
2002-05-28 03:52:40 +02:00
$_def_arts
2002-12-27 17:02:57 +01:00
$_def_esd
2003-05-30 20:15:59 +02:00
$_def_esd_latency
2002-04-27 03:25:32 +02:00
$_def_sys_asoundlib_h
$_def_alsa_asoundlib_h
2001-11-17 04:53:05 +01:00
$_def_sunaudio
$_def_sgiaudio
2002-10-25 18:25:41 +02:00
$_def_win32waveout
2001-12-03 02:13:48 +01:00
$_def_nas
2001-06-02 18:02:38 +02:00
/* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
#undef FAST_OSD
#undef FAST_OSD_TABLE
2001-11-11 05:26:54 +01:00
/* Enable TV Interface support */
2001-11-17 04:53:05 +01:00
$_def_tv
2001-11-11 05:26:54 +01:00
2002-12-23 01:33:22 +01:00
/* Enable EDL support */
$_def_edl
2001-12-01 16:05:08 +01:00
/* Enable Video 4 Linux TV interface support */
$_def_tv_v4l
2002-03-15 17:10:29 +01:00
/* Enable *BSD BrookTree TV interface support */
$_def_tv_bsdbt848
2001-02-24 21:28:24 +01:00
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
2001-11-17 04:53:05 +01:00
$_def_words_endian
2001-02-24 21:28:24 +01:00
2001-11-17 04:53:05 +01:00
$_def_arch
2001-02-24 21:28:24 +01:00
2003-06-09 14:09:39 +02:00
/* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
* define ARCH_PPC if ARCH_POWERPC is set to cope with that.
*/
#ifdef ARCH_POWERPC
#define ARCH_PPC 1
#endif
2003-06-20 15:18:31 +02:00
/* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
#ifdef ARCH_ARMV4L
#define ARCH_ARM 1
#endif
2001-11-17 04:53:05 +01:00
/* Define this for Cygwin build for win32 */
$_def_confwin32
2001-08-05 14:39:34 +02:00
2001-05-22 09:45:35 +02:00
/* Define this to any prefered value from 386 up to infinity with step 100 */
#define __CPU__ $iproc
2002-09-16 21:37:57 +02:00
$_mp_wordsize
2001-11-17 04:53:05 +01:00
$_def_linux
2001-10-17 20:17:50 +02:00
2001-12-02 00:38:57 +01:00
$_def_vcd
2001-08-12 15:34:24 +02:00
#ifdef sun
#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
2001-08-21 19:17:03 +02:00
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
2002-08-09 23:30:21 +02:00
#elif defined(HPUX)
2002-09-16 22:46:31 +02:00
#define DEFAULT_CDROM_DEVICE "/dev/cdrom"
2002-08-09 23:30:21 +02:00
#define DEFAULT_DVD_DEVICE "/dev/dvd"
2002-07-10 05:02:11 +02:00
#elif defined(WIN32)
#define DEFAULT_CDROM_DEVICE "D:"
#define DEFAULT_DVD_DEVICE "D:"
2003-03-05 11:56:47 +01:00
#elif defined(SYS_DARWIN)
#define DEFAULT_CDROM_DEVICE "/dev/rdiskN"
2003-02-19 18:26:59 +01:00
#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
2001-08-12 15:34:24 +02:00
#else
#define DEFAULT_CDROM_DEVICE "/dev/cdrom"
2001-08-21 19:17:03 +02:00
#define DEFAULT_DVD_DEVICE "/dev/dvd"
2001-08-12 15:34:24 +02:00
#endif
2001-08-20 23:20:03 +02:00
2001-05-22 09:45:35 +02: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 21:28:24 +01:00
2002-11-05 08:34:55 +01:00
/* C99 lrintf function available */
$_def_lrintf
2001-11-23 19:25:09 +01:00
/* nanosleep support */
$_def_nanosleep
2003-03-21 17:06:11 +01:00
/* SMB support */
$_def_smbsupport
2001-02-24 21:28:24 +01:00
/* termcap flag for getch2.c */
2001-11-17 04:53:05 +01:00
$_def_termcap
2001-06-09 01:30:09 +02:00
2001-11-19 17:42:01 +01:00
/* termios flag for getch2.c */
$_def_termios
2001-12-03 16:22:03 +01:00
$_def_termios_h
$_def_termios_sys_h
2001-11-19 17:42:01 +01:00
2001-09-01 21:36:44 +02:00
/* enable PNG support */
2001-11-17 04:53:05 +01:00
$_def_png
2001-02-24 21:28:24 +01:00
2002-03-10 23:49:18 +01:00
/* enable JPEG support */
$_def_jpg
2002-05-12 03:07:25 +02:00
/* enable GIF support */
$_def_gif
2002-05-13 22:52:10 +02:00
$_def_gif_4
2003-02-19 17:55:14 +01:00
$_def_gif_tvt_hack
2002-05-12 03:07:25 +02:00
2002-08-28 22:52:02 +02:00
/* enable FreeType support */
$_def_freetype
2003-03-21 17:54:03 +01:00
/* enable FriBiDi usage */
$_def_fribidi
2002-10-13 23:40:10 +02:00
/* liblzo support */
2002-10-29 17:50:34 +01:00
$_def_liblzo
2002-10-13 23:40:10 +02:00
2001-10-23 15:59:10 +02:00
/* libmad support */
2001-11-17 04:53:05 +01:00
$_def_mad
2001-10-23 15:59:10 +02:00
2001-09-01 21:36:44 +02:00
/* enable OggVorbis support */
2001-11-17 04:53:05 +01:00
$_def_vorbis
2001-09-01 21:36:44 +02:00
2002-12-04 21:27:36 +01:00
/* enable Tremor as vorbis decoder */
$_def_tremor
2003-05-11 20:29:07 +02:00
/* enable OggTheora support */
$_def_theora
2003-04-30 13:39:32 +02:00
/* enable Matroska support */
$_def_matroska
2002-03-19 00:30:04 +01:00
/* enable FAAD (AAC) support */
$_def_faad
2003-02-07 22:04:35 +01:00
$_def_faad_version
2002-03-19 00:30:04 +01:00
2003-05-17 14:24:01 +02:00
/* enable network */
$_def_network
2001-06-09 01:30:09 +02:00
2003-06-11 18:48:09 +02:00
/* enable winsock2 instead of Unix functions*/
$_def_winsock2
2002-08-29 09:07:12 +02:00
/* define this to use inet_aton() instead of inet_pton() */
$_def_use_aton
2002-06-11 16:29:51 +02:00
/* enables / disables cdparanoia support */
$_def_cdparanoia
2003-01-31 02:47:55 +01:00
/* enables / disables VIDIX usage */
2002-01-11 18:20:43 +01:00
$_def_vidix
2002-02-03 13:43:18 +01:00
/* enables / disables new input joystick support */
$_def_joystick
2002-11-12 02:56:42 +01:00
/* enables / disables new config */
$_def_new_conf
2002-11-16 04:06:55 +01:00
/* enables / disables QTX codecs */
2003-05-29 13:50:23 +02:00
$_def_qtx
2002-11-16 04:06:55 +01:00
2002-11-15 00:49:05 +01:00
/* enables / disables osd menu */
$_def_menu
2002-12-05 01:05:57 +01:00
/* enables / disables subtitles sorting */
$_def_sortsub
2002-12-22 22:01:01 +01:00
/* XMMS input plugin support */
$_def_xmms
#define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
2003-03-26 12:35:13 +01:00
/* enables inet6 support */
$_def_inet6
/* do we have gethostbyname2? */
$_def_gethostbyname2
2001-02-24 21:28:24 +01:00
/* Extension defines */
2001-11-17 04:53:05 +01: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 19:29:12 +01:00
$_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
2002-11-11 10:37:29 +01:00
$_def_altivec // only define if you have Altivec (G4)
2001-02-24 21:28:24 +01:00
2001-08-03 20:50:54 +02:00
#ifdef HAVE_MMX
2001-11-17 04:53:05 +01:00
#define USE_MMX_IDCT 1
2001-08-03 20:50:54 +02:00
#endif
2003-06-09 14:09:39 +02:00
$_def_altivec_h // enables usage of altivec.h
2001-11-17 04:53:05 +01:00
$_def_mlib // Sun mediaLib, available only on solaris
2001-08-27 18:51:10 +02:00
2001-08-24 18:20:04 +02:00
/* libmpeg2 uses a different feature test macro for mediaLib */
#ifdef HAVE_MLIB
2001-11-17 04:53:05 +01:00
#define LIBMPEG2_MLIB 1
2001-08-24 18:20:04 +02:00
#endif
2001-02-24 21:28:24 +01:00
/* libvo options */
2001-11-17 23:50:30 +01:00
#define SCREEN_SIZE_X 1
#define SCREEN_SIZE_Y 1
2001-11-17 04:53:05 +01:00
$_def_x11
$_def_xv
2003-06-21 03:47:26 +02:00
$_def_xvmc
2001-11-17 04:53:05 +01:00
$_def_vm
$_def_xinerama
$_def_gl
$_def_dga
$_def_dga2
$_def_sdl
2001-05-05 23:37:37 +02:00
/* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
2001-11-17 04:53:05 +01:00
$_def_sdlbuggy
2002-09-28 21:03:50 +02:00
$_def_directx
2001-11-17 04:53:05 +01:00
$_def_ggi
$_def_3dfx
$_def_tdfxfb
2003-03-07 19:45:02 +01:00
$_def_tdfxvid
2001-12-03 02:09:36 +01:00
$_def_directfb
2002-08-05 13:42:29 +02:00
$_def_directfb_version
2002-01-17 02:27:20 +01:00
$_def_zr
2002-09-09 00:41:53 +02:00
$_def_bl
2001-11-17 04:53:05 +01:00
$_def_mga
$_def_xmga
$_def_syncfb
$_def_fbdev
2002-01-17 02:12:01 +01:00
$_def_fbdev_nocopy
2002-05-13 15:15:40 +02:00
$_def_dxr2
2001-11-17 04:53:05 +01:00
$_def_dxr3
$_def_dvb
2003-03-16 21:13:28 +01:00
$_def_dvb_in
2001-11-17 04:53:05 +01:00
$_def_svga
2002-02-07 03:29:55 +01:00
$_def_vesa
2001-11-17 04:53:05 +01:00
$_def_xdpms
$_def_aa
2001-02-24 21:28:24 +01:00
2001-08-25 23:05:23 +02:00
/* used by GUI: */
2001-11-17 04:53:05 +01:00
$_def_xshape
2001-08-25 23:05:23 +02:00
2001-11-17 04:53:05 +01:00
#if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
#define X11_FULLSCREEN 1
2001-02-24 21:28:24 +01:00
#endif
EOF
2001-11-17 04:53:05 +01:00
#############################################################################
2001-02-24 21:28:24 +01:00
2001-11-18 18:45:23 +01:00
echo "Creating libvo/config.mak"
2001-02-24 21:28:24 +01:00
_voobj=`echo $_vosrc | sed -e 's/\.c/\.o/g'`
2001-11-18 18:45:23 +01:00
cat > libvo/config.mak << EOF
2001-02-24 21:28:24 +01:00
include ../config.mak
2001-11-17 04:53:05 +01:00
OPTIONAL_SRCS = $_vosrc
OPTIONAL_OBJS = $_voobj
2001-02-24 21:28:24 +01:00
EOF
2001-11-17 04:53:05 +01:00
#############################################################################
2001-06-03 12:46:42 +02:00
2001-11-18 18:45:23 +01:00
echo "Creating libao2/config.mak"
2001-06-03 12:46:42 +02:00
_aoobj=`echo $_aosrc | sed -e 's/\.c/\.o/g'`
2001-11-18 18:45:23 +01:00
cat > libao2/config.mak << EOF
2001-06-03 12:46:42 +02:00
include ../config.mak
2001-11-17 04:53:05 +01:00
OPTIONAL_SRCS = $_aosrc
OPTIONAL_OBJS = $_aoobj
EOF
2001-06-03 12:46:42 +02:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-06-03 12:46:42 +02:00
2001-11-17 04:53:05 +01:00
echo "Creating help_mp.h"
cat > help_mp.h << EOF
2002-09-22 18:37:08 +02:00
//
// WARNING! This is a generated file. Do NOT edit.
// See the help/ subdir for the editable files.
//
2001-11-17 04:53:05 +01:00
#include "$_mp_help"
2001-06-03 12:46:42 +02:00
EOF
2002-09-22 18:31:21 +02:00
if test $_mp_help != "help/help_mp-en.h"; then
2002-06-03 22:41:39 +02:00
echo "Adding untranslated messages to help_mp.h"
2002-09-22 18:37:08 +02:00
echo '// untranslated messages from the english master-file:' >> help_mp.h
2002-09-22 18:31:21 +02:00
help/help_diff.sh $_mp_help <help/help_mp-en.h >> help_mp.h
2002-06-03 22:41:39 +02:00
fi
2002-06-03 19:48:19 +02:00
2001-11-17 04:53:05 +01:00
#############################################################################
2001-02-24 21:28:24 +01:00
cat << EOF
Config files successfully generated by ./configure !
2001-10-13 18:53:37 +02:00
2001-11-17 04:53:05 +01:00
Install prefix: $_prefix
Data directory: $_datadir
2001-12-25 22:58:10 +01:00
Config direct.: $_confdir
2001-11-29 02:18:05 +01:00
2002-08-05 03:31:47 +02:00
Byte order: $_byte_order
2002-05-03 11:43:36 +02:00
Optimizing for: $_optimizing
2003-02-21 00:32:47 +01:00
Languages:
Messages/GUI: $_language
EOF
echo -n " Manual pages: $LANGUAGES"
test "$LANGUAGES" = en && echo -n " (no localization selected, use --language=all)"
echo
2002-05-03 11:43:36 +02:00
2003-02-21 00:32:47 +01:00
cat << EOF
2001-11-29 02:18:05 +01:00
Enabled optional drivers:
Input: $_inputmodules
Codecs: $_codecmodules
Audio output: $_aomodules
Video output: $_vomodules
2002-03-12 08:16:29 +01:00
Disabled optional drivers:
Input: $_noinputmodules
Codecs: $_nocodecmodules
Audio output: $_noaomodules
Video output: $_novomodules
2001-11-17 04:53:05 +01:00
'config.h' and 'config.mak' contain your configuration options.
2002-08-04 00:48:41 +02:00
Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
compile *** DO NOT REPORT BUGS if you tweak these files ***
2001-11-17 04:53:05 +01:00
'make' will now compile MPlayer and 'make install' will install it.
2001-10-13 18:53:37 +02:00
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
2001-02-24 21:28:24 +01:00
EOF
2001-08-22 10:51:19 +02:00
2001-10-12 01:41:43 +02:00
if test "$_mtrr" = yes ; then
2003-06-13 03:25:11 +02:00
echo "Please check mtrr settings at /proc/mtrr (see DOCS/en/video.html#mtrr)"
2001-11-17 04:53:05 +01:00
echo
2001-02-24 21:28:24 +01:00
fi
2001-10-12 01:41:43 +02:00
if test "$_sdl" = "outdated" ; then
2001-10-13 18:53:37 +02: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
2002-08-04 00:48:41 +02:00
You need to rerun ./configure and recompile after updating SDL. If you are
only interested in the libSDL audio drivers, then an older version might work.
2001-10-13 18:53:37 +02:00
Use --enable-sdl to force usage of libSDL.
2002-05-23 16:38:40 +02:00
2001-10-13 18:53:37 +02:00
EOF
2001-02-24 21:28:24 +01:00
fi
2003-05-11 20:53:12 +02:00
if x86; then
2001-10-23 16:56:58 +02:00
if test "$_win32" = no ; then
if test "$_win32libdir" ; then
2003-05-30 20:17:58 +02:00
echo "Failed to find a Win32 codecs dir at $_win32libdir!"
2001-10-23 17:13:51 +02:00
else
2003-05-30 20:17:58 +02:00
echo "Failed to find a Win32 codecs directory! (default: /usr/local/lib/codecs/)"
fi
cat << EOF
Create it and copy the DLL files there! You can download the codecs from our
homepage at http://www.mplayerhq.hu/MPlayer/releases/codecs/
2002-05-23 16:38:40 +02:00
2001-10-23 17:13:51 +02:00
EOF
2001-10-13 18:53:37 +02:00
fi
2001-02-24 21:28:24 +01:00
else
2001-11-17 04:53:05 +01:00
cat <<EOF
2002-12-29 20:58:56 +01:00
NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
2003-05-11 20:53:12 +02:00
operating system ($system_name). You may encounter a few AVI files that
cannot be played due to missing Open Source video/audio codec support.
2002-05-23 16:38:40 +02:00
2001-10-13 18:53:37 +02:00
EOF
2001-02-24 21:28:24 +01:00
fi
2001-11-28 18:52:25 +01:00
2001-11-17 04:53:05 +01:00
cat <<EOF
2002-12-29 20:58:56 +01:00
Check $TMPLOG if you wonder why an autodetection failed (check whether
the development headers/packages are installed).
2002-01-07 13:17:21 +01:00
2003-06-13 03:25:11 +02:00
If you suspect a bug, please read DOCS/en/bugreports.html.
2001-11-17 04:53:05 +01:00
EOF
2002-01-11 18:20:43 +01:00
if test "$_vidix" = no ; then
cat <<EOF
2002-05-23 16:49:13 +02:00
You've disabled VIDIX. Although it would be better to PORT it instead.
Have a look at the documentation for supported cards!
2002-05-23 16:38:40 +02:00
2002-01-11 18:20:43 +01:00
EOF
fi
2001-06-05 04:36:12 +02:00
# Last move:
2001-10-13 18:53:37 +02:00
rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"