* ALL: the build mechanism now uses automake. See HACKING for more details.
authorSam Hocevar <sam@videolan.org>
Mon, 30 Sep 2002 11:05:42 +0000 (11:05 +0000)
committerSam Hocevar <sam@videolan.org>
Mon, 30 Sep 2002 11:05:42 +0000 (11:05 +0000)
  * ./mozilla/vlcplugin.cpp: javascript support for the Mozilla plugin.
  * debian/rules: the A52 module is now in a separate package.

134 files changed:
.cvsignore
ChangeLog
HACKING
Makefile.am
Makefile.config.in [deleted file]
Makefile.modules [deleted file]
Makefile.old [deleted file]
Makefile.opts.in [deleted file]
bootstrap
configure.ac.in [new file with mode: 0644]
configure.in [deleted file]
debian/.cvsignore
debian/control
debian/libvlc0-dev.dirs
debian/rules
debian/vlc-plugin-dvb.dirs [new file with mode: 0644]
debian/vlc.dirs
doc/.cvsignore [new file with mode: 0644]
doc/developer/Makefile
doc/developer/hacking.xml [new file with mode: 0644]
doc/developer/manual.xml
doc/developer/overview.xml
doc/fortunes.txt
doc/vlc.1
extras/GNUgetopt/.cvsignore [new file with mode: 0644]
include/modules_inner.h
include/vlc_config.h
include/vlc_symbols.h [deleted file]
ipkg/.cvsignore [new file with mode: 0644]
lib/.cvsignore
m4/.cvsignore [new file with mode: 0644]
modules/.cvsignore [new file with mode: 0644]
modules/access/.cvsignore
modules/access/Makefile [deleted file]
modules/access/dvd/Makefile [deleted file]
modules/access/dvdplay/Makefile [deleted file]
modules/access/dvdread/Makefile [deleted file]
modules/access/file.c
modules/access/http.c
modules/access/rtp.c
modules/access/satellite/Makefile [deleted file]
modules/access/udp.c
modules/access/v4l/Makefile [deleted file]
modules/access/vcd/Makefile [deleted file]
modules/audio_filter/channel_mixer/Makefile [deleted file]
modules/audio_filter/converter/Makefile [deleted file]
modules/audio_filter/resampler/Makefile [deleted file]
modules/audio_mixer/Makefile [deleted file]
modules/audio_output/Makefile [deleted file]
modules/audio_output/arts.c
modules/audio_output/sdl.c
modules/codec/Makefile [deleted file]
modules/codec/a52old/Makefile [deleted file]
modules/codec/a52old/downmix/Makefile [deleted file]
modules/codec/a52old/imdct/Makefile [deleted file]
modules/codec/cinepak/Makefile [deleted file]
modules/codec/dv/Makefile [deleted file]
modules/codec/faad/Makefile [deleted file]
modules/codec/ffmpeg/Makefile [deleted file]
modules/codec/ffmpeg/postprocessing/Makefile [deleted file]
modules/codec/mad/Makefile [deleted file]
modules/codec/mpeg_audio/Makefile [deleted file]
modules/codec/mpeg_video/Makefile [deleted file]
modules/codec/mpeg_video/idct/Makefile [deleted file]
modules/codec/mpeg_video/motion/Makefile [deleted file]
modules/codec/spudec/Makefile [deleted file]
modules/control/lirc/Makefile [deleted file]
modules/control/rc/Makefile [deleted file]
modules/control/rc/rc.c
modules/demux/Makefile [deleted file]
modules/demux/aac/Makefile [deleted file]
modules/demux/avi/Makefile [deleted file]
modules/demux/mp4/Makefile [deleted file]
modules/demux/mpeg/Makefile [deleted file]
modules/demux/util/Makefile [deleted file]
modules/gui/beos/Makefile [deleted file]
modules/gui/familiar/Makefile [deleted file]
modules/gui/familiar/callbacks.c
modules/gui/familiar/callbacks.h
modules/gui/gtk/Makefile [deleted file]
modules/gui/gtk/common.h
modules/gui/gtk/display.c
modules/gui/gtk/display.h
modules/gui/gtk/gnome.c
modules/gui/gtk/gnome.glade
modules/gui/gtk/gnome_interface.c
modules/gui/gtk/gtk.c
modules/gui/gtk/gtk_callbacks.c
modules/gui/gtk/gtk_callbacks.h
modules/gui/gtk/open.c
modules/gui/kde/Makefile [deleted file]
modules/gui/macosx/Makefile [deleted file]
modules/gui/ncurses/Makefile [deleted file]
modules/gui/qnx/Makefile [deleted file]
modules/gui/qt/.cvsignore
modules/gui/qt/Makefile [deleted file]
modules/gui/qt/intf.cpp
modules/gui/qt/intf.h [new file with mode: 0644]
modules/gui/win32/Makefile [deleted file]
modules/gui/win32/win32.bpr
modules/misc/Makefile [deleted file]
modules/misc/dummy/Makefile [deleted file]
modules/misc/gtk_main.c
modules/misc/logger/Makefile [deleted file]
modules/misc/memcpy/Makefile [deleted file]
modules/misc/network/Makefile [deleted file]
modules/video_chroma/Makefile [deleted file]
modules/video_filter/Makefile [deleted file]
modules/video_filter/deinterlace/Makefile [deleted file]
modules/video_output/Makefile [deleted file]
modules/video_output/directx/Makefile [deleted file]
modules/video_output/directx/aout.c
modules/video_output/mga/Makefile [deleted file]
modules/video_output/qte/Makefile [deleted file]
modules/video_output/sdl.c
modules/video_output/x11/Makefile [deleted file]
modules/visualization/scope/Makefile [deleted file]
modules/visualization/xosd/Makefile [deleted file]
mozilla/Makefile [deleted file]
mozilla/vlcintf.idl
mozilla/vlcpeer.cpp
mozilla/vlcpeer.h
mozilla/vlcplugin.cpp
mozilla/vlcplugin.h
mozilla/vlcshell.cpp
po/.cvsignore
po/POTFILES.in
share/.cvsignore [new file with mode: 0644]
src/.cvsignore [new file with mode: 0644]
src/misc/modules.c
src/misc/modules_plugin.h [deleted file]
src/misc/modules_plugin.h.in
src/misc/symbols.c [deleted file]
vlc-config.in

index c466e22..59aba81 100644 (file)
@@ -5,6 +5,7 @@ ABOUT-NLS
 core
 core.*
 gmon.out
+configure.ac
 configure
 config.h
 config.h.*
@@ -20,12 +21,15 @@ Makefile.in
 Makefile.opts
 Makefile.modules
 Makefile.config
+Modules.am
 build-stamp
 stamp-h*
 aclocal.m4
 install-sh
 missing
 mkinstalldirs
+compile
+depcomp
 vlc-debug.*
 vlc-log.*
 vlc-config
index 6c4d9bb..4f37405 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,3 @@
-#===================#
-# ChangeLog for vlc #
-#===================#
-
 0.5.0
 Not released yet
 
diff --git a/HACKING b/HACKING
index e445b7e..d7eb783 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -1,12 +1,17 @@
-$Id: HACKING,v 1.4 2002/08/27 14:15:24 sam Exp $
+$Id: HACKING,v 1.5 2002/09/30 11:05:32 sam Exp $
 
 Hacking vlc
 ===========
 
+Requirements
+------------
+
 You will need the following tools if you plan to use the CVS version of vlc:
 
  - autoconf version 2.50 or later
- - automake version 1.5 (but 1.6 is recommended)
+
+ - automake version 1.5 (but 1.6 or later is recommended)
+
  - gettext version 0.10.40 (but 0.11.3 or later is recommended)
 
 After retrieving the CVS tree, you need to run the bootstrap script to
@@ -18,3 +23,37 @@ you can check out a CVS tree on an OS that provides these tools (such
 as a recent Linux distribution), run bootstrap, and then copy the whole
 tree to your retarded OS.
 
+
+The bootstrap sequence
+----------------------
+
+The bootstrap script does the following actions:
+
+ - browse the modules/ directory for all available modules. A module "foo"
+   exists if there is a Modules.am file in the modules/ directory which
+   defines SOURCES_foo.
+
+ - create a top-level Modules.am file (which will be included by Makefile.am)
+   which contains additional build rules for modules, and includes all the
+   Modules.am files that were found in modules/
+
+ - create a top-level configure.ac file from configure.ac.in, generating
+   the AC_SUBST and AM_CONDITIONAL rules that will be needed.
+
+ - run autopoint (previously gettextize) to create an intl/ directory,
+   needed when libgettext is not available.
+
+ - run the usual aclocal, autoheader, automake and autoconf, which create
+   the various Makefile.in files from the corresponding Makefile.am and the
+   configure script from configure.ac.
+
+ - fix a few files in the vlc repository that may have been altered.
+
+
+How to add a module
+-------------------
+
+To add a module to the repository, just add its sources to a Modules.am
+file. If you create a new Modules.am, do not forget to add a corresponding
+line to modules/Makefile.am.
+
index 18f7d70..69f5f06 100644 (file)
@@ -1,8 +1,448 @@
-SUBDIRS = src include modules mozilla extras \
-           debian doc ipkg lib po share m4 intl
+###############################################################################
+# Automake targets and declarations
+###############################################################################
 
-ACLOCAL_AMFLAGS = -I m4
+# SUBDIRS stores the directories where a "make" is required when building
+# something. DIST_SUBDIRS stores the directories where nothing is built but
+# which have makefiles with distribution information.
+SUBDIRS = po intl m4 share
+DIST_SUBDIRS = $(SUBDIRS) modules src debian doc ipkg lib
 
 EXTRA_DIST = BUGS FAQ HACKING MAINTAINERS STATUS \
-             INSTALL.win32 README.MacOSX.rtf \
-             config.rpath mkinstalldirs
+             INSTALL.win32 README.MacOSX.rtf vlc.spec install-win32 \
+             Modules.am macosx-dmg \
+             configure.ac.in mkinstalldirs bootstrap
+MOSTLYCLEANFILES =
+BUILT_SOURCES =
+SUFFIXES = 
+
+# List of programs, libraries and headers that need to be built and/or
+# distributed. Initialized to empty because we'll use += later.
+bin_PROGRAMS =
+
+lib_LIBRARIES = 
+libvlc_LIBRARIES =
+noinst_LIBRARIES =
+
+noinst_HEADERS =
+
+# Tell aclocal to use -I m4. Wonder if it really works.
+ACLOCAL_AMFLAGS = -I m4
+
+###############################################################################
+# Compilation flags for debug mode, profiling, and others
+###############################################################################
+
+# Standard flags used everywhere to build things in the distribution. Some
+# of them are empty but might be extended later in the Makefile. *_default
+# is the default flag list for all files in the distribution, for instance
+# the vlc code. *_pic is for PIC code, such as the Mozilla plugin. *_plugin
+# is for plugin code, *_builtin is for builtin code, and *_builtin_pic is
+# for PIC builtin code, for instance builtin modules in the mozilla plugin.
+
+CPPFLAGS_default = -I$(top_srcdir)/include
+CFLAGS_default = 
+CXXFLAGS_default = 
+OBJCFLAGS_default = 
+LDFLAGS_default =
+
+CPPFLAGS_pic = $(CPPFLAGS_default)
+CFLAGS_pic = $(CFLAGS_default) @CFLAGS_pics@
+CXXFLAGS_pic = $(CXXFLAGS_default) @CFLAGS_pics@
+OBJCFLAGS_pic = $(OBJCFLAGS_default) @CFLAGS_pics@
+LDFLAGS_pic = $(LDFLAGS_default)
+
+CPPFLAGS_plugin = $(CPPFLAGS_default) -D__VLC__ -D__PLUGIN__
+CFLAGS_plugin = $(CFLAGS_default) @CFLAGS_plugins@
+CXXFLAGS_plugin = $(CXXFLAGS_default) @CFLAGS_plugins@
+OBJCFLAGS_plugin = $(OBJCFLAGS_default) @CFLAGS_plugins@
+LDFLAGS_plugin = @LDFLAGS_plugins@
+
+CPPFLAGS_builtin = $(CPPFLAGS_default) -D__VLC__ -D__BUILTIN__
+CFLAGS_builtin = $(CFLAGS_default) @CFLAGS_builtins@
+CXXFLAGS_builtin = $(CXXFLAGS_default) @CFLAGS_builtins@
+OBJCFLAGS_builtin = $(OBJCFLAGS_default) @CFLAGS_builtins@
+LDFLAGS_builtin =
+L_builtin =
+
+CPPFLAGS_builtin_pic = $(CPPFLAGS_builtin) $(CPPFLAGS_pic)
+CFLAGS_builtin_pic = $(CFLAGS_builtin) $(CFLAGS_pic)
+CXXFLAGS_builtin_pic = $(CXXFLAGS_builtin) $(CXXFLAGS_pic)
+OBJCFLAGS_builtin_pic = $(OBJCFLAGS_builtin) $(OBJCFLAGS_pic)
+LDFLAGS_builtin_pic = $(LDFLAGS_builtin) $(LDFLAGS_pic)
+L_builtin_pic = $(L_builtin) $(L_pic)
+
+# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
+CPPFLAGS_default += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
+CPPFLAGS_default += -D_REENTRANT -D_THREAD_SAFE
+CPPFLAGS_default += -D_GNU_SOURCE
+
+# Gettext support
+CPPFLAGS_default += -DLOCALEDIR=\"$(datadir)/locale\"
+
+# Data and plugin location
+CPPFLAGS_default += -DDATA_PATH=\"@prefix@/share/vlc\"
+CPPFLAGS_default += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
+
+# Conditional flags that get added to *FLAGS_default
+if RELEASE
+CPPFLAGS_release = -DHAVE_RELEASE
+endif
+if DEBUG
+CPPFLAGS_debug = -DDEBUG -DHAVE_RELEASE
+CFLAGS_debug = -g
+endif
+if GPROF
+CPPFLAGS_gprof = -DGPROF
+CFLAGS_gprof = -finstrument-functions
+endif
+if CPROF
+CPPFLAGS_cprof = -DCPROF
+CFLAGS_cprof = -pg
+endif
+if OPTIM
+CFLAGS_optim = @CFLAGS_OPTIM@ @CFLAGS_TUNING@
+if DEBUG
+else
+if GPROF
+else
+if CPROF
+else
+CFLAGS_nodebug = @CFLAGS_OPTIM_NODEBUG@
+endif
+endif
+endif
+endif
+
+CPPFLAGS_default += $(CPPFLAGS_release) \
+               $(CPPFLAGS_debug) $(CPPFLAGS_gprof) $(CPPFLAGS_cprof)
+CFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
+               $(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
+CXXFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
+               $(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
+OBJCFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
+               $(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
+
+###############################################################################
+# Headers
+###############################################################################
+
+BUILT_SOURCES += \
+       include/vlc_symbols.h \
+       src/misc/modules_builtin.h \
+       src/misc/modules_plugin.h
+
+pkgincludedir = $(includedir)/vlc
+
+dist_pkginclude_HEADERS = \
+       include/vlc/vlc.h \
+       include/vlc/aout.h \
+       include/vlc/vout.h \
+       include/vlc/sout.h \
+       include/vlc/decoder.h \
+       include/vlc/input.h \
+       include/vlc/intf.h
+
+noinst_HEADERS += $(HEADERS_include) $(HEADERS_include_built)
+
+HEADERS_include = \
+       include/aout_internal.h \
+       include/audio_output.h \
+       include/beos_specific.h \
+       include/configuration.h \
+       include/darwin_specific.h \
+       include/input_ext-dec.h \
+       include/input_ext-intf.h \
+       include/input_ext-plugins.h \
+       include/interface.h \
+       include/intf_eject.h \
+       include/iso_lang.h \
+       include/main.h \
+       include/mmx.h \
+       include/modules.h \
+       include/modules_inner.h \
+       include/mtime.h \
+       include/netutils.h \
+       include/network.h \
+       include/os_specific.h \
+       include/stream_control.h \
+       include/stream_output.h \
+       include/video.h \
+       include/video_output.h \
+       include/vlc_common.h \
+       include/vlc_config.h \
+       include/vlc_cpu.h \
+       include/vlc_messages.h \
+       include/vlc_objects.h \
+       include/vlc_playlist.h \
+       include/vlc_threads.h \
+       include/vlc_threads_funcs.h \
+       include/win32_specific.h
+
+HEADERS_include_built = \
+       include/vlc_symbols.h
+
+include/vlc_symbols.h: Makefile $(HEADERS_include)
+       rm -f $@.in
+       echo '/* DO NOT EDIT THIS FILE! See Makefile.am */' >> $@.in
+       echo 'struct module_symbols_t {' >> $@.in
+       cat $(HEADERS_include) | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/    \1 (* \2_inner) \3;/' >> $@.in
+       echo '};' >> $@.in
+       echo '#ifdef __PLUGIN__' >> $@.in
+       cat $(HEADERS_include) | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/#   define \2 p_symbols->\2_inner/' >> $@.in
+       echo '#endif /* __PLUGIN__ */' >> $@.in
+       mv -f $@.in $@
+
+src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
+       rm -f $@.tmp && cp $@.in $@.tmp
+       sed -e 's#.*\$[I][d]:.*# * Automatically generated from '$@'.in by bootstrap#' < $@.in > $@.tmp
+       echo '#define STORE_SYMBOLS( p_symbols ) \' >> $@.tmp
+       cat $(HEADERS_include) | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/    (p_symbols)->\2_inner = \2; \\/' >> $@.tmp
+       echo '' >> $@.tmp
+       mv -f $@.tmp $@
+
+src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
+       rm -f $@.tmp && cp $@.in $@.tmp
+if HAVE_BUILTINS
+       for i in $(BUILTINS) ; do echo "int vlc_entry__"`echo $$i | sed -e 'y@/@_@' -e 's@\..*@@'`"( module_t* );" >>$@.tmp; done
+       echo "" >> $@.tmp
+endif
+       echo "#define ALLOCATE_ALL_BUILTINS() \\" >> $@.tmp
+       echo "    do \\" >> $@.tmp
+       echo "    { \\" >> $@.tmp
+if HAVE_BUILTINS
+       for i in $(BUILTINS) ; do echo "        ALLOCATE_BUILTIN("`echo $$i | sed -e 'y@/@_@' -e 's@\..*@@'`"); \\" >> $@.tmp ; done
+endif
+       echo "    } while( 0 );" >> $@.tmp
+       echo "" >> $@.tmp
+       mv -f $@.tmp $@
+
+###############################################################################
+# Optional getopt
+###############################################################################
+
+EXTRA_DIST += \
+       extras/GNUgetopt/COPYING \
+       extras/GNUgetopt/getopt.c \
+       extras/GNUgetopt/getopt.h \
+       extras/GNUgetopt/getopt1.c
+
+if BUILD_GETOPT
+SOURCES_libgetopt = extras/GNUgetopt/getopt.c extras/GNUgetopt/getopt1.c
+endif
+
+###############################################################################
+# MacOS X project
+###############################################################################
+
+EXTRA_DIST += \
+       extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
+       extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
+       extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib \
+       extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
+       extras/MacOSX/Resources/divx.icns \
+       extras/MacOSX/Resources/generic.icns \
+       extras/MacOSX/Resources/mpeg.icns \
+       extras/MacOSX/Resources/mpeg1.icns \
+       extras/MacOSX/Resources/mpeg2.icns \
+       extras/MacOSX/Resources/mpeg4.icns \
+       extras/MacOSX/Resources/vlc.icns \
+       extras/MacOSX/Resources/pause.png \
+       extras/MacOSX/Resources/play.png \
+       extras/MacOSX/Resources/stop.png \
+       extras/MacOSX/Resources/stepf.png \
+       extras/MacOSX/Resources/stepr.png \
+       extras/MacOSX/vlc.pbproj/project.pbxproj
+
+###############################################################################
+# Building libvlc
+###############################################################################
+
+bin_SCRIPTS = vlc-config
+
+lib_LIBRARIES += lib/libvlc.a $(LIBRARIES_libvlc_pic)
+
+lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
+lib_libvlc_a_CFLAGS = $(CPPFLAGS_default) -D__VLC__ $(CFLAGS_default) @CFLAGS_vlc@
+lib_libvlc_a_CXXFLAGS = $(CPPFLAGS_default) -D__VLC__ $(CXXFLAGS_default)
+
+lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
+lib_libvlc_pic_a_CFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CFLAGS_pic) @CFLAGS_vlc@
+lib_libvlc_pic_a_CXXFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CXXFLAGS_pic)
+
+if HAVE_BEOS
+SOURCES_libvlc_beos = src/misc/beos_specific.cpp
+endif
+if HAVE_DARWIN
+SOURCES_libvlc_darwin = src/misc/darwin_specific.c
+endif
+if HAVE_WIN32
+SOURCES_libvlc_win32 = src/misc/win32_specific.c
+endif
+if BUILD_MOZILLA
+LIBRARIES_libvlc_pic = lib/libvlc_pic.a
+endif
+
+EXTRA_DIST += \
+       src/misc/beos_specific.cpp \
+       src/misc/darwin_specific.c \
+       src/misc/win32_specific.c
+
+BUILT_SOURCES += \
+       src/misc/modules_builtin.h
+
+SOURCES_libvlc = \
+       src/libvlc.c \
+       src/libvlc.h \
+       src/interface/interface.c \
+       src/interface/intf_eject.c \
+       src/playlist/playlist.c \
+       src/input/input.c \
+       src/input/input_ext-plugins.c \
+       src/input/input_ext-dec.c \
+       src/input/input_ext-intf.c \
+       src/input/input_dec.c \
+       src/input/input_programs.c \
+       src/input/input_clock.c \
+       src/input/input_info.c \
+       src/video_output/video_output.c \
+       src/video_output/vout_pictures.c \
+       src/video_output/vout_pictures.h \
+       src/video_output/video_text.c \
+       src/video_output/video_text.h \
+       src/video_output/vout_subpictures.c \
+       src/audio_output/common.c \
+       src/audio_output/dec.c \
+       src/audio_output/filters.c \
+       src/audio_output/input.c \
+       src/audio_output/mixer.c \
+       src/audio_output/output.c \
+       src/audio_output/intf.c \
+       src/stream_output/stream_output.c \
+       src/misc/mtime.c \
+       src/misc/modules.c \
+       src/misc/modules_plugin.h \
+       src/misc/threads.c \
+       src/misc/cpu.c \
+       src/misc/configuration.c \
+       src/misc/netutils.c \
+       src/misc/iso_lang.c \
+       src/misc/iso-639.def \
+       src/misc/messages.c \
+       src/misc/objects.c \
+       src/misc/extras.c \
+       $(SOURCES_libvlc_win32) \
+       $(SOURCES_libvlc_beos) \
+       $(SOURCES_libvlc_darwin)
+
+###############################################################################
+# Building vlc
+###############################################################################
+
+bin_PROGRAMS += vlc
+
+vlc_SOURCES = src/vlc.c $(SOURCES_libgetopt)
+
+# @AUTOMAKE_SUCKS@ gets expanded to $(L_builtin) $(LDFLAGS_builtin)
+# but we don't write it directly, otherwise automake will go amok and eat all
+# the memory because of its 2^N crap algorithm. So we fool him. Nuahaha.
+vlc_LDADD = lib/libvlc.a $(LDFLAGS_vlc) $(noinst_share_vlc_win32_rc_DATA) @AUTOMAKE_SUCKS@
+vlc_DEPENDENCIES = lib/libvlc.a $(L_builtin)
+vlc_CFLAGS = $(CPPFLAGS_default) $(CFLAGS_default)
+
+vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
+       @rm -f vlc$(EXEEXT)
+       $(LINK) $(vlc_LDFLAGS) $(vlc_OBJECTS) $(vlc_LDADD) $(LIBS)
+if HAVE_BEOS
+       xres -o $@ ./share/vlc_beos.rsrc
+       mimeset -f $@
+endif
+
+# Install the symlinks
+install-exec-local:
+       for i in dummy $(ALIASES) ; do if test "x$$i" != "xdummy" ; then \
+               rm -f $(DESTDIR)$(bindir)/$$i && \
+               ln -s vlc $(DESTDIR)$(bindir)/$$i ; \
+       fi ; done
+
+if HAVE_DARWIN
+# Create the MacOS X app
+vlc_app_DATA = vlc.app
+vlc_appdir = $(bindir)
+vlc.app: vlc
+       rm -Rf vlc.app
+       cd extras/MacOSX ; pbxbuild | grep -v '^[ \t]' | grep -v "^$$"
+       cp -r extras/MacOSX/build/vlc.bundle ./vlc.app
+       $(INSTALL) -d vlc.app/Contents/MacOS/share
+       $(INSTALL) -d vlc.app/Contents/MacOS/modules
+       $(INSTALL) vlc vlc.app/Contents/MacOS/
+#      FIXME: install modules ! (and add dependency on modules)
+       $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
+endif
+
+if HAVE_WIN32
+noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
+noinst_share_vlc_win32_rcdir = $(libdir)
+share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
+       $(WINDRES) -i $< -o $@
+endif
+
+###############################################################################
+# Building the Mozilla plugin
+###############################################################################
+
+noinst_LIBRARIES += $(noinst_LIBRARIES_mozilla)
+
+MOSTLYCLEANFILES += mozilla/libvlcplugin$(LIBEXT)
+
+EXTRA_DIST += $(SOURCES_mozilla) mozilla/vlcintf.idl
+
+BUILT_SOURCES += $(BUILT_SOURCES_mozilla)
+
+SOURCES_mozilla = \
+       mozilla/vlcshell.cpp \
+       mozilla/vlcplugin.cpp \
+       mozilla/vlcplugin.h \
+       mozilla/vlcpeer.cpp \
+       mozilla/vlcpeer.h \
+       mozilla/classinfo.h \
+       mozilla/npunix.c
+
+if BUILD_MOZILLA
+noinst_LIBRARIES_mozilla = mozilla/libvlcplugin.a
+
+mozilla_libvlcplugin_a_SOURCES = $(SOURCES_mozilla) $(BUILT_SOURCES_mozilla) \
+                                 $(SOURCES_libgetopt)
+mozilla_libvlcplugin_a_CFLAGS = $(CPPFLAGS_pic) $(CFLAGS_pic) \
+                                $(CPPFLAGS_mozilla) $(CFLAGS_mozilla)
+mozilla_libvlcplugin_a_CXXFLAGS = $(CPPFLAGS_pic) $(CXXFLAGS_pic) \
+                                  $(CPPFLAGS_mozilla) $(CXXFLAGS_mozilla)
+mozilla_libvlcplugin_a_DEPENDENCIES = lib/libvlc_pic.a $(L_builtin_pic)
+
+BUILT_SOURCES_mozilla = mozilla/vlcintf.h
+
+mozilla_libvlcplugin_DATA = mozilla/libvlcplugin$(LIBEXT)
+mozilla_libvlcplugindir = $(libdir)/mozilla/plugins
+mozilla/libvlcplugin$(LIBEXT): mozilla/libvlcplugin.a $(L_builtin_pic)
+       $(CC) -o $@ $(mozilla_libvlcplugin_a_OBJECTS) lib/libvlc_pic.a \
+               $(L_builtin_pic) -shared $(LDFLAGS) $(LDFLAGS_vlc) \
+               $(LDFLAGS_mozilla) $(LDFLAGS_builtin_pic)
+
+mozilla_vlcintf_xpt_DATA = mozilla/vlcintf.xpt
+mozilla_vlcintf_xptdir = $(libdir)/mozilla/components
+mozilla/vlcintf.xpt: Makefile mozilla/vlcintf.idl
+       $(XPIDL) -I/usr/share/idl/mozilla -m typelib \
+               -o mozilla/vlcintf mozilla/vlcintf.idl
+
+mozilla/vlcintf.h: Makefile mozilla/vlcintf.idl
+       $(XPIDL) -I/usr/share/idl/mozilla -m header \
+               -o mozilla/vlcintf mozilla/vlcintf.idl
+endif
+
+###############################################################################
+# Modules
+###############################################################################
+libvlcdir = $(libdir)/vlc
+
+include Modules.am
+
diff --git a/Makefile.config.in b/Makefile.config.in
deleted file mode 100644 (file)
index 9fdf24c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# vlc (VideoLAN Client) options Makefile
-# (c)1998 VideoLAN
-###############################################################################
-
-# 
-# Plugins to build
-# WARNING: if you do not have a dynamic loader on your platform, remove
-# the plugins in this line and put them as built-ins, otherwise your
-# application won't be able to load them.
-# 
-PLUGINS :=@PLUGINS@
-
-# 
-# Built-in modules to build
-# WARNING: do NOT put gtk and gnome together in this rule.
-# 
-BUILTINS :=@BUILTINS@
-
diff --git a/Makefile.modules b/Makefile.modules
deleted file mode 100644 (file)
index 2a54e00..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-###############################################################################
-# vlc (VideoLAN Client) common module Makefile
-# (c)2001 VideoLAN
-###############################################################################
-# This file should be included by all module Makefiles
-###############################################################################
-
-#
-# include the local Makefile
-#
-include Makefile
-
-#
-# Analyze the target we are asked to build
-#
-module_name := $(shell echo $(MAKECMDGOALS) | sed 's@\..*@@')
-suff := $(shell echo $(MAKECMDGOALS) | sed 's@.*\.@@' | tr so/a lo/o)
-
-#
-# Compiler flags
-#
-SRC_C := $(filter %.c,$($(module_name)_SOURCES))
-SRC_CPP := $(filter %.cpp,$($(module_name)_SOURCES))
-SRC_M := $(filter %.m,$($(module_name)_SOURCES))
-
-plugins_CFLAGS += -D__PLUGIN__ -I$(PARENT) -I$(PARENT)/include -I$(PARENT)/extras
-builtins_CFLAGS += -D__BUILTIN__ -I$(PARENT) -I$(PARENT)/include -I$(PARENT)/extras
-
-ifeq (lo,$(suff))
-extra_CFLAGS := $(plugins_CFLAGS) $($(module_name)_CFLAGS) \
-                -DMODULE_NAME=$(module_name) -DMODULE_NAME_IS_$(module_name) \
-               -DMODULE_PATH=$(MODULE_PATH) $($(module_name)_so_CFLAGS)
-OBJ_ALL := $(SRC_C:%.c=%.lo.$(module_name)) $(SRC_CPP:%.cpp=%.lo.$(module_name))
-else
-extra_CFLAGS := $(builtins_CFLAGS) $($(module_name)_CFLAGS) \
-                -DMODULE_NAME=$(module_name) -DMODULE_NAME_IS_$(module_name) \
-               -DMODULE_PATH=$(MODULE_PATH) $($(module_name)_a_CFLAGS)
-OBJ_ALL := $(SRC_C:%.c=%.o.$(module_name)) $(SRC_CPP:%.cpp=%.o.$(module_name)) \
-               $(SRC_M:%.m=%.o.$(module_name))
-endif
-
-# 
-# Standard dependencies
-#
-C_DEP := $(SRC_C:%.c=.dep/%.d)
-CPP_DEP := $(SRC_CPP:%.cpp=.dep/%.dpp)
-M_DEP := $(SRC_M:%.m=.dep/%.dm)
-
-export
-
-#
-# Virtual targets
-#
-all:
-
-clean:
-#      rm -f $(PLUGIN_ALL) $(BUILTIN_ALL)
-       rm -f *.a *.so *.o *.o.* *.lo.* *.obj *.moc *.moc.* *.bak
-       rm -Rf .dep
-
-FORCE:
-
-$(OBJ_ALL): $(PARENT)/Makefile.modules $(PARENT)/Makefile.dep $(PARENT)/Makefile $(PARENT)/Makefile.opts Makefile
-$(OBJ_ALL): $(H_DEP:%=$(PARENT)/include/%)
-
-$(C_DEP): %.d: FORCE
-       @$(MAKE) -s --no-print-directory -f $(PARENT)/Makefile.dep $@ CFLAGS="$(CFLAGS) $(extra_CFLAGS)"
-
-$(CPP_DEP): %.dpp: FORCE
-       @$(MAKE) -s --no-print-directory -f $(PARENT)/Makefile.dep $@ CFLAGS="$(CFLAGS) $(extra_CFLAGS)"
-
-$(M_DEP): %.dm: FORCE
-       @$(MAKE) -s --no-print-directory -f $(PARENT)/Makefile.dep $@ CFLAGS="$(CFLAGS) $(extra_CFLAGS)"
-
-$(SRC_C:%.c=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.d
-$(SRC_C:%.c=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.c
-       $(CC) $(CFLAGS) $(extra_CFLAGS) -c $< -o $@
-
-$(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.dpp
-$(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.cpp
-       $(CC) $(CFLAGS) $(extra_CFLAGS) -c $< -o $@
-
-$(SRC_M:%.m=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.dm
-$(SRC_M:%.m=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.m
-       $(CC) $(CFLAGS) $(extra_CFLAGS) -c $< -o $@
-
-# foo_CUSTOM lets us override all target rules for foo.so and foo.a
-ifeq (,$($(module_name)_CUSTOM))
-$(module_name).so: $(EXTRA_DEP) $(OBJ_ALL)
-       $(CC) $(OBJ_ALL) $(LDFLAGS) $(plugins_LDFLAGS) $($(module_name)_LDFLAGS) -o $@
-
-$(module_name).a: $(EXTRA_DEP) $(OBJ_ALL)
-       rm -f $@
-       ar rc $@ $(OBJ_ALL)
-       $(RANLIB) $@
-endif
-
diff --git a/Makefile.old b/Makefile.old
deleted file mode 100644 (file)
index 93cef4c..0000000
+++ /dev/null
@@ -1,510 +0,0 @@
-###############################################################################
-# vlc (VideoLAN Client) main Makefile - (c)1998 VideoLAN
-###############################################################################
-
-ifeq ($(shell [ ! -r Makefile.opts ] && echo 1),)
-    include Makefile.opts
-endif
-ifeq ($(shell [ ! -r Makefile.config ] && echo 1),)
-    include Makefile.config
-endif
-
-###############################################################################
-# Objects and files
-###############################################################################
-
-#
-# C Objects
-# 
-VLC := vlc
-LIBVLC := libvlc
-INTERFACE := interface intf_eject
-PLAYLIST := playlist
-INPUT := input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock input_info
-VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
-AUDIO_OUTPUT := common filters input mixer output intf dec
-STREAM_OUTPUT := stream_output
-MISC := mtime modules threads cpu configuration netutils iso_lang messages objects extras
-
-LIBVLC_OBJ :=  $(LIBVLC:%=src/%.o) \
-               $(INTERFACE:%=src/interface/%.o) \
-               $(PLAYLIST:%=src/playlist/%.o) \
-               $(INPUT:%=src/input/%.o) \
-               $(VIDEO_OUTPUT:%=src/video_output/%.o) \
-               $(AUDIO_OUTPUT:%=src/audio_output/%.o) \
-               $(STREAM_OUTPUT:%=src/stream_output/%.o) \
-               $(MISC:%=src/misc/%.o)
-
-VLC_OBJ := $(VLC:%=src/%.o)
-
-#
-# Misc Objects
-# 
-ifeq ($(NEED_GETOPT),1)
-LIBVLC_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o 
-endif
-
-ifeq ($(NEED_SYMBOLS),1)
-LIBVLC_OBJ += src/misc/symbols.o
-endif
-
-ifeq ($(SYS),beos)
-CPP_OBJ :=     src/misc/beos_specific.o
-endif
-
-ifneq (,$(findstring darwin,$(SYS)))
-LIBVLC_OBJ +=  src/misc/darwin_specific.o
-endif
-
-ifneq (,$(findstring mingw32,$(SYS)))
-LIBVLC_OBJ +=  src/misc/win32_specific.o
-RESOURCE_OBJ :=        share/vlc_win32_rc.o
-endif
-
-C_OBJ := $(VLC_OBJ) $(LIBVLC_OBJ) $(BUILTIN_OBJ)
-
-LIBVLC_OBJ += $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ)
-
-VLC_OBJ += $(RESOURCE_OBJ)
-
-#
-# Generated header
-#
-H_OBJ :=       src/misc/modules_builtin.h
-
-#
-# Other lists of files
-#
-C_DEP := $(C_OBJ:%.o=.dep/%.d)
-CPP_DEP := $(CPP_OBJ:%.o=.dep/%.dpp)
-
-#
-# Translate plugin names
-#
-ifneq (,$(PLUGINS))
-PLUGIN_OBJ := $(PLUGINS:%=modules/%.so)
-endif
-ifneq (,$(BUILTINS))
-BUILTIN_OBJ := $(BUILTINS:%=modules/%.a)
-endif
-
-#
-# Misc variables
-#
-VERSION := $(shell grep '^ *VERSION=' configure.in | head -1 | sed 's/"//g' | cut -f2 -d=)
-
-# All symbols must be exported
-export
-
-###############################################################################
-# Targets
-###############################################################################
-
-#
-# Virtual targets
-#
-all: Makefile.opts vlc ${ALIASES} vlc.app plugins po mozilla/libvlcplugin.so
-
-Makefile.opts:
-       @echo "**** No configuration found, please run ./configure"
-       @exit 1
-#      ./configure
-#      $(MAKE) $(MAKECMDGOALS)
-#      exit    
-
-show:
-       @echo CC: $(CC)
-       @echo CFLAGS: $(CFLAGS)
-       @echo LDFLAGS: $(LDFLAGS)
-       @echo plugins_CFLAGS: $(plugins_CFLAGS)
-       @echo plugins_LDFLAGS: $(plugins_LDFLAGS)
-       @echo builtins_CFLAGS: $(builtins_CFLAGS)
-       @echo builtins_LDFLAGS: $(builtins_LDFLAGS)
-       @echo C_OBJ: $(C_OBJ)
-       @echo CPP_OBJ: $(CPP_OBJ)
-       @echo PLUGIN_OBJ: $(PLUGIN_OBJ)
-       @echo BUILTIN_OBJ: $(BUILTIN_OBJ)
-
-#
-# Cleaning rules
-#
-clean: plugins-clean po-clean vlc-clean mozilla-clean
-       rm -f src/*/*.o extras/*/*.o
-       rm -f lib/*.so* lib/*.a
-       rm -f plugins/*.so plugins/*.a plugins/*.lib plugins/*.tds
-       rm -Rf extras/MacOSX/build
-
-po-clean:
-       -cd po && $(MAKE) clean
-
-plugins-clean:
-       for dir in $(shell echo $(PLUGIN_OBJ) $(BUILTIN_OBJ) | sed 's@\([^ ]*\)/[^ ]*@\1@g' ) ; do ( PARENT=`pwd` ; cd $${dir} && $(MAKE) -f $$PARENT/Makefile.modules clean PARENT=$$PARENT ) ; done
-
-vlc-clean:
-       rm -f $(C_OBJ) $(CPP_OBJ)
-       rm -f vlc gnome-vlc gvlc kvlc qvlc vlc.exe
-       rm -Rf vlc.app
-
-mozilla-clean:
-       -cd mozilla && $(MAKE) clean
-
-distclean: clean
-       -cd po && $(MAKE) maintainer-clean
-       rm -f **/*.o **/*~ *.log
-       rm -f Makefile.opts Makefile.config vlc-config
-       rm -f include/defs.h include/modules_builtin.h
-       rm -f src/misc/modules_builtin.h
-       rm -f config*status config*cache config*log conftest*
-       rm -f gmon.out core build-stamp
-       rm -Rf .dep
-       rm -f .gdb_history
-
-#
-# Install/uninstall rules
-#
-install: vlc-install plugins-install builtins-install libvlc-install po-install mozilla-install
-
-uninstall: vlc-uninstall plugins-uninstall builtins-uninstall libvlc-uninstall po-uninstall mozilla-uninstall
-
-vlc-install:
-       mkdir -p $(DESTDIR)$(bindir)
-       $(INSTALL) vlc $(DESTDIR)$(bindir)
-ifneq (,$(ALIASES))
-       for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
-endif
-       mkdir -p $(DESTDIR)$(datadir)/vlc
-       $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/vlc
-       $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/vlc
-       $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/vlc
-
-vlc-uninstall:
-       rm -f $(DESTDIR)$(bindir)/vlc
-ifneq (,$(ALIASES))
-       for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias ; fi ; done
-endif
-       rm -f $(DESTDIR)$(datadir)/vlc/*.psf
-       rm -f $(DESTDIR)$(datadir)/vlc/*.png
-       rm -f $(DESTDIR)$(datadir)/vlc/*.xpm
-       -rmdir $(DESTDIR)$(datadir)/vlc
-
-plugins-install:
-       mkdir -p $(DESTDIR)$(libdir)/vlc
-ifneq (,$(PLUGINS))
-       for plugin in $(PLUGINS) ; \
-               do dir=`echo $$plugin | sed -e 's@/[^ ]*@@g'` ; \
-               mkdir -p $(DESTDIR)$(libdir)/vlc/$$dir ; \
-               cp modules/$${plugin}.so $(DESTDIR)$(libdir)/vlc/$$dir ; \
-       done
-endif
-
-plugins-uninstall:
-       rm -f $(DESTDIR)$(libdir)/vlc/*/*.so
-       -rmdir $(DESTDIR)$(libdir)/vlc/*
-       -rmdir $(DESTDIR)$(libdir)/vlc
-
-builtins-install:
-       mkdir -p $(DESTDIR)$(libdir)/vlc
-ifneq (,$(BUILTINS))
-       $(INSTALL) -m 644 $(BUILTINS:%=modules/%.a) $(DESTDIR)$(libdir)/vlc
-endif
-
-builtins-uninstall:
-       rm -f $(DESTDIR)$(libdir)/vlc/*.a
-       -rmdir $(DESTDIR)$(libdir)/vlc
-
-libvlc-install:
-       mkdir -p $(DESTDIR)$(bindir)
-       $(INSTALL) vlc-config $(DESTDIR)$(bindir)
-       mkdir -p $(DESTDIR)$(includedir)/vlc
-       $(INSTALL) -m 644 include/vlc/*.h $(DESTDIR)$(includedir)/vlc
-       mkdir -p $(DESTDIR)$(libdir)
-       $(INSTALL) -m 644 lib/libvlc.a $(DESTDIR)$(libdir)
-
-libvlc-uninstall:
-       rm -f $(DESTDIR)$(bindir)/vlc-config
-       rm -Rf $(DESTDIR)$(includedir)/vlc
-       rm -f $(DESTDIR)$(libdir)/libvlc.a
-
-mozilla-install:
-ifeq ($(MOZILLA),1)
-       -cd mozilla && $(MAKE) install
-endif
-
-mozilla-uninstall:
-ifeq ($(MOZILLA),1)
-       -cd mozilla && $(MAKE) uninstall
-endif
-
-po-install:
-       -cd po && $(MAKE) install
-
-po-uninstall:
-       -cd po && $(MAKE) uninstall
-
-#
-# Package generation rules
-#
-dist:
-       # Check that tmp isn't in the way
-       @if test -e tmp; then \
-               echo "Error: please remove ./tmp, it is in the way"; false; \
-       else \
-               echo "OK."; mkdir tmp; \
-       fi
-       # Copy directory structure in tmp
-       find -type d | grep -v '\(\.dep\|snapshot\|CVS\)' | while read i ; \
-               do mkdir -p tmp/vlc/$$i ; \
-       done
-       rm -Rf tmp/vlc/tmp
-       find debian -mindepth 1 -maxdepth 1 -type d | \
-               while read i ; do rm -Rf tmp/vlc/$$i ; done
-       # Copy .c .h .in .cpp .m and .glade files
-       find include src modules -type f -name '*.[bcdhigmrst]*' | while read i ; \
-               do cp $$i tmp/vlc/$$i ; done
-       # Grmbl... special case...
-       for i in API BUGS DESIGN TODO ; \
-               do cp modules/mad/$$i tmp/vlc/modules/mad ; done
-       # Copy plugin Makefiles
-       find modules -type f -name Makefile | while read i ; \
-               do cp $$i tmp/vlc/$$i ; done
-       # Copy extra programs and documentation
-       cp -a extras/* tmp/vlc/extras
-       cp -a doc/* tmp/vlc/doc
-       find tmp/vlc/extras tmp/vlc/doc \
-               -type d -name CVS -o -name '.*' -o -name '*.[o]' | \
-                       while read i ; do rm -Rf $$i ; done
-       # Copy gettext stuff
-       cp po/ChangeLog po/vlc.pot po/*.po tmp/vlc/po
-       for i in Makefile.in.in POTFILES.in ; do cp po/$$i tmp/vlc/po ; done
-       # Copy misc files
-       cp FAQ AUTHORS COPYING TODO todo.pl ChangeLog* README* INSTALL* \
-               ABOUT-NLS BUGS MODULES vlc.spec \
-               Makefile Makefile.*.in Makefile.dep Makefile.modules \
-               configure configure.in install-sh install-win32 macosx-dmg \
-               config.sub config.guess aclocal.m4 mkinstalldirs \
-                       tmp/vlc/
-       # Copy Debian control files
-       for file in debian/*dirs debian/*docs debian/*menu debian/*desktop \
-               debian/*copyright ; do cp $$file tmp/vlc/debian ; done
-       for file in control changelog rules ; do \
-               cp debian/$$file tmp/vlc/debian/ ; done
-       # Copy ipkg control files
-       for file in control rules patch ; do \
-               cp ipkg/$$file tmp/vlc/ipkg/ ; done
-       # Copy fonts and icons
-       for file in share/*vlc* share/*psf; do \
-               cp $$file tmp/vlc/share ; done
-       # Build archives
-       F=vlc-${VERSION}; \
-       mv tmp/vlc tmp/$$F; (cd tmp ; \
-               cd $$F && $(MAKE) distclean && cd .. ; \
-               tar czf ../$$F.tar.gz $$F);
-       # Clean up
-       rm -Rf tmp
-
-package-win32:
-       # XXX: this rule is probably only useful to you if you have exactly
-       # the same setup as me. Contact sam@zoy.org if you need to use it.
-       #
-       # Check that tmp isn't in the way
-       @if test -e tmp; then \
-               echo "Error: please remove ./tmp, it is in the way"; false; \
-       else \
-               echo "OK."; mkdir tmp; \
-       fi
-       # Create installation script
-       cp install-win32 tmp/nsi
-       # Copy relevant files
-       cp vlc.exe tmp/ 
-       $(STRIP) tmp/vlc.exe
-       cp INSTALL.win32 tmp/INSTALL.txt ; unix2dos tmp/INSTALL.txt
-       for file in AUTHORS COPYING ChangeLog README FAQ TODO ; \
-                       do cp $$file tmp/$${file}.txt ; \
-                       unix2dos tmp/$${file}.txt ; done
-       mkdir tmp/plugins
-ifneq (,$(PLUGINS))
-       for i in $(PLUGINS) ; do \
-               DIR=`echo $$i | cut -f1 -d/` ; \
-               mkdir -p tmp/plugins/$$DIR ; \
-               cp modules/$$i.so tmp/plugins/$$DIR ; \
-               if test $$i != gui/win32/win32 ; then \
-                       $(STRIP) \
-                       tmp/plugins/$$DIR/`echo $$i | sed -e 's@.*/@@'`.so ; \
-               fi ; \
-       done
-endif
-       mkdir tmp/share
-       for file in default8x16.psf default8x9.psf ; \
-               do cp share/$$file tmp/share/ ; done
-       # Create package 
-       wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe -- /DVERSION=${VERSION} /CD tmp/nsi
-       # Clean up
-       rm -Rf tmp
-
-package-beos:
-       # Check that tmp isn't in the way
-       @if test -e tmp; then \
-               echo "Error: please remove ./tmp, it is in the way"; false; \
-       else \
-               echo "OK."; mkdir tmp; \
-       fi
-       
-       # Create dir
-       mkdir -p tmp/vlc/share
-       # Copy relevant files
-       cp vlc tmp/vlc/
-       strip tmp/vlc/vlc
-       xres -o tmp/vlc/vlc ./share/vlc_beos.rsrc
-       cp AUTHORS COPYING ChangeLog README FAQ TODO tmp/vlc/
-       for file in default8x16.psf default8x9.psf ; \
-               do cp share/$$file tmp/vlc/share/ ; done
-       mkdir tmp/vlc/modules
-       cp $(PLUGINS:%=modules/%.so) tmp/vlc/modules/ 
-       strip $(PLUGINS:%=tmp/vlc/modules/%.so)
-       # Create package 
-       mv tmp/vlc tmp/vlc-${VERSION}
-       (cd tmp ; find vlc-${VERSION} | \
-       zip -9 -@ vlc-${VERSION}-BeOS-x86.zip )
-       mv tmp/vlc-${VERSION}-BeOS-x86.zip .
-       # Clean up
-       rm -Rf tmp
-
-package-macosx:
-       # Check that tmp isn't in the way
-       @if test -e tmp; then \
-               echo "Error: please remove ./tmp, it is in the way"; false; \
-       else \
-               echo "OK."; mkdir tmp; \
-       fi
-
-       # Copy relevant files 
-       cp -R vlc.app tmp/
-       cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf FAQ TODO tmp/
-
-       # Create disk image 
-       ./macosx-dmg 0 "vlc-${VERSION}" tmp/* 
-
-       # Clean up
-       rm -Rf tmp
-
-#
-# Gtk/Gnome/* aliases and OS X application
-#
-gnome-vlc gvlc kvlc qvlc: vlc
-       rm -f $@ && ln -s vlc $@
-
-.PHONY: vlc.app
-vlc.app: vlc plugins
-ifneq (,$(findstring darwin,$(SYS)))
-       rm -Rf vlc.app
-       cd extras/MacOSX ; pbxbuild | grep -v '^ ' | grep -v '^\t' | grep -v "^$$"
-       cp -r extras/MacOSX/build/vlc.bundle ./vlc.app
-       $(INSTALL) -d vlc.app/Contents/MacOS/share
-       $(INSTALL) -d vlc.app/Contents/MacOS/modules
-       $(INSTALL) vlc vlc.app/Contents/MacOS/
-ifneq (,$(PLUGINS))
-       $(INSTALL) $(PLUGINS:%=modules/%.so) vlc.app/Contents/MacOS/modules
-endif
-       $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
-endif
-
-FORCE:
-
-#
-# Generic rules (see below)
-#
-src/misc/modules_builtin.h: Makefile.opts Makefile Makefile.config
-       @echo "make[$(MAKELEVEL)]: Creating \`$@'"
-       @rm -f $@ && cp $@.in $@
-ifneq (,$(BUILTINS))
-       @for i in $(BUILTINS) ; do \
-               echo "int vlc_entry__modules_"`echo $$i | sed -e 'y@/@_@' -e 's@\..*@@'`"( module_t* );" >>$@; \
-       done
-       @echo "" >> $@ ;
-endif
-       @echo "#define ALLOCATE_ALL_BUILTINS() \\" >> $@ ;
-       @echo "    do \\" >> $@ ;
-       @echo "    { \\" >> $@ ;
-ifneq (,$(BUILTINS))
-       @for i in $(BUILTINS) ; do \
-               echo "        ALLOCATE_BUILTIN(modules_"`echo $$i | sed -e 'y@/@_@' -e 's@\..*@@'`"); \\" >> $@ ; \
-       done
-endif
-       @echo "    } while( 0 );" >> $@ ;
-       @echo "" >> $@ ;
-
-$(C_DEP): %.d: FORCE
-       @$(MAKE) -s --no-print-directory -f Makefile.dep $@ CFLAGS="$(CFLAGS) $(vlc_CFLAGS)"
-
-$(CPP_DEP): %.dpp: FORCE
-       @$(MAKE) -s --no-print-directory -f Makefile.dep $@ CFLAGS="$(CFLAGS) $(vlc_CFLAGS)"
-
-$(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile
-$(C_OBJ): %.o: $(H_OBJ)
-$(C_OBJ): %.o: .dep/%.d
-$(C_OBJ): %.o: %.c
-       $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
-
-$(CPP_OBJ): %.o: Makefile.opts Makefile.dep Makefile
-$(CPP_OBJ): %.o: $(H_OBJ)
-$(CPP_OBJ): %.o: .dep/%.dpp
-$(CPP_OBJ): %.o: %.cpp
-       $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
-
-$(M_OBJ): %.o: Makefile.opts Makefile.dep Makefile
-$(M_OBJ): %.o: $(H_OBJ)
-$(M_OBJ): %.o: .dep/%.dm
-$(M_OBJ): %.o: %.m
-       $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
-
-$(RESOURCE_OBJ): %.o: Makefile.dep Makefile
-ifneq (,(findstring mingw32,$(SYS)))
-$(RESOURCE_OBJ): %.o: %.rc
-       $(WINDRES) -i $< -o $@
-endif
-
-#
-# Main application target
-#
-vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ)
-       $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) lib/libvlc.a $(LDFLAGS) $(vlc_LDFLAGS) $(BUILTIN_OBJ) $(builtins_LDFLAGS)
-ifeq ($(SYS),beos)
-       xres -o $@ ./share/vlc_beos.rsrc
-       mimeset -f $@
-endif
-
-#
-# Main library target
-#
-lib/libvlc.a: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
-       rm -f $@
-       ar rc $@ $(LIBVLC_OBJ)
-       $(RANLIB) $@
-
-#
-# DO NOT DISTRIBUTE SHARED VERSIONS OF LIBVLC UNTIL THE ABI IS STABLE
-# OR BURN IN HELL -- Sam
-#
-#lib/libvlc.so: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
-#      $(CC) -shared $(LIBVLC_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) -o $@
-
-builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
-plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
-
-modules/%.a modules/%.so: $(H_OBJ) FORCE
-       cd $(shell echo $@ | sed -e 's@\(.*\)/.*@\1@') && $(MAKE) -f $(shell echo $@ | sed -e 's@[^/]*/@../@g' -e 's@\(.*\)/.*@\1@')/Makefile.modules $(shell echo $@ | sed -e 's@.*/@@') PARENT=$(shell echo $@ | sed -e 's@[^/]*/@../@g' -e 's@\(.*\)/.*@\1@') MODULE_PATH=$(shell echo $@ | sed -e 'y@/@_@' -e 's@\..*@@')
-
-#
-# Mozilla plugin target
-#
-mozilla/libvlcplugin.so: FORCE
-ifeq ($(MOZILLA),1)
-       @cd mozilla && $(MAKE) builtins_LDFLAGS="$(builtins_LDFLAGS)"
-endif
-
-#
-# gettext target
-#
-po: FORCE
-       @cd po && $(MAKE)
-
diff --git a/Makefile.opts.in b/Makefile.opts.in
deleted file mode 100644 (file)
index 34ac60e..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-###############################################################################
-# vlc (VideoLAN Client) options Makefile
-# (c)1998 VideoLAN
-###############################################################################
-
-HAVE_MAKEFILE_OPTS = 1
-
-###############################################################################
-# Configuration
-###############################################################################
-
-# 
-# Build options
-# 
-SYS = @SYS@
-ALIASES =@ALIASES@
-MOZILLA = @MOZILLA@
-INSTALL = @INSTALL@
-ARCH = @ARCH@
-
-#
-# Compilation options
-#
-DEBUG = @DEBUG@
-CPROF = @CPROF@
-GPROF = @GPROF@
-OPTIMS = @OPTIMS@
-TUNING = @TUNING@
-RELEASE = @RELEASE@
-
-# 
-# Build environment
-# 
-CC = @CC@
-CFLAGS += @CFLAGS@
-SHELL = @SHELL@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-MOC = @MOC@
-WINDRES = @WINDRES@
-BCBUILDER = @BCBUILDER@
-
-# 
-# Installation environment
-# 
-exec_prefix = @exec_prefix@
-prefix = @prefix@
-bindir = @bindir@
-datadir = @datadir@
-libdir = @libdir@
-includedir = @includedir@
-
-#
-# CFLAGS for special cases
-#
-vlc_CFLAGS = @vlc_CFLAGS@
-plugins_CFLAGS = @plugins_CFLAGS@
-builtins_CFLAGS = @builtins_CFLAGS@
-mozilla_CFLAGS = @mozilla_CFLAGS@
-
-a52tofloat32_CFLAGS = @a52tofloat32_CFLAGS@
-arts_CFLAGS = @arts_CFLAGS@
-i420_yuy2_mmx_CFLAGS = @i420_yuy2_mmx_CFLAGS@
-directx_CFLAGS = @directx_CFLAGS@
-dvd_CFLAGS = @dvd_CFLAGS@
-dvdread_CFLAGS = @dvdread_CFLAGS@
-dvdplay_CFLAGS = @dvdplay_CFLAGS@
-esd_CFLAGS = @esd_CFLAGS@
-familiar_CFLAGS = @familiar_CFLAGS@
-faad_CFLAGS = @faad_CFLAGS@
-ffmpeg_CFLAGS = @ffmpeg_CFLAGS@
-glide_CFLAGS = @glide_CFLAGS@
-gnome_CFLAGS = @gnome_CFLAGS@
-gtk_CFLAGS = @gtk_CFLAGS@
-gtk_main_CFLAGS = @gtk_main_CFLAGS@
-idctaltivec_CFLAGS = @idctaltivec_CFLAGS@
-kde_CFLAGS = @kde_CFLAGS@
-mad_CFLAGS = @mad_CFLAGS@
-memcpyaltivec_CFLAGS = @memcpyaltivec_CFLAGS@
-motionaltivec_CFLAGS = @motionaltivec_CFLAGS@
-opie_CFLAGS = @opie_CFLAGS@
-ts_dvbpsi_CFLAGS = @ts_dvbpsi_CFLAGS@
-qt_CFLAGS = @qt_CFLAGS@
-qte_CFLAGS = @qte_CFLAGS@
-sdl_CFLAGS = @sdl_CFLAGS@
-svgalib_CFLAGS = @svgalib_CFLAGS@
-x11_CFLAGS = @x11_CFLAGS@
-xvideo_CFLAGS = @xvideo_CFLAGS@
-
-#
-# Libraries for special cases
-#
-vlc_LDFLAGS = @vlc_LDFLAGS@
-plugins_LDFLAGS = @plugins_LDFLAGS@
-builtins_LDFLAGS = @builtins_LDFLAGS@
-mozilla_LDFLAGS = @mozilla_LDFLAGS@
-
-a52tofloat32_LDFLAGS = @a52tofloat32_LDFLAGS@
-aa_LDFLAGS = @aa_LDFLAGS@
-alsa_LDFLAGS = @alsa_LDFLAGS@
-arts_LDFLAGS = @arts_LDFLAGS@
-beos_LDFLAGS = @beos_LDFLAGS@
-i420_rgb_LDFLAGS = @i420_rgb_LDFLAGS@
-directx_LDFLAGS = @directx_LDFLAGS@
-dv_LDFLAGS = @dv_LDFLAGS@
-dvd_LDFLAGS = @dvd_LDFLAGS@
-dvdread_LDFLAGS = @dvdread_LDFLAGS@
-dvdplay_LDFLAGS = @dvdplay_LDFLAGS@
-esd_LDFLAGS = @esd_LDFLAGS@
-familiar_LDFLAGS = @familiar_LDFLAGS@
-distort_LDFLAGS = @distort_LDFLAGS@
-faad_LDFLAGS = @faad_LDFLAGS@
-ffmpeg_LDFLAGS = @ffmpeg_LDFLAGS@
-mp4_LDFLAGS = @mp4_LDFLAGS@
-ggi_LDFLAGS = @ggi_LDFLAGS@
-glide_LDFLAGS = @glide_LDFLAGS@
-gnome_LDFLAGS = @gnome_LDFLAGS@
-gtk_LDFLAGS = @gtk_LDFLAGS@
-gtk_main_LDFLAGS = @gtk_main_LDFLAGS@
-http_LDFLAGS = @http_LDFLAGS@
-idctaltivec_LDFLAGS = @idctaltivec_LDFLAGS@
-imdct_LDFLAGS = @imdct_LDFLAGS@
-imdct3dn_LDFLAGS = @imdct3dn_LDFLAGS@
-imdctsse_LDFLAGS = @imdctsse_LDFLAGS@
-ipv4_LDFLAGS = @ipv4_LDFLAGS@
-ipv6_LDFLAGS = @ipv6_LDFLAGS@
-kde_LDFLAGS = @kde_LDFLAGS@
-lirc_LDFLAGS = @lirc_LDFLAGS@
-macosx_LDFLAGS = @macosx_LDFLAGS@
-mad_LDFLAGS = @mad_LDFLAGS@
-memcpyaltivec_LDFLAGS = @memcpyaltivec_LDFLAGS@
-motionaltivec_LDFLAGS = @motionaltivec_LDFLAGS@
-ncurses_LDFLAGS = @ncurses_LDFLAGS@
-opie_LDFLAGS = @opie_LDFLAGS@
-oss_LDFLAGS = @oss_LDFLAGS@
-qnx_LDFLAGS = @qnx_LDFLAGS@
-qt_LDFLAGS = @qt_LDFLAGS@
-qte_LDFLAGS = @qte_LDFLAGS@
-rc_LDFLAGS = @rc_LDFLAGS@
-sdl_LDFLAGS = @sdl_LDFLAGS@
-svgalib_LDFLAGS = @svgalib_LDFLAGS@
-audio_LDFLAGS = @audio_LDFLAGS@
-ts_dvbpsi_LDFLAGS = @ts_dvbpsi_LDFLAGS@
-vcd_LDFLAGS = @vcd_LDFLAGS@
-vorbis_LDFLAGS = @vorbis_LDFLAGS@
-waveout_LDFLAGS = @waveout_LDFLAGS@
-x11_LDFLAGS = @x11_LDFLAGS@
-xosd_LDFLAGS = @xosd_LDFLAGS@
-xvideo_LDFLAGS = @xvideo_LDFLAGS@
-id3tag_LDFLAGS = @id3tag_LDFLAGS@
-
-#
-# Other special cases
-#
-NEED_GETOPT = @NEED_GETOPT@
-
-###############################################################################
-# Configuration pre-processing
-###############################################################################
-
-# PROGRAM_OPTIONS is an identification string of the compilation options
-PROGRAM_OPTIONS = $(SYS) $(ARCH)
-ifeq ($(DEBUG),1)
-PROGRAM_OPTIONS += DEBUG
-CFLAGS += -DDEBUG
-endif
-ifeq ($(CPROF),1)
-PROGRAM_OPTIONS += CPROF
-CFLAGS += -DCPROF
-endif
-ifeq ($(GPROF),1)
-PROGRAM_OPTIONS += GPROF
-CFLAGS += -DGPROF
-endif
-
-# PROGRAM_BUILD is a complete identification of the build
-# (we can't use fancy options with date since OSes like Solaris
-# or FreeBSD have strange date implementations)
-ifeq ($(SYS),beos)
-# XXX: beos does not support hostname (how lame...)
-PROGRAM_BUILD = `date` $(USER)
-else
-PROGRAM_BUILD = `date` $(USER)@`hostname`
-endif
-
-# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
-CFLAGS += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
-
-# Gettext support
-CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\"
-
-# Data and plugin location
-CFLAGS += -DDATA_PATH=\"@prefix@/share/vlc\"
-CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
-
-###############################################################################
-# Tuning and other variables - do not change anything except if you know
-# exactly what you are doing
-###############################################################################
-
-#
-# C headers directories
-#
-vlc_CFLAGS += -Iinclude -Iextras -I.
-
-#
-# C compiler flags: mainstream compilation
-#
-CFLAGS += -D_REENTRANT -D_THREAD_SAFE
-CFLAGS += -D_GNU_SOURCE
-
-ifeq ($(RELEASE),1)
-CFLAGS += -DHAVE_RELEASE
-endif
-
-CFLAGS += -D__VLC__
-
-# Optimizations : don't compile debug versions with them
-ifeq ($(OPTIMS),1)
-CFLAGS += @CFLAGS_OPTIM@
-ifneq ($(DEBUG),1)
-ifneq ($(GPROF),1)
-ifneq ($(CPROF),1)
-CFLAGS += @CFLAGS_OPTIM_NODEBUG@
-endif
-endif
-endif
-
-ifneq (,$(findstring powerpc,$(ARCH)))
-# Optimizations for PowerPC
-CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
-ifneq (,$(TUNING))
-CFLAGS += -mtune=$(TUNING)
-endif
-else
-ifneq (,$(findstring sparc,$(ARCH)))
-# Optimizations for Sparc
-CFLAGS += -mhard-float
-ifneq (,$(TUNING))
-CFLAGS += -mcpu=$(TUNING)
-endif
-else
-# Generic optimizations
-ifneq (,$(TUNING))
-CFLAGS += -mcpu=$(TUNING)
-endif
-endif
-endif
-
-#end of optimisations
-endif
-
-#
-# C compiler flags: linking
-#
-LDFLAGS += @LDFLAGS@
-LDFLAGS += -Wall
-ifneq ($(DEBUG),1)
-ifneq ($(GPROF),1)
-ifneq ($(CPROF),1)
-#LDFLAGS += -s
-endif
-endif
-endif
-
-#
-# Linker flags: plugins and builtins linking
-#
-builtins_LDFLAGS += $(shell echo $(BUILTINS) | sed -e 's@[^ ]*/\([^ ]*\)@$$\1_LDFLAGS@g')
-
-#
-# Debugging and profiling support
-#
-ifeq ($(DEBUG),1)
-CFLAGS += -g
-endif
-
-ifeq ($(CPROF),1)
-CFLAGS += -finstrument-functions
-endif
-
-ifeq ($(GPROF),1)
-CFLAGS += -pg
-endif
-
-
index 0ac4fbc..16d79ab 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,7 @@
 #! /bin/sh
 
-##  bootstrap.sh file for vlc, the VideoLAN Client
-##  $Id: bootstrap,v 1.13 2002/08/29 23:53:22 massiot Exp $
+##  bootstrap file for vlc, the VideoLAN Client
+##  $Id: bootstrap,v 1.14 2002/09/30 11:05:32 sam Exp $
 ##
 ##  Authors: Samuel Hocevar <sam@zoy.org>
 
@@ -27,8 +27,136 @@ while test $# -gt 0; do
   shift
 done
 
+##
+## Check that our tools don't suck
+##
+SEDSUCKS=no
+if test ! 20000 -eq `perl -e 'printf "%s\n","a"x20000' | sed -e 's/.//' 2>/dev/null | wc -c`
+then
+  SEDSUCKS=yes
+fi
+
+PERLSUCKS=no
+
+##
+## Generate the modules makefile, by parsing modules/**/Modules.am
+##
+
+printf "generating Modules.am and configure.ac"
+
+echo > Modules.am
+echo > configure.ac
+
+ALL_FLAGS="`sed -n -e '/^[^=A-Z]*[A-Z]*FLAGS_[^=]*=/s/[^=A-Z]*\([A-Z]*FLAGS_[^=]*=\).*/\1/p' < configure.ac.in | sort | uniq`"
+
+cat >> configure.ac << EOF
+dnl ################################################################
+dnl # Do not edit this file, it was generated from configure.ac.in #
+dnl ################################################################
+
+EOF
+sed -n -e '/dnl do not touch this line/q;p' < configure.ac.in >> configure.ac
+
+modules=""
+for mf in `sed -ne 's@[^a-z]*\([^ ]*\)am.*@modules/\1am@p' < modules/Makefile.am`
+do
+  printf "."
+  dir=`echo ${mf} | sed -e 's@\(.*\)/.*@\1@'`
+  topdir=`echo ${dir} | cut -f2 -d/`
+  sym=`echo ${dir} | sed -e 'y@/@_@'`
+  cat >> Modules.am << EOF
+# Directory ${dir}
+
+include ${dir}/Modules.am
+
+EOF
+  sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | while read mod
+  do
+    if echo "$ALL_FLAGS" | grep '^CPPFLAGS_'${mod}'=$' >/dev/null 2>&1; then
+        echo "AC_SUBST(CPPFLAGS_${mod})" >> configure.ac; fi
+    if echo "$ALL_FLAGS" | grep '^CFLAGS_'${mod}'=$' >/dev/null 2>&1; then
+        echo "AC_SUBST(CFLAGS_${mod})" >> configure.ac; fi
+    if echo "$ALL_FLAGS" | grep '^CXXFLAGS_'${mod}'=$' >/dev/null 2>&1; then
+        echo "AC_SUBST(CXXFLAGS_${mod})" >> configure.ac; fi
+    if echo "$ALL_FLAGS" | grep '^OBJCFLAGS_'${mod}'=$' >/dev/null 2>&1; then
+        echo "AC_SUBST(OBJCFLAGS_${mod})" >> configure.ac; fi
+    if echo "$ALL_FLAGS" | grep '^LDFLAGS_'${mod}'=$' >/dev/null 2>&1; then
+        echo "AC_SUBST(LDFLAGS_${mod})" >> configure.ac; fi
+    if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < ${mf} >/dev/null 2>&1; then
+        PRIVATE='#'; else
+        PRIVATE=''; fi
+    if grep '^nodist_SOURCES_'${mod}'' < ${mf} >/dev/null 2>&1; then
+        NODIST=''; else
+        NODIST='#'; fi
+    cat >> configure.ac << EOF
+AM_CONDITIONAL(${mod}_plugin, test x\$${mod}_plugin = xyes)
+AM_CONDITIONAL(${mod}_builtin, test x\$${mod}_builtin = xyes)
+EOF
+# L_ is for LIBRARIES_, D_ for DATA_, B_ for BUILT_SOURCES_, F_ for LDFLAGS_
+# _p is for _plugin, _b is for _builtin
+    cat >> Modules.am << EOF
+# The ${mod} plugin
+
+if ${mod}_plugin
+L_${mod}_p = ${dir}/lib${mod}_plugin.a
+D_${mod}_p = ${dir}/lib${mod}_plugin\$(LIBEXT)
+${NODIST}B_${mod}_p = \$(nodist_SOURCES_${mod})
+endif
+if ${mod}_builtin
+L_${mod}_b = ${dir}/lib${mod}.a
+F_${mod}_b = \$(LDFLAGS_${mod})
+if BUILD_MOZILLA
+L_${mod}_pic = ${dir}/lib${mod}_pic.a
+endif
+${NODIST}B_${mod}_b = \$(nodist_SOURCES_${mod})
+endif
+
+L_builtin += \$(L_${mod}_b)
+L_builtin_pic += \$(L_${mod}_pic)
+LDFLAGS_builtin += \$(F_${mod}_b)
+${PRIVATE}BUILT_SOURCES += \$(B_${mod}_p) \$(B_${mod}_b)
+
+${PRIVATE}${sym}_lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
+${NODIST}${PRIVATE}nodist_${sym}_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
+${sym}_lib${mod}_plugin_a_CPPFLAGS = \$(CPPFLAGS_plugin) \$(CPPFLAGS_${mod}) -DMODULE_NAME=${mod} -DMODULE_NAME_IS_${mod}
+${sym}_lib${mod}_plugin_a_CFLAGS = \$(CFLAGS_plugin) \$(CFLAGS_${mod}) \$(${sym}_lib${mod}_plugin_a_CPPFLAGS)
+${sym}_lib${mod}_plugin_a_CXXFLAGS = \$(CXXFLAGS_plugin) \$(CXXFLAGS_${mod}) \$(${sym}_lib${mod}_plugin_a_CPPFLAGS)
+${sym}_lib${mod}_plugin_a_OBJCFLAGS = \$(OBJCFLAGS_plugin) \$(OBJCFLAGS_${mod}) \$(${sym}_lib${mod}_plugin_a_CPPFLAGS)
+
+${sym}_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
+${NODIST}nodist_${sym}_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
+${sym}_lib${mod}_pic_a_CPPFLAGS = \$(CPPFLAGS_builtin_pic) \$(CPPFLAGS_${mod}) -DMODULE_NAME=${mod} -DMODULE_NAME_IS_${mod}
+${sym}_lib${mod}_pic_a_CFLAGS = \$(CFLAGS_builtin_pic) \$(CFLAGS_${mod}) \$(${sym}_lib${mod}_pic_a_CPPFLAGS)
+${sym}_lib${mod}_pic_a_CXXFLAGS = \$(CXXFLAGS_builtin_pic) \$(CXXFLAGS_${mod}) \$(${sym}_lib${mod}_pic_a_CPPFLAGS)
+${sym}_lib${mod}_pic_a_OBJCFLAGS = \$(OBJCFLAGS_builtin_pic) \$(OBJCFLAGS_${mod}) \$(${sym}_lib${mod}_pic_a_CPPFLAGS)
+
+${sym}_lib${mod}_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
+${NODIST}nodist_${sym}_lib${mod}_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
+${sym}_lib${mod}_a_CPPFLAGS = \$(CPPFLAGS_builtin) \$(CPPFLAGS_${mod}) -DMODULE_NAME=${mod} -DMODULE_NAME_IS_${mod}
+${sym}_lib${mod}_a_CFLAGS = \$(CFLAGS_builtin) \$(CFLAGS_${mod}) \$(${sym}_lib${mod}_a_CPPFLAGS)
+${sym}_lib${mod}_a_CXXFLAGS = \$(CXXFLAGS_builtin) \$(CXXFLAGS_${mod}) \$(${sym}_lib${mod}_a_CPPFLAGS)
+${sym}_lib${mod}_a_OBJCFLAGS = \$(OBJCFLAGS_builtin) \$(OBJCFLAGS_${mod}) \$(${sym}_lib${mod}_a_CPPFLAGS)
+
+libvlc_LIBRARIES += \$(L_${mod}_b) \$(L_${mod}_pic)
+lib${mod}_DATA = \$(D_${mod}_p)
+
+lib${mod}dir = \$(libdir)/vlc/${topdir}
+MOSTLYCLEANFILES += \$(D_${mod}_p)
+${PRIVATE}noinst_LIBRARIES += \$(L_${mod}_p)
+${PRIVATE}${dir}/lib${mod}_plugin\$(LIBEXT): \$(${sym}_lib${mod}_plugin_a_OBJECTS)
+${PRIVATE}     \$(CC) \$^ -o \$@ -shared \$(LDFLAGS) \$(LDFLAGS_plugins) \$(LDFLAGS_${mod})
+
+
+EOF
+  done
+done
+
+sed -n -e '/dnl do not touch this line/,//p' < configure.ac.in >> configure.ac
+
+echo "done."
+
 ###
-###  classic stuff
+###  classic bootstrap stuff
 ###
 set -x
 rm -f aclocal.m4 configure config.guess config.log config.sub ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh
@@ -40,15 +168,17 @@ if expr `gettextize --version | sed -e '1s/[^0-9]*//' -e q` \
         '>' 0.11.3 >/dev/null 2>&1
 then
   # We have gettext, and a recent version! Everything is cool.
-  autopoint --force
+  autopoint --force || exit 1
   GETTEXT=yes
 else
   # What?! User is not using a recent version of gettext? We'll have to
   # cheat a bit, then.
   rm -f po/ChangeLog~
   gettextize --copy --force | grep '^from the' | cut -f3 -d' '
+  test -f po/ChangeLog~ && mv -f po/ChangeLog~ po/ChangeLog
   # Yuck!
-  test -f po/ChangeLog~ && mv po/ChangeLog~ po/ChangeLog
+  mkdir -p intl
+  test -f intl/Makefile.am || echo > intl/Makefile.am
   # Yuck!
   echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' > m4/oldgettext.m4
   GETTEXT=old
@@ -72,7 +202,7 @@ else
   else
     if automake --version > /dev/null 2>&1
     then
-      amvers=`automake --version | head -1 | cut -d\  -f 4`
+      amvers=`automake --version | sed -e '1s/[^0-9]*//' -e q`
 
       if expr "$amvers" "<" "1.5" > /dev/null 2>&1
       then amvers="none"
@@ -90,52 +220,59 @@ then
 fi
 
 # Do the rest
-aclocal${amvers} -I m4
-autoheader
-automake${amvers} --foreign --add-missing --copy
-autoconf
+aclocal${amvers} -I m4 || exit 1
+autoheader || exit 1
+
+automake${amvers} --foreign --add-missing --copy || PERLSUCKS=yes
+
+case "$PERLSUCKS" in
+  no)
+  ;;
+  yes)
+    set +x
+    echo ""
+    echo "==========================================================="
+    echo "IMPORTANT NOTE: automake failed. On certain systems this is"
+    echo "because of insufficient stack size. Please set the stack"
+    echo "size to something bigger or unlimited (\`unlimit stacksize')"
+    echo "and try again."
+    exit 1
+  ;;
+esac
+
+# Wrap automake's long lines, because the Solaris sed doesn't support lines
+# longer than 3999 characters, and ./configure calls sed. We use Perl instead
+# of sed for obvious reasons :)
+perl -ne 'if(/^.{500}/) {s/(.{200}[^ ]* )/$1\\\n\t/g} print $_' < Makefile.in > Makefile.in.tmp && mv Makefile.in.tmp Makefile.in
 
-# nuahahahahaha !! overwriting Makefile.in with what *I* want!
-cp Makefile.old Makefile.in
+autoconf || exit 1
 
 ##
-##  headers which need to be regenerated because of the VLC_EXPORT macro
+##  Shut up
 ##
-file=src/misc/modules_plugin.h
-rm -f $file
-sed -e 's#.*\$[I][d]:.*# * Automatically generated from '$file'.in by bootstrap.sh#' < $file.in > $file
-echo '#define STORE_SYMBOLS( p_symbols ) \' >> $file
-cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
-       sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/    (p_symbols)->\2_inner = \2; \\/' >> $file
-echo '' >> $file
-
-file=include/vlc_symbols.h
-rm -f $file && touch $file
-echo '/* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */' >> $file
-echo '' >> $file
-echo 'struct module_symbols_t' >> $file
-echo '{' >> $file
-cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
-       sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/    \1 (* \2_inner) \3;/' | sort >> $file
-echo '};' >> $file
-echo '' >> $file
-echo '#ifdef __PLUGIN__' >> $file
-cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
-       sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/#   define \2 p_symbols->\2_inner/' | sort >> $file
-echo '#endif /* __PLUGIN__ */' >> $file
-echo '' >> $file
+set +x
 
+##
+##  headers which need to be regenerated because of the VLC_EXPORT macro
+##
+files="src/misc/modules_builtin.h src/misc/modules_plugin.h include/vlc_symbols.h"
+for file in src/misc/modules_builtin.h src/misc/modules_plugin.h include/vlc_symbols.h mozilla/vlcintf.h
+do
+  echo "touching $file"
+  echo > $file
+done
 
 ##
 ##  Glade sometimes sucks
 ##
+echo "workarounds for annoying glade features"
 for file in gnome_interface.c gtk_interface.c
 do
 if grep "DO NOT EDIT THIS FILE" modules/gui/gtk/$file 2>&1 > /dev/null
 then
     rm -f /tmp/$$.$file.bak
     cat > /tmp/$$.$file.bak << EOF
-/* This file was created automatically by glade and fixed by bootstrap.sh */
+/* This file was created automatically by glade and fixed by bootstrap */
 
 #include <vlc/vlc.h>
 EOF
@@ -154,15 +291,10 @@ file=gtk_support.h
 if grep "DO NOT EDIT THIS FILE" modules/gui/gtk/$file 2>&1 > /dev/null
 then
     rm -f /tmp/$$.$file.bak
-    sed -e 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by bootstrap.sh/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < modules/gui/gtk/$file > /tmp/$$.$file.bak
+    sed -e 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by bootstrap/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < modules/gui/gtk/$file > /tmp/$$.$file.bak
     mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
 fi
 
-##
-##  Shut up
-##
-set +x
-
 ##
 ##  Update the potfiles because no one ever does it
 ##
@@ -176,7 +308,7 @@ else
 fi
 
 ##
-##  Tell the user about gettext
+##  Tell the user about gettext and sed
 ##
 case "$GETTEXT" in
   yes)
@@ -196,3 +328,16 @@ case "$GETTEXT" in
   ;;
 esac
 
+case "$SEDSUCKS" in
+  no)
+  ;;
+  yes)
+    echo ""
+    echo "============================================================="
+    echo "IMPORTANT NOTE: the version of 'sed' on your system is unable"
+    echo "to handle long lines. bootstrap will try its best to generate"
+    echo "a correct Makefile, but you should expect problems. We highly"
+    echo "recommend installing GNU sed."
+  ;;
+esac
+
diff --git a/configure.ac.in b/configure.ac.in
new file mode 100644 (file)
index 0000000..44325cc
--- /dev/null
@@ -0,0 +1,2245 @@
+dnl Autoconf settings for vlc
+
+AC_INIT(vlc,0.5.0-cvs-am)
+
+CONFIGURE_LINE="$0 $*"
+CODENAME="Natalya"
+
+AC_PREREQ(2.50)
+AC_CONFIG_SRCDIR(src/libvlc.c)
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
+AM_CONFIG_HEADER(config.h)
+
+dnl
+dnl  Save *FLAGS
+dnl
+CPPFLAGS_save="${CPPFLAGS}"
+CFLAGS_save="${CFLAGS}"
+CXXFLAGS_save="${CXXFLAGS}"
+OBJCFLAGS_save="${OBJCFLAGS}"
+LDFLAGS_save="${LDFLAGS}"
+
+dnl
+dnl Check for tools
+dnl
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_CPP
+AC_PROG_CXX
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+
+dnl AC_PROG_OBJC doesn't seem to exist, this is the KDE workaround
+AC_MSG_CHECKING(for an Objective-C compiler)
+OBJC="${CXX}"
+AC_SUBST(OBJC)
+OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
+AC_SUBST(OBJCFLAGS)
+dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
+#OBJCDEPMODE="depmode=gcc3"
+#AC_SUBST(OBJCDEPMODE)
+_AM_DEPENDENCIES(OBJC)
+AC_MSG_RESULT(not implemented yet)
+
+dnl Find the right ranlib, even when cross-compiling
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+dnl Gettext stuff
+ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
+AM_GNU_GETTEXT_VERSION(0.10.40)
+AM_GNU_GETTEXT
+
+dnl AM_PROG_LIBTOOL
+AC_PROG_INSTALL
+
+dnl Check for compiler properties
+AC_C_CONST
+AC_C_INLINE
+
+dnl
+dnl  Set default values
+dnl
+LDFLAGS_vlc="${LDFLAGS}"
+LIBEXT=".so"
+
+dnl
+dnl  Check the operating system
+dnl
+case "x${target_os}" in
+  x)
+    SYS=unknown
+    ;;
+  xlinux*)
+    SYS=linux
+    ;;
+  xbsdi*)
+    SYS=bsdi
+    CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
+    LDFLAGS_dvd="${LDFLAGS_dvd} -ldvd"
+    LDFLAGS_vcd="${LDFLAGS_vcd} -ldvd"
+    ;;
+  x*bsd*)
+    SYS="${target_os}"
+    CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
+    ;;
+  xdarwin*)
+    SYS=darwin
+    CFLAGS_save="${CFLAGS_save} -no-cpp-precomp"; CFLAGS="${CFLAGS_save}"
+    CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp"; CXXFLAGS="${CXXFLAGS_save}"
+    OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp"; OBJCFLAGS="${OBJCFLAGS_save}"
+    LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
+    LIBEXT=".dylib"
+    ;;
+  x*mingw32*)
+    SYS=mingw32
+    AC_CHECK_TOOL(WINDRES, windres, :)
+    CFLAGS_save="${CFLAGS_save} -fnative-struct"; CFLAGS="${CFLAGS_save}"
+    CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
+    LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows -Xlinker --force-exe-suffix"
+    LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
+    LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
+    LDFLAGS_access_http="${LDFLAGS_http} -lws2_32"
+    LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
+    LIBEXT=".dll"
+    ;;
+  x*cygwin*)
+    SYS=cygwin
+    AC_CHECK_TOOL(WINDRES, windres, :)
+    LIBEXT=".dll"
+    ;;
+  x*nto*)
+    SYS=nto
+    LDFLAGS_x11="${LDFLAGS_x11} -lsocket"
+    LDFLAGS_xvideo="${LDFLAGS_xvideo} -lsocket"
+    ;;
+  xsolaris*)
+    SYS=solaris
+    ;;
+  xhpux*)
+    SYS=hpux
+    LIBEXT=".sl"
+    ;;
+  xbeos)
+    SYS=beos
+    CFLAGS_save="${CFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${CFLAGS_save}"
+    CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
+    LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
+    LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
+    LDFLAGS_beos="${LDFLAGS_beos} -lbe -lgame -lroot -ltracker -lstdc++.r4"
+    LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"
+    ;;
+  x*)
+    SYS="${target_os}"
+    ;;
+esac
+AM_CONDITIONAL(HAVE_BEOS, test "x${SYS}" = "xbeos")
+AM_CONDITIONAL(HAVE_DARWIN, test "x${SYS}" = "xdarwin")
+AM_CONDITIONAL(HAVE_WIN32, test "x${SYS}" = "xmingw32")
+
+AC_MSG_CHECKING(for suffix of libraries)
+AC_MSG_RESULT(${LIBEXT})
+
+dnl Flags for plugin compilation
+case "x${SYS}" in
+  xmingw32|xcygwin)
+    CFLAGS_pics="${CFLAGS_pics} -fnative-struct"
+    CXXFLAGS_pics="${CXXFLAGS_pics} -fnative-struct"
+    OBJCFLAGS_pics="${OBJCFLAGS_pics} -fnative-struct"
+    CFLAGS_plugins="${CFLAGS_plugins} -fnative-struct"
+    CXXFLAGS_plugins="${CXXFLAGS_plugins} -fnative-struct"
+    OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fnative-struct"
+    ;;
+  x*)
+    CFLAGS_pics="${CFLAGS_pics} -fPIC"
+    CXXFLAGS_pics="${CXXFLAGS_pics} -fPIC"
+    OBJCFLAGS_pics="${OBJCFLAGS_pics} -fPIC"
+    CFLAGS_plugins="${CFLAGS_plugins} -fPIC"
+    CXXFLAGS_plugins="${CXXFLAGS_plugins} -fPIC"
+    OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fPIC"
+    LDFLAGS_plugins="${LDFLAGS_plugins} -fPIC"
+    ;;
+esac
+
+dnl The -DSYS_FOO flag
+CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
+
+dnl Check for system libs needed
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup)
+
+AC_CHECK_FUNC(connect,,[
+  AC_CHECK_LIB(socket,connect,
+    LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
+    LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket"
+)])
+
+AC_CHECK_FUNC(send,,[
+  AC_CHECK_LIB(socket,send,
+    LDFLAGS_http="${LDFLAGS_http} -lsocket"
+)])
+
+AC_CHECK_FUNC(gethostbyname,,[
+  AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl",[
+    AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind")])
+])
+
+have_nanosleep=false
+AC_CHECK_FUNC(nanosleep,have_nanosleep=:,[
+  AC_CHECK_LIB(rt,nanosleep,
+    [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
+    [AC_CHECK_LIB(posix4,nanosleep,
+        [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
+  )
+])
+if ${have_nanosleep}; then
+  AC_DEFINE(HAVE_NANOSLEEP, 1,
+            Define if nanosleep is available.)
+fi
+# HP/UX port
+AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
+
+AC_CHECK_FUNC(inet_aton,,[
+  AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv")
+])
+AC_CHECK_FUNC(textdomain,,[
+  AC_CHECK_LIB(intl,textdomain,
+    LDFLAGS_vlc="${LDFLAGS_vlc} -lintl"
+    LDFLAGS_plugins="${LDFLAGS_plugins} -lintl"
+  )
+])
+
+dnl Check for getopt
+need_getopt=false
+AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
+[ # FreeBSD has a gnugetopt library for this:
+  AC_CHECK_LIB([gnugetopt],[getopt_long],
+    [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LDFLAGS_vlc="${LDFLAGS_vlc} -lgnugetopt"],
+    [need_getopt=:])])
+AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
+
+AC_TYPE_SIGNAL
+AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
+AC_CHECK_LIB(m,cos,
+  LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
+  LDFLAGS_filter_distort="${LDFLAGS_filter_distort} -lm")
+AC_CHECK_LIB(m,pow,
+  LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
+  LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
+  LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
+  LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
+  LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
+  LDFLAGS_faad="${LDFLAGS_faad} -lm"
+)
+
+dnl Check for pthreads - borrowed from XMMS
+THREAD_LIB=error
+if test "x${THREAD_LIB}" = "xerror"; then
+  AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
+fi
+if test "x${THREAD_LIB}" = "xerror"; then
+  AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
+fi
+if test "x${THREAD_LIB}" = "xerror"; then
+  AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
+fi
+if test "x${THREAD_LIB}" = "xerror"; then
+  AC_CHECK_FUNC(pthread_mutex_lock)
+  THREAD_LIB=""
+fi
+
+dnl Check for cthreads under GNU/Hurd for instance
+AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
+
+dnl Check for misc headers
+AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
+  AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
+            Define if <pthread.h> defines pthread_cond_t.)])
+AC_EGREP_HEADER(pthread_once,pthread.h,[
+  AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
+            Define if <pthread.h> defines pthread_once.)])
+AC_EGREP_HEADER(strncasecmp,strings.h,[
+  AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
+            Define if <strings.h> defines strncasecmp.)])
+
+dnl Check for headers
+AC_CHECK_HEADERS(stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
+AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h)
+AC_CHECK_HEADERS(dlfcn.h image.h)
+AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
+AC_CHECK_HEADERS(machine/param.h sys/shm.h)
+AC_CHECK_HEADERS(linux/version.h)
+
+AC_HEADER_TIME
+
+dnl Mac OS X and other OSes don't have declaration for nanosleep
+AC_EGREP_HEADER(nanosleep,time.h,[
+  AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
+            Define if <time.h> defines nanosleep.)
+])
+
+dnl Make sure we have timespecs
+AC_EGREP_HEADER(timespec,sys/time.h,[
+  AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
+            Define if <sys/time.h> defines struct timespec.)
+])
+
+dnl Check for threads library
+AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
+
+dnl Default X headers and libraries
+if test "x${x_includes}" = "xNONE"; then
+  x_includes="/usr/X11R6/include"
+fi
+if test "x${x_libraries}" = "xNONE"; then
+  x_libraries="/usr/X11R6/lib"
+fi
+
+dnl Build the gtk_main plugins?
+NEED_GTK_MAIN=no
+NEED_GNOME_MAIN=no
+
+dnl Check for DPMS
+if test "x${SYS}" != "xmingw32"
+then
+  CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
+  AC_CHECK_HEADERS(X11/extensions/dpms.h, [
+    AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
+      AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
+                Define if <X11/extensions/dpms.h> defines DPMSInfo.)
+    ])
+  ])
+  CPPFLAGS="${CPPFLAGS_save}"
+fi
+
+dnl Check for ntohl, etc.
+AC_CACHE_CHECK([for ntohl in sys/param.h],
+    [ac_cv_c_ntohl_sys_param_h],
+    [CFLAGS="${CFLAGS_save} -Wall -Werror"
+     AC_TRY_COMPILE([#include <sys/param.h>],
+        [void foo() { int meuh; ntohl(meuh); }],
+        ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
+if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
+    AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
+fi
+
+dnl Check for inline function size limit
+AC_CACHE_CHECK([if \$CC accepts -finline-limit],
+    [ac_cv_c_inline_limit],
+    [CFLAGS="${CFLAGS_save} -finline-limit-30000"
+     AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
+if test "x${ac_cv_c_inline_limit}" != "xno"; then
+    CFLAGS_save="${CFLAGS_save} -finline-limit-30000"; CFLAGS="${CFLAGS_save}"
+    CXXFLAGS_save="${CXXFLAGS_save} -finline-limit-30000"; CXXFLAGS="${CXXFLAGS_save}"
+    OBJCFLAGS_save="${OBJCFLAGS_save} -finline-limit-30000"; OBJCFLAGS="${OBJCFLAGS_save}"
+fi
+
+dnl Check for -W or -w flags
+AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
+    [ac_cv_c_Wall_Winline],
+    [CFLAGS="-Wall -Winline ${CFLAGS_save}"
+     AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
+if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
+    CFLAGS_save="-Wall -Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
+    CXXFLAGS_save="-Wall -Winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
+    OBJCFLAGS_save="-Wall -Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
+else
+    AC_CACHE_CHECK([if \$CC accepts -wall -winline],
+        [ac_cv_c_wall_winline],
+        [CFLAGS="-wall -winline ${CFLAGS_save}"
+         AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)])
+    if test "x${ac_cv_c_wall_winline}" != "xno"; then
+        CFLAGS_save="-wall -winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
+        CXXFLAGS_save="-wall -winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
+        OBJCFLAGS_save="-wall -winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
+    fi
+fi
+
+dnl Check for -pipe
+AC_CACHE_CHECK([if \$CC accepts -pipe],
+    [ac_cv_c_pipe],
+    [CFLAGS="${CFLAGS_save} -pipe"
+     AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
+if test "x${ac_cv_c_pipe}" != "xno"; then
+    CFLAGS_save="${CFLAGS_save} -pipe"; CFLAGS="${CFLAGS_save}"
+    CXXFLAGS_save="${CXXFLAGS_save} -pipe"; CXXFLAGS="${CXXFLAGS_save}"
+    OBJCFLAGS_save="${OBJCFLAGS_save} -pipe"; OBJCFLAGS="${OBJCFLAGS_save}"
+fi
+
+dnl Check for various optimization flags
+AC_CACHE_CHECK([if \$CC accepts -O3],
+    [ac_cv_c_o3],
+    [CFLAGS="${CFLAGS_save} -O3"
+     AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
+if test "x${ac_cv_c_o3}" != "xno"; then
+    CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
+else
+    AC_CACHE_CHECK([if \$CC accepts -O2],
+        [ac_cv_c_o2],
+        [CFLAGS="${CFLAGS_save} -O2"
+         AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
+    if test "x${ac_cv_c_o2}" != "xno"; then
+        CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
+    else
+        AC_CACHE_CHECK([if \$CC accepts -O],
+            [ac_cv_c_o],
+            [CFLAGS="${CFLAGS_save} -O"
+             AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
+        if test "x${ac_cv_c_o}" != "xno"; then
+            CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
+        fi
+    fi
+fi
+
+dnl Check for -ffast-math
+AC_CACHE_CHECK([if \$CC accepts -ffast-math],
+    [ac_cv_c_fast_math],
+    [CFLAGS="${CFLAGS_save} -ffast-math"
+     AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
+if test "x${ac_cv_c_fast_math}" != "xno"; then
+    CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
+fi
+
+dnl Check for -funroll-loops
+AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
+    [ac_cv_c_unroll_loops],
+    [CFLAGS="${CFLAGS_save} -funroll-loops"
+     AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
+if test "x${ac_cv_c_unroll_loops}" != "xno"; then
+    CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
+fi
+
+dnl Check for -fomit-frame-pointer
+AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
+    [ac_cv_c_omit_frame_pointer],
+    [CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
+     AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
+if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
+    CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
+    # this plugin does not compile without -fomit-frame-pointer, damn gcc!
+    CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer"
+fi
+
+dnl Check for Darwin plugin linking flags
+AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
+    [ac_cv_ld_darwin],
+    [CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
+     AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
+if test "x${ac_cv_ld_darwin}" != "xno"; then
+    LDFLAGS_plugins="${LDFLAGS_plugins} -bundle -undefined error -lcc_dynamic"
+fi
+
+dnl Check for standard plugin linking flags
+AC_CACHE_CHECK([if \$CC accepts -shared],
+    [ac_cv_ld_plugins],
+    [CFLAGS="${CFLAGS_save} -shared"
+     AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
+if test "x${ac_cv_ld_plugins}" != "xno"; then
+    LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
+fi
+
+dnl Check for variadic macros
+AC_CACHE_CHECK([for variadic cpp macros],
+    [ac_cv_cpp_variadic_macros],
+    [CFLAGS="${CFLAGS_save}"
+     AC_TRY_COMPILE(
+         [#include <stdio.h>
+          #define a(b,c...) printf(b,##c)],
+         [a("foo");a("%s","bar");a("%s%s","baz","quux");],
+         ac_cv_cpp_variadic_macros=yes,
+         ac_cv_cpp_variadic_macros=no)])
+if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
+    AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
+fi
+
+dnl Checks for __attribute__(aligned()) directive
+AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
+    [ac_cv_c_attribute_aligned],
+    [ac_cv_c_attribute_aligned=0
+        CFLAGS="${CFLAGS_save} -Werror"
+    for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
+        AC_TRY_COMPILE([],
+        [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
+        [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
+    done
+        CFLAGS="${CFLAGS_save}"])
+if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
+    AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
+        [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
+fi
+
+dnl
+dnl  Check the CPU
+dnl
+case "x${target_cpu}" in
+  x)
+    ARCH=unknown
+    ;;
+  *)
+    ARCH="${target_cpu}"
+    ;;
+esac
+
+case "${ARCH}" in
+  hppa64)
+    CFLAGS_mpeg_video="${CFLAGS_mpeg_video} -ffunction-sections"
+    ;;
+esac
+
+dnl
+dnl  default modules
+dnl
+PLUGINS="${PLUGINS} dummy null"
+PLUGINS="${PLUGINS} rc logger access_file memcpy"
+PLUGINS="${PLUGINS} es audio mpeg_system ps ts"
+PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
+#PLUGINS="${PLUGINS} a52old imdct downmix"
+PLUGINS="${PLUGINS} lpcm"
+PLUGINS="${PLUGINS} deinterlace invert wall transform distort clone crop motionblur"
+PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab"
+PLUGINS="${PLUGINS} trivial_resampler ugly_resampler"
+PLUGINS="${PLUGINS} trivial_channel_mixer"
+PLUGINS="${PLUGINS} trivial_mixer spdif_mixer"
+PLUGINS="${PLUGINS} aout_file"
+#PLUGINS="${PLUGINS} scope"
+PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
+PLUGINS="${PLUGINS} id3"
+
+dnl
+dnl  Network modules
+dnl
+NETWORK_MODULES="access_udp access_http access_rtp ipv4"
+
+dnl
+dnl  Accelerated modules
+dnl
+MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i420_yuy2_mmx i422_yuy2_mmx i420_ymga_mmx"
+MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
+THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
+SSE_MODULES="imdctsse downmixsse"
+ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
+
+if test x${SYS} != xbeos
+then
+  PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
+fi
+
+AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
+    [ac_cv_mmx_inline],
+    [CFLAGS="${CFLAGS_save}"
+     AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
+                    ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
+if test "x${ac_cv_mmx_inline}" != "xno"; then
+  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
+fi
+
+AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
+    [ac_cv_mmxext_inline],
+    [CFLAGS="${CFLAGS_save}"
+     AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
+                    ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
+if test "x${ac_cv_mmxext_inline}" != "xno"; then
+  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
+fi
+
+AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
+    [ac_cv_3dnow_inline],
+    [CFLAGS="${CFLAGS_save}"
+     AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
+                    ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
+if test "x${ac_cv_3dnow_inline}" != "xno"; then
+  AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
+  ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
+fi
+
+AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
+    [ac_cv_sse_inline],
+    [CFLAGS="${CFLAGS_save}"
+     AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
+                    ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
+if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
+  AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
+  ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
+fi
+
+# don't try to grok AltiVec with native mingw32 it doesn't work right now
+# we should be able to remove this test with future versions of mingw32
+if test "x${SYS}" != "xmingw32"; then
+AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
+    [ac_cv_altivec_inline],
+    [CFLAGS="${CFLAGS_save}"
+     AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
+         ac_cv_altivec_inline=yes,
+         [CFLAGS="${CFLAGS_save} -Wa,-m7400"
+          AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
+            [ac_cv_altivec_inline="-Wa,-m7400"],
+            ac_cv_altivec_inline=no)
+         ])])
+if test "x${ac_cv_altivec_inline}" != "xno"; then
+  AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
+  if test "x${ac_cv_altivec_inline}" != "xyes"; then
+    CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_altivec_inline}"
+    CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_altivec_inline}"
+    CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_altivec_inline}"
+    CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_altivec_inline}"
+  fi
+  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
+fi
+
+AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
+    [ac_cv_c_altivec],
+    [CFLAGS="${CFLAGS_save} -faltivec"
+     # Darwin test
+     AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
+        ac_cv_c_altivec=-faltivec, [
+        # Linux/PPC test
+        CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
+        AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
+            [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
+        ])
+     CFLAGS="${CFLAGS_save}"])
+if test "x${ac_cv_c_altivec}" != "xno"; then
+  AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
+  CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_c_altivec}"
+  CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_c_altivec}"
+  CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_c_altivec}"
+  CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_c_altivec}"
+  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
+fi
+
+AC_CACHE_CHECK([if linker needs -framework vecLib],
+    [ac_cv_ld_altivec],
+    [LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
+     AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
+     LDFLAGS="${LDFLAGS_save}"
+    ])
+if test "x${ac_cv_ld_altivec}" != "xno"; then
+  LDFLAGS_idctaltivec="${LDFLAGS_idctaltivec} -framework vecLib"
+  LDFLAGS_motionaltivec="${LDFLAGS_motionaltivec} -framework vecLib"
+  LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
+  LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
+fi
+fi # end if mingw32
+
+AC_ARG_WITH(,[])
+AC_ARG_WITH(,[Optimization options:])
+
+dnl
+dnl  Special arch tuning
+dnl
+AC_ARG_WITH(tuning,
+[  --with-tuning=ARCH      enable special tuning for an architecture
+                          (default i686 on IA-32 and 750 on PPC)])
+if test "x${with_tuning}" != "x"; then
+    if test "x${target_cpu}" = "xpowerpc"; then
+        CFLAGS_TUNING="-mtune=${with_tuning}"
+    else
+        CFLAGS_TUNING="-mcpu=${with_tuning}"
+    fi
+else
+    if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then CFLAGS_TUNING="-mcpu=pentiumpro"
+    else
+        if test "x${target_cpu}" = "xpowerpc"; then CFLAGS_TUNING="-mtune=750"; fi
+    fi
+fi
+
+dnl
+dnl  x86 accelerations
+dnl
+if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
+then
+    ARCH="${ARCH} mmx"
+    PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
+fi
+
+dnl
+dnl  Enable/disable optimizations
+dnl
+AC_ARG_ENABLE(optimizations,
+[  --disable-optimizations disable compiler optimizations (default enabled)])
+AM_CONDITIONAL(OPTIM, test "x${enable_optimizations}" != "xno")
+
+dnl
+dnl  AltiVec acceleration
+dnl
+AC_ARG_ENABLE(altivec,
+[  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)],
+[ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
+    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
+[ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
+    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
+
+dnl
+dnl  Debugging mode
+dnl
+AC_ARG_ENABLE(debug,
+[  --enable-debug          debug mode (default disabled)])
+AM_CONDITIONAL(DEBUG, test "x${enable_debug}" = "xyes")
+
+dnl
+dnl  Enable release-specific flags
+dnl
+AC_ARG_ENABLE(release,
+[  --enable-release        activate extra optimizations (default disabled)])
+AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes")
+
+dnl
+dnl  Input plugins
+dnl
+
+AC_ARG_WITH(,[Input plugins:])
+
+dnl
+dnl  DVD module: optionally check for installed libdvdcss
+dnl
+AC_ARG_ENABLE(dvd,
+[  --enable-dvd            DVD input module (default enabled)])
+if test "x${enable_dvd}" != "xno"
+then
+  AC_ARG_WITH(dvdcss,
+  [    --with-dvdcss=PATH    libdvdcss headers and libraries])
+  AC_ARG_WITH(dvdcss-tree,
+  [    --with-dvdcss-tree=PATH libdvdcss tree for static linking])
+  case "x${with_dvdcss}" in
+  x|xyes)
+    if test "x${with_dvdcss_tree}" = x
+    then
+      AC_CHECK_HEADERS(dvdcss/dvdcss.h,
+        [ PLUGINS="${PLUGINS} dvd"
+          LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss" ],
+        [ AC_MSG_WARN([libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.])
+          AC_MSG_ERROR([cannot find libdvdcss headers]) ])
+    else
+      AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
+      real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
+      if test "x${real_dvdcss_tree}" = "x"
+      then
+        dnl  The given directory can't be found
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
+      fi
+      if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
+      then
+        dnl  Use a custom libdvdcss
+        AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
+        BUILTINS="${BUILTINS} dvd"
+        LDFLAGS_dvd="${LDFLAGS_dvd} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
+        CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
+      else
+        dnl  The given libdvdcss wasn't built
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
+      fi
+    fi
+  ;;
+  xno)
+    dnl  Compile without dvdcss (dlopen version, works only under Linux)
+    PLUGINS="${PLUGINS} dvd"
+    CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA"
+    LDFLAGS_dvd="${LDFLAGS_dvd} -ldl"
+  ;;
+  *)
+    AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
+    if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
+    then
+      dnl  Use ${with_dvdcss}/include/dvdcss/dvdcss.h
+      AC_MSG_RESULT(yes)
+      PLUGINS="${PLUGINS} dvd"
+      LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
+      CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
+    else
+      dnl  No libdvdcss could be found, sorry
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
+    fi
+  ;;
+  esac
+fi
+
+dnl
+dnl dvdread module: check for libdvdread plugin
+dnl
+AC_ARG_ENABLE(dvdread,
+[  --enable-dvdread        dvdread input module (default disabled)])
+if test "x${enable_dvdread}" != "xno"
+then
+  AC_ARG_WITH(dvdread,
+  [    --with-dvdread=PATH   libdvdread headers and libraries])
+  if test "x${with_dvdread}" = "x"
+  then
+    LDFLAGS_test=""
+    CPPFLAGS_test=""
+  else
+    LDFLAGS_test="-L${with_dvdread}/lib"
+    CPPFLAGS_test="-I${with_dvdread}/include"
+  fi
+  CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
+  AC_CHECK_HEADERS(dvdread/dvd_reader.h, [
+     AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
+        [int foo() { return DVD_VIDEO_LB_LEN; }],[
+          PLUGINS="${PLUGINS} dvdread"
+          LDFLAGS_dvdread="${LDFLAGS_dvdread} ${LDFLAGS_test} -ldvdread"
+          CPPFLAGS_dvdread="${CPPFLAGS_dvdread} ${CPPFLAGS_test}"
+        ],[
+          if test "x${enable_dvdread}" != "x"
+          then
+            AC_MSG_ERROR([Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later])
+          fi
+        ])
+  ],[
+    if test "x${enable_dvdread}" != "x"
+    then
+      if test "x${with_dvdread}" != "x"
+      then
+        AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include])
+      else
+        AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h])
+      fi
+    fi
+  ])
+  CPPFLAGS="${CPPFLAGS_save}"
+fi
+
+dnl
+dnl dvdplay module: check for libdvdplay
+dnl
+AC_ARG_ENABLE(dvdplay,
+[  --enable-dvdplay        dvdplay input module (default disabled)])
+if test "x${enable_dvdplay}" != "xno"
+then
+  AC_ARG_WITH(dvdplay,
+  [    --with-dvdplay=PATH   libdvdplay headers and libraries])
+  if test "x${with_dvdplay}" = x
+  then
+    LDFLAGS_test=""
+    CPPFLAGS_test=""
+  else
+    LDFLAGS_test="-L${with_dvdplay}/lib"
+    CPPFLAGS_test="-I${with_dvdplay}/include"
+  fi
+  CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
+  AC_CHECK_HEADERS(dvdplay/dvdplay.h, [
+      PLUGINS="${PLUGINS} dvdplay"
+      LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_test} -ldvdplay -ldvdread"
+      CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_test}"
+    ],[
+    if test "x${enable_dvdplay}" != x
+    then
+      if test "x${with_dvdplay}" != x
+      then
+        AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include])
+      else
+        AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h])
+      fi
+    fi
+  ])
+  CPPFLAGS="${CPPFLAGS_save}"
+fi
+
+
+dnl
+dnl  libdvbpsi ts demux
+dnl
+AC_ARG_ENABLE(dvbpsi,
+[  --enable-dvbpsi        dvbpsi ts demux module (default disabled)])
+if test "x${enable_dvbpsi}" != "xno"
+then
+  AC_ARG_WITH(dvbpsi,
+  [    --with-dvbpsi=PATH    libdvbpsi headers and libraries])
+  AC_ARG_WITH(dvbpsi,
+  [    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
+  case "x${with_dvbpsi}" in
+  x|xyes)
+    if test "x${with_dvbpsi_tree}" = "x"
+    then
+      AC_CHECK_HEADERS(dvbpsi/dr.h,
+        [ PLUGINS="${PLUGINS} ts_dvbpsi"
+          LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -ldvbpsi" ], [],
+        [  AC_MSG_ERROR([cannot find libdvbpsi headers]) ])
+    else
+      AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
+      real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
+      if test "x${real_dvbpsi_tree}" = "x"
+      then
+        dnl  The given directory can't be found
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
+      fi
+      if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
+      then
+        dnl  Use a custom libdvbpsi
+        AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
+        BUILTINS="${BUILTINS} ts_dvbpsi"
+        LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
+        CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
+      else
+        dnl  The given libdvbpsi wasn't built
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
+      fi
+    fi
+  ;;
+  xno)
+    dnl  Compile without dvbpsi
+  ;;
+  *)
+    AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
+    if test "x${with_dvbpsi}" = "x"
+    then
+      LDFLAGS_test=""
+      CPPFLAGS_test=""
+    else
+      LDFLAGS_test="-L${with_dvbpsi}/lib"
+      CPPFLAGS_test="-I${with_dvbpsi}/include"
+    fi
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
+    AC_CHECK_HEADER([dvbpsi/dr.h],[
+      PLUGINS="${PLUGINS} ts_dvbpsi"
+      LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
+      CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} ${CPPFLAGS_test}"
+      ],[
+      if test "x${enable_dvbpsi}" != "x"
+      then
+        AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
+      fi
+    ])
+    CPPFLAGS="${CPPFLAGS_save}"
+  ;;
+  esac
+fi
+
+dnl
+dnl  Video4Linux plugin
+dnl
+AC_ARG_ENABLE(v4l,
+  [  --enable-v4l            Video4Linux input support (default disabled)])
+if test "x${enable_v4l}" = "xyes"
+then
+  AC_CHECK_HEADERS(libv4l/v4l.h, [
+    PLUGINS="${PLUGINS} v4l"
+   ],[])
+fi
+
+dnl
+dnl  VCD module
+dnl
+AC_ARG_ENABLE(vcd,
+  [  --enable-vcd            VCD support for Linux, FreeBSD and MacOS X (default enabled)])
+
+if test "x${enable_vcd}" != "xno"
+then
+  AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
+    PLUGINS="${PLUGINS} vcd"
+  ])
+
+  AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
+    PLUGINS="${PLUGINS} vcd"
+    AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
+  ])
+
+  if test "x${SYS}" = "xbsdi"
+  then
+    PLUGINS="${PLUGINS} vcd"
+  fi
+
+  if test "x${SYS}" = "xdarwin"
+  then
+    # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
+    LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
+  fi
+fi
+
+dnl
+dnl  Satellite input module
+dnl
+AC_ARG_ENABLE(satellite,
+  [  --enable-satellite      satellite card support (default disabled)],
+  [ if test "x${enable_satellite}" = "xyes"
+    then
+      PLUGINS="${PLUGINS} satellite"
+    fi])
+
+dnl
+dnl  ipv6 plugin - not for QNX yet
+dnl
+if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
+then
+  have_ipv6=false
+  AC_CHECK_FUNC(inet_pton,[have_ipv6=:],[
+    AC_CHECK_LIB(resolv,inet_pton,
+      [have_ipv6=:
+       LDFLAGS_ipv6="${LDFLAGS_ipv6} -lresolv"])
+  ])
+  AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
+  AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
+    [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=false])
+  if ${have_ipv6}; then
+    PLUGINS="${PLUGINS} ipv6"
+  fi
+fi
+if test "x${SYS}" = "xmingw32"
+then
+  AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
+  AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
+    PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
+fi
+
+dnl
+dnl  AVI demux plugin
+dnl
+AC_ARG_ENABLE(avi,
+  [  --enable-avi            AVI demux module (default enabled)])
+if test "x${enable_avi}" != "xno"
+then
+  PLUGINS="${PLUGINS} avi"
+fi
+
+dnl
+dnl  AAC demux plugin
+dnl
+AC_ARG_ENABLE(aac,
+  [  --enable-aac            AAC demux module (default enabled)])
+if test "x${enable_aac}" != "xno"
+then
+  PLUGINS="${PLUGINS} aac"
+fi
+
+dnl
+dnl  Codec plugins
+dnl
+
+AC_ARG_WITH(,[Codec plugins:])
+
+dnl
+dnl  mad plugin
+dnl
+AC_ARG_ENABLE(mad,
+  [  --enable-mad            libmad module (default disabled)])
+if test "x${enable_mad}" = "xyes"
+then
+  AC_ARG_WITH(mad,
+    [    --with-mad=PATH       path to libmad],[],[])
+  if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
+  then
+    CPPFLAGS_mad="${CPPFLAGS_mad} -I${with_mad}/include"
+    LDFLAGS_mad="${LDFLAGS_mad} -L${with_mad}/lib"
+  fi
+
+  AC_ARG_WITH(mad-tree,
+    [    --with-mad-tree=PATH  mad tree for static linking],[],[])
+  if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
+  then
+    real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
+    if test "x${real_mad_tree}" = "x"
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
+    fi
+    dnl  Use a custom libmad
+    AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
+    if test -f ${real_mad_tree}/libmad/mad.h
+    then
+      AC_MSG_RESULT(yes)
+      CPPFLAGS_mad="${CPPFLAGS_mad} -I${real_mad_tree}/libmad"
+      LDFLAGS_mad="${LDFLAGS_mad} -L${real_mad_tree}/libmad/.libs"
+      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mad}"
+      AC_CHECK_LIB(mad, mad_bit_init, [
+        BUILTINS="${BUILTINS} mad"
+        LDFLAGS_mad="${LDFLAGS_mad} -lmad"
+        ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
+      ],[])
+      LDFLAGS="${LDFLAGS_save}"
+    else
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([the specified tree doesn't have mad.h])
+    fi
+  else
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mad}"
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mad}"
+    AC_CHECK_HEADERS(mad.h, ,
+      [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
+    AC_CHECK_LIB(mad, mad_bit_init, [
+      PLUGINS="${PLUGINS} mad"
+      LDFLAGS_mad="${LDFLAGS_mad} -lmad" ],
+      [ AC_MSG_ERROR([Cannot find libmad library...]) ])
+    CPPFLAGS="${CPPFLAGS_save}"
+    LDFLAGS="${LDFLAGS_save}"
+  fi
+fi
+
+dnl
+dnl   libid3tag support
+dnl
+AC_CHECK_HEADERS(id3tag.h, [
+  LDFLAGS_id3tag="${LDFLAGS_id3tag} -lz -lid3tag"
+  PLUGINS="${PLUGINS} id3tag"])
+
+dnl
+dnl  ffmpeg decoder plugin
+dnl
+AC_ARG_ENABLE(ffmpeg,
+[  --enable-ffmpeg         ffmpeg codec (default disabled)])
+if test "x${enable_ffmpeg}" = "xyes"
+then
+  AC_ARG_WITH(ffmpeg,
+    [    --with-ffmpeg=PATH    path to ffmpeg installation],[],[])
+  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
+  then
+    CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/libffmpeg"
+    LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib"
+  fi
+
+  dnl Add postprocessing modules
+  PLUGINS="${PLUGINS} postprocessing_c"
+  if test "x${ac_cv_mmx_inline}" != "xno"; then
+    PLUGINS="${PLUGINS} postprocessing_mmx"
+  fi
+
+  if test "x${ac_cv_mmxext_inline}" != "xno"; then
+    PLUGINS="${PLUGINS} postprocessing_mmxext"
+  fi
+
+  AC_ARG_WITH(ffmpeg-tree,
+  [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
+  if test "x${with_ffmpeg_tree}" != "x"
+  then
+    AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
+    real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
+    if test "x${real_ffmpeg_tree}" = x
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
+    fi
+    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
+    then
+      dnl  Use a custom libffmpeg
+      AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
+      BUILTINS="${BUILTINS} ffmpeg"
+      LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
+      CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
+    else
+      dnl  The given libavcodec wasn't built
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
+    fi
+  else
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
+    AC_CHECK_LIB(avcodec, avcodec_init, [
+      BUILTINS="${BUILTINS} ffmpeg"
+      LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" ],
+      [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
+    LDFLAGS="${LDFLAGS_save}"
+    CPPFLAGS="${CPPFLAGS_save}"
+  fi
+fi
+
+dnl
+dnl  faad decoder plugin
+dnl
+AC_ARG_ENABLE(faad,
+[  --enable-faad           faad codec (default disabled)])
+if test "x${enable_faad}" = "xyes"
+then
+  AC_ARG_WITH(faad,
+    [    --with-faad=PATH      path to faad installation],[],[])
+  if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
+  then
+    CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include"
+    LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib"
+  fi
+  LDFLAGS_faad="${LDFLAGS_faad}"
+
+  AC_ARG_WITH(faad-tree,
+  [    --with-faad-tree=PATH faad tree for static linking])
+  if test "x${with_faad_tree}" != "x"
+  then
+    AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
+    real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
+    if test "x${real_faad_tree}" = x
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
+    fi
+    if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
+    then
+      dnl  Use a custom faad
+      AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
+      BUILTINS="${BUILTINS} faad"
+      LDFLAGS_faad="${LDFLAGS_faad} ${real_faad_tree}/libfaad/.libs/libfaad.a"
+      CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
+    else
+      dnl  The given libfaad wasn't built
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
+    fi
+  else
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
+    AC_CHECK_HEADERS(faad.h, ,
+      [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
+    AC_CHECK_LIB(faad, faacDecOpen, [
+      PLUGINS="${PLUGINS} faad"
+      LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ],
+      [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
+    LDFLAGS="${LDFLAGS_save}"
+    CPPFLAGS="${CPPFLAGS_save}"
+  fi
+fi
+
+
+
+dnl
+dnl MP4 module
+dnl
+AC_ARG_ENABLE(mp4,
+  [  --enable-mp4            MP4 demux module (default enabled)])
+if test "x${enable_mp4}" != "xno"
+then
+
+    PLUGINS="${PLUGINS} mp4"
+    AC_CHECK_HEADERS(zlib.h,
+              [ LDFLAGS_mp4="${LDFLAGS_mp4} -lz" ] )
+fi
+
+dnl
+dnl  a52 AC3 decoder plugin
+dnl
+AC_ARG_ENABLE(a52,
+  [  --enable-a52            A/52 support with liba52 (default enabled)])
+if test "x${enable_a52}" != "xno"
+then
+  AC_ARG_WITH(a52,
+    [    --with-a52=PATH       a52 headers and libraries])
+  AC_ARG_WITH(a52-tree,
+    [    --with-a52-tree=PATH  a52dec tree for static linking ],[],[])
+  if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
+  then
+    real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
+    if test "x${real_a52_tree}" = "x"
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
+    fi
+    dnl  Use a custom a52dec
+    AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
+    if test -f ${real_a52_tree}/include/a52.h
+    then
+      AC_MSG_RESULT(yes)
+      CPPFLAGS_a52="${CPPFLAGS_a52} -I${real_a52_tree}"
+      LDFLAGS_a52="${LDFLAGS_a52} -L${real_a52_tree}/liba52/.libs"
+      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52}"
+      AC_CHECK_LIB(a52, a52_free, [
+        BUILTINS="${BUILTINS} a52"
+        LDFLAGS_a52="${LDFLAGS_a52} -la52 -lm"
+        CPPFLAGS_a52="${CPPFLAGS_a52} -DUSE_A52DEC_TREE"
+        ],[
+        if test -f ${real_a52_tree}/liba52/.libs/liba52.a
+        then
+          AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
+        else
+          AC_MSG_ERROR([the specified tree hasn't been compiled])
+        fi
+      ],[-lm])
+      LDFLAGS="${LDFLAGS_save}"
+    else
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([the specified tree doesn't have a52.h])
+    fi
+  else
+    if test "x${with_a52}" = "x"
+    then
+      LDFLAGS_test=""
+      CPPFLAGS_test=""
+    else
+      LDFLAGS_test="-L${with_a52}/lib"
+      CPPFLAGS_test="-I${with_a52}/include"
+    fi
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test}"
+    AC_CHECK_HEADERS(a52dec/a52.h, [
+      AC_CHECK_LIB(a52, a52_free, [
+        PLUGINS="${PLUGINS} a52"
+        LDFLAGS_a52="${LDFLAGS_a52} ${LDFLAGS_test} -la52 -lm"
+        CPPFLAGS_a52="${CPPFLAGS_a52} ${CPPFLAGS_test}"
+      ],[
+        if test "x${enable_dvbpsi}" != "x"
+        then
+          AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net])
+        fi
+      ],[-lm])
+    ])
+    CPPFLAGS="${CPPFLAGS_save}"
+    LDFLAGS="${LDFLAGS_save}"
+  fi
+fi
+
+dnl
+dnl  cinepak plugin
+dnl
+AC_ARG_ENABLE(cinepak,
+  [  --enable-cinepak        Cinepak decoder (default enabled)])
+if test "x${enable_cinepak}" != "xno"
+then
+  PLUGINS="${PLUGINS} cinepak"
+fi
+
+dnl
+dnl  ogg vorbis plugin
+dnl
+AC_ARG_ENABLE(vorbis,
+  [  --enable-vorbis         Ogg/Vorbis decoder support (default enabled)])
+if test "x${enable_vorbis}" != "xno"
+then
+  AC_CHECK_HEADERS(ogg/ogg.h, [
+    dnl disabled for the moment
+    #PLUGINS="${PLUGINS} ogg vorbis"
+    LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis"
+   ],[])
+fi
+
+dnl
+dnl  DV plugin
+dnl
+AC_ARG_ENABLE(dv,
+  [  --enable-dv             DV decoder support (default disabled)])
+if test "x${enable_dv}" = "xyes"
+then
+  AC_CHECK_HEADERS(libdv/dv.h, [
+    PLUGINS="${PLUGINS} dv"
+    LDFLAGS_dv="${LDFLAGS_dv} -ldv"
+   ],[])
+fi
+
+dnl
+dnl  Video plugins
+dnl
+
+AC_ARG_WITH(,[Video plugins:])
+
+dnl
+dnl  X11 module
+dnl  (enabled by default except on win32)
+dnl
+AC_ARG_ENABLE(x11,
+  [  --enable-x11            X11 support (default enabled)])
+if test "x${enable_x11}" != "xno" &&
+  (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
+  CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
+  AC_CHECK_HEADERS(X11/Xlib.h, [
+    PLUGINS="${PLUGINS} x11"
+    LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
+    CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
+  ])
+  CPPFLAGS="${CPPFLAGS_save}"
+fi
+
+dnl
+dnl  XVideo module
+dnl  (enabled by default except on win32)
+dnl
+AC_ARG_ENABLE(xvideo,
+  [  --enable-xvideo         XVideo support (default enabled)])
+if test "x${enable_xvideo}" != "xno" &&
+  (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
+  CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
+  AC_CHECK_HEADERS(X11/extensions/Xv.h, [
+    CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
+    AC_CHECK_LIB(Xv_pic,XvPutImage,
+      # We have Xv_pic, that's good, we can build an xvideo.so plugin !
+      PLUGINS="${PLUGINS} xvideo"
+      LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv_pic"
+      CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
+      AC_CHECK_LIB(Xv,XvPutImage,
+        # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
+        PLUGINS="${PLUGINS} xvideo"
+        LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv"
+        CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
+        # Otherwise... well, do nothing.
+        :
+      )
+    )
+    CFLAGS="${CFLAGS_save}"
+  ]
+  CPPFLAGS="${CPPFLAGS_save}")
+fi
+
+dnl
+dnl  SDL module
+dnl
+AC_ARG_ENABLE(sdl,
+  [  --enable-sdl            SDL support (default enabled)])
+if test "x${enable_sdl}" != "xno"
+then
+  SDL_PATH="${PATH}"
+  AC_ARG_WITH(sdl-config-path,
+    [    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
+    [ if test "x${with_sdl_config_path}" != "xno"
+      then
+        SDL_PATH="${with_sdl_config_path}:${PATH}"
+      fi ])
+  AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
+  SDL_CONFIG="${SDL12_CONFIG}"
+  SDL_HEADER="SDL12/SDL.h"
+  if test "x${SDL_CONFIG}" = "xno"
+  then
+    AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
+    SDL_CONFIG=${SDL11_CONFIG}
+    SDL_HEADER="SDL11/SDL.h"
+  fi
+  if test "x${SDL_CONFIG}" = "xno"
+  then
+    AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
+    SDL_HEADER="SDL/SDL.h"
+  fi
+  if test "x${SDL_CONFIG}" != "xno"
+  then
+    PLUGINS="${PLUGINS} vout_sdl aout_sdl"
+    CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} --cflags`"
+    LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
+    CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} --cflags`"
+    LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
+    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
+    AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
+      <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
+      [ AC_MSG_ERROR([The development package for SDL is not installed.
+Please install it and try again. Alternatively you can also configure with
+--disable-sdl.])
+      ])
+    CPPFLAGS="${CPPFLAGS_save}"
+    if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
+    then
+      AC_MSG_ERROR([The development package for SDL is not installed.
+Please install it and try again. Alternatively you can also configure with
+--disable-sdl.])
+    fi
+  elif test "x${enable_sdl}" =  "xyes"
+  then
+    AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
+from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
+    ])
+  fi
+fi
+
+dnl
+dnl  Qt Embedded module
+dnl  (disabled by default)
+dnl
+AC_ARG_ENABLE(qte,
+  [  --enable-qte            QT Embedded support (default disabled)])
+if test "x${enable_qte}" != "xno"
+then
+  AC_ARG_WITH(qte,
+  [    --with-qte=PATH    Qt Embedded headers and libraries])
+  if test "x${with_qte}" = "x"
+  then
+    LDFLAGS_test="-L${QTDIR}/lib"
+    CPPFLAGS_test="-I${QTDIR}/include"
+  else
+    LDFLAGS_test="-L${with_qte}/lib"
+    CPPFLAGS_test="-I${with_qte}/include"
+  fi
+
+  CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
+  AC_CHECK_HEADERS(qt.h, [
+    CPPFLAGS_qte="${CPPFLAGS_qte} ${CPPFLAGS_test} -DQT_QWS_IPAQ -DQWS"
+    CXXFLAGS_qte="${CXXFLAGS_qte} -fno-exceptions -fno-rtti"
+    LDFLAGS_qte="${LDFLAGS_qte} ${LDFLAGS_test} -lqte"
+    if test "x${with_qte}" = "x"
+    then
+      PLUGINS="${PLUGINS} qte"
+    else
+      BUILTINS="${BUILTINS} qte"
+    fi
+  ])
+  CPPFLAGS="${CPPFLAGS_save}"
+fi
+
+dnl
+dnl  Windows DirectX module
+dnl
+AC_ARG_ENABLE(directx,
+  [  --enable-directx        Win32 DirectX support (default enabled on Win32)])
+if test "x${enable_directx}" != "xno"
+then
+  if test "x${SYS}" = "xmingw32"
+  then
+    AC_ARG_WITH(directx,
+    [    --with-directx=PATH   Win32 DirectX headers])
+    if test "x${with_directx}" = "x"
+    then
+      AC_CHECK_HEADERS(ddraw.h,
+      [ PLUGINS="${PLUGINS} directx"
+        LDFLAGS_directx="${LDFLAGS_directx} -lgdi32" ])
+    else
+      AC_MSG_CHECKING(for directX headers in ${with_directx})
+      if test -f ${with_directx}/ddraw.h
+      then
+        PLUGINS="${PLUGINS} directx"
+        LDFLAGS_directx="${LDFLAGS_directx} -lgdi32"
+        CPPFLAGS_directx="${CPPFLAGS_directx} -I${with_directx}"
+        AC_MSG_RESULT(yes)
+      else
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
+      fi
+    fi
+  fi
+fi
+
+dnl
+dnl  Linux framebuffer module
+dnl
+AC_ARG_ENABLE(fb,
+  [  --enable-fb             Linux framebuffer support (default enabled on Linux)])
+    if test "x${enable_fb}" != "xno"
+    then
+      AC_CHECK_HEADERS(linux/fb.h, [
+        PLUGINS="${PLUGINS} fb"
+      ])
+    fi
+
+dnl
+dnl  Linux MGA module
+dnl
+AC_ARG_ENABLE(mga,
+  [  --enable-mga            Linux kernel Matrox support (default disabled)],
+  [ if test "x${enable_mga}" = "xyes"
+    then
+      PLUGINS="${PLUGINS} mga xmga"
+    fi ])
+
+dnl
+dnl  SVGAlib module
+dnl
+AC_ARG_ENABLE(svgalib,
+  [  --enable-svgalib        SVGAlib support (default disabled)])
+if test "x${enable_svgalib}" = "xyes"
+then
+  PLUGINS="${PLUGINS} svgalib"
+  LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga"
+fi
+
+dnl
+dnl  GGI module
+dnl
+AC_ARG_ENABLE(ggi,
+  [  --enable-ggi            GGI support (default disabled)])
+if test "x${enable_ggi}" = "xyes"
+then
+  PLUGINS="${PLUGINS} ggi"
+  LDFLAGS_ggi="${LDFLAGS_ggi} -lggi"
+  AC_ARG_WITH(ggi,
+    [    --with-ggi=PATH       path to libggi],
+    [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
+      then
+        CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include"
+        LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib"
+      fi ])
+fi
+
+dnl
+dnl  Glide module
+dnl
+AC_ARG_ENABLE(glide,
+  [  --enable-glide          Glide (3dfx) support (default disabled)])
+if test "x${enable_glide}" = "xyes"
+then
+  PLUGINS="${PLUGINS} glide"
+  LDFLAGS_glide="${LDFLAGS_glide} -lglide2x -lm"
+  CPPFLAGS_glide="${CPPFLAGS_glide} -I/usr/include/glide"
+  AC_ARG_WITH(glide,
+    [    --with-glide=PATH     path to libglide],
+    [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
+      then
+        CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include"
+        LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib"
+      fi ])
+fi
+
+dnl
+dnl  AA plugin
+dnl
+AC_ARG_ENABLE(aa,
+  [  --enable-aa             aalib output (default disabled)])
+if test "x${enable_aa}" = "xyes"
+then
+  AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
+  if test "x${have_aa}" = "xtrue"
+  then
+    PLUGINS="${PLUGINS} aa"
+    LDFLAGS_aa="${LDFLAGS_aa} -laa"
+  fi
+fi
+
+dnl
+dnl  Audio plugins
+dnl
+
+AC_ARG_WITH(,[Audio plugins:])
+
+dnl
+dnl  OSS /dev/dsp module (enabled by default except on win32)
+dnl
+AC_ARG_ENABLE(oss,
+  [  --enable-oss            Linux OSS /dev/dsp support (enabled on Linux)])
+
+if test "x${enable_oss}" != "xno" &&
+  (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
+then
+  AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
+    PLUGINS="${PLUGINS} oss"
+    AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio")
+  ])
+fi
+
+dnl
+dnl  Esound module
+dnl
+AC_ARG_ENABLE(esd,
+  [  --enable-esd            Esound library support (default disabled)],
+  [if test "x${enable_esd}" = "xyes"
+   then
+     AC_PATH_PROG(ESD_CONFIG, esd-config, no)
+     if test "x${ESD_CONFIG}" != "xno"
+     then
+       PLUGINS="${PLUGINS} esd"
+       CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`"
+       LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`"
+     fi
+   fi])
+
+dnl
+dnl  aRts module
+dnl
+AC_ARG_ENABLE(arts,
+  [  --enable-arts           aRts sound server (default disabled)],
+  [if test "x${enable_arts}" = "xyes"
+   then
+     AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
+     if test "x${ARTS_CONFIG}" != "xno"
+     then
+       PLUGINS="${PLUGINS} arts"
+       CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`"
+       LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `"
+     fi
+   fi])
+
+dnl
+dnl  ALSA module
+dnl
+AC_ARG_ENABLE(alsa,
+  [  --enable-alsa           ALSA sound support for Linux (default disabled)],
+  [if test "x${enable_alsa}" = "xyes"
+   then
+     AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
+     if test "x${have_alsa}" = "xtrue"
+     then
+       PLUGINS="${PLUGINS} alsa"
+       LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
+     fi
+   fi])
+
+dnl
+dnl  win32 waveOut plugin
+dnl
+AC_ARG_ENABLE(waveout,
+  [  --enable-waveout        Win32 waveOut module (default enabled on Win32)])
+if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
+  then
+    PLUGINS="${PLUGINS} waveout"
+    LDFLAGS_waveout="-lwinmm"
+fi
+
+dnl
+dnl  Interface plugins
+dnl
+
+AC_ARG_WITH(,[Interface plugins:])
+
+dnl special case for BeOS
+if test "x${SYS}" = "xbeos"
+then
+    PLUGINS="${PLUGINS} beos"
+fi
+
+dnl
+dnl  Gtk+ module
+dnl
+AC_ARG_ENABLE(gtk,
+  [  --enable-gtk            Gtk+ support (default enabled)])
+if test "x${enable_gtk}" != "xno"
+then
+  GTK_PATH="${PATH}"
+  AC_ARG_WITH(gtk-config-path,
+    [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
+    [ if test "x${with_gtk_config_path}" != "xno"
+      then
+        GTK_PATH="${with_gtk_config_path}:${PATH}"
+      fi ])
+  # look for gtk-config
+  AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
+  GTK_CONFIG=${GTK12_CONFIG}
+  if test "x${GTK_CONFIG}" = "xno"
+  then
+    AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
+  fi
+  if test "x${GTK_CONFIG}" != "xno"
+  then
+    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
+    then
+      AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
+    fi
+    CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
+    LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
+    # now look for the gtk.h header
+    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
+    ac_cv_gtk_headers=yes
+    AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
+      ac_cv_gtk_headers=no
+      echo "Cannot find gtk development headers."
+    ])
+    if test "x${ac_cv_gtk_headers}" = "xyes"
+    then
+      PLUGINS="${PLUGINS} gtk"
+      NEED_GTK_MAIN=yes
+      ALIASES="${ALIASES} gvlc"
+    fi
+    CPPFLAGS="${CPPFLAGS_save}"
+  fi
+fi
+
+dnl
+dnl  Familiar module uses Gtk+ library
+dnl
+AC_ARG_ENABLE(familiar,
+  [  --enable-familiar       Familiar Gtk+ support (default disabled)])
+if test "x${enable_familiar}" = "xyes"
+then
+  GTK_PATH="${PATH}"
+  AC_ARG_WITH(gtk-config-path,
+    [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
+    [ if test "x${with_gtk_config_path}" != "xno"
+      then
+        GTK_PATH="${with_gtk_config_path}:${PATH}"
+      fi ])
+  # look for gtk-config
+  AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
+  GTK_CONFIG=${GTK12_CONFIG}
+  if test "x${GTK_CONFIG}" = "xno"
+  then
+    AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
+  fi
+  if test "x${GTK_CONFIG}" != "xno"
+  then
+    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
+    then
+      AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar.])
+    fi
+    CFLAGS_familiar="${CFLAGS_familiar} `${GTK_CONFIG} --cflags gtk gthread`"
+    LDFLAGS_familiar="${LDFLAGS_familiar} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
+    # now look for the gtk.h header
+    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
+    ac_cv_gtk_headers=yes
+    AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
+      ac_cv_gtk_headers=no
+      echo "Cannot find gtk development headers."
+    ])
+    if test "x${ac_cv_gtk_headers}" = "xyes"
+    then
+      PLUGINS="${PLUGINS} familiar"
+      NEED_GTK_MAIN=yes
+    fi
+    CPPFLAGS="${CPPFLAGS_save}"
+  fi
+fi
+
+dnl
+dnl  Gnome module
+dnl
+AC_ARG_ENABLE(gnome,
+  [  --enable-gnome          Gnome interface support (default disabled)],
+  [if test "x${enable_gnome}" = "xyes"; then
+    # look for gnome-config
+    AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
+    if test -x ${GNOME_CONFIG}
+    then
+       CFLAGS_gnome="${CFLAGS_gnome} `${GNOME_CONFIG} --cflags gtk gnomeui`"
+       LDFLAGS_gnome="${LDFLAGS_gnome} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
+    fi
+    # now look for the gnome.h header
+    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
+    AC_CHECK_HEADERS(gnome.h, [
+      PLUGINS="${PLUGINS} gnome"
+      NEED_GTK_MAIN=yes
+      NEED_GNOME_MAIN=yes
+      ALIASES="${ALIASES} gnome-vlc"
+     ],[
+      AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
+developement tools or remove the --enable-gnome option])
+     ])
+    CPPFLAGS="${CPPFLAGS_save}"
+  fi])
+
+dnl
+dnl  Qt module
+dnl
+AC_ARG_ENABLE(qt,
+  [  --enable-qt             Qt interface support (default disabled)],
+  [if test "x${enable_qt}" = "xyes"; then
+     PLUGINS="${PLUGINS} qt"
+     ALIASES="${ALIASES} qvlc"
+     LDFLAGS_qt="${LDFLAGS_qt} -lqt -L${QTDIR}/lib"
+     CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt -I${QTDIR}/include"
+     if test -x ${QTDIR}/bin/moc
+     then
+       MOC=${QTDIR}/bin/moc
+     else
+       MOC=moc
+     fi
+   fi])
+
+dnl
+dnl  KDE module
+dnl
+AC_ARG_ENABLE(kde,
+  [  --enable-kde            KDE interface support (default disabled)],
+  [if test "x${enable_kde}" = "xyes"; then
+     PLUGINS="${PLUGINS} kde"
+     ALIASES="${ALIASES} kvlc"
+     LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib -lkfile"
+     CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt"
+     CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
+     if test -x ${QTDIR}/bin/moc
+     then
+       MOC=${QTDIR}/bin/moc
+     else
+       MOC=moc
+     fi
+   fi])
+
+dnl
+dnl  Opie QT embedded module
+dnl
+AC_ARG_ENABLE(opie,
+  [  --enable-opie           Qt embedded interface support (default disabled)],
+  [if test "x${enable_opie}" = "xyes"; then
+     AC_ARG_WITH(qte,
+     [    --with-qte=PATH    Qt Embedded headers and libraries])
+     if test "x${with_qte}" = "x"
+     then
+       LDFLAGS_test="-L${QTDIR}/lib"
+       CPPFLAGS_test="-I${QTDIR}/include"
+     else
+       LDFLAGS_test="-L${with_qte}/lib"
+       CPPFLAGS_test="-I${with_qte}/include"
+     fi
+
+     PLUGINS="${PLUGINS} opie"
+     LDFLAGS_opie="${LDFLAGS_opie} ${LDFLAGS_test} -lqte"
+     CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_test}"
+     if test -x ${QTEDIR}/bin/moc
+     then
+       MOC=${QTEDIR}/bin/moc
+     else
+       MOC=moc
+     fi
+   fi])
+
+dnl
+dnl  MacOS X module
+dnl
+AC_ARG_ENABLE(macosx,
+  [  --enable-macosx         MacOS X support (default enabled on MacOS X)],
+  [if test "x${enable_macosx}" = "xyes"
+   then
+     BUILTINS="${BUILTINS} macosx"
+     LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
+   fi],
+  [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
+     BUILTINS="${BUILTINS} macosx"
+     LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
+   )])
+
+dnl
+dnl  QNX RTOS module
+dnl
+AC_ARG_ENABLE(qnx,
+  [  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)])
+    if test "x${enable_qnx}" != "xno"
+    then
+      AC_CHECK_HEADERS(Ph.h, [
+        PLUGINS="${PLUGINS} qnx"
+        LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph"
+      ])
+    fi
+
+dnl
+dnl  Windows native interface module, built with Borland C++ Builder
+dnl
+AC_ARG_ENABLE(intfwin,
+[  --enable-intfwin        Win32 interface support (default disabled)],
+[ if test "x${enable_intfwin}" != "xno"
+  then
+    AC_ARG_WITH(bcbuilder,
+    [    --with-bcbuilder=PATH Borland C++ Builder installation path])
+    if test "x${with_bcbuilder}" != "x"
+    then
+      BCBUILDER="${with_bcbuilder}"
+    fi
+    PLUGINS="${PLUGINS} win32"
+  fi ])
+
+dnl
+dnl  ncurses module
+dnl
+AC_ARG_ENABLE(ncurses,
+  [  --enable-ncurses        ncurses interface support (default disabled)],
+  [if test "x${enable_ncurses}" = "xyes"; then
+     PLUGINS="${PLUGINS} ncurses"
+     LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses"
+   fi])
+
+dnl
+dnl  XOSD plugin
+dnl
+AC_ARG_ENABLE(xosd,
+  [  --enable-xosd           xosd interface support (default disabled)])
+if test "x${enable_xosd}" = "xyes"
+then
+  AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
+  AC_TRY_COMPILE([#include <xosd.h>],
+     [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
+      AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if <xosd.h> is pre-1.0.0))
+  if test "x${have_xosd}" = "xtrue"
+  then
+    PLUGINS="${PLUGINS} xosd"
+    LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd"
+  fi
+fi
+
+dnl
+dnl  Lirc plugin
+dnl
+AC_ARG_ENABLE(lirc,
+  [  --enable-lirc           lirc support (default disabled)])
+if test "x${enable_lirc}" = "xyes"
+then
+  AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
+  if test "x${have_lirc}" = "xtrue"
+  then
+    PLUGINS="${PLUGINS} lirc"
+    LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client"
+  fi
+fi
+
+AC_ARG_WITH(,[Misc options:])
+
+dnl
+dnl  Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
+dnl
+dnl  We give the user the opportunity to specify
+dnl  --with-words=big or --with-words=little ; otherwise, try to guess
+dnl
+AC_ARG_WITH(words,
+  [  --with-words=endianness set endianness (big or little)])
+  case "x${with_words}" in
+    xbig)
+      ac_cv_c_bigendian=yes
+      ;;
+    xlittle)
+      ac_cv_c_bigendian=no
+      ;;
+    *)
+      dnl  Try to guess endianness by matching patterns on a compiled
+      dnl  binary, by looking for an ASCII or EBCDIC string
+      AC_CACHE_CHECK([whether the byte order is big-endian],
+        [ac_cv_c_bigendian],
+        [ac_cv_c_bigendian="unknown"
+        [cat >conftest.c <<EOF
+        short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
+        short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
+        void _a(void) { char*s = (char*)am; s = (char *)ai; }
+        short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
+        short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
+        void _e(void) { char*s = (char*)em; s = (char*)ei; }
+        int main(void) { _a(); _e(); return 0; }
+EOF
+        ]
+        if test -f conftest.c
+        then
+          if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
+              && test -f conftest.o
+          then
+            if test "`strings conftest.o | grep BIGenDianSyS`"
+            then
+              ac_cv_c_bigendian="yes"
+            fi
+            if test "`strings conftest.o | grep LiTTleEnDian`"
+            then
+              ac_cv_c_bigendian="no"
+            fi
+          fi
+        fi
+      ])
+      if test "x${ac_cv_c_bigendian}" = "xunknown"
+      then
+        AC_MSG_ERROR([Could not guess endianness, please use --with-words])
+      fi
+      ;;
+  esac
+dnl  Now we know what to use for endianness, just put it in the header
+if test "${ac_cv_c_bigendian}" = "yes"
+then
+  AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
+fi
+
+dnl
+dnl  Profiling
+dnl
+AC_ARG_ENABLE(gprof,
+[  --enable-gprof          gprof profiling (default disabled)])
+AC_ARG_ENABLE(cprof,
+[  --enable-cprof          cprof profiling (default disabled)])
+AM_CONDITIONAL(GPROF, test "x${enable_gprof}" = "xyes")
+AM_CONDITIONAL(CPROF, test "x${enable_gprof}" = "xyes")
+
+dnl
+dnl  GNU portable threads
+dnl
+AC_ARG_ENABLE(pth,
+  [  --enable-pth            GNU Pth support (default disabled)],
+  [ if test "x${enable_pth}" = "xyes"; then
+    AC_CHECK_LIB(pth,pth_init)
+    AC_EGREP_HEADER(pth_init,pth.h,[
+      AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
+                Define if <pth.h> defines pth_init)
+    THREAD_LIB="-lpth"
+    fi])
+])
+
+dnl
+dnl  State Threads
+dnl
+AC_ARG_ENABLE(st,
+  [  --enable-st             State Threads (default disabled)],
+  [ if test "x${enable_st}" = "xyes"; then
+    AC_CHECK_LIB(st,st_init)
+    AC_EGREP_HEADER(st_init,st.h,[
+      AC_DEFINE(ST_INIT_IN_ST_H, 1,
+                Define if <st.h> defines st_init)
+    THREAD_LIB="-lst"
+    fi])
+])
+
+LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
+LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
+
+dnl
+dnl  Mozilla plugin
+dnl
+mozilla=false
+AC_ARG_ENABLE(mozilla,
+  [  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)])
+if test "x${enable_mozilla}" = "xyes"
+then
+  AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
+  if test "x${MOZILLA_CONFIG}" != "xno"
+  then
+    if test "x${SYS}" != "xmingw32"; then
+      LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
+      AC_CHECK_LIB(Xt,XtStrings,[
+        LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt"
+      ])
+      LDFLAGS="${LDFLAGS_save}"
+    fi
+    mozilla=:
+    dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
+    [CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
+    #[CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java --defines | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
+    LDFLAGS_mozilla="${LDFLAGS_mozilla} `${MOZILLA_CONFIG} --libs plugin xpcom`"
+    dnl Not necessarily in ${PATH}
+    if test "x${XPIDL}" = "x" -o ! -x "${XPIDL}"
+    then
+      XPIDL="/usr/lib/mozilla/xpidl"
+    fi
+  fi
+fi
+AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
+
+dnl
+dnl  gtk_main plugin
+dnl
+if test "x${NEED_GTK_MAIN}" != "xno"
+then
+    PLUGINS="${PLUGINS} gtk_main"
+    CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
+    LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
+fi
+
+if test "x${NEED_GNOME_MAIN}" != "xno"
+then
+    PLUGINS="${PLUGINS} gnome_main"
+    CFLAGS_gnome_main="${CFLAGS_gnome_main} ${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}"
+    LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
+fi
+
+dnl
+dnl  Plugin and builtin checks
+dnl
+builtin_support=false
+plugin_support=:
+
+dnl Support for plugins - this must be AT THE END
+AC_ARG_ENABLE(plugins,
+  [  --disable-plugins       make all plugins built-in (default plugins enabled)],
+  [if test "x${enable_plugins}" = "xno"
+   then
+     plugin_support=false
+   fi])
+
+dnl Automagically disable plugins if there is no system support for .so files
+dnl don't forget vlc-win32 still can load .so as plugins
+if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
+then
+  echo "*** Your system doesn't have plugin support. All plugins will be built"
+  echo "statically."
+  plugin_support=false
+fi
+
+dnl Export automake variables
+if ${plugin_support}
+then
+  for plugin in `echo ${PLUGINS}`
+  do
+    typeset ${plugin}_plugin=yes
+  done
+else
+  BUILTINS="${BUILTINS} ${PLUGINS}"
+  PLUGINS=
+fi
+AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
+
+[if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
+then
+  builtin_support=:
+  for builtin in `echo ${BUILTINS}`
+  do
+    typeset ${builtin}_builtin=yes
+  done
+fi]
+AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
+
+dnl do not touch this line (bootstrap needs it)
+
+
+dnl
+dnl  Stuff used by the program
+dnl
+AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc ${VERSION} ${CODENAME} Copyright 1996-2002 VideoLAN", [Simple version string])
+AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN", [Copyright string])
+AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
+
+VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
+AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
+AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
+AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
+
+DATA_PATH="${ac_tool_prefix}/share/videolan"
+AC_SUBST(DATA_PATH)
+PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
+AC_SUBST(PLUGIN_PATH)
+
+dnl
+dnl  Restore *FLAGS
+dnl
+CPPFLAGS="${CPPFLAGS_save}"
+CFLAGS="${CFLAGS_save}"
+CXXFLAGS="${CXXFLAGS_save}"
+OBJCFLAGS="${OBJCFLAGS_save}"
+LDFLAGS="${LDFLAGS_save}"
+
+dnl
+dnl  Fool automake (see Makefile.am)
+dnl
+AUTOMAKE_SUCKS="\$(L_builtin) \$(LDFLAGS_builtin)"
+AC_SUBST(AUTOMAKE_SUCKS)
+
+dnl
+dnl  Create the vlc-config script
+dnl
+LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtins}"
+for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
+
+dnl
+dnl  Configuration is finished
+dnl
+AC_SUBST(SYS)
+AC_SUBST(ARCH)
+AC_SUBST(PLUGINS)
+AC_SUBST(BUILTINS)
+AC_SUBST(ALIASES)
+AC_SUBST(ASM)
+AC_SUBST(MOC)
+AC_SUBST(WINDRES)
+AC_SUBST(BCBUILDER)
+AC_SUBST(XPIDL)
+AC_SUBST(LIBEXT)
+
+AC_SUBST(CFLAGS_TUNING)
+AC_SUBST(CFLAGS_OPTIM)
+AC_SUBST(CFLAGS_OPTIM_NODEBUG)
+AC_SUBST(LDFLAGS)
+
+AC_SUBST(CFLAGS_vlc)
+AC_SUBST(CFLAGS_pics)
+AC_SUBST(CFLAGS_plugins)
+AC_SUBST(CFLAGS_builtins)
+AC_SUBST(CPPFLAGS_mozilla)
+
+AC_SUBST(LDFLAGS_vlc)
+AC_SUBST(LDFLAGS_libvlc)
+AC_SUBST(LDFLAGS_plugins)
+AC_SUBST(LDFLAGS_builtins)
+AC_SUBST(LDFLAGS_mozilla)
+
+AC_OUTPUT([
+  Makefile
+  debian/Makefile
+  doc/Makefile
+  intl/Makefile
+  ipkg/Makefile
+  lib/Makefile
+  m4/Makefile
+  modules/Makefile
+  po/Makefile.in
+  share/Makefile
+  src/Makefile
+  vlc-config
+],[
+  chmod a+x vlc-config
+])
+
+printf "
+vlc configuration
+--------------------
+vlc version           : ${VERSION}
+system                : ${SYS}
+architecture          : ${ARCH}
+build flavour         : "
+test "x${DEBUG_TRUE}" = "x" && printf "debug "
+test "x${CPROF_TRUE}" = "x" && printf "cprof "
+test "x${GPROF_TRUE}" = "x" && printf "gprof "
+test "x${OPTIM_TRUE}" = "x" && printf "optim "
+test "x${RELEASE_TRUE}" = "x" && printf "release " || printf "devel "
+echo "
+vlc aliases           :${ALIASES}
+
+To build vlc and its plugins, type \`make'.
+"
+
diff --git a/configure.in b/configure.in
deleted file mode 100644 (file)
index b06a3cd..0000000
+++ /dev/null
@@ -1,2259 +0,0 @@
-dnl Autoconf settings for vlc
-AC_INIT(configure.in)
-
-AC_PREREQ(2.50)
-AC_CANONICAL_SYSTEM
-
-CONFIGURE_LINE="$0 $*"
-
-PACKAGE="vlc"
-VERSION="0.5.0-cvs"
-CODENAME="Natalya"
-
-AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
-AM_CONFIG_HEADER(config.h)
-
-dnl
-dnl  Save *FLAGS
-dnl
-save_CPPFLAGS="${CPPFLAGS}"
-save_CFLAGS="${CFLAGS}"
-save_LDFLAGS="${LDFLAGS}"
-
-dnl
-dnl Check for tools
-dnl
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_MAKE_SET
-AC_PROG_INSTALL
-
-dnl Find the right ranlib, even when cross-compiling
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-dnl
-dnl Check for GNU make
-dnl
-AC_PATH_PROG(GMAKE, gmake, no)
-if test "x${GMAKE}" = "xno"; then
-AC_CACHE_CHECK([whether GNU make is installed],
-  [ac_cv_gmake],
-  [if make --version | grep -q -i gnu; then
-     ac_cv_gmake="yes"
-   else
-     echo "This software needs you to install GNU make to compile properly."
-     echo "You can get it from http://www.gnu.org/."
-     exit
-   fi])
-VLC_MAKE="make"
-else
-VLC_MAKE="gmake"
-fi
-
-dnl Gettext stuff
-ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
-AM_GNU_GETTEXT_VERSION(0.10.40)
-AM_GNU_GETTEXT
-
-dnl AM_PROG_LIBTOOL
-AC_PROG_INSTALL
-
-dnl Check for compiler properties
-AC_C_CONST
-AC_C_INLINE
-
-dnl
-dnl  Set default LDFLAGS
-dnl
-vlc_LDFLAGS="${LDFLAGS}"
-
-dnl
-dnl  Check the operating system
-dnl
-case "x${target_os}" in
-x)
-SYS=unknown
-;;
-xlinux*)
-SYS=linux
-;;
-xbsdi*)
-SYS=bsdi
-save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
-dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
-vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
-;;
-x*bsd*)
-SYS="${target_os}"
-save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
-;;
-xdarwin*)
-SYS=darwin
-save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"; CFLAGS="${save_CFLAGS}"
-vlc_LDFLAGS="${vlc_LDFLAGS} -all_load"
-;;
-x*mingw32*)
-SYS=mingw32
-AC_CHECK_TOOL(WINDRES, windres, :)
-save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"; CFLAGS="${save_CFLAGS}"
-vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
-vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
-ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
-ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
-http_LDFLAGS="${http_LDFLAGS} -lws2_32"
-rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
-;;
-x*nto*)
-SYS=nto
-x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
-xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
-;;
-xsolaris*)
-SYS=solaris
-;;
-xbeos)
-SYS=beos
-save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
-vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
-plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
-beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker -lstdc++.r4"
-ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
-;;
-x*)
-SYS="${target_os}"
-;;
-esac
-
-dnl Flags for plugin compilation
-if test "x${SYS}" = "xmingw32"
-then
-plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
-else
-plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
-plugins_LDFLAGS="${plugins_LDFLAGS} -fPIC"
-fi
-
-dnl The -DSYS_FOO flag
-save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CFLAGS="${save_CFLAGS}"
-
-dnl Check for system libs needed
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup)
-
-AC_CHECK_FUNC(connect,,[
-AC_CHECK_LIB(socket,connect,
-ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
-vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
-)])
-AC_CHECK_FUNC(send,,[
-AC_CHECK_LIB(socket,send,
-http_LDFLAGS="${http_LDFLAGS} -lsocket"
-)])
-AC_CHECK_FUNC(gethostbyname,,[
-AC_CHECK_LIB(nsl,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl",[
-AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")])
-])
-have_nanosleep=0
-AC_CHECK_FUNC(nanosleep,have_nanosleep=1,[
-  AC_CHECK_LIB(rt,nanosleep,
-    [pthread_LDFLAGS="${pthread_LDFLAGS} -lrt"; have_nanosleep=1],
-    [AC_CHECK_LIB(posix4,nanosleep,
-        [pthread_LDFLAGS="${pthread_LDFLAGS} -lposix4"; have_nanosleep=1])]
-  )
-])
-if test x$have_nanosleep = x1; then
-AC_DEFINE(HAVE_NANOSLEEP, 1,
-        Define if nanosleep is available.)
-fi
-# HP/UX port
-AC_CHECK_LIB(rt,sem_init, [pthread_LDFLAGS="${pthread_LDFLAGS} -lrt"])
-
-AC_CHECK_FUNC(inet_aton,,[
-AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv")
-])
-AC_CHECK_FUNC(textdomain,,[
-AC_CHECK_LIB(intl,textdomain,
-vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
-plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
-)
-])
-
-dnl Check for getopt
-NEED_GETOPT=0
-AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
-[ # FreeBSD has a gnugetopt library for this:
-AC_CHECK_LIB([gnugetopt],[getopt_long],
-[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"],
-[NEED_GETOPT=1])])
-
-AC_TYPE_SIGNAL
-AC_CHECK_LIB(dl,dlopen,vlc_LDFLAGS="${vlc_LDFLAGS} -ldl")
-AC_CHECK_LIB(m,cos,
-imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
-filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm")
-AC_CHECK_LIB(m,pow,
-ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
-imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
-imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
-imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
-i420_rgb_LDFLAGS="${i420_rgb_LDFLAGS} -lm"
-faad_LDFLAGS="${faad_LDFLAGS} -lm"
-)
-
-dnl Check for pthreads - borrowed from XMMS
-THREAD_LIB=error
-if test "x${THREAD_LIB}" = "xerror"; then
-  AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread ${pthread_LDFLAGS}")
-fi
-if test "x${THREAD_LIB}" = "xerror"; then
-  AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads ${pthread_LDFLAGS}")
-fi
-if test "x${THREAD_LIB}" = "xerror"; then
-AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
-fi
-if test "x${THREAD_LIB}" = "xerror"; then
-AC_CHECK_FUNC(pthread_mutex_lock)
-THREAD_LIB=""
-fi
-
-dnl Check for cthreads under GNU/Hurd for instance
-AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
-
-dnl Check for misc headers
-AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
-AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
-        Define if <pthread.h> defines pthread_cond_t.)])
-AC_EGREP_HEADER(pthread_once,pthread.h,[
-AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
-        Define if <pthread.h> defines pthread_once.)])
-AC_EGREP_HEADER(strncasecmp,strings.h,[
-AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
-        Define if <strings.h> defines strncasecmp.)])
-
-dnl Check for headers
-AC_CHECK_HEADERS(stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
-AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h)
-AC_CHECK_HEADERS(dlfcn.h image.h)
-AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
-AC_CHECK_HEADERS(machine/param.h sys/shm.h)
-AC_CHECK_HEADERS(linux/version.h)
-
-AC_HEADER_TIME
-
-dnl Mac OS X and other OSes don't have declaration for nanosleep
-AC_EGREP_HEADER(nanosleep,time.h,[
-AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
-        Define if <time.h> defines nanosleep.)
-])
-
-dnl Make sure we have timespecs
-AC_EGREP_HEADER(timespec,sys/time.h,[
-AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
-        Define if <sys/time.h> defines struct timespec.)
-])
-
-dnl Check for threads library
-AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
-
-dnl Default X headers and libraries
-if test "x${x_includes}" = "xNONE"; then
-x_includes="/usr/X11R6/include"
-fi
-if test "x${x_libraries}" = "xNONE"; then
-x_libraries="/usr/X11R6/lib"
-fi
-
-dnl Build the gtk_main plugin?
-NEED_GTK_MAIN=no
-
-dnl Check for DPMS
-if test "x${SYS}" != "xmingw32"
-then
-CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
-AC_CHECK_HEADERS(X11/extensions/dpms.h, [
-AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
-  AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
-            Define if <X11/extensions/dpms.h> defines DPMSInfo.)
-])
-])
-CPPFLAGS="${save_CPPFLAGS}"
-fi
-
-dnl Check for ntohl, etc.
-AC_CACHE_CHECK([for ntohl in sys/param.h],
-[ac_cv_c_ntohl_sys_param_h],
-[CFLAGS="${save_CFLAGS} -Wall -Werror"
- AC_TRY_COMPILE([#include <sys/param.h>],
-    [void foo() { int meuh; ntohl(meuh); }],
-    ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
-if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
-AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
-fi
-
-dnl Check for inline function size limit
-AC_CACHE_CHECK([if \$CC accepts -finline-limit],
-[ac_cv_c_inline_limit],
-[CFLAGS="${save_CFLAGS} -finline-limit-30000"
- AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
-if test "x${ac_cv_c_inline_limit}" != "xno"; then
-save_CFLAGS="${save_CFLAGS} -finline-limit-30000"; CFLAGS="${save_CFLAGS}"
-fi
-
-dnl Check for -W or -w flags
-AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
-[ac_cv_c_Wall_Winline],
-[CFLAGS="-Wall -Winline ${save_CFLAGS}"
- AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
-if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
-save_CFLAGS="-Wall -Winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
-else
-AC_CACHE_CHECK([if \$CC accepts -wall -winline],
-    [ac_cv_c_wall_winline],
-    [CFLAGS="-wall -winline ${save_CFLAGS}"
-     AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)])
-if test "x${ac_cv_c_wall_winline}" != "xno"; then
-    save_CFLAGS="-wall -winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
-fi
-fi
-
-dnl Check for -pipe
-AC_CACHE_CHECK([if \$CC accepts -pipe],
-[ac_cv_c_pipe],
-[CFLAGS="${save_CFLAGS} -pipe"
- AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
-if test "x${ac_cv_c_pipe}" != "xno"; then
-save_CFLAGS="${save_CFLAGS} -pipe"; CFLAGS="${save_CFLAGS}"
-fi
-
-dnl Check for various optimization flags
-AC_CACHE_CHECK([if \$CC accepts -O3],
-[ac_cv_c_o3],
-[CFLAGS="${save_CFLAGS} -O3"
- AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
-if test "x${ac_cv_c_o3}" != "xno"; then
-CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
-else
-AC_CACHE_CHECK([if \$CC accepts -O2],
-    [ac_cv_c_o2],
-    [CFLAGS="${save_CFLAGS} -O2"
-     AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
-if test "x${ac_cv_c_o2}" != "xno"; then
-    CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
-else
-    AC_CACHE_CHECK([if \$CC accepts -O],
-        [ac_cv_c_o],
-        [CFLAGS="${save_CFLAGS} -O"
-         AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
-    if test "x${ac_cv_c_o}" != "xno"; then
-        CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
-    fi
-fi
-fi
-
-dnl Check for -ffast-math
-AC_CACHE_CHECK([if \$CC accepts -ffast-math],
-[ac_cv_c_fast_math],
-[CFLAGS="${save_CFLAGS} -ffast-math"
- AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
-if test "x${ac_cv_c_fast_math}" != "xno"; then
-CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
-fi
-
-dnl Check for -funroll-loops
-AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
-[ac_cv_c_unroll_loops],
-[CFLAGS="${save_CFLAGS} -funroll-loops"
- AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
-if test "x${ac_cv_c_unroll_loops}" != "xno"; then
-CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
-fi
-
-dnl Check for -fomit-frame-pointer
-AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
-[ac_cv_c_omit_frame_pointer],
-[CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
- AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
-if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
-CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
-# this plugin does not compile without -fomit-frame-pointer, damn gcc!
-i420_yuy2_mmx_CFLAGS="${i420_yuy2_mmx_CFLAGS} -fomit-frame-pointer"
-fi
-
-dnl Check for Darwin plugin linking flags
-AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
-[ac_cv_ld_darwin],
-[CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
- AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
-if test "x${ac_cv_ld_darwin}" != "xno"; then
-plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic"
-fi
-
-dnl Check for standard plugin linking flags
-AC_CACHE_CHECK([if \$CC accepts -shared],
-[ac_cv_ld_plugins],
-[CFLAGS="${save_CFLAGS} -shared"
- AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
-if test "x${ac_cv_ld_plugins}" != "xno"; then
-plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
-fi
-    
-dnl Check for variadic macros
-AC_CACHE_CHECK([for variadic cpp macros],
-[ac_cv_cpp_variadic_macros],
-[CFLAGS="${save_CFLAGS}"
- AC_TRY_COMPILE(
-     [#include <stdio.h>
-      #define a(b,c...) printf(b,##c)],
-     [a("foo");a("%s","bar");a("%s%s","baz","quux");],
-     ac_cv_cpp_variadic_macros=yes,
-     ac_cv_cpp_variadic_macros=no)])
-if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
-AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
-fi
-
-dnl Checks for __attribute__(aligned()) directive
-AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
-[ac_cv_c_attribute_aligned],
-[ac_cv_c_attribute_aligned=0
-    CFLAGS="${save_CFLAGS} -Werror"
-for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
-    AC_TRY_COMPILE([],
-    [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
-    [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
-done
-    CFLAGS="${save_CFLAGS}"])
-if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
-AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
-    [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
-fi
-
-dnl
-dnl  Check the CPU
-dnl
-case "x${target_cpu}" in
-x)
-ARCH=unknown
-;;
-*)
-ARCH="${target_cpu}"
-;;
-esac
-
-dnl
-dnl  default modules
-dnl
-BUILTINS="${BUILTINS}"
-PLUGINS="${PLUGINS} misc/dummy/dummy misc/null"
-PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file misc/memcpy/memcpy"
-PLUGINS="${PLUGINS} demux/mpeg/es demux/mpeg/audio demux/mpeg/mpeg_system demux/mpeg/ps demux/mpeg/ts demux/a52sys"
-PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec codec/mpeg_audio/mpeg_audio"
-PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/a52old/a52old codec/a52 codec/lpcm"
-PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop video_filter/motionblur"
-PLUGINS="${PLUGINS} audio_filter/converter/float32tos16 audio_filter/converter/float32tos8 audio_filter/converter/float32tou16 audio_filter/converter/float32tou8 audio_filter/converter/a52tospdif audio_filter/converter/fixed32tofloat32 audio_filter/converter/fixed32tos16 audio_filter/converter/s16tofloat32 audio_filter/converter/s16tofloat32swab"
-PLUGINS="${PLUGINS} audio_filter/resampler/trivial audio_filter/resampler/ugly"
-PLUGINS="${PLUGINS} audio_filter/channel_mixer/trivial"
-PLUGINS="${PLUGINS} audio_mixer/float32 audio_mixer/trivial audio_mixer/spdif"
-PLUGINS="${PLUGINS} audio_output/file"
-#PLUGINS="${PLUGINS} visualization/scope/scope"
-PLUGINS="${PLUGINS} video_chroma/i420_rgb video_chroma/i420_yuy2 video_chroma/i422_yuy2 video_chroma/i420_ymga"
-PLUGINS="${PLUGINS} demux/util/id3"
-dnl
-dnl  Network modules
-dnl
-NETWORK_MODULES="access/udp access/http access/rtp misc/network/ipv4"
-
-dnl
-dnl  Accelerated modules
-dnl
-MMX_MODULES="misc/memcpy/memcpymmx codec/mpeg_video/idct/idctmmx codec/mpeg_video/motion/motionmmx video_chroma/i420_rgb_mmx video_chroma/i420_yuy2_mmx video_chroma/i422_yuy2_mmx video_chroma/i420_ymga_mmx"
-MMXEXT_MODULES="misc/memcpy/memcpymmxext codec/mpeg_video/idct/idctmmxext codec/mpeg_video/motion/motionmmxext"
-THREEDNOW_MODULES="misc/memcpy/memcpy3dn codec/a52old/imdct/imdct3dn codec/a52old/downmix/downmix3dn"
-SSE_MODULES="codec/a52old/imdct/imdctsse codec/a52old/downmix/downmixsse"
-ALTIVEC_MODULES="codec/mpeg_video/idct/idctaltivec codec/mpeg_video/motion/motionaltivec misc/memcpy/memcpyaltivec"
-
-if test x$SYS != xbeos
-then
-  PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
-fi
-
-AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
-    [ac_cv_mmx_inline],
-    [CFLAGS="${save_CFLAGS}"
-     AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
-                    ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
-if test "x${ac_cv_mmx_inline}" != "xno"; then
-  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
-fi
-
-AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
-    [ac_cv_mmxext_inline],
-    [CFLAGS="${save_CFLAGS}"
-     AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
-                    ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
-if test "x${ac_cv_mmxext_inline}" != "xno"; then
-  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
-fi
-
-AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
-    [ac_cv_3dnow_inline],
-    [CFLAGS="${save_CFLAGS}"
-     AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
-                    ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
-if test "x${ac_cv_3dnow_inline}" != "xno"; then
-  AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
-  ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
-fi
-
-AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
-    [ac_cv_sse_inline],
-    [CFLAGS="${save_CFLAGS}"
-     AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
-                    ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
-if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
-  AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
-  ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
-fi
-
-# don't try to grok AltiVec with native mingw32 it doesn't work right now
-# we should be able to remove this test with future versions of mingw32
-if test "x${SYS}" != "xmingw32"; then
-AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
-    [ac_cv_altivec_inline],
-    [CFLAGS="${save_CFLAGS}"
-     AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
-         ac_cv_altivec_inline=yes,
-         [CFLAGS="${save_CFLAGS} -Wa,-m7400"
-          AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
-            [ac_cv_altivec_inline="-Wa,-m7400"],
-            ac_cv_altivec_inline=no)
-         ])])
-if test "x${ac_cv_altivec_inline}" != "xno"; then
-  AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
-  if test "x${ac_cv_altivec_inline}" != "xyes"; then
-    idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_altivec_inline}"
-    motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_altivec_inline}"
-    memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_altivec_inline}"
-    vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_altivec_inline}"
-  fi
-  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
-fi
-
-AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
-    [ac_cv_c_altivec],
-    [CFLAGS="${save_CFLAGS} -faltivec"
-     # Darwin test
-     AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
-        ac_cv_c_altivec=-faltivec, [
-        # Linux/PPC test
-        CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
-        AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
-            [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
-        ])
-     CFLAGS="${save_CFLAGS}"])
-if test "x${ac_cv_c_altivec}" != "xno"; then
-  AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
-  idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_c_altivec}"
-  motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_c_altivec}"
-  memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_c_altivec}"
-  vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_c_altivec}"
-  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
-fi
-
-AC_CACHE_CHECK([if linker needs -framework vecLib],
-    [ac_cv_ld_altivec],
-    [LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
-     AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
-     LDFLAGS="${save_LDFLAGS}"
-    ])
-if test "x${ac_cv_ld_altivec}" != "xno"; then
-  idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
-  motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
-  memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
-  vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
-fi
-fi # end if mingw32
-
-
-AC_ARG_WITH(,[])
-AC_ARG_WITH(,[Optimization options:])
-
-dnl
-dnl  Special arch tuning
-dnl
-AC_ARG_WITH(tuning,
-[  --with-tuning=ARCH      enable special tuning for an architecture
-                          (default i686 on IA-32 and 750 on PPC)])
-if test "x${with_tuning}" != "x"; then
-    TUNING="${with_tuning}"
-else
-    if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then TUNING="pentiumpro"
-    else
-        if test "x${target_cpu}" = "xpowerpc"; then TUNING="750"; fi
-    fi
-fi
-
-dnl
-dnl  x86 accelerations
-dnl
-if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
-then
-    ARCH="${ARCH} mmx"
-    PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
-fi
-
-dnl
-dnl  Enable/disable optimizations
-dnl
-AC_ARG_ENABLE(optimizations,
-[  --disable-optimizations disable compiler optimizations (default enabled)],
-[ if test "x${enable_optimizations}" = "xno"; then OPTIMS=0; fi ],
-[ OPTIMS=1 ])
-
-dnl
-dnl  AltiVec acceleration
-dnl
-AC_ARG_ENABLE(altivec,
-[  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)],
-[ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
-    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
-[ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
-    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
-
-dnl
-dnl  Debugging mode
-dnl
-DEBUG=0
-AC_ARG_ENABLE(debug,
-[  --enable-debug          debug mode (default disabled)],
-[ if test "x${enable_debug}" = "xyes"; then DEBUG=1; fi ])
-
-dnl
-dnl  Enable release-specific flags
-dnl
-RELEASE=0
-AC_ARG_ENABLE(release,
-[  --enable-release        activate extra optimizations (default disabled)],
-[ if test "x${enable_release}" = "xyes"; then RELEASE=1; fi ],
-[ VERSION="${VERSION}_`date +%Y-%m-%d`" ])
-
-dnl
-dnl  Input plugins
-dnl
-
-AC_ARG_WITH(,[Input plugins:])
-
-dnl
-dnl  DVD module: optionally check for installed libdvdcss
-dnl
-AC_ARG_ENABLE(dvd,
-[  --enable-dvd            DVD input module (default enabled)])
-if test "x${enable_dvd}" != "xno"
-then
-  AC_ARG_WITH(dvdcss, 
-  [    --with-dvdcss=PATH    libdvdcss headers and libraries])
-  AC_ARG_WITH(dvdcss-tree, 
-  [    --with-dvdcss-tree=PATH libdvdcss tree for static linking])
-  case "x${with_dvdcss}" in
-  x|xyes)
-    if test "x${with_dvdcss_tree}" = x
-    then
-      AC_CHECK_HEADERS(dvdcss/dvdcss.h,
-        [ PLUGINS="${PLUGINS} access/dvd/dvd"
-          dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" ],
-        [ AC_MSG_WARN([libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.])
-          AC_MSG_ERROR([cannot find libdvdcss headers]) ])
-    else
-      AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
-      real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
-      if test "x${real_dvdcss_tree}" = "x"
-      then
-        dnl  The given directory can't be found
-        AC_MSG_RESULT(no)
-        AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
-      fi
-      if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
-      then
-        dnl  Use a custom libdvdcss
-        AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
-        BUILTINS="${BUILTINS} access/dvd/dvd"
-        dvd_LDFLAGS="${dvd_LDFLAGS} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
-        dvd_CFLAGS="${dvd_CFLAGS} -I${real_dvdcss_tree}/src"
-      else
-        dnl  The given libdvdcss wasn't built
-        AC_MSG_RESULT(no)
-        AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
-      fi
-    fi
-  ;;
-  xno)
-    dnl  Compile without dvdcss (dlopen version, works only under Linux)
-    PLUGINS="${PLUGINS} access/dvd/dvd"
-    dvd_CFLAGS="${dvd_CFLAGS} -DGOD_DAMN_DMCA"
-    dvd_LDFLAGS="${dvd_LDFLAGS} -ldl"
-  ;;
-  *)
-    AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
-    if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
-    then
-      dnl  Use ${with_dvdcss}/include/dvdcss/dvdcss.h
-      AC_MSG_RESULT(yes)
-      PLUGINS="${PLUGINS} access/dvd/dvd"
-      dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
-      dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
-    else
-      dnl  No libdvdcss could be found, sorry
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
-    fi
-  ;;
-  esac
-fi
-
-dnl
-dnl dvdread module: check for libdvdread plugin
-dnl
-AC_ARG_ENABLE(dvdread,
-[  --enable-dvdread        dvdread input module (default disabled)])
-if test "x${enable_dvdread}" != "xno"
-then
-  AC_ARG_WITH(dvdread, 
-  [    --with-dvdread=PATH   libdvdread headers and libraries])
-  if test "x${with_dvdread}" = "x"
-  then
-    test_LDFLAGS=""
-    test_CFLAGS=""
-  else
-    test_LDFLAGS="-L${with_dvdread}/lib"
-    test_CFLAGS="-I${with_dvdread}/include"
-  fi
-  CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
-  AC_CHECK_HEADERS(dvdread/dvd_reader.h, [
-     AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
-        [int foo() { return DVD_VIDEO_LB_LEN; }],[
-          PLUGINS="${PLUGINS} access/dvdread/dvdread"
-          dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
-          dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
-        ],[
-          if test "x${enable_dvdread}" != "x"
-          then
-            AC_MSG_ERROR([Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later])
-          fi
-        ])
-  ],[
-    if test "x${enable_dvdread}" != "x"
-    then
-      if test "x${with_dvdread}" != "x"
-      then
-        AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include])
-      else
-        AC_MSG_ERROR([Cannot find dvdread/dvd_reader.h])
-      fi
-    fi
-  ])
-  CPPFLAGS="$save_CPPFLAGS"
-fi
-
-dnl
-dnl dvdplay module: check for libdvdplay
-dnl
-AC_ARG_ENABLE(dvdplay,
-[  --enable-dvdplay        dvdplay input module (default disabled)])
-if test "x$enable_dvdplay" != "xno"
-then
-  AC_ARG_WITH(dvdplay, 
-  [    --with-dvdplay=PATH   libdvdplay headers and libraries])
-  if test "x$with_dvdplay" = x
-  then
-    test_LDFLAGS=""
-    test_CFLAGS=""
-  else
-    test_LDFLAGS="-L${with_dvdplay}/lib"
-    test_CFLAGS="-I${with_dvdplay}/include"
-  fi
-  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
-  AC_CHECK_HEADERS(dvdplay/dvdplay.h, [
-      PLUGINS="${PLUGINS} access/dvdplay/dvdplay"
-      dvdplay_LDFLAGS="${dvdplay_LDFLAGS} ${test_LDFLAGS} -ldvdplay -ldvdread"
-      dvdplay_CFLAGS="${dvdplay_CFLAGS} ${test_CFLAGS}"
-    ],[
-    if test "x$enable_dvdplay" != x
-    then
-      if test "x$with_dvdplay" != x
-      then
-        AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include])
-      else
-        AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h])
-      fi
-    fi
-  ])
-  CPPFLAGS="${save_CPPFLAGS}"
-fi
-
-
-dnl
-dnl  libdvbpsi ts demux
-dnl
-AC_ARG_ENABLE(dvbpsi,
-[  --enable-dvbpsi        dvbpsi ts demux module (default disabled)])
-if test "x${enable_dvbpsi}" != "xno"
-then
-  AC_ARG_WITH(dvbpsi, 
-  [    --with-dvbpsi=PATH    libdvbpsi headers and libraries])
-  AC_ARG_WITH(dvbpsi,
-  [    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
-  case "x${with_dvbpsi}" in
-  x|xyes)
-    if test "x${with_dvbpsi_tree}" = "x"
-    then
-      AC_CHECK_HEADERS(dvbpsi/dr.h,
-        [ PLUGINS="${PLUGINS} demux/mpeg/ts_dvbpsi"
-          ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} -ldvbpsi" ], [],
-        [  AC_MSG_ERROR([cannot find libdvbpsi headers]) ])
-    else
-      AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
-      real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
-      if test "x${real_dvbpsi_tree}" = "x"
-      then
-        dnl  The given directory can't be found
-        AC_MSG_RESULT(no)
-        AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
-      fi
-      if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
-      then
-        dnl  Use a custom libdvbpsi
-        AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
-        BUILTINS="${BUILTINS} demux/mpeg/ts_dvbpsi"
-        ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
-        ts_dvbpsi_CFLAGS="${ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
-      else
-        dnl  The given libdvbpsi wasn't built
-        AC_MSG_RESULT(no)
-        AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
-      fi
-    fi
-  ;;
-  xno)
-    dnl  Compile without dvbpsi
-  ;;
-  *)
-    AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
-    if test "x${with_dvbpsi}" = "x"
-    then
-      test_LDFLAGS=""
-      test_CFLAGS=""
-    else
-      test_LDFLAGS="-L${with_dvbpsi}/lib"
-      test_CFLAGS="-I${with_dvbpsi}/include"
-    fi
-    CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
-    AC_CHECK_HEADER([dvbpsi/dr.h],[
-      PLUGINS="${PLUGINS} demux/mpeg/ts_dvbpsi"
-      ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
-      ts_dvbpsi_CFLAGS="${ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
-      ],[
-      if test "x${enable_dvbpsi}" != "x"
-      then
-        AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
-      fi
-    ])
-    CPPFLAGS="${save_CPPFLAGS}"
-  ;;
-  esac
-fi
-
-dnl
-dnl  Video4Linux plugin
-dnl
-AC_ARG_ENABLE(v4l,
-  [  --enable-v4l            Video4Linux input support (default disabled)])
-if test "x${enable_v4l}" = "xyes"
-then
-  AC_CHECK_HEADERS(libv4l/v4l.h, [
-    PLUGINS="${PLUGINS} access/v4l/v4l"
-   ],[])
-fi
-
-dnl
-dnl  VCD module
-dnl
-AC_ARG_ENABLE(vcd,
-  [  --enable-vcd            VCD support for Linux, FreeBSD and MacOS X (default enabled)])
-
-if test "x${enable_vcd}" != "xno"
-then
-  AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
-    PLUGINS="${PLUGINS} access/vcd/vcd"
-  ])
-  
-  AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
-    PLUGINS="${PLUGINS} access/vcd/vcd"
-    AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
-  ])
-  
-  if test "x${SYS}" = "xbsdi"
-  then
-    PLUGINS="${PLUGINS} access/vcd/vcd"
-  fi
-
-  if test "x${SYS}" = "xdarwin"
-  then
-    # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
-    vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
-  fi
-fi
-
-dnl
-dnl  Satellite input module
-dnl
-AC_ARG_ENABLE(satellite,
-  [  --enable-satellite      satellite card support (default disabled)],
-  [ if test "x${enable_satellite}" = "xyes"
-    then
-      PLUGINS="${PLUGINS} access/satellite/satellite"
-    fi])
-
-dnl
-dnl  ipv6 plugin - not for QNX yet
-dnl
-if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
-then
-  have_ipv6=0
-  AC_CHECK_FUNC(inet_pton,[have_ipv6=1],[
-    AC_CHECK_LIB(resolv,inet_pton,
-      [have_ipv6=1
-       ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"])
-  ])
-  AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
-  AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
-    [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=0])
-  if test x$have_ipv6 = x1; then
-    PLUGINS="${PLUGINS} misc/network/ipv6"
-  fi
-fi
-if test "x${SYS}" = "xmingw32"
-then
-  AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
-  AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
-    PLUGINS="${PLUGINS} misc/network/ipv6"],[AC_MSG_RESULT(no)])
-fi
-
-dnl
-dnl  AVI demux plugin
-dnl
-AC_ARG_ENABLE(avi,
-  [  --enable-avi            AVI demux module (default enabled)])
-if test "x${enable_avi}" != "xno"
-then
-  PLUGINS="${PLUGINS} demux/avi/avi"
-fi
-
-dnl
-dnl  AAC demux plugin
-dnl
-AC_ARG_ENABLE(aac,
-  [  --enable-aac            AAC demux module (default enabled)])
-if test "x${enable_aac}" != "xno"
-then
-  PLUGINS="${PLUGINS} demux/aac/aac"
-fi
-
-dnl
-dnl  Codec plugins
-dnl
-
-AC_ARG_WITH(,[Codec plugins:])
-
-dnl
-dnl  mad plugin
-dnl
-AC_ARG_ENABLE(mad,
-  [  --enable-mad            libmad module (default disabled)])
-if test "x${enable_mad}" = "xyes"
-then
-  AC_ARG_WITH(mad,
-    [    --with-mad=PATH       path to libmad],[],[])
-  if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
-  then
-    mad_CFLAGS="${mad_CFLAGS} -I${with_mad}/include"
-    mad_LDFLAGS="${mad_LDFLAGS} -L${with_mad}/lib"
-  fi
-
-  AC_ARG_WITH(mad-tree,
-    [    --with-mad-tree=PATH  mad tree for static linking],[],[])
-  if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
-  then
-    real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
-    if test "x${real_mad_tree}" = "x"
-    then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
-    fi
-    dnl  Use a custom libmad
-    AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
-    if test -f ${real_mad_tree}/libmad/mad.h
-    then
-      AC_MSG_RESULT(yes)
-      mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad"
-      mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
-      LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
-      AC_CHECK_LIB(mad, mad_bit_init, [
-        BUILTINS="${BUILTINS} codec/mad/mad"
-        mad_LDFLAGS="${mad_LDFLAGS} -lmad"
-        ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
-      ],[])
-      LDFLAGS="${save_LDFLAGS}"
-    else
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([the specified tree doesn't have mad.h])
-    fi
-  else
-    CFLAGS="${save_CFLAGS} ${mad_CFLAGS}"
-    LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
-    AC_CHECK_HEADERS(mad.h, ,
-      [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
-    AC_CHECK_LIB(mad, mad_bit_init, [
-      PLUGINS="${PLUGINS} codec/mad/mad"
-      mad_LDFLAGS="${mad_LDFLAGS} -lmad" ],
-      [ AC_MSG_ERROR([Cannot find libmad library...]) ])
-    CFLAGS="${save_CFLAGS}"
-    LDFLAGS="${save_LDFLAGS}"
-  fi
-fi
-
-dnl
-dnl   libid3tag support
-dnl
-AC_CHECK_HEADERS(id3tag.h, [
-  id3tag_LDFLAGS="${id3tag_LDFLAGS} -lz -lid3tag"
-  PLUGINS="${PLUGINS} demux/util/id3tag"])
-   
-dnl
-dnl  ffmpeg decoder plugin
-dnl
-AC_ARG_ENABLE(ffmpeg,
-[  --enable-ffmpeg         ffmpeg codec (default disabled)])
-if test "x${enable_ffmpeg}" = "xyes"
-then
-  AC_ARG_WITH(ffmpeg,
-    [    --with-ffmpeg=PATH    path to ffmpeg installation],[],[])
-  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
-  then
-    ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${with_ffmpeg}/include/libffmpeg"
-    ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L${with_ffmpeg}/lib"
-  fi
-
-  dnl Add postprocessing modules
-  PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_c"
-  if test "x${ac_cv_mmx_inline}" != "xno"; then
-    PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_mmx"
-  fi
-
-  if test "x${ac_cv_mmxext_inline}" != "xno"; then
-    PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_mmxext"
-  fi
-
-
-  AC_ARG_WITH(ffmpeg-tree, 
-  [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
-  if test "x${with_ffmpeg_tree}" != "x"
-  then
-    AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
-    real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
-    if test "x${real_ffmpeg_tree}" = x
-    then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
-    fi
-    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
-    then
-      dnl  Use a custom libffmpeg
-      AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
-      BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
-      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
-      ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
-    else
-      dnl  The given libavcodec wasn't built
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
-    fi
-  else
-    CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
-    LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS}"
-    AC_CHECK_LIB(avcodec, avcodec_init, [
-      BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
-      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec" ],
-      [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
-    LDFLAGS="${save_LDFLAGS}"
-    CFLAGS="${save_CFLAGS}"
-  fi
-fi
-
-dnl
-dnl  faad decoder plugin
-dnl
-AC_ARG_ENABLE(faad,
-[  --enable-faad           faad codec (default disabled)])
-if test "x${enable_faad}" = "xyes"
-then
-  AC_ARG_WITH(faad,
-    [    --with-faad=PATH      path to faad installation],[],[])
-  if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
-  then
-    faad_CFLAGS="${faad_CFLAGS} -I${with_faad}/include"
-    faad_LDFLAGS="${faad_LDFLAGS} -L${with_faad}/lib"
-  fi
-  faad_LDFLAGS="${faad_LDFLAGS}"
-
-  AC_ARG_WITH(faad-tree, 
-  [    --with-faad-tree=PATH faad tree for static linking])
-  if test "x${with_faad_tree}" != "x"
-  then
-    AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
-    real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
-    if test "x${real_faad_tree}" = x
-    then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
-    fi
-    if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
-    then
-      dnl  Use a custom faad
-      AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
-      BUILTINS="${BUILTINS} codec/faad/faad"
-      faad_LDFLAGS="${faad_LDFLAGS} ${real_faad_tree}/libfaad/.libs/libfaad.a"
-      faad_CFLAGS="${faad_CFLAGS} -I${real_faad_tree}/include"
-    else
-      dnl  The given libfaad wasn't built
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
-    fi
-  else
-    CFLAGS="${save_CFLAGS} ${faad_CFLAGS}"
-    LDFLAGS="${save_LDFLAGS} ${faad_LDFLAGS}"
-    AC_CHECK_HEADERS(faad.h, ,
-      [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
-    AC_CHECK_LIB(faad, faacDecOpen, [
-      PLUGINS="${PLUGINS} codec/faad/faad"
-      faad_LDFLAGS="${faad_LDFLAGS} -lfaad" ],
-      [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
-    LDFLAGS="${save_LDFLAGS}"
-    CFLAGS="${save_CFLAGS}"
-  fi
-fi
-
-
-
-dnl 
-dnl MP4 module 
-dnl 
-AC_ARG_ENABLE(mp4,
-  [  --enable-mp4            MP4 demux module (default enabled)])
-if test "x${enable_mp4}" != "xno"
-then
-
-    PLUGINS="${PLUGINS} demux/mp4/mp4"
-    AC_CHECK_HEADERS(zlib.h,
-              [ mp4_LDFLAGS="${mp4_LDFLAGS} -lz" ] )
-fi
-
-dnl
-dnl  a52 AC3 decoder plugin
-dnl
-AC_ARG_ENABLE(a52,
-  [  --enable-a52            A/52 support with liba52 (default enabled)])
-if test "x${enable_a52}" != "xno"
-then
-  AC_ARG_WITH(a52, 
-    [    --with-a52=PATH       a52 headers and libraries])
-  AC_ARG_WITH(a52-tree,
-    [    --with-a52-tree=PATH  a52dec tree for static linking ],[],[])
-  if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
-  then
-    real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
-    if test "x${real_a52_tree}" = "x"
-    then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
-    fi
-    dnl  Use a custom a52dec
-    AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
-    if test -f ${real_a52_tree}/include/a52.h
-    then
-      AC_MSG_RESULT(yes)
-      a52tofloat32_CFLAGS="${a52tofloat32_CFLAGS} -I${real_a52_tree}"
-      a52tofloat32_LDFLAGS="${a52tofloat32_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
-      LDFLAGS="${save_LDFLAGS} ${a52tofloat32_LDFLAGS}"
-      AC_CHECK_LIB(a52, a52_free, [
-        BUILTINS="${BUILTINS} audio_filter/converter/a52tofloat32"
-        a52tofloat32_LDFLAGS="${a52tofloat32_LDFLAGS} -la52 -lm"
-        a52tofloat32_CFLAGS="${a52tofloat32_CFLAGS} -DUSE_A52DEC_TREE"
-        ],[
-        if test -f ${real_a52_tree}/liba52/.libs/liba52.a
-        then
-          AC_MSG_ERROR([make sure you have at least a52dec-0.7.4])
-        else
-          AC_MSG_ERROR([the specified tree hasn't been compiled])
-        fi
-      ],[-lm])
-      LDFLAGS="${save_LDFLAGS}"
-    else
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([the specified tree doesn't have a52.h])
-    fi
-  else
-    if test "x${with_a52}" = "x"
-    then
-      test_LDFLAGS=""
-      test_CFLAGS=""
-    else
-      test_LDFLAGS="-L${with_a52}/lib"
-      test_CFLAGS="-I${with_a52}/include"
-    fi
-    save_CPPFLAGS="${CPPFLAGS}"
-    save_LDFLAGS="${LDFLAGS}"
-    CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
-    LDFLAGS="${save_LDFLAGS} ${test_LDFLAGS}"
-    AC_CHECK_HEADERS(a52dec/a52.h, [
-      AC_CHECK_LIB(a52, a52_free, [
-        BUILTINS="${BUILTINS} audio_filter/converter/a52tofloat32"
-        a52tofloat32_LDFLAGS="${a52tofloat32_LDFLAGS} ${test_LDFLAGS} -la52 -lm"
-        a52tofloat32_CFLAGS="${a52tofloat32_CFLAGS} ${test_CFLAGS}"
-      ],[
-        if test "x${enable_dvbpsi}" != "x"
-        then
-          AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net])
-        fi
-      ],[-lm])
-    ])
-    CPPFLAGS="${save_CPPFLAGS}"
-    LDFLAGS="${save_LDFLAGS}"
-  fi
-fi
-
-dnl
-dnl  cinepak plugin
-dnl
-AC_ARG_ENABLE(cinepak,
-  [  --enable-cinepak        Cinepak decoder (default enabled)])
-if test "x${enable_cinepak}" != "xno"
-then
-  PLUGINS="${PLUGINS} codec/cinepak/cinepak"
-fi
-
-dnl
-dnl  ogg vorbis plugin
-dnl
-AC_ARG_ENABLE(vorbis,
-  [  --enable-vorbis         Ogg/Vorbis decoder support (default enabled)])
-if test "x${enable_vorbis}" != "xno"
-then
-  AC_CHECK_HEADERS(ogg/ogg.h, [
-    dnl disabled for the moment
-    #PLUGINS="${PLUGINS} demux/ogg/ogg codec/vorbis/vorbis"
-    vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
-   ],[])
-fi
-
-dnl
-dnl  DV plugin
-dnl 
-AC_ARG_ENABLE(dv,
-  [  --enable-dv             DV decoder support (default disabled)])
-if test "x${enable_dv}" = "xyes"
-then
-  AC_CHECK_HEADERS(libdv/dv.h, [
-    PLUGINS="${PLUGINS} codec/dv/dv"
-    dv_LDFLAGS="${dv_LDFLAGS} -ldv"
-   ],[])
-fi  
-
-dnl
-dnl  Video plugins
-dnl
-
-AC_ARG_WITH(,[Video plugins:])
-
-dnl
-dnl  X11 module
-dnl  (enabled by default except on win32)
-dnl
-AC_ARG_ENABLE(x11,
-  [  --enable-x11            X11 support (default enabled)])
-if test "x${enable_x11}" != "xno" &&
-  (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
-  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
-  AC_CHECK_HEADERS(X11/Xlib.h, [
-    PLUGINS="${PLUGINS} video_output/x11/x11"
-    x11_LDFLAGS="${x11_LDFLAGS} -L${x_libraries} -lX11 -lXext"
-    x11_CFLAGS="${x11_CFLAGS} -I${x_includes}"
-  ])
-  CPPFLAGS="${save_CPPFLAGS}"
-fi
-
-dnl
-dnl  XVideo module
-dnl  (enabled by default except on win32)
-dnl
-AC_ARG_ENABLE(xvideo,
-  [  --enable-xvideo         XVideo support (default enabled)])
-if test "x${enable_xvideo}" != "xno" &&
-  (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
-  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
-  AC_CHECK_HEADERS(X11/extensions/Xv.h, [
-    CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
-    AC_CHECK_LIB(Xv_pic,XvPutImage,
-      # We have Xv_pic, that's good, we can build an xvideo.so plugin !
-      PLUGINS="${PLUGINS} video_output/x11/xvideo"
-      xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv_pic"
-      xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}",
-      AC_CHECK_LIB(Xv,XvPutImage,
-        # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
-        PLUGINS="${PLUGINS} video_output/x11/xvideo"
-        xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv"
-        xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}",
-        # Otherwise... well, do nothing.
-        :
-      )
-    )
-    CFLAGS="${save_CFLAGS}"
-  ]
-  CPPFLAGS="${save_CPPFLAGS}")
-fi
-
-dnl
-dnl  SDL module
-dnl
-AC_ARG_ENABLE(sdl,
-  [  --enable-sdl            SDL support (default enabled)])
-if test "x${enable_sdl}" != "xno"
-then
-  SDL_PATH="${PATH}"
-  AC_ARG_WITH(sdl-config-path,
-    [    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
-    [ if test "x${with_sdl_config_path}" != "xno"
-      then
-        SDL_PATH="${with_sdl_config_path}:${PATH}"
-      fi ])
-  AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
-  SDL_CONFIG="${SDL12_CONFIG}"
-  SDL_HEADER="SDL12/SDL.h"
-  if test "x${SDL_CONFIG}" = "xno"
-  then
-    AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
-    SDL_CONFIG=${SDL11_CONFIG}
-    SDL_HEADER="SDL11/SDL.h"
-  fi
-  if test "x${SDL_CONFIG}" = "xno"
-  then
-    AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
-    SDL_HEADER="SDL/SDL.h"
-  fi
-  if test "x${SDL_CONFIG}" != "xno"
-  then
-    PLUGINS="${PLUGINS} video_output/sdl audio_output/sdl"
-    sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
-    sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
-    CPPFLAGS="${save_CPPFLAGS} ${sdl_CFLAGS}"
-    AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
-      <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
-      [ AC_MSG_ERROR([The development package for SDL is not installed. 
-Please install it and try again. Alternatively you can also configure with 
---disable-sdl.])
-      ])
-    CPPFLAGS="${save_CPPFLAGS}"
-    if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
-    then
-      AC_MSG_ERROR([The development package for SDL is not installed.
-Please install it and try again. Alternatively you can also configure with
---disable-sdl.])
-    fi
-  elif test "x${enable_sdl}" =  "xyes"
-  then
-    AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
-from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
-    ])
-  fi
-fi
-
-dnl
-dnl  Qt Embedded module
-dnl  (disabled by default)
-dnl
-AC_ARG_ENABLE(qte,
-  [  --enable-qte            QT Embedded support (default disabled)])
-if test "x${enable_qte}" != "xno"
-then
-  AC_ARG_WITH(qte,
-  [    --with-qte=PATH    Qt Embedded headers and libraries])
-  if test "x${with_qte}" = "x"
-  then
-    test_LDFLAGS="-L${QTDIR}/lib"
-    test_CFLAGS="-I${QTDIR}/include"
-  else
-    test_LDFLAGS="-L${with_qte}/lib"
-    test_CFLAGS="-I${with_qte}/include"
-  fi
-
-  CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
-  AC_CHECK_HEADERS(qt.h, [
-    qte_CFLAGS="${qte_CFLAGS} ${test_CFLAGS} -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
-    qte_LDFLAGS="${qte_LDFLAGS} ${test_LDFLAGS} -lqte"
-    if test "x${with_qte}" = "x"
-    then
-      PLUGINS="${PLUGINS} video_output/qte/qte"
-    else
-      BUILTINS="${BUILTINS} video_output/qte/qte"
-    fi
-  ])
-  CPPFLAGS="${save_CPPFLAGS}"
-fi
-
-dnl
-dnl  Windows DirectX module
-dnl
-AC_ARG_ENABLE(directx,
-  [  --enable-directx        Win32 DirectX support (default enabled on Win32)])
-if test "x${enable_directx}" != "xno"
-then
-  if test "x${SYS}" = "xmingw32"
-  then
-    AC_ARG_WITH(directx, 
-    [    --with-directx=PATH   Win32 DirectX headers])
-    if test "x${with_directx}" = "x"
-    then
-      AC_CHECK_HEADERS(ddraw.h,
-      [ PLUGINS="${PLUGINS} video_output/directx/directx"
-        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" ])
-    else
-      AC_MSG_CHECKING(for directX headers in ${with_directx})
-      if test -f ${with_directx}/ddraw.h
-      then
-        PLUGINS="${PLUGINS} video_output/directx/directx"
-        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32"
-        directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
-        AC_MSG_RESULT(yes)
-      else
-        AC_MSG_RESULT(no)
-        AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
-      fi
-    fi
-  fi
-fi
-
-dnl
-dnl  Linux framebuffer module
-dnl
-AC_ARG_ENABLE(fb,
-  [  --enable-fb             Linux framebuffer support (default enabled on Linux)])
-    if test "x${enable_fb}" != "xno"
-    then
-      AC_CHECK_HEADERS(linux/fb.h, [
-        PLUGINS="${PLUGINS} video_output/fb"
-      ])
-    fi
-
-dnl
-dnl  Linux MGA module
-dnl
-AC_ARG_ENABLE(mga,
-  [  --enable-mga            Linux kernel Matrox support (default disabled)],
-  [ if test "x${enable_mga}" = "xyes"
-    then
-      PLUGINS="${PLUGINS} video_output/mga/mga video_output/mga/xmga"
-    fi ])
-
-dnl
-dnl  SVGAlib module
-dnl
-AC_ARG_ENABLE(svgalib,
-  [  --enable-svgalib        SVGAlib support (default disabled)])
-if test "x${enable_svgalib}" = "xyes"
-then
-  PLUGINS="${PLUGINS} video_output/svgalib"
-  svgalib_LDFLAGS="${svgalib_LDFLAGS} -lvgagl -lvga"
-fi
-
-dnl
-dnl  GGI module
-dnl
-AC_ARG_ENABLE(ggi,
-  [  --enable-ggi            GGI support (default disabled)])
-if test "x${enable_ggi}" = "xyes"
-then
-  PLUGINS="${PLUGINS} video_output/ggi"
-  ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
-  AC_ARG_WITH(ggi,
-    [    --with-ggi=PATH       path to libggi],
-    [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
-      then
-        CFLAGS_GGI="${CFLAGS_GGI} -I${with_ggi}/include"
-        ggi_LDFLAGS="${ggi_LDFLAGS} -L${with_ggi}/lib"
-      fi ])
-fi
-
-dnl
-dnl  Glide module
-dnl
-AC_ARG_ENABLE(glide,
-  [  --enable-glide          Glide (3dfx) support (default disabled)])
-if test "x${enable_glide}" = "xyes"
-then
-  PLUGINS="${PLUGINS} video_output/glide"
-  glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
-  glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
-  AC_ARG_WITH(glide,
-    [    --with-glide=PATH     path to libglide],
-    [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
-      then
-        glide_CFLAGS="${glide_CFLAGS} -I${with_glide}/include"
-        glide_LDFLAGS="${glide_LDFLAGS} -L${with_glide}/lib"
-      fi ])
-fi
-
-dnl
-dnl  AA plugin
-dnl
-AC_ARG_ENABLE(aa,
-  [  --enable-aa             aalib output (default disabled)])
-if test "x${enable_aa}" = "xyes"
-then
-  AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
-  if test "x${have_aa}" = "xtrue"
-  then
-    PLUGINS="${PLUGINS} video_output/aa"
-    aa_LDFLAGS="${aa_LDFLAGS} -laa"
-  fi
-fi
-
-dnl
-dnl  Audio plugins
-dnl
-
-AC_ARG_WITH(,[Audio plugins:])
-
-dnl
-dnl  OSS /dev/dsp module (enabled by default except on win32)
-dnl
-AC_ARG_ENABLE(oss,
-  [  --enable-oss            Linux OSS /dev/dsp support (enabled on Linux)])
-
-if test "x${enable_oss}" != "xno" &&
-  (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
-then
-  AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
-    PLUGINS="${PLUGINS} audio_output/oss"
-    AC_CHECK_LIB(ossaudio,main,oss_LDFLAGS="${oss_LDFLAGS} -lossaudio")
-  ])
-fi
-
-dnl
-dnl  Esound module
-dnl
-AC_ARG_ENABLE(esd,
-  [  --enable-esd            Esound library support (default disabled)],
-  [if test "x${enable_esd}" = "xyes"
-   then
-     AC_PATH_PROG(ESD_CONFIG, esd-config, no)
-     if test "x${ESD_CONFIG}" != "xno"
-     then
-       PLUGINS="${PLUGINS} audio_output/esd"
-       esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
-       esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
-     fi
-   fi])
-
-dnl
-dnl  aRts module
-dnl
-AC_ARG_ENABLE(arts,
-  [  --enable-arts           aRts sound server (default disabled)],
-  [if test "x${enable_arts}" = "xyes"
-   then
-     AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
-     if test "x${ARTS_CONFIG}" != "xno"
-     then
-       PLUGINS="${PLUGINS} audio_output/arts"
-       arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
-       arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
-     fi
-   fi])
-
-dnl
-dnl  ALSA module
-dnl
-AC_ARG_ENABLE(alsa,
-  [  --enable-alsa           ALSA sound support for Linux (default disabled)],
-  [if test "x${enable_alsa}" = "xyes"
-   then
-     AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
-     if test "x${have_alsa}" = "xtrue"
-     then
-       PLUGINS="${PLUGINS} audio_output/alsa"
-       alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
-     fi
-   fi])
-
-dnl
-dnl  win32 waveOut plugin
-dnl
-AC_ARG_ENABLE(waveout,
-  [  --enable-waveout        Win32 waveOut module (default enabled on Win32)])
-if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
-  then
-    PLUGINS="${PLUGINS} audio_output/waveout"
-    waveout_LDFLAGS="-lwinmm"
-fi
-
-dnl
-dnl  Interface plugins
-dnl
-
-AC_ARG_WITH(,[Interface plugins:])
-
-dnl special case for BeOS
-if test "x${SYS}" = "xbeos"
-then
-    PLUGINS="${PLUGINS} gui/beos/beos"
-fi
-
-dnl
-dnl  Gtk+ module
-dnl
-AC_ARG_ENABLE(gtk,
-  [  --enable-gtk            Gtk+ support (default enabled)])
-if test "x${enable_gtk}" != "xno"
-then
-  GTK_PATH="${PATH}"
-  AC_ARG_WITH(gtk-config-path,
-    [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
-    [ if test "x${with_gtk_config_path}" != "xno"
-      then
-        GTK_PATH="${with_gtk_config_path}:${PATH}"
-      fi ])
-  # look for gtk-config
-  AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
-  GTK_CONFIG=${GTK12_CONFIG}
-  if test "x${GTK_CONFIG}" = "xno"
-  then
-    AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
-  fi
-  if test "x${GTK_CONFIG}" != "xno"
-  then
-    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
-    then
-      AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
-    fi
-    gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk gthread`"
-    gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
-    # now look for the gtk.h header
-    CPPFLAGS="${save_CPPFLAGS} ${gtk_CFLAGS}"
-    ac_cv_gtk_headers=yes
-    AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
-      ac_cv_gtk_headers=no
-      echo "Cannot find gtk development headers."
-    ])
-    if test "x${ac_cv_gtk_headers}" = "xyes"
-    then
-      PLUGINS="${PLUGINS} gui/gtk/gtk"
-      NEED_GTK_MAIN=yes
-      ALIASES="${ALIASES} gvlc"
-    fi
-    CPPFLAGS="${save_CPPFLAGS}"
-  fi
-fi
-
-dnl
-dnl  Familiar module uses Gtk+ library
-dnl
-AC_ARG_ENABLE(familiar,
-  [  --enable-familiar       Familiar Gtk+ support (default disabled)])
-if test "x${enable_familiar}" = "xyes"
-then
-  GTK_PATH="${PATH}"
-  AC_ARG_WITH(gtk-config-path,
-    [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
-    [ if test "x${with_gtk_config_path}" != "xno"
-      then
-        GTK_PATH="${with_gtk_config_path}:${PATH}"
-      fi ])
-  # look for gtk-config
-  AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
-  GTK_CONFIG=${GTK12_CONFIG}
-  if test "x${GTK_CONFIG}" = "xno"
-  then
-    AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
-  fi
-  if test "x${GTK_CONFIG}" != "xno"
-  then
-    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
-    then
-      AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar.])
-    fi
-    familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} --cflags gtk gthread`"
-    familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
-    # now look for the gtk.h header
-    CPPFLAGS="${save_CPPFLAGS} ${familiar_CFLAGS}"
-    ac_cv_gtk_headers=yes
-    AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
-      ac_cv_gtk_headers=no
-      echo "Cannot find gtk development headers."
-    ])
-    if test "x${ac_cv_gtk_headers}" = "xyes"
-    then
-      PLUGINS="${PLUGINS} gui/familiar/familiar"
-      NEED_GTK_MAIN=yes
-    fi
-    CPPFLAGS="${save_CPPFLAGS}"
-  fi
-fi
-
-dnl
-dnl  Gnome module
-dnl
-AC_ARG_ENABLE(gnome,
-  [  --enable-gnome          Gnome interface support (default disabled)],
-  [if test "x${enable_gnome}" = "xyes"; then
-    # look for gnome-config
-    AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
-    if test -x ${GNOME_CONFIG}
-    then
-       gnome_CFLAGS="${gnome_CFLAGS} `${GNOME_CONFIG} --cflags gtk gnomeui`"
-       gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
-    fi
-    # now look for the gnome.h header
-    CPPFLAGS="${save_CPPFLAGS} ${gnome_CFLAGS}"
-    AC_CHECK_HEADERS(gnome.h, [
-      PLUGINS="${PLUGINS} gui/gtk/gnome"
-      NEED_GTK_MAIN=yes
-      ALIASES="${ALIASES} gnome-vlc"
-     ],[
-      AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
-developement tools or remove the --enable-gnome option])
-     ])
-    CPPFLAGS="${save_CPPFLAGS}"
-  fi])
-
-dnl
-dnl  Qt module
-dnl
-AC_ARG_ENABLE(qt,
-  [  --enable-qt             Qt interface support (default disabled)],
-  [if test "x${enable_qt}" = "xyes"; then
-     PLUGINS="${PLUGINS} gui/qt/qt"
-     ALIASES="${ALIASES} qvlc"
-     qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib"
-     qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include"
-     if test -x ${QTDIR}/bin/moc
-     then
-       MOC=${QTDIR}/bin/moc
-     else
-       MOC=moc
-     fi
-   fi])
-
-dnl 
-dnl  KDE module
-dnl
-AC_ARG_ENABLE(kde,
-  [  --enable-kde            KDE interface support (default disabled)],
-  [if test "x${enable_kde}" = "xyes"; then
-     PLUGINS="${PLUGINS} gui/kde/kde"
-     ALIASES="${ALIASES} kvlc"
-     kde_LDFLAGS="${kde_LDFLAGS} -L${KDEDIR}/lib -lkfile"
-     kde_CFLAGS="${kde_CFLAGS} -I/usr/include/kde -I/usr/include/qt"
-     kde_CFLAGS="${kde_CFLAGS} -I${KDEDIR}/include -I${QTDIR}/include"
-     if test -x ${QTDIR}/bin/moc
-     then
-       MOC=${QTDIR}/bin/moc
-     else
-       MOC=moc
-     fi
-   fi])
-
-dnl
-dnl  Opie QT embedded module
-dnl
-AC_ARG_ENABLE(opie,
-  [  --enable-opie           Qt embedded interface support (default disabled)],
-  [if test "x${enable_opie}" = "xyes"; then
-     AC_ARG_WITH(qte,
-     [    --with-qte=PATH    Qt Embedded headers and libraries])
-     if test "x${with_qte}" = "x"
-     then
-       test_LDFLAGS="-L$(QTDIR)/lib -lqte"
-       test_CFLAGS="-I${QTDIR}/include -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
-     else
-       test_LDFLAGS="-L${with_qte}/lib"
-       test_CFLAGS="-I${with_qte}/include"
-     fi
-
-     CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
-     AC_CHECK_HEADERS(qt.h, [
-       opie_CFLAGS="${opie_CFLAGS} ${test_CFLAGS}"
-       opie_LDFLAGS="${opie_LDFLAGS} -lqpe ${test_LDFLAGS}"
-       if test "x${with_qte}" = "x"
-       then
-         PLUGINS="${PLUGINS} gui/opie/opie"
-       else
-         BUILTINS="${BUILTINS} gui/opie/opie"
-       fi
-     ])
-     CPPFLAGS="${save_CPPFLAGS}"
-
-     if test -x ${QTDIR}/bin/moc
-     then
-       MOC=${QTDIR}/bin/moc
-     else
-       MOC=moc
-     fi
-   fi])
-
-
-dnl
-dnl  MacOS X module
-dnl
-AC_ARG_ENABLE(macosx,
-  [  --enable-macosx         MacOS X support (default enabled on MacOS X)],
-  [if test "x${enable_macosx}" = "xyes"
-   then
-     BUILTINS="${BUILTINS} gui/macosx/macosx"
-     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
-   fi],
-  [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
-     BUILTINS="${BUILTINS} gui/macosx/macosx"
-     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
-   )])
-
-dnl
-dnl  QNX RTOS module
-dnl
-AC_ARG_ENABLE(qnx,
-  [  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)])
-    if test "x${enable_qnx}" != "xno"
-    then
-      AC_CHECK_HEADERS(Ph.h, [
-        PLUGINS="${PLUGINS} gui/qnx/qnx"
-        qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
-      ])
-    fi
-
-dnl
-dnl  Windows native interface module, built with Borland C++ Builder
-dnl
-AC_ARG_ENABLE(intfwin,
-[  --enable-intfwin        Win32 interface support (default disabled)],
-[ if test "x${enable_intfwin}" != "xno"
-  then
-    AC_ARG_WITH(bcbuilder, 
-    [    --with-bcbuilder=PATH Borland C++ Builder installation path])
-    if test "x${with_bcbuilder}" != "x"
-    then
-      BCBUILDER="${with_bcbuilder}"
-    fi
-    PLUGINS="${PLUGINS} gui/win32/win32"
-  fi ])
-
-dnl
-dnl  ncurses module
-dnl
-AC_ARG_ENABLE(ncurses,
-  [  --enable-ncurses        ncurses interface support (default disabled)],
-  [if test "x${enable_ncurses}" = "xyes"; then
-     PLUGINS="${PLUGINS} gui/ncurses/ncurses"
-     ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
-   fi])
-
-dnl
-dnl  XOSD plugin
-dnl
-AC_ARG_ENABLE(xosd,
-  [  --enable-xosd           xosd interface support (default disabled)])
-if test "x${enable_xosd}" = "xyes"
-then
-  AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
-  AC_TRY_COMPILE([#include <xosd.h>],
-     [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
-      AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if <xosd.h> is pre-1.0.0))
-  if test "x${have_xosd}" = "xtrue"
-  then
-    PLUGINS="${PLUGINS} visualization/xosd/xosd"
-    xosd_LDFLAGS="${xosd_LDFLAGS} -lxosd"
-  fi
-fi
-
-dnl
-dnl  Lirc plugin
-dnl
-AC_ARG_ENABLE(lirc,
-  [  --enable-lirc           lirc support (default disabled)])
-if test "x${enable_lirc}" = "xyes"
-then
-  AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
-  if test "x${have_lirc}" = "xtrue"
-  then
-    PLUGINS="${PLUGINS} control/lirc/lirc"
-    lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
-  fi
-fi
-
-AC_ARG_WITH(,[Misc options:])
-
-dnl
-dnl  Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
-dnl
-dnl  We give the user the opportunity to specify
-dnl  --with-words=big or --with-words=little ; otherwise, try to guess
-dnl
-AC_ARG_WITH(words,
-  [  --with-words=endianness set endianness (big or little)])
-  case "x${with_words}" in
-    xbig)
-      ac_cv_c_bigendian=yes
-      ;;
-    xlittle)
-      ac_cv_c_bigendian=no
-      ;;
-    *)
-      dnl  Try to guess endianness by matching patterns on a compiled
-      dnl  binary, by looking for an ASCII or EBCDIC string
-      AC_CACHE_CHECK([whether the byte order is big-endian],
-        [ac_cv_c_bigendian],
-        [ac_cv_c_bigendian="unknown"
-        [cat >conftest.c <<EOF
-        short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
-        short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
-        void _a(void) { char*s = (char*)am; s = (char *)ai; }
-        short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
-        short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
-        void _e(void) { char*s = (char*)em; s = (char*)ei; }
-        int main(void) { _a(); _e(); return 0; }
-EOF
-        ]
-        if test -f conftest.c
-        then 
-          if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
-              && test -f conftest.o
-          then
-            if test "`strings conftest.o | grep BIGenDianSyS`"
-            then
-              ac_cv_c_bigendian="yes"
-            fi
-            if test "`strings conftest.o | grep LiTTleEnDian`"
-            then
-              ac_cv_c_bigendian="no"
-            fi
-          fi
-        fi
-      ])
-      if test "x${ac_cv_c_bigendian}" = "xunknown"
-      then
-        AC_MSG_ERROR([Could not guess endianness, please use --with-words])
-      fi
-      ;;
-  esac
-dnl  Now we know what to use for endianness, just put it in the header
-if test "${ac_cv_c_bigendian}" = "yes"
-then
-  AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
-fi
-
-dnl
-dnl  Profiling
-dnl
-PROFILING=0
-
-GPROF=0
-AC_ARG_ENABLE(gprof,
-[  --enable-gprof          gprof profiling (default disabled)],
-[ if test "x${enable_gprof}" = "xyes"
-  then
-    GPROF=1
-    PROFILING="gprof"
-  fi
-])
-
-CPROF=0
-AC_ARG_ENABLE(cprof,
-[  --enable-cprof          cprof profiling (default disabled)],
-[ if test "x${enable_cprof}" = "xyes"
-  then
-    save_LDFLAGS="${save_LDFLAGS} -lcprof"; LDFLAGS="${save_LDFLAGS}"
-    CPROF=1
-    PROFILING="cprof"
-  fi
-])
-
-dnl
-dnl  GNU portable threads
-dnl
-AC_ARG_ENABLE(pth,
-  [  --enable-pth            GNU Pth support (default disabled)],
-  [ if test "x${enable_pth}" = "xyes"; then
-    AC_CHECK_LIB(pth,pth_init)
-    AC_EGREP_HEADER(pth_init,pth.h,[
-      AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
-                Define if <pth.h> defines pth_init)
-    THREAD_LIB="-lpth"
-    fi])
-])
-
-dnl
-dnl  State Threads
-dnl
-AC_ARG_ENABLE(st,
-  [  --enable-st             State Threads (default disabled)],
-  [ if test "x${enable_st}" = "xyes"; then
-    AC_CHECK_LIB(st,st_init)
-    AC_EGREP_HEADER(st_init,st.h,[
-      AC_DEFINE(ST_INIT_IN_ST_H, 1,
-                Define if <st.h> defines st_init)
-    THREAD_LIB="-lst"
-    fi])
-])
-
-vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}"
-plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}"
-
-dnl
-dnl  Mozilla plugin
-dnl
-MOZILLA=0
-AC_ARG_ENABLE(mozilla,
-  [  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)])
-if test "x${enable_mozilla}" = "xyes"
-then
-  AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
-  if test "x${MOZILLA_CONFIG}" != "xno"
-  then
-    if test "x${SYS}" != "xmingw32"; then
-      LDFLAGS="${save_LDFLAGS} -L${x_libraries}"
-      AC_CHECK_LIB(Xt,XtStrings,[
-        mozilla_LDFLAGS="${mozilla_LDFLAGS} -L${x_libraries} -lXt"
-      ])
-      LDFLAGS="${save_LDFLAGS}"
-    fi
-    MOZILLA=1
-    dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
-    [mozilla_CFLAGS="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
-    mozilla_LDFLAGS="${mozilla_LDFLAGS} `${MOZILLA_CONFIG} --libs plugin xpcom`"
-  fi
-fi
-
-dnl
-dnl  gtk_main plugin
-dnl
-if test "x${NEED_GTK_MAIN}" != "xno"
-then
-    PLUGINS="${PLUGINS} misc/gtk_main"
-    gtk_main_CFLAGS="${gtk_main_CFLAGS} ${gtk_CFLAGS} ${familiar_CFLAGS} ${gnome_CFLAGS}"
-    gtk_main_LDFLAGS="${gtk_main_LDFLAGS} ${gtk_LDFLAGS} ${familiar_LDFLAGS} ${gnome_LDFLAGS}"
-fi
-
-dnl
-dnl  Plug-ins - this must be AT THE END
-dnl
-AC_ARG_ENABLE(plugins,
-  [  --disable-plugins       make all plug-ins built-in (default plug-ins enabled)],
-  [if test "x${enable_plugins}" = "xno"
-   then
-     BUILTINS="${BUILTINS} ${PLUGINS}"
-     PLUGINS=
-   fi])
-
-dnl Automagically disable plug-ins if there is no system support for .so files
-dnl don't forget vlc-win32 still can load .so as plugins
-if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
-then
-  echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
-  echo "as built-in"
-  BUILTINS="${BUILTINS} ${PLUGINS}"
-  PLUGINS=
-fi
-
-dnl
-dnl  Stuff used by the program
-dnl
-AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "vlc ${VERSION} ${CODENAME} Copyright 1996-2002 VideoLAN", [Simple version string])
-AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN", [Copyright string])
-AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
-
-VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
-AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
-AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
-
-DATA_PATH="${ac_tool_prefix}/share/videolan"
-AC_SUBST(DATA_PATH)
-PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
-AC_SUBST(PLUGIN_PATH)
-
-dnl
-dnl  Restore *FLAGS
-dnl
-CPPFLAGS="${save_CPPFLAGS}"
-CFLAGS="${save_CFLAGS}"
-LDFLAGS="${save_LDFLAGS}"
-
-dnl
-dnl  Create the vlc-config script
-dnl
-libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
-for i in `echo ${BUILTINS} | sed -e 's#[^ ]*/##g'` ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
-AC_SUBST(libvlc_LDFLAGS)
-
-dnl 
-dnl  Configuration is finished
-dnl
-AC_SUBST(SYS)
-AC_SUBST(ARCH)
-AC_SUBST(PLUGINS)
-AC_SUBST(BUILTINS)
-AC_SUBST(ALIASES)
-AC_SUBST(DEBUG)
-AC_SUBST(ASM)
-AC_SUBST(CPROF)
-AC_SUBST(GPROF)
-AC_SUBST(OPTIMS)
-AC_SUBST(TUNING)
-AC_SUBST(RELEASE)
-AC_SUBST(MOC)
-AC_SUBST(WINDRES)
-AC_SUBST(BCBUILDER)
-AC_SUBST(NEED_GETOPT)
-AC_SUBST(MOZILLA)
-
-AC_SUBST(CFLAGS_OPTIM)
-AC_SUBST(CFLAGS_OPTIM_NODEBUG)
-AC_SUBST(LDFLAGS)
-
-AC_SUBST(vlc_CFLAGS)
-AC_SUBST(plugins_CFLAGS)
-AC_SUBST(builtins_CFLAGS)
-AC_SUBST(mozilla_CFLAGS)
-
-AC_SUBST(a52tofloat32_CFLAGS)
-AC_SUBST(arts_CFLAGS)
-AC_SUBST(i420_yuy2_mmx_CFLAGS)
-AC_SUBST(dvd_CFLAGS)
-AC_SUBST(dvdread_CFLAGS)
-AC_SUBST(dvdplay_CFLAGS)
-AC_SUBST(ts_dvbpsi_CFLAGS)
-AC_SUBST(directx_CFLAGS)
-AC_SUBST(esd_CFLAGS)
-AC_SUBST(familiar_CFLAGS)
-AC_SUBST(faad_CFLAGS)
-AC_SUBST(ffmpeg_CFLAGS)
-AC_SUBST(glide_CFLAGS)
-AC_SUBST(gnome_CFLAGS)
-AC_SUBST(gtk_CFLAGS)
-AC_SUBST(gtk_main_CFLAGS)
-AC_SUBST(kde_CFLAGS)
-AC_SUBST(opie_CFLAGS)
-AC_SUBST(idctaltivec_CFLAGS)
-AC_SUBST(macosx_CFLAGS)
-AC_SUBST(mad_CFLAGS)
-AC_SUBST(memcpyaltivec_CFLAGS)
-AC_SUBST(motionaltivec_CFLAGS)
-AC_SUBST(qt_CFLAGS)
-AC_SUBST(qte_CFLAGS)
-AC_SUBST(sdl_CFLAGS)
-AC_SUBST(svgalib_CFLAGS)
-AC_SUBST(x11_CFLAGS)
-AC_SUBST(xvideo_CFLAGS)
-
-AC_SUBST(vlc_LDFLAGS)
-AC_SUBST(plugins_LDFLAGS)
-AC_SUBST(builtins_LDFLAGS)
-AC_SUBST(mozilla_LDFLAGS)
-
-AC_SUBST(a52tofloat32_LDFLAGS)
-AC_SUBST(aa_LDFLAGS)
-AC_SUBST(alsa_LDFLAGS)
-AC_SUBST(arts_LDFLAGS)
-AC_SUBST(beos_LDFLAGS)
-AC_SUBST(i420_rgb_LDFLAGS)
-AC_SUBST(directx_LDFLAGS)
-AC_SUBST(dv_LDFLAGS)
-AC_SUBST(dvd_LDFLAGS)
-AC_SUBST(dvdread_LDFLAGS)
-AC_SUBST(dvdplay_LDFLAGS)
-AC_SUBST(ts_dvbpsi_LDFLAGS)
-AC_SUBST(audio_LDFLAGS)
-AC_SUBST(esd_LDFLAGS)
-AC_SUBST(familiar_LDFLAGS)
-AC_SUBST(distort_LDFLAGS)
-AC_SUBST(faad_LDFLAGS)
-AC_SUBST(ffmpeg_LDFLAGS)
-AC_SUBST(mp4_LDFLAGS)
-AC_SUBST(ggi_LDFLAGS)
-AC_SUBST(glide_LDFLAGS)
-AC_SUBST(gnome_LDFLAGS)
-AC_SUBST(gtk_LDFLAGS)
-AC_SUBST(gtk_main_LDFLAGS)
-AC_SUBST(http_LDFLAGS)
-AC_SUBST(idctaltivec_LDFLAGS)
-AC_SUBST(imdct_LDFLAGS)
-AC_SUBST(imdct3dn_LDFLAGS)
-AC_SUBST(imdctsse_LDFLAGS)
-AC_SUBST(ipv4_LDFLAGS)
-AC_SUBST(ipv6_LDFLAGS)
-AC_SUBST(kde_LDFLAGS)
-AC_SUBST(lirc_LDFLAGS)
-AC_SUBST(macosx_LDFLAGS)
-AC_SUBST(mad_LDFLAGS)
-AC_SUBST(memcpyaltivec_LDFLAGS)
-AC_SUBST(motionaltivec_LDFLAGS)
-AC_SUBST(ncurses_LDFLAGS)
-AC_SUBST(opie_LDFLAGS)
-AC_SUBST(oss_LDFLAGS)
-AC_SUBST(qnx_LDFLAGS)
-AC_SUBST(qt_LDFLAGS)
-AC_SUBST(qte_LDFLAGS)
-AC_SUBST(rc_LDFLAGS)
-AC_SUBST(sdl_LDFLAGS)
-AC_SUBST(svgalib_LDFLAGS)
-AC_SUBST(vcd_LDFLAGS)
-AC_SUBST(vorbis_LDFLAGS)
-AC_SUBST(waveout_LDFLAGS)
-AC_SUBST(x11_LDFLAGS)
-AC_SUBST(xvideo_LDFLAGS)
-AC_SUBST(xosd_LDFLAGS)
-AC_SUBST(id3tag_LDFLAGS)
-        
-AC_OUTPUT([
-  Makefile
-  Makefile.config
-  Makefile.opts
-  m4/Makefile
-  intl/Makefile
-  po/Makefile.in
-  vlc-config
-],[
-  chmod a+x vlc-config
-])
-
-echo "
-vlc configuration
---------------------
-vlc version           : ${VERSION}
-system                : ${SYS}
-architecture          : ${ARCH}
-optimizations         : ${OPTIMS}
-tuning                : ${TUNING}
-debug mode            : ${DEBUG}
-release               : ${RELEASE}
-profiling             : ${PROFILING}
-need builtin getopt   : ${NEED_GETOPT}
-modules               : (see Makefile.config)
-mozilla plugin        : ${MOZILLA}
-vlc aliases           :${ALIASES}
-
-You may now tune Makefile.config and Makefile.opts at your convenience, for
-instance to choose which modules get compiled as plugins, or tune CFLAGS.
-
-To build vlc and its plugins, type \`${VLC_MAKE}'.
-"
-
index b650d8b..b153086 100644 (file)
@@ -1,3 +1,5 @@
+Makefile
+Makefile.in
 tmp
 vlc
 vlc-plugin-*
index c52906b..f5c3fde 100644 (file)
@@ -2,7 +2,7 @@ Source: vlc
 Section: graphics
 Priority: optional
 Maintainer: Samuel Hocevar <sam@zoy.org>
-Build-Depends: debhelper (>=2.2.0), xlibs-dev, xlibs-pic, libgnome-dev, libggi2-dev, libglide2-dev [i386], libesd0-dev, libsdl1.2-dev (>=1.2.2-3.1), libqt-dev, libasound2-dev (>=0.9.0beta10a), libarts-dev, libmad0-dev, liblircclient-dev, a52dec-dev, aalib1-dev, libdvbpsi1-dev, mozilla-dev, kdelibs-dev, dvb-dev, libdv-dev, libxosd-dev (>=1.0.2-1), svgalibg1-dev (>=1.4.0)
+Build-Depends: debhelper (>=2.2.0), xlibs-dev, xlibs-pic, libgnome-dev, libggi2-dev, libglide2-dev [i386], libesd0-dev, libsdl1.2-dev (>=1.2.2-3.1), libqt-dev, libasound2-dev (>=0.9.0beta10a), libarts-dev, libmad0-dev, liblircclient-dev, liba52-0.7.4-dev, aalib1-dev, libdvbpsi1-dev, mozilla-dev, kdelibs-dev, dvb-dev, libdv2-dev, libxosd-dev (>=1.0.2-1), svgalibg1-dev (>=1.4.0)
 Standards-Version: 3.5.6
 
 Package: vlc
@@ -297,3 +297,21 @@ Description: DV codec plugin for vlc
  .
  This plugin adds support for the DV video format to vlc, the VideoLAN
  Client. The plugin is autodetected.
+
+Package: vlc-plugin-a52
+Architecture: any
+Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
+Description: A-52 (AC-3) codec plugin for vlc
+ VideoLAN is a free MPEG, MPEG2, DVD and DivX software solution.
+ .
+ This plugin adds support for the ATSC A-52 (aka. AC-3) audio format to
+ vlc, the VideoLAN Client. The plugin is autodetected.
+
+Package: vlc-plugin-dvb
+Architecture: any
+Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
+Description: DVB input plugin for vlc
+ VideoLAN is a free MPEG, MPEG2, DVD and DivX software solution.
+ .
+ This plugin adds support for DVB cards to vlc, the VideoLAN Client. Note
+ that your card needs to be supported by your kernel before vlc can use it.
index 12e3c2d..5b5b3f1 100644 (file)
@@ -1,4 +1,16 @@
 usr/bin
-usr/lib/vlc
+usr/lib/vlc/access
+usr/lib/vlc/audio_filter
+usr/lib/vlc/audio_mixer
+usr/lib/vlc/audio_output
+usr/lib/vlc/codec
+usr/lib/vlc/control
+usr/lib/vlc/demux
+usr/lib/vlc/gui
+usr/lib/vlc/misc
+usr/lib/vlc/video_chroma
+usr/lib/vlc/video_filter
+usr/lib/vlc/video_output
+usr/lib/vlc/visualization
 usr/include/vlc
 usr/share/doc
index a4a8a30..3ce57c2 100755 (executable)
@@ -12,7 +12,8 @@ export DH_COMPAT=3
 # Compilation options
 #
 
-CONFIG_FLAGS = --enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-familiar --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-mp4 --enable-dvb --enable-dv --enable-svgalib
+CONFIG_FLAGS = --enable-release --prefix=/usr
+CONFIG_FLAGS += --enable-gnome --enable-gtk --enable-familiar --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde --enable-mp4 --enable-dvb --enable-dv --enable-svgalib --enable-satellite
 CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
 CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
 ifeq ($(DEB_BUILD_ARCH),i386)
@@ -38,11 +39,11 @@ build-stamp:
 
        # Check that we have an ffmpeg tree in here (can be a symlink)
        test -d extras/ffmpeg
-       (cd extras/ffmpeg ; ./configure ; make)
+       (cd extras/ffmpeg && ./configure && make)
 
        # Check that we have an faad tree in here (can be a symlink)
        test -d extras/faad
-       (cd extras/faad ; ./configure ; make)
+       (cd extras/faad && ./configure && cd libfaad && make)
 
        ./configure --mandir=$${prefix}/share/man \
                --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
@@ -58,10 +59,11 @@ clean:
 
        # Check that we have an ffmpeg tree in here (can be a symlink)
        test -d extras/ffmpeg
-       -(cd extras/ffmpeg ; make distclean)
+       -(cd extras/ffmpeg && make distclean)
        # Check that we have an faad tree in here (can be a symlink)
        test -d extras/faad
-       -(cd extras/faad ; make distclean)
+       -(cd extras/faad && make distclean)
+
        -$(MAKE) distclean
 
        dh_clean
@@ -84,13 +86,15 @@ install: build
        mv debian/vlc/usr/bin/vlc-config debian/libvlc0-dev/usr/bin/
        mv debian/vlc/usr/lib/*.a debian/libvlc0-dev/usr/lib/
        mv debian/vlc/usr/lib/vlc/*.a debian/libvlc0-dev/usr/lib/vlc/
-       mv debian/vlc/usr/include/vlc/* debian/libvlc0-dev/usr/include/vlc/
+       mv debian/vlc/usr/include/vlc/*.h debian/libvlc0-dev/usr/include/vlc/
+       rm -Rf debian/vlc/usr/include
        ln -s vlc debian/libvlc0-dev/usr/share/doc/libvlc0-dev
 
        # Package: gnome-vlc
        mv debian/vlc/usr/bin/gnome-vlc debian/gnome-vlc/usr/bin/
        ln -s vlc debian/gnome-vlc/usr/share/doc/gnome-vlc
-       mv debian/vlc/usr/lib/vlc/gui/gnome.so debian/gnome-vlc/usr/lib/vlc/gui/
+       mv debian/vlc/usr/lib/vlc/gui/libgnome_plugin.so \
+               debian/gnome-vlc/usr/lib/vlc/gui/
        ln -s vlc.1.gz debian/gnome-vlc/usr/share/man/man1/gnome-vlc.1.gz
        mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/gnome-vlc/$(VIDDIR)/gnome-vlc.xpm
        mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/gnome-vlc/$(PIXDIR)/gnome-vlc.png
@@ -98,72 +102,75 @@ install: build
        # Package: gvlc
        mv debian/vlc/usr/bin/gvlc debian/gvlc/usr/bin/
        ln -s vlc debian/gvlc/usr/share/doc/gvlc
-       mv debian/vlc/usr/lib/vlc/gui/gtk.so debian/gvlc/usr/lib/vlc/gui/
-       mv debian/vlc/usr/lib/vlc/gui/familiar.so debian/gvlc/usr/lib/vlc/gui/
+       mv debian/vlc/usr/lib/vlc/gui/libgtk_plugin.so \
+               debian/gvlc/usr/lib/vlc/gui/
+       mv debian/vlc/usr/lib/vlc/gui/libfamiliar_plugin.so \
+               debian/gvlc/usr/lib/vlc/gui/
        ln -s vlc.1.gz debian/gvlc/usr/share/man/man1/gvlc.1.gz
        mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/gvlc/$(VIDDIR)/gvlc.xpm
        mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/gvlc/$(PIXDIR)/gvlc.png
 
        # Package: vlc-plugin-esd
        ln -s vlc debian/vlc-plugin-esd/usr/share/doc/vlc-plugin-esd
-       mv debian/vlc/usr/lib/vlc/audio_output/esd.so \
+       mv debian/vlc/usr/lib/vlc/audio_output/libesd_plugin.so \
                debian/vlc-plugin-esd/usr/lib/vlc/audio_output/
 
        # Package: vlc-plugin-alsa
        ln -s vlc debian/vlc-plugin-alsa/usr/share/doc/vlc-plugin-alsa
-       mv debian/vlc/usr/lib/vlc/audio_output/alsa.so \
+       mv debian/vlc/usr/lib/vlc/audio_output/libalsa_plugin.so \
                debian/vlc-plugin-alsa/usr/lib/vlc/audio_output/
 
        # Package: vlc-plugin-sdl
        ln -s vlc debian/vlc-plugin-sdl/usr/share/doc/vlc-plugin-sdl
-       mv debian/vlc/usr/lib/vlc/audio_output/sdl.so \
+       mv debian/vlc/usr/lib/vlc/audio_output/libaout_sdl_plugin.so \
                debian/vlc-plugin-sdl/usr/lib/vlc/audio_output/
-       mv debian/vlc/usr/lib/vlc/video_output/sdl.so \
+       mv debian/vlc/usr/lib/vlc/video_output/libvout_sdl_plugin.so \
                debian/vlc-plugin-sdl/usr/lib/vlc/video_output/
 
        # Package: vlc-plugin-ggi
        ln -s vlc debian/vlc-plugin-ggi/usr/share/doc/vlc-plugin-ggi
-       mv debian/vlc/usr/lib/vlc/video_output/ggi.so \
+       mv debian/vlc/usr/lib/vlc/video_output/libggi_plugin.so \
                debian/vlc-plugin-ggi/usr/lib/vlc/video_output/
 
        # Package: vlc-plugin-glide
 ifeq ($(DEB_BUILD_ARCH),i386)
        ln -s vlc debian/vlc-plugin-glide/usr/share/doc/vlc-plugin-glide
-       mv debian/vlc/usr/lib/vlc/video_output/glide.so \
+       mv debian/vlc/usr/lib/vlc/video_output/libglide_plugin.so \
                debian/vlc-plugin-glide/usr/lib/vlc/video_output/
 endif
 
        # Package: qvlc
        mv debian/vlc/usr/bin/qvlc debian/qvlc/usr/bin/
        ln -s vlc debian/qvlc/usr/share/doc/qvlc
-       mv debian/vlc/usr/lib/vlc/gui/qt.so debian/qvlc/usr/lib/vlc/gui/
+       mv debian/vlc/usr/lib/vlc/gui/libqt_plugin.so \
+               debian/qvlc/usr/lib/vlc/gui/
        ln -s vlc.1.gz debian/qvlc/usr/share/man/man1/qvlc.1.gz
        mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/qvlc/$(VIDDIR)/qvlc.xpm
        mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/qvlc/$(PIXDIR)/qvlc.png
 
        # Package: vlc-plugin-mad
        ln -s vlc debian/vlc-plugin-mad/usr/share/doc/vlc-plugin-mad
-       mv debian/vlc/usr/lib/vlc/codec/mad.so \
+       mv debian/vlc/usr/lib/vlc/codec/libmad_plugin.so \
                debian/vlc-plugin-mad/usr/lib/vlc/codec/
 
        # Package: vlc-plugin-arts
        ln -s vlc debian/vlc-plugin-arts/usr/share/doc/vlc-plugin-arts
-       mv debian/vlc/usr/lib/vlc/audio_output/arts.so \
+       mv debian/vlc/usr/lib/vlc/audio_output/libarts_plugin.so \
                debian/vlc-plugin-arts/usr/lib/vlc/audio_output/
 
        # Package: vlc-plugin-lirc
        ln -s vlc debian/vlc-plugin-lirc/usr/share/doc/vlc-plugin-lirc
-       mv debian/vlc/usr/lib/vlc/control/lirc.so \
+       mv debian/vlc/usr/lib/vlc/control/liblirc_plugin.so \
                debian/vlc-plugin-lirc/usr/lib/vlc/control/
 
        # Package: vlc-plugin-aa
        ln -s vlc debian/vlc-plugin-aa/usr/share/doc/vlc-plugin-aa
-       mv debian/vlc/usr/lib/vlc/video_output/aa.so \
+       mv debian/vlc/usr/lib/vlc/video_output/libaa_plugin.so \
                debian/vlc-plugin-aa/usr/lib/vlc/video_output/
 
        # Package: vlc-plugin-xosd
        ln -s vlc debian/vlc-plugin-xosd/usr/share/doc/vlc-plugin-xosd
-       mv debian/vlc/usr/lib/vlc/visualization/xosd.so \
+       mv debian/vlc/usr/lib/vlc/visualization/libxosd_plugin.so \
                debian/vlc-plugin-xosd/usr/lib/vlc/visualization/
 
        # Package: mozilla-plugin-vlc
@@ -173,21 +180,32 @@ endif
        # Package: kvlc
        mv debian/vlc/usr/bin/kvlc debian/kvlc/usr/bin/
        ln -s vlc debian/kvlc/usr/share/doc/kvlc
-       mv debian/vlc/usr/lib/vlc/gui/kde.so debian/kvlc/usr/lib/vlc/gui/
+       mv debian/vlc/usr/lib/vlc/gui/libkde_plugin.so \
+               debian/kvlc/usr/lib/vlc/gui/
        ln -s vlc.1.gz debian/kvlc/usr/share/man/man1/kvlc.1.gz
        mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/kvlc/$(VIDDIR)/kvlc.xpm
        mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/kvlc/$(PIXDIR)/kvlc.png
 
        # Package: vlc-plugin-svgalib
        ln -s vlc debian/vlc-plugin-svgalib/usr/share/doc/vlc-plugin-svgalib
-       mv debian/vlc/usr/lib/vlc/video_output/svgalib.so \
+       mv debian/vlc/usr/lib/vlc/video_output/libsvgalib_plugin.so \
                debian/vlc-plugin-svgalib/usr/lib/vlc/video_output
 
        # Package: vlc-plugin-dv
        ln -s vlc debian/vlc-plugin-dv/usr/share/doc/vlc-plugin-dv
-       mv debian/vlc/usr/lib/vlc/codec/dv.so \
+       mv debian/vlc/usr/lib/vlc/codec/libdv_plugin.so \
                debian/vlc-plugin-dv/usr/lib/vlc/codec
 
+       # Package: vlc-plugin-a52
+       ln -s vlc debian/vlc-plugin-a52/usr/share/doc/vlc-plugin-a52
+       mv debian/vlc/usr/lib/vlc/codec/liba52_plugin.so \
+               debian/vlc-plugin-a52/usr/lib/vlc/codec
+
+       # Package: vlc-plugin-dvb
+       ln -s vlc debian/vlc-plugin-dvb/usr/share/doc/vlc-plugin-dvb
+       mv debian/vlc/usr/lib/vlc/access/libsatellite_plugin.so \
+               debian/vlc-plugin-dvb/usr/lib/vlc/access
+
        # Clean up
        rm -f debian/vlc/$(VIDDIR)/*.png
 
diff --git a/debian/vlc-plugin-dvb.dirs b/debian/vlc-plugin-dvb.dirs
new file mode 100644 (file)
index 0000000..3055424
--- /dev/null
@@ -0,0 +1,2 @@
+usr/lib/vlc/access
+usr/share/doc
index ac1793e..c9f5c07 100644 (file)
@@ -1,5 +1,5 @@
 usr/bin
-usr/lib/vlc/acess
+usr/lib/vlc/access
 usr/lib/vlc/audio_filter
 usr/lib/vlc/audio_mixer
 usr/lib/vlc/audio_output
diff --git a/doc/.cvsignore b/doc/.cvsignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
index 217244f..7353ba5 100644 (file)
@@ -25,12 +25,12 @@ all: manual
 
 manual: manual.txt manual.ps manual.html
 
-manual.tex: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
+manual.tex: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml hacking.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
        $(JADE) -t tex -V %section-autolabel% -d $(PRINT_SS) $(XML_DECL) manual.xml
        perl -i.bak -pe 's/\000//g' $@ && rm $*.tex.bak
 # No it's not a joke
 
-manual.html: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
+manual.html: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml hacking.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
        $(JADE) -t sgml -V %section-autolabel% -V nochunks \
          -d $(HTML_SS) $(XML_DECL) manual.xml > $@
 
@@ -42,7 +42,7 @@ manual.dvi: manual.tex modules.eps ps.eps stream.eps ts.eps
 manual.ps: manual.dvi
        dvips -f $< > $@
 
-manual.txt: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
+manual.txt: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml hacking.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
        $(JADE) -t sgml -V nochunks -d $(HTML_SS) $(XML_DECL) manual.xml > dump.html
        lynx -force_html -dump dump.html > $@
        -rm -f dump.html
diff --git a/doc/developer/hacking.xml b/doc/developer/hacking.xml
new file mode 100644 (file)
index 0000000..8116af5
--- /dev/null
@@ -0,0 +1,247 @@
+<chapter> <title> VLC Overview </title>
+
+  <sect1> <title> LibVLC </title>
+
+    <para> LibVLC is the core part of VLC. It is a library providing an
+    interface for programs such as VLC to a lot of functionalities such as
+    stream access, audio and video output, plugin handling, a thread system.
+    All the LibVLC source files are located in the <filename>src/</filename>
+    directory and its subdirectories: </para>
+
+    <itemizedlist>
+
+      <listitem> <para> <filename>interface/</filename>: contains code for
+      user interaction such as key presses and device ejection. </para>
+      </listitem>
+
+      <listitem> <para> <filename>playlist/</filename>: manages playlist
+      interaction such as stop, play, next, or random playback. </para>
+      </listitem>
+
+      <listitem> <para> <filename>input/</filename>: opens an input module,
+      reads packets, parses them and passes reconstituted elementary streams
+      to the decoder(s). </para> </listitem>
+
+      <listitem> <para> <filename>video_output/</filename>: initializes the
+      video display, gets all pictures and subpictures (ie. subtitles) from
+      the decoder(s), optionally converts them to another format (such as YUV
+      to RGB), and displays them. </para></listitem>
+
+      <listitem> <para> <filename>audio_output/</filename>: initializes the
+      audio mixer, ie. finds the right playing frequency, and then resamples
+      audio frames received from the decoder(s). </para> </listitem>
+
+      <listitem> <para> <filename>stream_output/</filename>: TODO </para>
+      </listitem>
+
+      <listitem> <para> <filename>misc/</filename>: miscellaneous utilities
+      used in other parts of libvlc, such as the thread system, the message
+      queue, CPU detection, the object lookup system, or platform-specific
+      code. </para> </listitem>
+
+    </itemizedlist>
+
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="modules.eps" format="EPS" scalefit="1" scale="80"/>
+      </imageobject>
+      <imageobject>
+        <imagedata fileref="modules.gif" format="GIF" />
+      </imageobject>
+      <textobject>
+        <phrase> Data flow between modules </phrase>
+      </textobject>
+    </mediaobject>
+
+  </sect1>
+
+  <sect1> <title> VLC </title>
+
+    <para> VLC is a simple program written around LibVLC. It is very small,
+    but is a fully featured multimedia player thanks to LibVLC's support for
+    dynamic modules. </para>
+
+  </sect1>
+
+  <sect1> <title> Modules </title>
+
+    <para> Modules are located in the <filename>modules/</filename>
+    subdirectory and are loaded at runtime. Every module may offer different
+    features that will best suit a particular file or a particular
+    environment. Besides, most portability works result in the writing of an
+    audio_output/video_output/interface module to support a new platform (eg.
+    BeOS or MacOS X). </para>
+
+    <para> Plugin modules are loaded and unloaded dynamically
+    by functions in <filename>src/misc/modules.c</filename> and
+    <filename>include/modules*.h</filename>. The API for writing modules will
+    be discussed in a following chapter. </para>
+
+    <para> Modules can also be built directly into the application which uses
+    LibVLC, for instance on an operating system that does not have support for
+    dynamically loadable code. Modules statically built into the application
+    are called builtins. </para>
+
+  </sect1>
+
+  <sect1> <title> Threads </title>
+
+    <sect2> <title> Thread management </title>
+
+    <para> VLC is heavily multi-threaded. We chose against a single-thread
+    approach because decoder preemptibility and scheduling would be a
+    mastermind (for instance decoders and outputs have to be separated,
+    otherwise it cannot be warrantied that a frame will be played at the
+    exact presentation time), and we currently have no plan to support a
+    single-threaded client. Multi-process decoders usually imply more overhead
+    (problems of shared memory) and communication between processes is harder.
+    </para>
+
+    <para> Our threading structure is modeled on pthreads.
+    However, for portability reasons, we don't call
+    <function>pthread_*</function> functions directly, but use a
+    similar wrapper, made of <function>vlc_thread_create</function>,
+    <function>vlc_thread_exit</function>,
+    <function>vlc_thread_join</function>,
+    <function>vlc_mutex_init</function>, <function>vlc_mutex_lock</function>,
+    <function>vlc_mutex_unlock</function>,
+    <function>vlc_mutex_destroy</function>,
+    <function>vlc_cond_init</function>, <function>vlc_cond_signal</function>,
+    <function>vlc_cond_broadcast</function>,
+    <function>vlc_cond_wait</function>, <function>vlc_cond_destroy</function>,
+    and structures <type>vlc_thread_t</type>, <type>vlc_mutex_t</type>, and
+    <type>vlc_cond_t</type>. </para>
+
+    </sect2>
+
+    <sect2> <title> Synchronization </title>
+
+    <para> Another key feature of VLC is that decoding and playing are
+    asynchronous: decoding is done by a decoder thread, playing is done by
+    audio_output or video_output thread. The design goal is to ensure that
+    an audio or video frame is played exactly at the right time, without
+    blocking any of the decoder threads. This leads to a complex communication
+    structure between the interface, the input, the decoders and the outputs.
+    </para>
+
+    <para> Having several input and video_output threads reading multiple
+    files at the same time is permitted, despite the fact that the current
+    interface doesn't allow any way to do it [this is subject to change in the
+    near future]. Anyway the client has been written from the ground up with
+    this in mind. This also implies that a non-reentrant library (including in
+    particular liba52) cannot be used without using a global lock. </para>
+
+    <para> Presentation Time Stamps located in the system layer of the
+    stream are passed to the decoders, and all resulting samples are dated
+    accordingly. The output layers are supposed to play them at the right
+    time. Dates are converted to microseconds ; an absolute date is the number
+    of microseconds since Epoch (Jan 1st, 1970). The <type>mtime_t</type> type
+    is a signed 64-bit integer. </para>
+
+    <para> The current date can be retrieved with
+    <function>mdate()</function>. The execution of a thread can be suspended
+    until a certain <parameter>date</parameter> via <function>mwait</function>
+    <parameter>( mtime_t date )</parameter>. You can sleep for a fixed number
+    of microseconds with <function>msleep</function> <parameter>( mtime_t
+    delay )</parameter>. </para>
+
+    <warning> <para> Please remember to wake up slightly
+    <emphasis>before</emphasis> the presentation date, if some particular
+    treatment needs to be done (e.g. a chroma transformation). For instance
+    in <filename>modules/codec/mpeg_video/synchro.c</filename>, track of the
+    average decoding times is kept to ensure pictures are not decoded too
+    late. </para> </warning>
+
+    </sect2>
+
+  </sect1>
+
+  <sect1> <title> Code conventions </title>
+
+    <sect2> <title> Function naming </title>
+
+      <para>
+All functions are named accordingly : module name (in lower case) + _ +
+function name (in mixed case, <emphasis> without underscores</emphasis>).
+For instance : <function>intf_FooFunction</function>. Static functions
+don't need usage of the module name.
+      </para>
+
+    </sect2>
+
+    <sect2> <title> Variable naming </title>
+
+      <para>
+Hungarian notations are used, that means we have the following prefixes :
+      </para>
+
+      <itemizedlist>
+        <listitem> <para> i_ for integers (sometimes l_ for long integers) ;
+        </para> </listitem>
+        <listitem> <para> b_ for booleans ; </para> </listitem>
+        <listitem> <para> d_ for doubles (sometimes f_ for floats) ;
+        </para> </listitem>
+        <listitem> <para> pf_ for function pointers ; </para> </listitem>
+        <listitem> <para> psz_ for a Pointer to a String terminated by a
+        Zero (C-string) ;
+        </para> </listitem>
+        <listitem> <para> More generally, we add a p when the variable is
+        a pointer to a type. </para> </listitem>
+      </itemizedlist>
+
+      <para>
+If one variable has no basic type (for instance a complex structure), don't
+put any prefix (except p_* if it's a pointer). After one prefix, put
+an <emphasis> explicit </emphasis> variable name <emphasis> in lower
+case</emphasis>. If several words are required, join them with an
+underscore (no mixed case). Examples :
+      </para>
+
+      <itemizedlist>
+        <listitem> <para>
+        <type> data_packet_t * </type> <varname> p_buffer; </varname>
+        </para> </listitem> <listitem> <para>
+        <type> char </type> <varname> psz_msg_date[42]; </varname>
+        </para> </listitem> <listitem> <para>
+        <type> int </type> <varname> pi_es_refcount[MAX_ES]; </varname>
+        </para> </listitem> <listitem> <para>
+        <type> void </type> <varname> (* pf_next_data_packet)( int * ); </varname>
+        </para> </listitem>
+      </itemizedlist>
+
+    </sect2>
+
+    <sect2> <title> A few words about white spaces </title>
+
+      <para>
+First, never use tabs in the source (you're entitled to use them in the
+Makefile :-). Use <command> set expandtab </command> under <application>
+vim </application> or the equivalent under <application>
+emacs</application>. Indents are 4 spaces long.
+      </para>
+
+      <para>
+Second, put spaces <emphasis> before and after </emphasis> operators, and
+inside brackets. For instance :
+<programlisting> for( i = 0; i &lt; 12; i++, j += 42 ); </programlisting>
+      </para>
+
+      <para>
+Third, leave braces alone on their lines (GNU style). For instance :
+        <programlisting>
+if( i_es == 42 )
+{
+    p_buffer[0] = 0x12;
+}
+        </programlisting>
+      </para>
+
+      <para>
+We write C, so use C-style comments /* ... */.
+      </para>
+
+    </sect2>
+
+  </sect1>
+
+</chapter>
index 0783051..5aea429 100644 (file)
@@ -4,6 +4,7 @@
 [
     <!ENTITY glossary SYSTEM "glossary.xml">
     <!ENTITY overview SYSTEM "overview.xml">
+    <!ENTITY hacking SYSTEM "hacking.xml">
     <!ENTITY interface SYSTEM "interface.xml">
     <!ENTITY input SYSTEM "input.xml">
     <!ENTITY decoders SYSTEM "decoders.xml">
@@ -57,7 +58,7 @@
       <orgname> VideoLAN project </orgname>
     </affiliation>
   </collab>
-  <pubdate> $Id: manual.xml,v 1.3 2002/08/29 23:53:22 massiot Exp $ </pubdate>
+  <pubdate> $Id: manual.xml,v 1.4 2002/09/30 11:05:33 sam Exp $ </pubdate>
   <copyright> <year> 2001 </year>
               <holder> Christophe Massiot, for IDEALX S.A.S. </holder>
   </copyright>
 
 &overview;
 
+<!-- ============================ HACKING =============================
+  -->
+
+&hacking;
+
 <!-- =========================== INTERFACE ============================
   -->
 
index 562e99a..8116af5 100644 (file)
@@ -1,36 +1,46 @@
 <chapter> <title> VLC Overview </title>
 
-  <sect1> <title> Code modules </title>
+  <sect1> <title> LibVLC </title>
+
+    <para> LibVLC is the core part of VLC. It is a library providing an
+    interface for programs such as VLC to a lot of functionalities such as
+    stream access, audio and video output, plugin handling, a thread system.
+    All the LibVLC source files are located in the <filename>src/</filename>
+    directory and its subdirectories: </para>
 
-    <para>
-The VLC code uses modules and plugins. A module is a group of compiled-in
-C source files. They are linked against the main application at build time.
-At present, these modules are :
-    </para>
-  
     <itemizedlist>
-      <listitem> <para> Interface : this is the entry point of the program. It manages
-    all user interactions and thread spawning. </para> </listitem>
-      <listitem> <para> Input : it opens the input socket, reads packets, parses
-    them and passes reconstituted elementary streams to the decoder(s).
-      </para> </listitem>
-      <listitem> <para> Video output : it initializes the video display. Then it
-    gets all pictures and subpictures (ie. subtitles) from the decoder(s),
-    optionally converts them to RGB format (from YUV), and displays them.
-      </para> </listitem>
-      <listitem> <para> Audio output : it initializes the audio mixer, ie.
-    finds the right playing frequency, and then resamples audio frames
-    received from the decoder(s). </para> </listitem>
-      <listitem> <para> Misc : miscellaneous utilities used in other modules.
-    This is the only module that will never launch a thread.
-      </para> </listitem>
-      <listitem> <para> ac3_decoder, audio_decoder, generic_decoder, lpcm_decoder,
-    spu_decoder, video_decoder, video_parser : decoders used by VLC to
-    decode different kinds of elementary stream data. [these are subject
-    to move to <filename> plugins/ </filename> in a forthcoming
-    version]</para> </listitem>
+
+      <listitem> <para> <filename>interface/</filename>: contains code for
+      user interaction such as key presses and device ejection. </para>
+      </listitem>
+
+      <listitem> <para> <filename>playlist/</filename>: manages playlist
+      interaction such as stop, play, next, or random playback. </para>
+      </listitem>
+
+      <listitem> <para> <filename>input/</filename>: opens an input module,
+      reads packets, parses them and passes reconstituted elementary streams
+      to the decoder(s). </para> </listitem>
+
+      <listitem> <para> <filename>video_output/</filename>: initializes the
+      video display, gets all pictures and subpictures (ie. subtitles) from
+      the decoder(s), optionally converts them to another format (such as YUV
+      to RGB), and displays them. </para></listitem>
+
+      <listitem> <para> <filename>audio_output/</filename>: initializes the
+      audio mixer, ie. finds the right playing frequency, and then resamples
+      audio frames received from the decoder(s). </para> </listitem>
+
+      <listitem> <para> <filename>stream_output/</filename>: TODO </para>
+      </listitem>
+
+      <listitem> <para> <filename>misc/</filename>: miscellaneous utilities
+      used in other parts of libvlc, such as the thread system, the message
+      queue, CPU detection, the object lookup system, or platform-specific
+      code. </para> </listitem>
+
     </itemizedlist>
+
     <mediaobject>
       <imageobject>
         <imagedata fileref="modules.eps" format="EPS" scalefit="1" scale="80"/>
@@ -45,29 +55,32 @@ At present, these modules are :
 
   </sect1>
 
-  <sect1> <title> Plug-ins </title>
+  <sect1> <title> VLC </title>
 
-    <para>
-Plugins are located in the <filename> plugins/ </filename> subdirectory
-and are loaded at runtime. Every plug-in
-may offer different features that will best suit a particular file or
-a particular environment. Besides, most portability works result in the writing
-of an audio_output/video_output/interface plug-in to support a new
-platform (eg. BeOS or MacOS X).
-    </para>
+    <para> VLC is a simple program written around LibVLC. It is very small,
+    but is a fully featured multimedia player thanks to LibVLC's support for
+    dynamic modules. </para>
 
-    <para>
-Plug-ins are loaded and unloaded dynamically by functions in
-<filename> src/misc/modules.c </filename> and <filename> include/modules*.h
-</filename>. The API for writing plugins will be discussed in a
-following chapter.
-    </para>
+  </sect1>
 
-    <para>
-Plugins can also be built into the VLC main application by changing the
-<parameter> BUILTINS </parameter> line in <filename>
-Makefile.opts</filename>.
-    </para>
+  <sect1> <title> Modules </title>
+
+    <para> Modules are located in the <filename>modules/</filename>
+    subdirectory and are loaded at runtime. Every module may offer different
+    features that will best suit a particular file or a particular
+    environment. Besides, most portability works result in the writing of an
+    audio_output/video_output/interface module to support a new platform (eg.
+    BeOS or MacOS X). </para>
+
+    <para> Plugin modules are loaded and unloaded dynamically
+    by functions in <filename>src/misc/modules.c</filename> and
+    <filename>include/modules*.h</filename>. The API for writing modules will
+    be discussed in a following chapter. </para>
+
+    <para> Modules can also be built directly into the application which uses
+    LibVLC, for instance on an operating system that does not have support for
+    dynamically loadable code. Modules statically built into the application
+    are called builtins. </para>
 
   </sect1>
 
@@ -75,76 +88,69 @@ Makefile.opts</filename>.
 
     <sect2> <title> Thread management </title>
 
-    <para>
-VLC is heavily multi-threaded. We chose against a single-thread approach
-because decoder preemptibility and scheduling would be a mastermind (for
-instance decoders and outputs have to be separated, otherwise it cannot
-be warrantied that a frame will be played at the exact presentation
-time), and
-we currently have no plan to support a single-threaded client.
-Multi-process decoders usually imply more overhead (problems of shared
-memory) and communication between processes is harder.
+    <para> VLC is heavily multi-threaded. We chose against a single-thread
+    approach because decoder preemptibility and scheduling would be a
+    mastermind (for instance decoders and outputs have to be separated,
+    otherwise it cannot be warrantied that a frame will be played at the
+    exact presentation time), and we currently have no plan to support a
+    single-threaded client. Multi-process decoders usually imply more overhead
+    (problems of shared memory) and communication between processes is harder.
     </para>
 
-    <para>
-Our threading structure is modeled on pthreads. However, for portability
-reasons, we don't call <function>pthread_*</function> functions
-directly, but use a similar wrapper, made of <function> vlc_thread_create,
-vlc_thread_exit, vlc_thread_join, vlc_mutex_init, vlc_mutex_lock,
-vlc_mutex_unlock, vlc_mutex_destroy, vlc_cond_init, vlc_cond_signal,
-vlc_cond_broadcast,
-vlc_cond_wait, vlc_cond_destroy</function>, and structures <type>
-vlc_thread_t, vlc_mutex_t, and vlc_cond_t</type>.
-    </para>
+    <para> Our threading structure is modeled on pthreads.
+    However, for portability reasons, we don't call
+    <function>pthread_*</function> functions directly, but use a
+    similar wrapper, made of <function>vlc_thread_create</function>,
+    <function>vlc_thread_exit</function>,
+    <function>vlc_thread_join</function>,
+    <function>vlc_mutex_init</function>, <function>vlc_mutex_lock</function>,
+    <function>vlc_mutex_unlock</function>,
+    <function>vlc_mutex_destroy</function>,
+    <function>vlc_cond_init</function>, <function>vlc_cond_signal</function>,
+    <function>vlc_cond_broadcast</function>,
+    <function>vlc_cond_wait</function>, <function>vlc_cond_destroy</function>,
+    and structures <type>vlc_thread_t</type>, <type>vlc_mutex_t</type>, and
+    <type>vlc_cond_t</type>. </para>
 
     </sect2>
 
     <sect2> <title> Synchronization </title>
 
-    <para>
-Another key feature of VLC is that decoding and playing are asynchronous :
-decoding is done by a *_decoder thread, playing is done by audio_output
-or video_output thread. The design goal is to ensure that an audio or
-video frame is played exactly at the right time, without blocking any
-of the decoder threads. This leads to a complex communication structure
-between the interface, the input, the decoders and the outputs.
-    </para>
-
-    <para>
-Having several input and video_output threads reading multiple files at
-the same time is permitted, despite the fact that the current interface
-doesn't allow any way to do it [this is subject to change in the near
-future]. Anyway the client has been written from the ground up
-with this in mind. This also implies that a non-reentrant
-library (including in particular LiViD's libac3) cannot be used.
-    </para>
-
-    <para>
-Presentation Time Stamps located in the system layer of the stream are
-passed to the decoders, and all resulting samples are dated accordingly.
-The output layers are supposed to play them at the right time. Dates are
-converted to microseconds ; an absolute date is the number of microseconds
-since Epoch (Jan 1st 1970). The <type> mtime_t </type> type is a signed
-64-bit integer.
-    </para>
-
-    <para>
-The current date can be retrieved with <function> mdate()</function>.
-Te execution of a thread can be suspended until a certain <parameter>
-date </parameter> via <function> mwait </function> <parameter>
-( mtime_t date )</parameter>. You can sleep for a fixed number of
-microseconds with <function> msleep </function> <parameter>
-( mtime_t delay )</parameter>.
+    <para> Another key feature of VLC is that decoding and playing are
+    asynchronous: decoding is done by a decoder thread, playing is done by
+    audio_output or video_output thread. The design goal is to ensure that
+    an audio or video frame is played exactly at the right time, without
+    blocking any of the decoder threads. This leads to a complex communication
+    structure between the interface, the input, the decoders and the outputs.
     </para>
 
-    <warning> <para>
-      Please remember to wake up a little while <emphasis> before
-      </emphasis> the presentation date, if some particular treatment
-      needs to be done (e.g. a YUV transform). For instance in <filename>
-      src/video_parser/vpar_synchro.c</filename>, track of the average
-      decoding times is kept to ensure pictures are not decoded too
-      late.
-    </para> </warning>
+    <para> Having several input and video_output threads reading multiple
+    files at the same time is permitted, despite the fact that the current
+    interface doesn't allow any way to do it [this is subject to change in the
+    near future]. Anyway the client has been written from the ground up with
+    this in mind. This also implies that a non-reentrant library (including in
+    particular liba52) cannot be used without using a global lock. </para>
+
+    <para> Presentation Time Stamps located in the system layer of the
+    stream are passed to the decoders, and all resulting samples are dated
+    accordingly. The output layers are supposed to play them at the right
+    time. Dates are converted to microseconds ; an absolute date is the number
+    of microseconds since Epoch (Jan 1st, 1970). The <type>mtime_t</type> type
+    is a signed 64-bit integer. </para>
+
+    <para> The current date can be retrieved with
+    <function>mdate()</function>. The execution of a thread can be suspended
+    until a certain <parameter>date</parameter> via <function>mwait</function>
+    <parameter>( mtime_t date )</parameter>. You can sleep for a fixed number
+    of microseconds with <function>msleep</function> <parameter>( mtime_t
+    delay )</parameter>. </para>
+
+    <warning> <para> Please remember to wake up slightly
+    <emphasis>before</emphasis> the presentation date, if some particular
+    treatment needs to be done (e.g. a chroma transformation). For instance
+    in <filename>modules/codec/mpeg_video/synchro.c</filename>, track of the
+    average decoding times is kept to ensure pictures are not decoded too
+    late. </para> </warning>
 
     </sect2>
 
index 53351ba..fe67139 100644 (file)
@@ -241,3 +241,83 @@ the Boston strangler is to the woman home alone.
 
   -- #videolan
 %
+<Dnumgis> what does vout_CreatePicture do?
+<sam> asks for a picture to the video output thread
+<Dnumgis> so it just returns the next picture to be displayed?
+<sam> not necessarily the next
+<sam> it's your duty to set its display date, afterwards
+<Meuuh> I'd even say, it is your destiny, Luke, to set its display date
+
+  -- #videolan
+%
+<hh> When the first picture of the coded frame is a I-field picture, then the
+     second picture of the frame shall be either an I-field picture or a
+     P-field picture. If the second picture is a P-field picture then certain
+     restrictions apply, see 7.6.3.5.
+<Meuuh> yeah
+<Dnumgis> Meuuh: not sure if you sound more like an mpeg guru or a blues
+          artist
+<Meuuh> like a cow, maybe ?
+<Dnumgis> or something
+
+  -- #videolan
+%
+<deepmind> a52old & wi11y?
+
+  -- #videolan
+%
+<sam> bah oui tu peux faire de la doc sur n'importe quoi hein
+<Meuuh> je fais bien une doc développeur vlc
+<Meuuh> comme si y'avait des développeurs vlc à part sam et moi !
+
+  -- #videolan
+%
+<deepmind> pis comme ca je me tiens au courant de où va vlc :)
+<Meuuh> dans le mur ?
+<Meuuh> y'a sam qui rajoute du charbon, moi je m'agrippe au frein
+
+  -- #videolan
+%
+<tooney> $grut Dnumgis 
+<gally> Dnumgis: tiår ditt og nødhavn klikk ?
+<Dnumgis> gally: og hva skulle det bety?
+<Dnumgis> gally: what was that supposed to mean?
+
+  -- #videolan
+%
+<sam> $grut
+<gally> vekt yrer gøten øke utgjøre kan 
+<Dnumgis> sam: you're insane
+<Dnumgis> someone have too much spare time
+<sam> definitely
+<Dnumgis> maybe they should do something useful instead
+<gally> grunt grunt snort grumpf grumpf gra grunt uiigrumpf uiihiiii snort !!
+
+  -- #videolan
+%
+<Meuuh> mais putain de bordel de chiottes de bite à cul de merde de sa race
+<Dnumgis> I think it may be a good thing that i don't understand that
+          sentence fully
+
+  -- #videolan
+%
+<Dnumgis> I just burned an amb duron trying to compile vlc :(
+<Meuuh> is it my fault ?
+<Dnumgis> no
+<Dnumgis> unless you wrote blocks.c :)
+<Meuuh> actually, I did...
+
+  -- #videolan
+%
+<Meuuh> pleasehelp : are you trying with a dolby trailer ?
+<pleasehelp> no... using windows
+
+  -- #videolan
+%
+<henrisson> hal_3k: don't worry, I'll soon be replaced by a lib
+<hal_3k> henri: you'll be replaced by a lib? does the lib know how to
+         program? ;)
+<Meuuh> do you think henri knows ? :p
+
+  -- #videolan
+%
index 77e67f5..6a769ee 100644 (file)
--- a/doc/vlc.1
+++ b/doc/vlc.1
 .\" .sp <n>    insert n+1 empty lines
 .\" for manpage-specific macros, see man(7)
 .SH NAME
-vlc, gvlc, gnome-vlc, qvlc \- The VideoLAN Client
+vlc, gvlc, gnome-vlc, kvlc, qvlc \- The VideoLAN Client
 .SH SYNOPSIS
 .B vlc
 .RI [ OPTIONS ]
-.RI [ PARAMETERS ]
 .RI [ ITEMS ]...
 .SH DESCRIPTION
 This manual page documents briefly the
diff --git a/extras/GNUgetopt/.cvsignore b/extras/GNUgetopt/.cvsignore
new file mode 100644 (file)
index 0000000..39a0668
--- /dev/null
@@ -0,0 +1 @@
+.deps
index 431f142..e5bd723 100644 (file)
@@ -2,7 +2,7 @@
  * modules_inner.h : Macros used from within a module.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_inner.h,v 1.31 2002/08/21 17:31:58 sam Exp $
+ * $Id: modules_inner.h,v 1.32 2002/09/30 11:05:33 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -26,7 +26,6 @@
  *****************************************************************************/
 #if !defined( __PLUGIN__ ) && !defined( __BUILTIN__ )
 #   define MODULE_NAME main
-#   define MODULE_PATH main
 #endif
 
 /*****************************************************************************
@@ -54,8 +53,8 @@
 /* If the module is built-in, then we need to define foo_InitModule instead
  * of InitModule. Same for Activate- and DeactivateModule. */
 #if defined( __BUILTIN__ )
-#   define E_( function )          CONCATENATE( function, MODULE_PATH )
-#   define __VLC_SYMBOL( symbol )  CONCATENATE( symbol, MODULE_PATH )
+#   define E_( function )          CONCATENATE( function, MODULE_NAME )
+#   define __VLC_SYMBOL( symbol )  CONCATENATE( symbol, MODULE_NAME )
 #   define DECLARE_SYMBOLS         struct _u_n_u_s_e_d_
 #   define STORE_SYMBOLS           struct _u_n_u_s_e_d_
 #elif defined( __PLUGIN__ )
 #define linked_with_a_crap_library_which_uses_atexit( )                       \
     p_module->b_unloadable = VLC_FALSE
 
-/*
- * module_activate: this function is called before functions can be accessed,
- * we do allocation tasks here, and maybe additional stuff such as large
- * table allocation. Once ActivateModule is called we are almost sure the
- * module will be used.
- */
-#define module_activate( prototype )                                          \
-    __module_activate( prototype );                                           \
-    int __VLC_SYMBOL( module_activate ) ( module_t *p_module )                \
-    {                                                                         \
-        STORE_SYMBOLS;                                                        \
-        config_SetCallbacks( p_module->p_config, p_config );                  \
-        return __module_activate( p_module );                                 \
-    }                                                                         \
-                                                                              \
-    static int __module_activate( prototype )
-
-/*
- * DeactivateModule: this function is called after we are finished with the
- * module. Everything that has been done in ActivateModule needs to be undone
- * here.
- */
-#define module_deactivate( prototype )                                        \
-    __module_deactivate( prototype );                                         \
-    int __VLC_SYMBOL( module_deactivate )( module_t *p_module )               \
-    {                                                                         \
-        int i_ret = __module_deactivate( p_module );                          \
-        config_UnsetCallbacks( p_module->p_config );                          \
-        return i_ret;                                                         \
-    }                                                                         \
-                                                                              \
-    static int __module_deactivate( prototype )
-
index d38c27f..5368018 100644 (file)
 
 /* Optimization level, from 0 to 2 - 1 is generally a good compromise. Remember
  * that raising this level dramatically lengthens the compilation time. */
-#if defined( HAVE_RELEASE ) || defined( __pentiumpro__ )
+#if defined( HAVE_RELEASE )
 #   define VPAR_OPTIM_LEVEL             2
 #else
 #   define VPAR_OPTIM_LEVEL             1
diff --git a/include/vlc_symbols.h b/include/vlc_symbols.h
deleted file mode 100644 (file)
index a7e9b08..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-/* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */
-
-struct module_symbols_t
-{
-    aout_buffer_t * (* aout_DecNewBuffer_inner) ( aout_instance_t *, aout_input_t *, size_t ) ;
-    aout_buffer_t * (* aout_FifoPop_inner) ( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) ;
-    aout_buffer_t * (* aout_OutputNextBuffer_inner) ( aout_instance_t *, mtime_t, vlc_bool_t ) ;
-    aout_input_t * (* __aout_DecNew_inner) ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) ;
-    aout_instance_t * (* __aout_New_inner) ( vlc_object_t * ) ;
-    char * (* __config_GetPsz_inner) (vlc_object_t *, const char *) ;
-    char * (* config_GetHomeDir_inner) ( void ) ;
-    char * (* input_OffsetToTime_inner) ( input_thread_t *, char *, off_t ) ;
-    char * (* mstrtime_inner) ( char *psz_buffer, mtime_t date ) ;
-    const char * (* DecodeLanguage_inner) ( u16 ) ;
-    const iso639_lang_t * (* GetLang_1_inner) ( const char * ) ;
-    const iso639_lang_t * (* GetLang_2B_inner) ( const char * ) ;
-    const iso639_lang_t * (* GetLang_2T_inner) ( const char * ) ;
-    data_buffer_t * (* input_NewBuffer_inner) ( input_buffers_t *, size_t ) ;
-    data_packet_t * (* input_NewPacket_inner) ( input_buffers_t *, size_t ) ;
-    data_packet_t * (* input_ShareBuffer_inner) ( input_buffers_t *, data_buffer_t * ) ;
-    es_descriptor_t * (* input_AddES_inner) ( input_thread_t *, pgrm_descriptor_t *, u16, size_t ) ;
-    es_descriptor_t * (* input_FindES_inner) ( input_thread_t *, u16 ) ;
-    float (* __config_GetFloat_inner) (vlc_object_t *, const char *) ;
-    input_area_t * (* input_AddArea_inner) ( input_thread_t * ) ;
-    input_info_category_t * (* input_InfoCategory_inner) ( input_thread_t *, char * ) ;
-    int (* __config_GetInt_inner) (vlc_object_t *, const char *) ;
-    int (* __config_LoadCmdLine_inner) ( vlc_object_t *, int *, char *[], vlc_bool_t ) ;
-    int (* __config_LoadConfigFile_inner) ( vlc_object_t *, const char * ) ;
-    int (* __config_SaveConfigFile_inner) ( vlc_object_t *, const char * ) ;
-    int (* __intf_Eject_inner) ( vlc_object_t *, const char * ) ;
-    int (* __network_ChannelCreate_inner) ( vlc_object_t * ) ;
-    int (* __network_ChannelJoin_inner) ( vlc_object_t *, int ) ;
-    int (* __vlc_cond_destroy_inner) ( char *, int, vlc_cond_t * ) ;
-    int (* __vlc_cond_init_inner) ( vlc_object_t *, vlc_cond_t * ) ;
-    int (* __vlc_mutex_destroy_inner) ( char *, int, vlc_mutex_t * ) ;
-    int (* __vlc_mutex_init_inner) ( vlc_object_t *, vlc_mutex_t * ) ;
-    int (* __vlc_thread_create_inner) ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), int, vlc_bool_t ) ;
-    int (* __vlc_threads_end_inner) ( vlc_object_t * ) ;
-    int (* __vlc_threads_init_inner) ( vlc_object_t * ) ;
-    int (* aout_DecDelete_inner) ( aout_instance_t *, aout_input_t * ) ;
-    int (* aout_DecPlay_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
-    int (* aout_FormatNbChannels_inner) ( audio_sample_format_t * p_format ) ;
-    int (* aout_Restart_inner) ( aout_instance_t * p_aout ) ;
-    int (* aout_VolumeDown_inner) ( aout_instance_t *, int, audio_volume_t * ) ;
-    int (* aout_VolumeGet_inner) ( aout_instance_t *, audio_volume_t * ) ;
-    int (* aout_VolumeInfos_inner) ( aout_instance_t *, audio_volume_t * ) ;
-    int (* aout_VolumeSet_inner) ( aout_instance_t *, audio_volume_t ) ;
-    int (* aout_VolumeUp_inner) ( aout_instance_t *, int, audio_volume_t * ) ;
-    int (* input_AccessInit_inner) ( input_thread_t * ) ;
-    int (* input_AddInfo_inner) ( input_info_category_t *, char *, char *, ... ) ;
-    int (* input_ChangeArea_inner) ( input_thread_t *, input_area_t * ) ;
-    int (* input_ChangeProgram_inner) ( input_thread_t *, u16 ) ;
-    int (* input_ClockManageControl_inner) ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ;
-    int (* input_InitStream_inner) ( input_thread_t *, size_t ) ;
-    int (* input_SelectES_inner) ( input_thread_t *, es_descriptor_t * ) ;
-    int (* input_SetProgram_inner) ( input_thread_t *, pgrm_descriptor_t * ) ;
-    int (* input_ToggleES_inner) ( input_thread_t *, es_descriptor_t *, vlc_bool_t ) ;
-    int (* input_UnselectES_inner) ( input_thread_t *, es_descriptor_t * ) ;
-    int (* playlist_Add_inner) ( playlist_t *, const char *, int, int ) ;
-    int (* playlist_Delete_inner) ( playlist_t *, int ) ;
-    int (* vout_ChromaCmp_inner) ( u32, u32 ) ;
-    intf_thread_t * (* __intf_Create_inner) ( vlc_object_t * ) ;
-    module_config_t * (* config_FindConfig_inner) ( vlc_object_t *, const char *psz_name ) ;
-    module_t * (* __module_Need_inner) ( vlc_object_t *, const char *, const char * ) ;
-    msg_subscription_t* (* __msg_Subscribe_inner) ( vlc_object_t * ) ;
-    mtime_t (* aout_DateGet_inner) ( const audio_date_t * ) ;
-    mtime_t (* aout_DateIncrement_inner) ( audio_date_t *, u32 ) ;
-    mtime_t (* input_ClockGetTS_inner) ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ;
-    mtime_t (* mdate_inner) ( void ) ;
-    pes_packet_t * (* input_NewPES_inner) ( input_buffers_t * ) ;
-    pgrm_descriptor_t * (* input_AddProgram_inner) ( input_thread_t *, u16, size_t ) ;
-    pgrm_descriptor_t * (* input_FindProgram_inner) ( input_thread_t *, u16 ) ;
-    picture_t * (* vout_CreatePicture_inner) ( vout_thread_t *, vlc_bool_t, vlc_bool_t, vlc_bool_t ) ;
-    sout_instance_t * (* __sout_NewInstance_inner) ( vlc_object_t *, char * ) ;
-    ssize_t (* input_FDNetworkRead_inner) ( input_thread_t *, byte_t *, size_t ) ;
-    ssize_t (* input_FDRead_inner) ( input_thread_t *, byte_t *, size_t ) ;
-    ssize_t (* input_FillBuffer_inner) ( input_thread_t * ) ;
-    ssize_t (* input_Peek_inner) ( input_thread_t *, byte_t **, size_t ) ;
-    ssize_t (* input_SplitBuffer_inner) ( input_thread_t *, data_packet_t **, size_t ) ;
-    subpicture_t * (* vout_CreateSubPicture_inner) ( vout_thread_t *, int, int ) ;
-    u32 (* UnalignedGetBits_inner) ( bit_stream_t *, unsigned int ) ;
-    u32 (* UnalignedShowBits_inner) ( bit_stream_t *, unsigned int ) ;
-    vlc_bool_t (* NextDataPacket_inner) ( decoder_fifo_t *, data_packet_t ** ) ;
-    vlc_error_t (* intf_RunThread_inner) ( intf_thread_t * ) ;
-    vlc_list_t * (* __vlc_list_find_inner) ( vlc_object_t *, int, int ) ;
-    void (* BitstreamNextDataPacket_inner) ( bit_stream_t * ) ;
-    void (* CurrentPTS_inner) ( bit_stream_t *, mtime_t *, mtime_t * ) ;
-    void (* DecoderError_inner) ( decoder_fifo_t * p_fifo ) ;
-    void (* InitBitstream_inner) ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) ;
-    void (* NextPTS_inner) ( bit_stream_t *, mtime_t *, mtime_t * ) ;
-    void (* UnalignedRemoveBits_inner) ( bit_stream_t * ) ;
-    void (* __config_PutFloat_inner) (vlc_object_t *, const char *, float) ;
-    void (* __config_PutInt_inner) (vlc_object_t *, const char *, int) ;
-    void (* __config_PutPsz_inner) (vlc_object_t *, const char *, const char *) ;
-    void (* __input_FDClose_inner) ( vlc_object_t * ) ;
-    void (* __input_FDNetworkClose_inner) ( vlc_object_t * ) ;
-    void (* __input_Seek_inner) ( vlc_object_t *, off_t, int ) ;
-    void (* __input_SetStatus_inner) ( vlc_object_t *, int ) ;
-    void (* __input_Tell_inner) ( vlc_object_t *, stream_position_t * ) ;
-    void (* __module_Unneed_inner) ( vlc_object_t *, module_t * ) ;
-    void (* __msg_Dbg_inner) ( void *, const char *, ... ) ;
-    void (* __msg_Err_inner) ( void *, const char *, ... ) ;
-    void (* __msg_Generic_inner) ( vlc_object_t *, int, const char *, const char *, ... ) ;
-    void (* __msg_Info_inner) ( void *, const char *, ... ) ;
-    void (* __msg_Unsubscribe_inner) ( vlc_object_t *, msg_subscription_t * ) ;
-    void (* __msg_Warn_inner) ( void *, const char *, ... ) ;
-    void (* __vlc_dumpstructure_inner) ( vlc_object_t * ) ;
-    void (* __vlc_liststructure_inner) ( vlc_object_t * ) ;
-    void (* __vlc_object_attach_inner) ( vlc_object_t *, vlc_object_t * ) ;
-    void (* __vlc_object_destroy_inner) ( vlc_object_t * ) ;
-    void (* __vlc_object_detach_inner) ( vlc_object_t * ) ;
-    void (* __vlc_object_release_inner) ( vlc_object_t * ) ;
-    void (* __vlc_object_yield_inner) ( vlc_object_t * ) ;
-    void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ;
-    void (* __vlc_thread_ready_inner) ( vlc_object_t * ) ;
-    void (* aout_DateInit_inner) ( audio_date_t *, u32 ) ;
-    void (* aout_DateMove_inner) ( audio_date_t *, mtime_t ) ;
-    void (* aout_DateSet_inner) ( audio_date_t *, mtime_t ) ;
-    void (* aout_DecDeleteBuffer_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
-    void (* aout_Delete_inner) ( aout_instance_t * ) ;
-    void (* aout_VolumeNoneInit_inner) ( aout_instance_t * ) ;
-    void (* aout_VolumeSoftInit_inner) ( aout_instance_t * ) ;
-    void (* config_Duplicate_inner) ( module_t *, module_config_t * ) ;
-    void (* config_SetCallbacks_inner) ( module_config_t *, module_config_t * ) ;
-    void (* config_UnsetCallbacks_inner) ( module_config_t * ) ;
-    void (* input_AccessEnd_inner) ( input_thread_t * ) ;
-    void (* input_AccessReinit_inner) ( input_thread_t * ) ;
-    void (* input_BuffersEnd_inner) ( input_thread_t *, input_buffers_t * ) ;
-    void (* input_ClockManageRef_inner) ( input_thread_t *, pgrm_descriptor_t *, mtime_t ) ;
-    void (* input_DecodePES_inner) ( decoder_fifo_t *, pes_packet_t * ) ;
-    void (* input_DelArea_inner) ( input_thread_t *, input_area_t * ) ;
-    void (* input_DelES_inner) ( input_thread_t *, es_descriptor_t * ) ;
-    void (* input_DelProgram_inner) ( input_thread_t *, pgrm_descriptor_t * ) ;
-    void (* input_DeletePES_inner) ( input_buffers_t *, pes_packet_t * ) ;
-    void (* input_DeletePacket_inner) ( input_buffers_t *, data_packet_t * ) ;
-    void (* input_DumpStream_inner) ( input_thread_t * ) ;
-    void (* input_EndStream_inner) ( input_thread_t * ) ;
-    void (* input_FDSeek_inner) ( input_thread_t *, off_t ) ;
-    void (* input_ReleaseBuffer_inner) ( input_buffers_t *, data_buffer_t * ) ;
-    void (* intf_Destroy_inner) ( intf_thread_t * ) ;
-    void (* intf_StopThread_inner) ( intf_thread_t * ) ;
-    void (* msleep_inner) ( mtime_t delay ) ;
-    void (* mwait_inner) ( mtime_t date ) ;
-    void (* playlist_Command_inner) ( playlist_t *, int, int ) ;
-    void (* sout_DeleteInstance_inner) ( sout_instance_t * ) ;
-    void (* vlc_list_release_inner) ( vlc_list_t * ) ;
-    void (* vout_AllocatePicture_inner) ( vout_thread_t *, picture_t *, int, int, u32 ) ;
-    void (* vout_DatePicture_inner) ( vout_thread_t *, picture_t *, mtime_t ) ;
-    void (* vout_DestroyPicture_inner) ( vout_thread_t *, picture_t * ) ;
-    void (* vout_DestroySubPicture_inner) ( vout_thread_t *, subpicture_t * ) ;
-    void (* vout_DestroyThread_inner) ( vout_thread_t * ) ;
-    void (* vout_DisplayPicture_inner) ( vout_thread_t *, picture_t * ) ;
-    void (* vout_DisplaySubPicture_inner) ( vout_thread_t *, subpicture_t * ) ;
-    void (* vout_LinkPicture_inner) ( vout_thread_t *, picture_t * ) ;
-    void (* vout_PlacePicture_inner) ( vout_thread_t *, int, int, int *, int *, int *, int * ) ;
-    void (* vout_UnlinkPicture_inner) ( vout_thread_t *, picture_t * ) ;
-    void * (* __vlc_object_create_inner) ( vlc_object_t *, int ) ;
-    void * (* __vlc_object_find_inner) ( vlc_object_t *, int, int ) ;
-    vout_thread_t * (* __vout_CreateThread_inner) ( vlc_object_t *, int, int, u32, int ) ;
-};
-
-#ifdef __PLUGIN__
-#   define BitstreamNextDataPacket p_symbols->BitstreamNextDataPacket_inner
-#   define CurrentPTS p_symbols->CurrentPTS_inner
-#   define DecodeLanguage p_symbols->DecodeLanguage_inner
-#   define DecoderError p_symbols->DecoderError_inner
-#   define GetLang_1 p_symbols->GetLang_1_inner
-#   define GetLang_2B p_symbols->GetLang_2B_inner
-#   define GetLang_2T p_symbols->GetLang_2T_inner
-#   define InitBitstream p_symbols->InitBitstream_inner
-#   define NextDataPacket p_symbols->NextDataPacket_inner
-#   define NextPTS p_symbols->NextPTS_inner
-#   define UnalignedGetBits p_symbols->UnalignedGetBits_inner
-#   define UnalignedRemoveBits p_symbols->UnalignedRemoveBits_inner
-#   define UnalignedShowBits p_symbols->UnalignedShowBits_inner
-#   define __aout_DecNew p_symbols->__aout_DecNew_inner
-#   define __aout_New p_symbols->__aout_New_inner
-#   define __config_GetFloat p_symbols->__config_GetFloat_inner
-#   define __config_GetInt p_symbols->__config_GetInt_inner
-#   define __config_GetPsz p_symbols->__config_GetPsz_inner
-#   define __config_LoadCmdLine p_symbols->__config_LoadCmdLine_inner
-#   define __config_LoadConfigFile p_symbols->__config_LoadConfigFile_inner
-#   define __config_PutFloat p_symbols->__config_PutFloat_inner
-#   define __config_PutInt p_symbols->__config_PutInt_inner
-#   define __config_PutPsz p_symbols->__config_PutPsz_inner
-#   define __config_SaveConfigFile p_symbols->__config_SaveConfigFile_inner
-#   define __input_FDClose p_symbols->__input_FDClose_inner
-#   define __input_FDNetworkClose p_symbols->__input_FDNetworkClose_inner
-#   define __input_Seek p_symbols->__input_Seek_inner
-#   define __input_SetStatus p_symbols->__input_SetStatus_inner
-#   define __input_Tell p_symbols->__input_Tell_inner
-#   define __intf_Create p_symbols->__intf_Create_inner
-#   define __intf_Eject p_symbols->__intf_Eject_inner
-#   define __module_Need p_symbols->__module_Need_inner
-#   define __module_Unneed p_symbols->__module_Unneed_inner
-#   define __msg_Dbg p_symbols->__msg_Dbg_inner
-#   define __msg_Err p_symbols->__msg_Err_inner
-#   define __msg_Generic p_symbols->__msg_Generic_inner
-#   define __msg_Info p_symbols->__msg_Info_inner
-#   define __msg_Subscribe p_symbols->__msg_Subscribe_inner
-#   define __msg_Unsubscribe p_symbols->__msg_Unsubscribe_inner
-#   define __msg_Warn p_symbols->__msg_Warn_inner
-#   define __network_ChannelCreate p_symbols->__network_ChannelCreate_inner
-#   define __network_ChannelJoin p_symbols->__network_ChannelJoin_inner
-#   define __sout_NewInstance p_symbols->__sout_NewInstance_inner
-#   define __vlc_cond_destroy p_symbols->__vlc_cond_destroy_inner
-#   define __vlc_cond_init p_symbols->__vlc_cond_init_inner
-#   define __vlc_dumpstructure p_symbols->__vlc_dumpstructure_inner
-#   define __vlc_list_find p_symbols->__vlc_list_find_inner
-#   define __vlc_liststructure p_symbols->__vlc_liststructure_inner
-#   define __vlc_mutex_destroy p_symbols->__vlc_mutex_destroy_inner
-#   define __vlc_mutex_init p_symbols->__vlc_mutex_init_inner
-#   define __vlc_object_attach p_symbols->__vlc_object_attach_inner
-#   define __vlc_object_create p_symbols->__vlc_object_create_inner
-#   define __vlc_object_destroy p_symbols->__vlc_object_destroy_inner
-#   define __vlc_object_detach p_symbols->__vlc_object_detach_inner
-#   define __vlc_object_find p_symbols->__vlc_object_find_inner
-#   define __vlc_object_release p_symbols->__vlc_object_release_inner
-#   define __vlc_object_yield p_symbols->__vlc_object_yield_inner
-#   define __vlc_thread_create p_symbols->__vlc_thread_create_inner
-#   define __vlc_thread_join p_symbols->__vlc_thread_join_inner
-#   define __vlc_thread_ready p_symbols->__vlc_thread_ready_inner
-#   define __vlc_threads_end p_symbols->__vlc_threads_end_inner
-#   define __vlc_threads_init p_symbols->__vlc_threads_init_inner
-#   define __vout_CreateThread p_symbols->__vout_CreateThread_inner
-#   define aout_DateGet p_symbols->aout_DateGet_inner
-#   define aout_DateIncrement p_symbols->aout_DateIncrement_inner
-#   define aout_DateInit p_symbols->aout_DateInit_inner
-#   define aout_DateMove p_symbols->aout_DateMove_inner
-#   define aout_DateSet p_symbols->aout_DateSet_inner
-#   define aout_DecDelete p_symbols->aout_DecDelete_inner
-#   define aout_DecDeleteBuffer p_symbols->aout_DecDeleteBuffer_inner
-#   define aout_DecNewBuffer p_symbols->aout_DecNewBuffer_inner
-#   define aout_DecPlay p_symbols->aout_DecPlay_inner
-#   define aout_Delete p_symbols->aout_Delete_inner
-#   define aout_FifoPop p_symbols->aout_FifoPop_inner
-#   define aout_FormatNbChannels p_symbols->aout_FormatNbChannels_inner
-#   define aout_OutputNextBuffer p_symbols->aout_OutputNextBuffer_inner
-#   define aout_Restart p_symbols->aout_Restart_inner
-#   define aout_VolumeDown p_symbols->aout_VolumeDown_inner
-#   define aout_VolumeGet p_symbols->aout_VolumeGet_inner
-#   define aout_VolumeInfos p_symbols->aout_VolumeInfos_inner
-#   define aout_VolumeNoneInit p_symbols->aout_VolumeNoneInit_inner
-#   define aout_VolumeSet p_symbols->aout_VolumeSet_inner
-#   define aout_VolumeSoftInit p_symbols->aout_VolumeSoftInit_inner
-#   define aout_VolumeUp p_symbols->aout_VolumeUp_inner
-#   define config_Duplicate p_symbols->config_Duplicate_inner
-#   define config_FindConfig p_symbols->config_FindConfig_inner
-#   define config_GetHomeDir p_symbols->config_GetHomeDir_inner
-#   define config_SetCallbacks p_symbols->config_SetCallbacks_inner
-#   define config_UnsetCallbacks p_symbols->config_UnsetCallbacks_inner
-#   define input_AccessEnd p_symbols->input_AccessEnd_inner
-#   define input_AccessInit p_symbols->input_AccessInit_inner
-#   define input_AccessReinit p_symbols->input_AccessReinit_inner
-#   define input_AddArea p_symbols->input_AddArea_inner
-#   define input_AddES p_symbols->input_AddES_inner
-#   define input_AddInfo p_symbols->input_AddInfo_inner
-#   define input_AddProgram p_symbols->input_AddProgram_inner
-#   define input_BuffersEnd p_symbols->input_BuffersEnd_inner
-#   define input_ChangeArea p_symbols->input_ChangeArea_inner
-#   define input_ChangeProgram p_symbols->input_ChangeProgram_inner
-#   define input_ClockGetTS p_symbols->input_ClockGetTS_inner
-#   define input_ClockManageControl p_symbols->input_ClockManageControl_inner
-#   define input_ClockManageRef p_symbols->input_ClockManageRef_inner
-#   define input_DecodePES p_symbols->input_DecodePES_inner
-#   define input_DelArea p_symbols->input_DelArea_inner
-#   define input_DelES p_symbols->input_DelES_inner
-#   define input_DelProgram p_symbols->input_DelProgram_inner
-#   define input_DeletePES p_symbols->input_DeletePES_inner
-#   define input_DeletePacket p_symbols->input_DeletePacket_inner
-#   define input_DumpStream p_symbols->input_DumpStream_inner
-#   define input_EndStream p_symbols->input_EndStream_inner
-#   define input_FDNetworkRead p_symbols->input_FDNetworkRead_inner
-#   define input_FDRead p_symbols->input_FDRead_inner
-#   define input_FDSeek p_symbols->input_FDSeek_inner
-#   define input_FillBuffer p_symbols->input_FillBuffer_inner
-#   define input_FindES p_symbols->input_FindES_inner
-#   define input_FindProgram p_symbols->input_FindProgram_inner
-#   define input_InfoCategory p_symbols->input_InfoCategory_inner
-#   define input_InitStream p_symbols->input_InitStream_inner
-#   define input_NewBuffer p_symbols->input_NewBuffer_inner
-#   define input_NewPES p_symbols->input_NewPES_inner
-#   define input_NewPacket p_symbols->input_NewPacket_inner
-#   define input_OffsetToTime p_symbols->input_OffsetToTime_inner
-#   define input_Peek p_symbols->input_Peek_inner
-#   define input_ReleaseBuffer p_symbols->input_ReleaseBuffer_inner
-#   define input_SelectES p_symbols->input_SelectES_inner
-#   define input_SetProgram p_symbols->input_SetProgram_inner
-#   define input_ShareBuffer p_symbols->input_ShareBuffer_inner
-#   define input_SplitBuffer p_symbols->input_SplitBuffer_inner
-#   define input_ToggleES p_symbols->input_ToggleES_inner
-#   define input_UnselectES p_symbols->input_UnselectES_inner
-#   define intf_Destroy p_symbols->intf_Destroy_inner
-#   define intf_RunThread p_symbols->intf_RunThread_inner
-#   define intf_StopThread p_symbols->intf_StopThread_inner
-#   define mdate p_symbols->mdate_inner
-#   define msleep p_symbols->msleep_inner
-#   define mstrtime p_symbols->mstrtime_inner
-#   define mwait p_symbols->mwait_inner
-#   define playlist_Add p_symbols->playlist_Add_inner
-#   define playlist_Command p_symbols->playlist_Command_inner
-#   define playlist_Delete p_symbols->playlist_Delete_inner
-#   define sout_DeleteInstance p_symbols->sout_DeleteInstance_inner
-#   define vlc_list_release p_symbols->vlc_list_release_inner
-#   define vout_AllocatePicture p_symbols->vout_AllocatePicture_inner
-#   define vout_ChromaCmp p_symbols->vout_ChromaCmp_inner
-#   define vout_CreatePicture p_symbols->vout_CreatePicture_inner
-#   define vout_CreateSubPicture p_symbols->vout_CreateSubPicture_inner
-#   define vout_DatePicture p_symbols->vout_DatePicture_inner
-#   define vout_DestroyPicture p_symbols->vout_DestroyPicture_inner
-#   define vout_DestroySubPicture p_symbols->vout_DestroySubPicture_inner
-#   define vout_DestroyThread p_symbols->vout_DestroyThread_inner
-#   define vout_DisplayPicture p_symbols->vout_DisplayPicture_inner
-#   define vout_DisplaySubPicture p_symbols->vout_DisplaySubPicture_inner
-#   define vout_LinkPicture p_symbols->vout_LinkPicture_inner
-#   define vout_PlacePicture p_symbols->vout_PlacePicture_inner
-#   define vout_UnlinkPicture p_symbols->vout_UnlinkPicture_inner
-#endif /* __PLUGIN__ */
-
diff --git a/ipkg/.cvsignore b/ipkg/.cvsignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
index 54d99fe..47a5d8a 100644 (file)
@@ -1,3 +1,6 @@
+Makefile
+Makefile.in
+.dirstamp
 *.a
 *.so
 *.so.*
diff --git a/m4/.cvsignore b/m4/.cvsignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/modules/.cvsignore b/modules/.cvsignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
index 435f39e..1b393fa 100644 (file)
@@ -1,4 +1,7 @@
-.dep
+Makefile
+Makefile.in
+.deps
+.dirstamp
 *.lo
 *.o.*
 *.lo.*
diff --git a/modules/access/Makefile b/modules/access/Makefile
deleted file mode 100644 (file)
index 9c4a79e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-file_SOURCES = file.c
-udp_SOURCES = udp.c
-http_SOURCES = http.c
-rtp_SOURCES = rtp.c
diff --git a/modules/access/dvd/Makefile b/modules/access/dvd/Makefile
deleted file mode 100644 (file)
index 1a9f155..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dvd_SOURCES = dvd.c access.c demux.c seek.c es.c ifo.c udf.c summary.c
diff --git a/modules/access/dvdplay/Makefile b/modules/access/dvdplay/Makefile
deleted file mode 100644 (file)
index 2d87cf4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dvdplay_SOURCES = dvd.c access.c demux.c intf.c es.c tools.c
diff --git a/modules/access/dvdread/Makefile b/modules/access/dvdread/Makefile
deleted file mode 100644 (file)
index 6e7cf66..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dvdread_SOURCES = dvdread.c input.c
index cdda4d1..fd15236 100644 (file)
@@ -2,7 +2,7 @@
  * file.c: file input (file: access plug-in)
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: file.c,v 1.1 2002/08/04 17:23:41 sam Exp $
+ * $Id: file.c,v 1.2 2002/09/30 11:05:34 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -145,6 +145,7 @@ static int Open( vlc_object_t *p_this )
 vlc_module_begin();
     set_description( _("Standard filesystem file reading") );
     set_capability( "access", 50 );
+    add_shortcut( "file" );
     add_shortcut( "stream" );
     set_callbacks( Open, __input_FDClose );
 vlc_module_end();
index 3d87884..4688674 100644 (file)
@@ -2,7 +2,7 @@
  * http.c: HTTP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: http.c,v 1.3 2002/08/08 00:35:10 sam Exp $
+ * $Id: http.c,v 1.4 2002/09/30 11:05:34 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -67,6 +67,7 @@ static void Seek       ( input_thread_t *, off_t );
 vlc_module_begin();
     set_description( _("HTTP access module") );
     set_capability( "access", 0 );
+    add_shortcut( "http" );
     add_shortcut( "http4" );
     add_shortcut( "http6" );
     set_callbacks( Open, Close );
index 8bdc507..9f3de26 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
- * udp.c: raw UDP access plug-in
+ * rtp.c: RTP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: rtp.c,v 1.1 2002/08/14 08:50:33 tooney Exp $
+ * $Id: rtp.c,v 1.2 2002/09/30 11:05:34 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -54,6 +54,7 @@ static int  RTPNetworkRead( input_thread_t *, byte_t *, size_t );
 vlc_module_begin();
     set_description( _("RTP access module") );
     set_capability( "access", 0 );
+    add_shortcut( "rtp" );
     add_shortcut( "rtpstream" );
     add_shortcut( "rtp4" );
     add_shortcut( "rtp6" );
diff --git a/modules/access/satellite/Makefile b/modules/access/satellite/Makefile
deleted file mode 100644 (file)
index dd4d0aa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-satellite_SOURCES = satellite.c access.c dvb.c
index 04c3c30..4610ac6 100644 (file)
@@ -2,7 +2,7 @@
  * udp.c: raw UDP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: udp.c,v 1.2 2002/08/07 00:29:36 sam Exp $
+ * $Id: udp.c,v 1.3 2002/09/30 11:05:34 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -53,6 +53,7 @@ static int  Open       ( vlc_object_t * );
 vlc_module_begin();
     set_description( _("raw UDP access module") );
     set_capability( "access", 0 );
+    add_shortcut( "udp" );
     add_shortcut( "udpstream" );
     add_shortcut( "udp4" );
     add_shortcut( "udp6" );
diff --git a/modules/access/v4l/Makefile b/modules/access/v4l/Makefile
deleted file mode 100644 (file)
index b6fbba5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-v4l_SOURCES = v4l.c
diff --git a/modules/access/vcd/Makefile b/modules/access/vcd/Makefile
deleted file mode 100644 (file)
index 3a17ed6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-vcd_SOURCES = vcd.c cdrom.c
diff --git a/modules/audio_filter/channel_mixer/Makefile b/modules/audio_filter/channel_mixer/Makefile
deleted file mode 100644 (file)
index b49f813..0000000
+++ /dev/null
@@ -1 +0,0 @@
-trivial_SOURCES = trivial.c
diff --git a/modules/audio_filter/converter/Makefile b/modules/audio_filter/converter/Makefile
deleted file mode 100644 (file)
index 73bf979..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-float32tos16_SOURCES = float32tos16.c
-float32tos8_SOURCES = float32tos8.c
-float32tou16_SOURCES = float32tou16.c
-float32tou8_SOURCES = float32tou8.c
-a52tospdif_SOURCES = a52tospdif.c
-a52tofloat32_SOURCES = a52tofloat32.c
-fixed32tos16_SOURCES = fixed32tos16.c
-fixed32tofloat32_SOURCES = fixed32tofloat32.c
-s16tofloat32_SOURCES = s16tofloat32.c
-s16tofloat32swab_SOURCES = s16tofloat32swab.c
diff --git a/modules/audio_filter/resampler/Makefile b/modules/audio_filter/resampler/Makefile
deleted file mode 100644 (file)
index 6902485..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-trivial_SOURCES = trivial.c
-ugly_SOURCES = ugly.c
-fast_SOURCES = fast.c
diff --git a/modules/audio_mixer/Makefile b/modules/audio_mixer/Makefile
deleted file mode 100644 (file)
index b7d4f2f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-trivial_SOURCES = trivial.c
-float32_SOURCES = float32.c
-spdif_SOURCES = spdif.c
diff --git a/modules/audio_output/Makefile b/modules/audio_output/Makefile
deleted file mode 100644 (file)
index ea78869..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-alsa_SOURCES = alsa.c
-arts_SOURCES = arts.c
-esd_SOURCES = esd.c
-file_SOURCES = file.c
-oss_SOURCES = oss.c
-sdl_SOURCES = sdl.c
-waveout_SOURCES = waveout.c
index d8a29f8..f8539a0 100644 (file)
@@ -2,7 +2,7 @@
  * arts.c : aRts module
  *****************************************************************************
  * Copyright (C) 2001-2002 VideoLAN
- * $Id: arts.c,v 1.11 2002/09/18 21:21:23 massiot Exp $
+ * $Id: arts.c,v 1.12 2002/09/30 11:05:35 sam Exp $
  *
  * Authors: Emmanuel Blindauer <manu@agat.net>
  *          Samuel Hocevar <sam@zoy.org>
@@ -106,7 +106,7 @@ static int Open( vlc_object_t *p_this )
         arts_close_stream( p_sys->stream );
     }
 
-    /* open a socket for playing a stream */
+    /* Open a socket for playing a stream, set format to 16 bits */
     p_sys->stream = arts_play_stream( p_aout->output.output.i_rate, 16,
                                       p_aout->output.output.i_channels, "vlc" );
     if( p_sys->stream == NULL )
@@ -116,16 +116,22 @@ static int Open( vlc_object_t *p_this )
     }
 
     /* Try not to bufferize more than 200 ms */
-    arts_stream_set( p_sys->stream, ARTS_P_BUFFER_TIME, 200 );
+    arts_stream_set( p_sys->stream, ARTS_P_BUFFER_TIME, 50 );
 
     /* Estimate latency with a half full buffer */
     p_sys->latency = (mtime_t)1000
-       * (mtime_t)( arts_stream_get( p_sys->stream, ARTS_P_SERVER_LATENCY )
-                  + arts_stream_get( p_sys->stream, ARTS_P_BUFFER_TIME ) / 2 );
+       * (mtime_t)arts_stream_get( p_sys->stream, ARTS_P_SERVER_LATENCY );
     p_sys->i_size = arts_stream_get( p_sys->stream, ARTS_P_PACKET_SIZE );
 
+    msg_Dbg( p_aout, "aRts initialized, latency %i000, %i packets of size %i\n",
+                     arts_stream_get( p_sys->stream, ARTS_P_SERVER_LATENCY ),
+                     arts_stream_get( p_sys->stream, ARTS_P_PACKET_COUNT ),
+                     arts_stream_get( p_sys->stream, ARTS_P_PACKET_SIZE ) );
+
     p_aout->output.output.i_format = AOUT_FMT_S16_NE;
-    p_aout->output.i_nb_samples = p_sys->i_size;
+    p_aout->output.i_nb_samples = p_sys->i_size
+                                   / sizeof(u16)
+                                   / p_aout->output.output.i_channels;
 
     /* Create aRts thread and wait for its readiness. */
     if( vlc_thread_create( p_aout, "aout", aRtsThread,
@@ -173,6 +179,7 @@ static void Close( vlc_object_t *p_this )
 static int aRtsThread( aout_instance_t * p_aout )
 {
     struct aout_sys_t * p_sys = p_aout->output.p_sys;
+mtime_t calldate = mdate();
 
     while ( !p_aout->b_die )
     {
@@ -180,25 +187,37 @@ static int aRtsThread( aout_instance_t * p_aout )
         int i_tmp, i_size;
         byte_t * p_bytes;
 
+fprintf(stderr, "can write %i\n", arts_stream_get( p_sys->stream, ARTS_P_BUFFER_SPACE ) );
+while( arts_stream_get( p_sys->stream, ARTS_P_BUFFER_SPACE ) < 16384*3/2 )
+{
+fprintf(stderr, "sleep\n");
+    msleep( 10000 );
+}
+fprintf(stderr, "after sleep: can write %i\n", arts_stream_get( p_sys->stream, ARTS_P_BUFFER_SPACE ) );
+
         /* Get the presentation date of the next write() operation. It
          * is equal to the current date + latency */
-        p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency,
-                                                  VLC_FALSE );
+        p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency / 4,
+                                                  VLC_TRUE );
 
         if ( p_buffer != NULL )
         {
+fprintf(stderr, "buffer duration %lld, bytes %i\n", p_buffer->end_date - p_buffer->start_date, p_buffer->i_nb_bytes);
             p_bytes = p_buffer->p_buffer;
             i_size = p_buffer->i_nb_bytes;
         }
         else
         {
-            i_size = p_sys->i_size / p_aout->output.output.i_frame_length
-                      * p_aout->output.output.i_bytes_per_frame;
-            p_bytes = alloca( i_size );
+            i_size = p_sys->i_size;
+            p_bytes = malloc( i_size );
             memset( p_bytes, 0, i_size );
         }
 
+fprintf(stderr, "WRITING %i bytes\n", i_size);
         i_tmp = arts_write( p_sys->stream, p_bytes, i_size );
+fprintf(stderr, "mdate: %lld\n", mdate() - calldate);
+calldate = mdate();
+fprintf(stderr, "can write %i\n", arts_stream_get( p_sys->stream, ARTS_P_BUFFER_SPACE ) );
 
         if( i_tmp < 0 )
         {
@@ -209,6 +228,10 @@ static int aRtsThread( aout_instance_t * p_aout )
         {
             aout_BufferFree( p_buffer );
         }
+        else
+        {
+            free( p_bytes );
+        }
     }
 
     return 0;
index 7712c6b..bc388c3 100644 (file)
@@ -2,7 +2,7 @@
  * sdl.c : SDL audio output plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2002 VideoLAN
- * $Id: sdl.c,v 1.12 2002/09/18 21:21:23 massiot Exp $
+ * $Id: sdl.c,v 1.13 2002/09/30 11:05:35 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -66,6 +66,7 @@ static void SDLCallback ( void *, Uint8 *, int );
 vlc_module_begin();
     set_description( _("Simple DirectMedia Layer audio module") );
     set_capability( "audio output", 40 );
+    add_shortcut( "sdl" );
     set_callbacks( Open, Close );
 vlc_module_end();
 
diff --git a/modules/codec/Makefile b/modules/codec/Makefile
deleted file mode 100644 (file)
index d3479ba..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-a52_SOURCES = a52.c
-lpcm_SOURCES = lpcm.c
diff --git a/modules/codec/a52old/Makefile b/modules/codec/a52old/Makefile
deleted file mode 100644 (file)
index f07f59d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-a52old_SOURCES = a52old.c decoder.c parse.c exponent.c bit_allocate.c mantissa.c rematrix.c imdct.c
diff --git a/modules/codec/a52old/downmix/Makefile b/modules/codec/a52old/downmix/Makefile
deleted file mode 100644 (file)
index accc86d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-downmix_SOURCES = downmix.c downmix_c.c
-downmixsse_SOURCES = downmix.c downmix_sse.c
-downmix3dn_SOURCES = downmix.c downmix_3dn.c
diff --git a/modules/codec/a52old/imdct/Makefile b/modules/codec/a52old/imdct/Makefile
deleted file mode 100644 (file)
index 6e31fa1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-COMMON_SOURCES = imdct_common.c
-
-imdct_SOURCES = imdct.c imdct_c.c srfft_c.c $(COMMON_SOURCES)
-imdctsse_SOURCES = imdct.c imdct_sse.c srfft_sse.c $(COMMON_SOURCES)
-imdct3dn_SOURCES = imdct.c imdct_3dn.c srfft_3dn.c $(COMMON_SOURCES)
diff --git a/modules/codec/cinepak/Makefile b/modules/codec/cinepak/Makefile
deleted file mode 100644 (file)
index e47caa0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cinepak_SOURCES = cinepak.c
diff --git a/modules/codec/dv/Makefile b/modules/codec/dv/Makefile
deleted file mode 100644 (file)
index 35e0636..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dv_SOURCES = dv.c
diff --git a/modules/codec/faad/Makefile b/modules/codec/faad/Makefile
deleted file mode 100644 (file)
index 4129549..0000000
+++ /dev/null
@@ -1 +0,0 @@
-faad_SOURCES = decoder.c
diff --git a/modules/codec/ffmpeg/Makefile b/modules/codec/ffmpeg/Makefile
deleted file mode 100644 (file)
index 89ae572..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ffmpeg_SOURCES = ffmpeg.c
-
-
-
diff --git a/modules/codec/ffmpeg/postprocessing/Makefile b/modules/codec/ffmpeg/postprocessing/Makefile
deleted file mode 100644 (file)
index eb9e03f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-postprocessing_c_SOURCES = postprocessing.c postprocessing_c.c
-postprocessing_mmx_SOURCES = postprocessing.c postprocessing_mmx.c
-postprocessing_mmxext_SOURCES = postprocessing.c postprocessing_mmxext.c
-
-
-
diff --git a/modules/codec/mad/Makefile b/modules/codec/mad/Makefile
deleted file mode 100644 (file)
index c569234..0000000
+++ /dev/null
@@ -1 +0,0 @@
-mad_SOURCES = decoder.c libmad.c
diff --git a/modules/codec/mpeg_audio/Makefile b/modules/codec/mpeg_audio/Makefile
deleted file mode 100644 (file)
index 6a1d52a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-mpeg_audio_SOURCES = decoder.c layer1.c layer2.c math.c generic.c
diff --git a/modules/codec/mpeg_video/Makefile b/modules/codec/mpeg_video/Makefile
deleted file mode 100644 (file)
index b9e97b9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-ifeq ($(ARCH),hppa64)
-CFLAGS += -ffunction-sections
-endif
-
-mpeg_video_SOURCES = parser.c headers.c blocks.c synchro.c pool.c decoder.c
diff --git a/modules/codec/mpeg_video/idct/Makefile b/modules/codec/mpeg_video/idct/Makefile
deleted file mode 100644 (file)
index f8c68d5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-idct_SOURCES = idct.c
-idctclassic_SOURCES = idctclassic.c
-idctmmx_SOURCES = idctmmx.c
-idctmmxext_SOURCES = idctmmxext.c
-idctaltivec_SOURCES = idctaltivec.c
diff --git a/modules/codec/mpeg_video/motion/Makefile b/modules/codec/mpeg_video/motion/Makefile
deleted file mode 100644 (file)
index cf79eda..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-motion_SOURCES = motion.c
-motionmmx_SOURCES = motionmmx.c
-motionmmxext_SOURCES = motionmmxext.c
-motion3dnow_SOURCES = motion3dnow.c
-motionaltivec_SOURCES = motionaltivec.c
diff --git a/modules/codec/spudec/Makefile b/modules/codec/spudec/Makefile
deleted file mode 100644 (file)
index 60e766e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-spudec_SOURCES = spudec.c parse.c render.c
diff --git a/modules/control/lirc/Makefile b/modules/control/lirc/Makefile
deleted file mode 100644 (file)
index 139372d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-lirc_SOURCES = lirc.c
diff --git a/modules/control/rc/Makefile b/modules/control/rc/Makefile
deleted file mode 100644 (file)
index fbb6f2b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-rc_SOURCES = rc.c
index 075a553..95ef652 100644 (file)
@@ -2,7 +2,7 @@
  * rc.c : remote control stdin/stdout plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: rc.c,v 1.4 2002/08/20 18:08:51 sam Exp $
+ * $Id: rc.c,v 1.5 2002/09/30 11:05:37 sam Exp $
  *
  * Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
  *
@@ -63,9 +63,13 @@ static void Run          ( intf_thread_t *p_intf );
 #define POS_TEXT N_("show stream position")
 #define POS_LONGTEXT N_("Show the current position in seconds within the stream from time to time.")
 
+#define TTY_TEXT N_("fake TTY")
+#define TTY_LONGTEXT N_("Force the rc plugin to use stdin as if it was a TTY.")
+
 vlc_module_begin();
     add_category_hint( N_("Remote control"), NULL );
     add_bool( "rc-show-pos", 0, NULL, POS_TEXT, POS_LONGTEXT );
+    add_bool( "fake-tty", 0, NULL, TTY_TEXT, TTY_LONGTEXT );
     set_description( _("remote control interface module") );
     set_capability( "interface", 20 );
     set_callbacks( Activate, NULL );
@@ -80,7 +84,7 @@ static int Activate( vlc_object_t *p_this )
 
 #ifdef HAVE_ISATTY
     /* Check that stdin is a TTY */
-    if( !isatty( 0 ) )
+    if( !config_GetInt( p_intf, "fake-tty" ) && !isatty( 0 ) )
     {
         msg_Warn( p_intf, "fd 0 is not a TTY" );
         return 1;
@@ -177,7 +181,7 @@ static void Run( intf_thread_t *p_intf )
             {
                 p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
                                                    FIND_ANYWHERE );
-                if( p_input )
+                //if( p_input )
                 {
                     p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST,
                                                            FIND_PARENT );
@@ -215,7 +219,7 @@ static void Run( intf_thread_t *p_intf )
         if( b_complete == 1 )
         {
             char *p_cmd = p_buffer;
-            //char *p_tmp;
+            char *p_tmp;
 
             if( !strcmp( p_cmd, "quit" ) )
             {
@@ -255,13 +259,11 @@ static void Run( intf_thread_t *p_intf )
             }
             else if( !strncmp( p_cmd, "set ", 4 ) )
             {
-#if 0
 //                vlc_set_r( p_intf->p_vlc, p_cmd + 4, strstr( p_cmd + 4, " " ) );
                 p_tmp = strstr( p_cmd + 4, " " );
                 p_tmp[0] = '\0';
                 config_PutPsz( p_intf->p_vlc, p_cmd + 4, p_tmp + 1 );
                 config_PutInt( p_intf->p_vlc, p_cmd + 4, atoi(p_tmp + 1) );
-#endif
             }
             else if( !strncmp( p_cmd, "intf ", 5 ) )
             {
@@ -403,12 +405,12 @@ static void Run( intf_thread_t *p_intf )
     {
         vlc_object_release( p_input );
         p_input = NULL;
+    }
 
-        if( p_playlist )
-        {
-            vlc_object_release( p_playlist );
-            p_playlist = NULL;
-        }
+    if( p_playlist )
+    {
+        vlc_object_release( p_playlist );
+        p_playlist = NULL;
     }
 }
 
diff --git a/modules/demux/Makefile b/modules/demux/Makefile
deleted file mode 100644 (file)
index 1966764..0000000
+++ /dev/null
@@ -1 +0,0 @@
-a52sys_SOURCES = a52sys.c
diff --git a/modules/demux/aac/Makefile b/modules/demux/aac/Makefile
deleted file mode 100644 (file)
index 969d856..0000000
+++ /dev/null
@@ -1 +0,0 @@
-aac_SOURCES = demux.c
diff --git a/modules/demux/avi/Makefile b/modules/demux/avi/Makefile
deleted file mode 100644 (file)
index 1983576..0000000
+++ /dev/null
@@ -1 +0,0 @@
-avi_SOURCES = avi.c libioRIFF.c
diff --git a/modules/demux/mp4/Makefile b/modules/demux/mp4/Makefile
deleted file mode 100644 (file)
index ed545ed..0000000
+++ /dev/null
@@ -1 +0,0 @@
-mp4_SOURCES = mp4.c libmp4.c
diff --git a/modules/demux/mpeg/Makefile b/modules/demux/mpeg/Makefile
deleted file mode 100644 (file)
index b39a64a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-mpeg_system_SOURCES = system.c
-es_SOURCES = es.c
-ps_SOURCES = ps.c
-ts_SOURCES = ts.c
-ts_dvbpsi_SOURCES = ts.c
-audio_SOURCES = audio.c
diff --git a/modules/demux/util/Makefile b/modules/demux/util/Makefile
deleted file mode 100644 (file)
index 7b2c888..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-id3_SOURCES = id3.c
-id3tag_SOURCES = id3tag.c
diff --git a/modules/gui/beos/Makefile b/modules/gui/beos/Makefile
deleted file mode 100644 (file)
index 4045658..0000000
+++ /dev/null
@@ -1 +0,0 @@
-beos_SOURCES = BeOS.cpp AudioOutput.cpp VideoOutput.cpp Interface.cpp InterfaceWindow.cpp DrawingTidbits.cpp TransportButton.cpp PlayListWindow.cpp MediaControlView.cpp VlcWrapper.cpp
diff --git a/modules/gui/familiar/Makefile b/modules/gui/familiar/Makefile
deleted file mode 100644 (file)
index be8d597..0000000
+++ /dev/null
@@ -1 +0,0 @@
-familiar_SOURCES = familiar.c interface.c support.c callbacks.c
index 73d5787..1c6b39b 100644 (file)
@@ -2,7 +2,7 @@
  * callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: callbacks.c,v 1.9 2002/09/04 21:18:29 jpsaman Exp $
+ * $Id: callbacks.c,v 1.10 2002/09/30 11:05:38 sam Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -222,8 +222,8 @@ static char* get_file_perm(const char *path)
  * Main interface callbacks
  */
 
-gboolean GtkExit( GtkWidget       *widget,
-                  gpointer         user_data )
+gboolean FamiliarExit( GtkWidget       *widget,
+                       gpointer         user_data )
 {
     intf_thread_t *p_intf = GtkGetIntf( widget );
 
@@ -452,7 +452,7 @@ on_familiar_delete_event               (GtkWidget       *widget,
                                         GdkEvent        *event,
                                         gpointer         user_data)
 {
-    GtkExit( GTK_WIDGET( widget ), user_data );
+    FamiliarExit( GTK_WIDGET( widget ), user_data );
     return TRUE;
 }
 
index a659e64..d85fcc5 100644 (file)
@@ -2,7 +2,7 @@
  * callbacks.h : familiar plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: callbacks.h,v 1.6 2002/08/21 19:30:03 jpsaman Exp $
+ * $Id: callbacks.h,v 1.7 2002/09/30 11:05:38 sam Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -23,7 +23,7 @@
 
 #include <gtk/gtk.h>
 
-gboolean GtkExit                ( GtkWidget *, gpointer );
+gboolean FamiliarExit           ( GtkWidget *, gpointer );
 
 void ReadDirectory(GtkCList *clist, char *psz_dir);
 
diff --git a/modules/gui/gtk/Makefile b/modules/gui/gtk/Makefile
deleted file mode 100644 (file)
index cfab85e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-COMMON_SOURCES = display.c open.c control.c menu.c playlist.c modules.c preferences.c gtk_callbacks.c
-
-gtk_SOURCES = gtk.c gtk_interface.c gtk_support.c $(COMMON_SOURCES)
-gnome_SOURCES = gnome.c gnome_interface.c gnome_support.c $(COMMON_SOURCES)
index 8634511..04befaa 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_common.h: private Gtk+ interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: common.h,v 1.2 2002/08/20 18:08:51 sam Exp $
+ * $Id: common.h,v 1.3 2002/09/30 11:05:38 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -90,12 +90,12 @@ struct intf_sys_t
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-gint GtkModeManage   ( intf_thread_t * p_intf );
-void GtkDisplayDate  ( GtkAdjustment *p_adj );
+gint E_(GtkModeManage)   ( intf_thread_t * p_intf );
+void E_(GtkDisplayDate)  ( GtkAdjustment *p_adj );
 
 /*****************************************************************************
  * Useful macro
  ****************************************************************************/
-#define  GtkGetIntf( widget ) __GtkGetIntf( GTK_WIDGET( widget ) )
-void * __GtkGetIntf( GtkWidget * );
+#define  GtkGetIntf( widget ) E_(__GtkGetIntf)( GTK_WIDGET( widget ) )
+void * E_(__GtkGetIntf)( GtkWidget * );
 
index 6d51fd7..0a56dcb 100644 (file)
@@ -2,7 +2,7 @@
  * display.c: Gtk+ tools for main interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: display.c,v 1.3 2002/08/20 21:10:48 sam Exp $
+ * $Id: display.c,v 1.4 2002/09/30 11:05:38 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -54,7 +54,7 @@
  * the stream. It is called whenever the slider changes its value.
  * The lock has to be taken before you call the function.
  *****************************************************************************/
-void GtkDisplayDate( GtkAdjustment *p_adj )
+void E_(GtkDisplayDate)( GtkAdjustment *p_adj )
 {
     intf_thread_t *p_intf;
 
@@ -74,12 +74,12 @@ void GtkDisplayDate( GtkAdjustment *p_adj )
 
 
 /*****************************************************************************
- * GtkModeManage: actualise the aspect of the interface whenever the input
+ * GtkModeManage: actualize the aspect of the interface whenever the input
  *                changes.
  *****************************************************************************
  * The lock has to be taken before you call the function.
  *****************************************************************************/
-gint GtkModeManage( intf_thread_t * p_intf )
+gint E_(GtkModeManage)( intf_thread_t * p_intf )
 {
     GtkWidget *     p_dvd_box;
     GtkWidget *     p_file_box;
@@ -235,7 +235,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
  * GtkHideTooltips: show or hide the tooltips depending on the configuration
  *                  option gnome-tooltips
  *****************************************************************************/
-void GtkHideTooltips( vlc_object_t *p_this )
+void E_(GtkHideTooltips)( vlc_object_t *p_this )
 {
     intf_thread_t **pp_intf;
     vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
index e73d774..586a53d 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
- * gtk_dsiplay.h: Gtk+ tools for main interface.
+ * display.h: Gtk+ tools for main interface.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: display.h,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: display.h,v 1.2 2002/09/30 11:05:39 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -26,8 +26,8 @@
  * Prototypes
  *****************************************************************************/
 
-gint GtkModeManage      ( intf_thread_t * p_intf );
-void GtkDisplayDate     ( GtkAdjustment *p_adj );
-void GtkHideTooltips    ( vlc_object_t * );
-void GtkHideToolbarText ( vlc_object_t * );
+gint E_(GtkModeManage)      ( intf_thread_t * p_intf );
+void E_(GtkDisplayDate)     ( GtkAdjustment *p_adj );
+void E_(GtkHideTooltips)    ( vlc_object_t * );
+void    GtkHideToolbarText  ( vlc_object_t * );
 
index e84a8c5..4fe11a9 100644 (file)
@@ -2,7 +2,7 @@
  * gnome.c : Gnome plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.2 2002/08/20 18:08:51 sam Exp $
+ * $Id: gnome.c,v 1.3 2002/09/30 11:05:39 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -70,7 +70,7 @@ vlc_module_begin();
     int i = getenv( "DISPLAY" ) == NULL ? 15 : 100;
 #endif
     add_category_hint( N_("GNOME"), NULL );
-    add_bool( "gnome-tooltips", 1, GtkHideTooltips,
+    add_bool( "gnome-tooltips", 1, E_(GtkHideTooltips),
               TOOLTIPS_TEXT, TOOLTIPS_LONGTEXT );
     add_bool( "gnome-toolbartext", 1, GtkHideToolbarText, TOOLBAR_TEXT,
               TOOLBAR_LONGTEXT );
@@ -208,7 +208,7 @@ static void Run( intf_thread_t *p_intf )
     p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
 
     gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
-                         GTK_SIGNAL_FUNC( GtkDisplayDate ), NULL );
+                         GTK_SIGNAL_FUNC( E_(GtkDisplayDate) ), NULL );
     p_intf->p_sys->f_adj_oldvalue = 0;
     #undef P_SLIDER
 
@@ -375,7 +375,7 @@ static void Manage( intf_thread_t *p_intf )
             /* New input or stream map change */
             if( p_input->stream.b_changed )
             {
-                GtkModeManage( p_intf );
+                E_(GtkModeManage)( p_intf );
                 GtkSetupMenus( p_intf );
                 p_intf->p_sys->b_playing = 1;
             }
@@ -429,7 +429,7 @@ static void Manage( intf_thread_t *p_intf )
     }
     else if( p_intf->p_sys->b_playing && !p_intf->b_die )
     {
-        GtkModeManage( p_intf );
+        E_(GtkModeManage)( p_intf );
         p_intf->p_sys->b_playing = 0;
     }
 
index 1d101e1..80d3608 100644 (file)
              <name>menubar_exit</name>
              <signal>
                <name>activate</name>
-               <handler>GtkExit</handler>
+               <handler>GnomeExit</handler>
                <last_modification_time>Sat, 19 May 2001 16:27:52 GMT</last_modification_time>
              </signal>
              <stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
     <name>popup_exit</name>
     <signal>
       <name>activate</name>
-      <handler>GtkExit</handler>
+      <handler>GnomeExit</handler>
       <last_modification_time>Sat, 19 May 2001 16:21:45 GMT</last_modification_time>
     </signal>
     <stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
index cb92d64..94a0b95 100644 (file)
@@ -46,7 +46,7 @@ static GnomeUIInfo menubar_file_menu_uiinfo[] =
   },
   GNOMEUIINFO_SEPARATOR,
   GNOMEUIINFO_MENU_CLOSE_ITEM (GtkClose, NULL),
-  GNOMEUIINFO_MENU_EXIT_ITEM (GtkExit, NULL),
+  GNOMEUIINFO_MENU_EXIT_ITEM (GnomeExit, NULL),
   GNOMEUIINFO_END
 };
 
@@ -952,7 +952,7 @@ static GnomeUIInfo intf_popup_uiinfo[] =
   },
   GNOMEUIINFO_MENU_PREFERENCES_ITEM (GtkPreferencesShow, NULL),
   GNOMEUIINFO_SEPARATOR,
-  GNOMEUIINFO_MENU_EXIT_ITEM (GtkExit, NULL),
+  GNOMEUIINFO_MENU_EXIT_ITEM (GnomeExit, NULL),
   GNOMEUIINFO_END
 };
 
index 1175027..8c8a27e 100644 (file)
@@ -2,7 +2,7 @@
  * gtk.c : Gtk+ plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: gtk.c,v 1.2 2002/08/20 18:08:51 sam Exp $
+ * $Id: gtk.c,v 1.3 2002/09/30 11:05:39 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -69,7 +69,7 @@ vlc_module_begin();
     int i = getenv( "DISPLAY" ) == NULL ? 10 : 90;
 #endif
     add_category_hint( N_("Gtk+"), NULL );
-    add_bool( "gtk-tooltips", 1, GtkHideTooltips,
+    add_bool( "gtk-tooltips", 1, E_(GtkHideTooltips),
               TOOLTIPS_TEXT, TOOLTIPS_LONGTEXT );
     add_integer( "gtk-prefs-maxh", 480, NULL,
                  PREFS_MAXH_TEXT, PREFS_MAXH_LONGTEXT );
@@ -204,7 +204,7 @@ static void Run( intf_thread_t *p_intf )
     p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
 
     gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
-                         GTK_SIGNAL_FUNC( GtkDisplayDate ), NULL );
+                         GTK_SIGNAL_FUNC( E_(GtkDisplayDate) ), NULL );
     p_intf->p_sys->f_adj_oldvalue = 0;
 #undef P_SLIDER
 
@@ -358,7 +358,7 @@ static void Manage( intf_thread_t *p_intf )
             /* New input or stream map change */
             if( p_input->stream.b_changed )
             {
-                GtkModeManage( p_intf );
+                E_(GtkModeManage)( p_intf );
                 GtkSetupMenus( p_intf );
                 p_intf->p_sys->b_playing = 1;
             }
@@ -410,7 +410,7 @@ static void Manage( intf_thread_t *p_intf )
     }
     else if( p_intf->p_sys->b_playing && !p_intf->b_die )
     {
-        GtkModeManage( p_intf );
+        E_(GtkModeManage)( p_intf );
         p_intf->p_sys->b_playing = 0;
     }
 
index 64a2e50..9ae8b5c 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_callbacks.c,v 1.2 2002/08/08 22:28:22 sam Exp $
+ * $Id: gtk_callbacks.c,v 1.3 2002/09/30 11:05:39 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -50,7 +50,7 @@
 /*****************************************************************************
  * Useful function to retrieve p_intf
  ****************************************************************************/
-void * __GtkGetIntf( GtkWidget * widget )
+void * E_(__GtkGetIntf)( GtkWidget * widget )
 {
     void *p_data;
 
@@ -89,7 +89,13 @@ void * __GtkGetIntf( GtkWidget * widget )
  * Main interface callbacks
  */
 
-gboolean GtkExit( GtkWidget       *widget,
+#ifdef MODULE_NAME_IS_gtk
+#   define GTKEXIT GtkExit
+#else
+#   define GTKEXIT GnomeExit
+#endif
+
+gboolean GTKEXIT( GtkWidget       *widget,
                   gpointer         user_data )
 {
     intf_thread_t *p_intf = GtkGetIntf( widget );
@@ -112,7 +118,7 @@ gboolean GtkWindowDelete( GtkWidget       *widget,
                           GdkEvent        *event,
                           gpointer         user_data )
 {
-    GtkExit( GTK_WIDGET( widget ), user_data );
+    GTKEXIT( GTK_WIDGET( widget ), user_data );
 
     return TRUE;
 }
index 605c0ef..cb49b9b 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_callbacks.h : Callbacks for the gtk plugin.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_callbacks.h,v 1.1 2002/08/04 17:23:43 sam Exp $
+ * $Id: gtk_callbacks.h,v 1.2 2002/09/30 11:05:39 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
  * main window callbacks: specific prototypes are in headers listed before
  *****************************************************************************/
 
+#ifdef MODULE_NAME_IS_gtk
 gboolean GtkExit                ( GtkWidget *, gpointer );
+#else
+gboolean GnomeExit              ( GtkWidget *, gpointer );
+#endif
 gboolean GtkWindowToggle        ( GtkWidget *, gpointer );
 gboolean GtkFullscreen          ( GtkWidget *, gpointer );
 gboolean GtkSliderRelease       ( GtkWidget *, GdkEventButton *, gpointer );
index f16ea01..a337090 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_open.c : functions to handle file/disc/network open widgets.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: open.c,v 1.2 2002/08/24 11:57:07 sam Exp $
+ * $Id: open.c,v 1.3 2002/09/30 11:05:39 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -64,7 +64,8 @@ void GtkFileShow( GtkButton * button, gpointer user_data )
 {
     GtkWidget * p_file = create_intf_file();
 
-    gtk_object_set_data( GTK_OBJECT(p_file), "p_intf", GtkGetIntf( button ) );
+    gtk_object_set_data( GTK_OBJECT(p_file), "p_intf",
+                         GtkGetIntf( button ) );
 
     gtk_widget_show( p_file );
     gdk_window_raise( p_file->window );
diff --git a/modules/gui/kde/Makefile b/modules/gui/kde/Makefile
deleted file mode 100644 (file)
index 701f9e2..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MOC_SOURCES = interface.moc.cpp slider.moc.cpp disc.moc.cpp net.moc.cpp menu.moc.cpp preferences.moc.cpp pluginsbox.moc.cpp QConfigItem.moc.cpp
-
-kde_SOURCES = kde.cpp interface.cpp slider.cpp disc.cpp net.cpp menu.cpp preferences.cpp pluginsbox.cpp QConfigItem.cpp $(MOC_SOURCES)
-
-$(MOC_SOURCES): %.moc.cpp: %.h
-       $(MOC) $< -o $@
diff --git a/modules/gui/macosx/Makefile b/modules/gui/macosx/Makefile
deleted file mode 100644 (file)
index 8ade2c5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-macosx_SOURCES = macosx.m aout.m vout.m intf.m open.m playlist.m controls.m
diff --git a/modules/gui/ncurses/Makefile b/modules/gui/ncurses/Makefile
deleted file mode 100644 (file)
index ec417ed..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ncurses_SOURCES = ncurses.c
diff --git a/modules/gui/qnx/Makefile b/modules/gui/qnx/Makefile
deleted file mode 100644 (file)
index be320aa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-qnx_SOURCES = qnx.c aout.c vout.c
index 12c27ba..e1108c6 100644 (file)
@@ -2,4 +2,4 @@
 *.lo
 *.o.*
 *.lo.*
-*.moc
+*.moc.*
diff --git a/modules/gui/qt/Makefile b/modules/gui/qt/Makefile
deleted file mode 100644 (file)
index e0e4e8f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-qt_SOURCES = qt.cpp intf.cpp
-MOC_QT = intf.moc
-
-EXTRA_DEP = $(MOC_QT)
-
-$(MOC_QT): %.moc: %.cpp
-       $(MOC) -i $< -o $@
-
index e5cb7c9..6c14797 100644 (file)
@@ -2,7 +2,7 @@
  * intf.cpp: Qt interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf.cpp,v 1.2 2002/08/08 22:28:22 sam Exp $
+ * $Id: intf.cpp,v 1.3 2002/09/30 11:05:39 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 #include <string.h>                                            /* strerror() */
 #include <stdio.h>
 
-#include <vlc/vlc.h>
-#include <vlc/intf.h>
-
-#include <qapplication.h>
-#include <qmainwindow.h>
-#include <qtoolbar.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
-#include <qfiledialog.h>
-#include <qslider.h>
-#include <qlcdnumber.h>
-#include <qmenubar.h>
-#include <qstatusbar.h>
-#include <qmessagebox.h>
-#include <qlabel.h> 
-#include <qtimer.h> 
-#include <qiconset.h> 
-
-#include <qvbox.h>
-#include <qhbox.h>
-
-/*****************************************************************************
- * Local Qt slider class
- *****************************************************************************/
-class IntfSlider : public QSlider
-{
-    Q_OBJECT
-
-public:
-    IntfSlider( intf_thread_t *, QWidget * );  /* Constructor and destructor */
-    ~IntfSlider();
-
-    bool b_free;                                     /* Is the slider free ? */
-
-    int  oldvalue   ( void ) { return i_oldvalue; };
-    void setOldValue( int i_value ) { i_oldvalue = i_value; };
-
-private slots:
-    void SlideStart ( void ) { b_free = FALSE; };
-    void SlideStop  ( void ) { b_free = TRUE; };
-
-private:
-    intf_thread_t *p_intf;
-    int  i_oldvalue;
-};
-
-/*****************************************************************************
- * Local Qt interface window class
- *****************************************************************************/
-class IntfWindow : public QMainWindow
-{
-    Q_OBJECT
-
-public:
-    IntfWindow( intf_thread_t * );
-    ~IntfWindow();
-
-private slots:
-    void Manage ( void );
-
-    void FileOpen  ( void );
-    void FileQuit  ( void );
-
-    void PlaybackPlay  ( void );
-    void PlaybackPause ( void );
-    void PlaybackSlow  ( void );
-    void PlaybackFast  ( void );
-
-    void PlaylistPrev  ( void );
-    void PlaylistNext  ( void );
-
-    void DateDisplay  ( int );
-    void About ( void );
-
-    void Unimplemented( void ) { msg_Warn( p_intf, "unimplemented" ); };
-
-private:
-    intf_thread_t *p_intf;
-
-    IntfSlider *p_slider;
-
-    QToolBar   *p_toolbar;
-    QPopupMenu *p_popup;
-    QLabel     *p_date;
-};
-
-#include "intf.moc"
+#include "intf.h"
 
 #define SLIDER_MIN    0x00000
 #define SLIDER_MAX    0x10000
diff --git a/modules/gui/qt/intf.h b/modules/gui/qt/intf.h
new file mode 100644 (file)
index 0000000..971dfaa
--- /dev/null
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * intf.h: Qt interface
+ *****************************************************************************
+ * Copyright (C) 1999, 2000 VideoLAN
+ * $Id: intf.h,v 1.1 2002/09/30 11:05:39 sam Exp $
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <vlc/vlc.h>
+#include <vlc/intf.h>
+
+#include <qapplication.h>
+#include <qmainwindow.h>
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+#include <qwhatsthis.h>
+#include <qpushbutton.h>
+#include <qfiledialog.h>
+#include <qslider.h>
+#include <qlcdnumber.h>
+#include <qmenubar.h>
+#include <qstatusbar.h>
+#include <qmessagebox.h>
+#include <qlabel.h> 
+#include <qtimer.h> 
+#include <qiconset.h> 
+
+#include <qvbox.h>
+#include <qhbox.h>
+
+/*****************************************************************************
+ * Local Qt slider class
+ *****************************************************************************/
+class IntfSlider : public QSlider
+{
+    Q_OBJECT
+
+public:
+    IntfSlider( intf_thread_t *, QWidget * );  /* Constructor and destructor */
+    ~IntfSlider();
+
+    bool b_free;                                     /* Is the slider free ? */
+
+    int  oldvalue   ( void ) { return i_oldvalue; };
+    void setOldValue( int i_value ) { i_oldvalue = i_value; };
+
+private slots:
+    void SlideStart ( void ) { b_free = FALSE; };
+    void SlideStop  ( void ) { b_free = TRUE; };
+
+private:
+    intf_thread_t *p_intf;
+    int  i_oldvalue;
+};
+
+/*****************************************************************************
+ * Local Qt interface window class
+ *****************************************************************************/
+class IntfWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    IntfWindow( intf_thread_t * );
+    ~IntfWindow();
+
+private slots:
+    void Manage ( void );
+
+    void FileOpen  ( void );
+    void FileQuit  ( void );
+
+    void PlaybackPlay  ( void );
+    void PlaybackPause ( void );
+    void PlaybackSlow  ( void );
+    void PlaybackFast  ( void );
+
+    void PlaylistPrev  ( void );
+    void PlaylistNext  ( void );
+
+    void DateDisplay  ( int );
+    void About ( void );
+
+    void Unimplemented( void ) { msg_Warn( p_intf, "unimplemented" ); };
+
+private:
+    intf_thread_t *p_intf;
+
+    IntfSlider *p_slider;
+
+    QToolBar   *p_toolbar;
+    QPopupMenu *p_popup;
+    QLabel     *p_date;
+};
+
diff --git a/modules/gui/win32/Makefile b/modules/gui/win32/Makefile
deleted file mode 100644 (file)
index f55df00..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# Borland C++ project
-# we override everything by setting win32_CUSTOM
-#
-win32_CUSTOM = yes
-
-win32.so: Makefile
-       rm -f win32.mak
-       $(BCBUILDER)/Bin/bpr2mak win32.bpr -s | sed 's#^LIBPATH = .*#&;$$(RELEASELIBPATH)# ; s#^USERDEFINES = .*#& -DMODULE_NAME=win32 -DMODULE_PATH=modules_gui_win32_win32#' > win32.mak
-       $(BCBUILDER)/Bin/make -f win32.mak -b
-
-
index 9b820b1..a529470 100644 (file)
@@ -3,7 +3,7 @@
 <PROJECT>\r
   <MACROS>\r
     <VERSION value="BCB.05.03"/>\r
-    <PROJECT value="win32.so"/>\r
+    <PROJECT value="libwin32_plugin.so"/>\r
     <OBJFILES value="win32.obj mainframe.obj network.obj playlist.obj preferences.obj about.obj \r
       disc.obj control.obj menu.obj messages.obj misc.obj"/>\r
     <RESFILES value=""/>\r
@@ -112,4 +112,4 @@ ActiveLang=
 ProjectLang=\r
 RootDir=\r
   </IDEOPTIONS>\r
-</PROJECT>
\ No newline at end of file
+</PROJECT>\r
diff --git a/modules/misc/Makefile b/modules/misc/Makefile
deleted file mode 100644 (file)
index aff05ac..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-null_SOURCES = null.c
-gtk_main_SOURCES = gtk_main.c
diff --git a/modules/misc/dummy/Makefile b/modules/misc/dummy/Makefile
deleted file mode 100644 (file)
index 307e1c7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dummy_SOURCES = dummy.c aout.c vout.c interface.c input.c decoder.c
index 583a536..3c684a1 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_main.c : Gtk+ wrapper for gtk_main
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: gtk_main.c,v 1.5 2002/08/29 23:53:22 massiot Exp $
+ * $Id: gtk_main.c,v 1.6 2002/09/30 11:05:39 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -30,7 +30,7 @@
 
 #include <gtk/gtk.h>
 
-#ifdef HAVE_GNOME_H
+#ifdef MODULE_NAME