From 2799d36bc8abdc28df29a202acdb27223b25a7a7 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 30 Sep 2002 11:05:42 +0000 Subject: [PATCH] * ALL: the build mechanism now uses automake. See HACKING for more details. * ./mozilla/vlcplugin.cpp: javascript support for the Mozilla plugin. * debian/rules: the A52 module is now in a separate package. --- .cvsignore | 4 + ChangeLog | 4 - HACKING | 43 +- Makefile.am | 450 +++++- Makefile.config.in | 19 - Makefile.modules | 97 -- Makefile.old | 510 ------ Makefile.opts.in | 286 ---- bootstrap | 233 ++- configure.in => configure.ac.in | 1464 +++++++++--------- debian/.cvsignore | 2 + debian/control | 20 +- debian/libvlc0-dev.dirs | 14 +- debian/rules | 66 +- debian/vlc-plugin-dvb.dirs | 2 + debian/vlc.dirs | 2 +- doc/.cvsignore | 2 + doc/developer/Makefile | 6 +- doc/developer/hacking.xml | 247 +++ doc/developer/manual.xml | 8 +- doc/developer/overview.xml | 224 +-- doc/fortunes.txt | 80 + doc/vlc.1 | 3 +- extras/GNUgetopt/.cvsignore | 1 + include/modules_inner.h | 40 +- include/vlc_config.h | 2 +- include/vlc_symbols.h | 319 ---- ipkg/.cvsignore | 2 + lib/.cvsignore | 3 + m4/.cvsignore | 2 + modules/.cvsignore | 2 + modules/access/.cvsignore | 5 +- modules/access/Makefile | 4 - modules/access/dvd/Makefile | 1 - modules/access/dvdplay/Makefile | 1 - modules/access/dvdread/Makefile | 1 - modules/access/file.c | 3 +- modules/access/http.c | 3 +- modules/access/rtp.c | 5 +- modules/access/satellite/Makefile | 1 - modules/access/udp.c | 3 +- modules/access/v4l/Makefile | 1 - modules/access/vcd/Makefile | 1 - modules/audio_filter/channel_mixer/Makefile | 1 - modules/audio_filter/converter/Makefile | 10 - modules/audio_filter/resampler/Makefile | 3 - modules/audio_mixer/Makefile | 3 - modules/audio_output/Makefile | 7 - modules/audio_output/arts.c | 45 +- modules/audio_output/sdl.c | 3 +- modules/codec/Makefile | 2 - modules/codec/a52old/Makefile | 1 - modules/codec/a52old/downmix/Makefile | 3 - modules/codec/a52old/imdct/Makefile | 5 - modules/codec/cinepak/Makefile | 1 - modules/codec/dv/Makefile | 1 - modules/codec/faad/Makefile | 1 - modules/codec/ffmpeg/Makefile | 4 - modules/codec/ffmpeg/postprocessing/Makefile | 6 - modules/codec/mad/Makefile | 1 - modules/codec/mpeg_audio/Makefile | 1 - modules/codec/mpeg_video/Makefile | 5 - modules/codec/mpeg_video/idct/Makefile | 5 - modules/codec/mpeg_video/motion/Makefile | 5 - modules/codec/spudec/Makefile | 1 - modules/control/lirc/Makefile | 1 - modules/control/rc/Makefile | 1 - modules/control/rc/rc.c | 24 +- modules/demux/Makefile | 1 - modules/demux/aac/Makefile | 1 - modules/demux/avi/Makefile | 1 - modules/demux/mp4/Makefile | 1 - modules/demux/mpeg/Makefile | 6 - modules/demux/util/Makefile | 2 - modules/gui/beos/Makefile | 1 - modules/gui/familiar/Makefile | 1 - modules/gui/familiar/callbacks.c | 8 +- modules/gui/familiar/callbacks.h | 4 +- modules/gui/gtk/Makefile | 4 - modules/gui/gtk/common.h | 10 +- modules/gui/gtk/display.c | 10 +- modules/gui/gtk/display.h | 12 +- modules/gui/gtk/gnome.c | 10 +- modules/gui/gtk/gnome.glade | 4 +- modules/gui/gtk/gnome_interface.c | 4 +- modules/gui/gtk/gtk.c | 10 +- modules/gui/gtk/gtk_callbacks.c | 14 +- modules/gui/gtk/gtk_callbacks.h | 6 +- modules/gui/gtk/open.c | 5 +- modules/gui/kde/Makefile | 6 - modules/gui/macosx/Makefile | 1 - modules/gui/ncurses/Makefile | 1 - modules/gui/qnx/Makefile | 1 - modules/gui/qt/.cvsignore | 2 +- modules/gui/qt/Makefile | 8 - modules/gui/qt/intf.cpp | 91 +- modules/gui/qt/intf.h | 113 ++ modules/gui/win32/Makefile | 12 - modules/gui/win32/win32.bpr | 4 +- modules/misc/Makefile | 2 - modules/misc/dummy/Makefile | 1 - modules/misc/gtk_main.c | 14 +- modules/misc/logger/Makefile | 1 - modules/misc/memcpy/Makefile | 5 - modules/misc/network/Makefile | 2 - modules/video_chroma/Makefile | 8 - modules/video_filter/Makefile | 7 - modules/video_filter/deinterlace/Makefile | 1 - modules/video_output/Makefile | 6 - modules/video_output/directx/Makefile | 1 - modules/video_output/directx/aout.c | 5 +- modules/video_output/mga/Makefile | 2 - modules/video_output/qte/Makefile | 1 - modules/video_output/sdl.c | 3 +- modules/video_output/x11/Makefile | 2 - modules/visualization/scope/Makefile | 1 - modules/visualization/xosd/Makefile | 1 - mozilla/Makefile | 62 - mozilla/vlcintf.idl | 2 + mozilla/vlcpeer.cpp | 42 +- mozilla/vlcpeer.h | 16 +- mozilla/vlcplugin.cpp | 61 +- mozilla/vlcplugin.h | 9 +- mozilla/vlcshell.cpp | 152 +- po/.cvsignore | 1 + po/POTFILES.in | 86 - share/.cvsignore | 2 + src/.cvsignore | 2 + src/misc/modules.c | 15 +- src/misc/modules_plugin.h | 337 ---- src/misc/modules_plugin.h.in | 4 +- src/misc/symbols.c | 111 -- vlc-config.in | 4 +- 133 files changed, 2375 insertions(+), 3274 deletions(-) delete mode 100644 Makefile.config.in delete mode 100644 Makefile.modules delete mode 100644 Makefile.old delete mode 100644 Makefile.opts.in rename configure.in => configure.ac.in (58%) create mode 100644 debian/vlc-plugin-dvb.dirs create mode 100644 doc/.cvsignore create mode 100644 doc/developer/hacking.xml create mode 100644 extras/GNUgetopt/.cvsignore delete mode 100644 include/vlc_symbols.h create mode 100644 ipkg/.cvsignore create mode 100644 m4/.cvsignore create mode 100644 modules/.cvsignore delete mode 100644 modules/access/Makefile delete mode 100644 modules/access/dvd/Makefile delete mode 100644 modules/access/dvdplay/Makefile delete mode 100644 modules/access/dvdread/Makefile delete mode 100644 modules/access/satellite/Makefile delete mode 100644 modules/access/v4l/Makefile delete mode 100644 modules/access/vcd/Makefile delete mode 100644 modules/audio_filter/channel_mixer/Makefile delete mode 100644 modules/audio_filter/converter/Makefile delete mode 100644 modules/audio_filter/resampler/Makefile delete mode 100644 modules/audio_mixer/Makefile delete mode 100644 modules/audio_output/Makefile delete mode 100644 modules/codec/Makefile delete mode 100644 modules/codec/a52old/Makefile delete mode 100644 modules/codec/a52old/downmix/Makefile delete mode 100644 modules/codec/a52old/imdct/Makefile delete mode 100644 modules/codec/cinepak/Makefile delete mode 100644 modules/codec/dv/Makefile delete mode 100644 modules/codec/faad/Makefile delete mode 100644 modules/codec/ffmpeg/Makefile delete mode 100644 modules/codec/ffmpeg/postprocessing/Makefile delete mode 100644 modules/codec/mad/Makefile delete mode 100644 modules/codec/mpeg_audio/Makefile delete mode 100644 modules/codec/mpeg_video/Makefile delete mode 100644 modules/codec/mpeg_video/idct/Makefile delete mode 100644 modules/codec/mpeg_video/motion/Makefile delete mode 100644 modules/codec/spudec/Makefile delete mode 100644 modules/control/lirc/Makefile delete mode 100644 modules/control/rc/Makefile delete mode 100644 modules/demux/Makefile delete mode 100644 modules/demux/aac/Makefile delete mode 100644 modules/demux/avi/Makefile delete mode 100644 modules/demux/mp4/Makefile delete mode 100644 modules/demux/mpeg/Makefile delete mode 100644 modules/demux/util/Makefile delete mode 100644 modules/gui/beos/Makefile delete mode 100644 modules/gui/familiar/Makefile delete mode 100644 modules/gui/gtk/Makefile delete mode 100644 modules/gui/kde/Makefile delete mode 100644 modules/gui/macosx/Makefile delete mode 100644 modules/gui/ncurses/Makefile delete mode 100644 modules/gui/qnx/Makefile delete mode 100644 modules/gui/qt/Makefile create mode 100644 modules/gui/qt/intf.h delete mode 100644 modules/gui/win32/Makefile delete mode 100644 modules/misc/Makefile delete mode 100644 modules/misc/dummy/Makefile delete mode 100644 modules/misc/logger/Makefile delete mode 100644 modules/misc/memcpy/Makefile delete mode 100644 modules/misc/network/Makefile delete mode 100644 modules/video_chroma/Makefile delete mode 100644 modules/video_filter/Makefile delete mode 100644 modules/video_filter/deinterlace/Makefile delete mode 100644 modules/video_output/Makefile delete mode 100644 modules/video_output/directx/Makefile delete mode 100644 modules/video_output/mga/Makefile delete mode 100644 modules/video_output/qte/Makefile delete mode 100644 modules/video_output/x11/Makefile delete mode 100644 modules/visualization/scope/Makefile delete mode 100644 modules/visualization/xosd/Makefile delete mode 100644 mozilla/Makefile create mode 100644 share/.cvsignore create mode 100644 src/.cvsignore delete mode 100644 src/misc/modules_plugin.h delete mode 100644 src/misc/symbols.c diff --git a/.cvsignore b/.cvsignore index c466e2242f..59aba812ee 100644 --- a/.cvsignore +++ b/.cvsignore @@ -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 diff --git a/ChangeLog b/ChangeLog index 6c4d9bb1f6..4f3740510f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,3 @@ -#===================# -# ChangeLog for vlc # -#===================# - 0.5.0 Not released yet diff --git a/HACKING b/HACKING index e445b7e140..d7eb783fc3 100644 --- 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. + diff --git a/Makefile.am b/Makefile.am index 18f7d70092..69f5f06225 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 index 9fdf24c904..0000000000 --- a/Makefile.config.in +++ /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 index 2a54e0037b..0000000000 --- a/Makefile.modules +++ /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 index 93cef4cd0e..0000000000 --- a/Makefile.old +++ /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 index 34ac60ed86..0000000000 --- a/Makefile.opts.in +++ /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 - - diff --git a/bootstrap b/bootstrap index 0ac4fbc7eb..16d79aba3f 100755 --- 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 @@ -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 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.in b/configure.ac.in similarity index 58% rename from configure.in rename to configure.ac.in index b06a3cd237..44325cc9ba 100644 --- a/configure.in +++ b/configure.ac.in @@ -1,56 +1,52 @@ dnl Autoconf settings for vlc -AC_INIT(configure.in) -AC_PREREQ(2.50) -AC_CANONICAL_SYSTEM +AC_INIT(vlc,0.5.0-cvs-am) CONFIGURE_LINE="$0 $*" - -PACKAGE="vlc" -VERSION="0.5.0-cvs" CODENAME="Natalya" -AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION}) +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 -save_CPPFLAGS="${CPPFLAGS}" -save_CFLAGS="${CFLAGS}" -save_LDFLAGS="${LDFLAGS}" +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 -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) @@ -64,156 +60,193 @@ AC_C_CONST AC_C_INLINE dnl -dnl Set default LDFLAGS +dnl Set default values dnl -vlc_LDFLAGS="${LDFLAGS}" +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 -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}" -;; + 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 -if test "x${SYS}" = "xmingw32" -then -plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct" -else -plugins_CFLAGS="${plugins_CFLAGS} -fPIC" -plugins_LDFLAGS="${plugins_LDFLAGS} -fPIC" -fi +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 -save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CFLAGS="${save_CFLAGS}" +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, -ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket" -vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket" + AC_CHECK_LIB(socket,connect, + LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket" + LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket" )]) + AC_CHECK_FUNC(send,,[ -AC_CHECK_LIB(socket,send, -http_LDFLAGS="${http_LDFLAGS} -lsocket" + AC_CHECK_LIB(socket,send, + LDFLAGS_http="${LDFLAGS_http} -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")]) + AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl",[ + AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind")]) ]) -have_nanosleep=0 -AC_CHECK_FUNC(nanosleep,have_nanosleep=1,[ + +have_nanosleep=false +AC_CHECK_FUNC(nanosleep,have_nanosleep=:,[ AC_CHECK_LIB(rt,nanosleep, - [pthread_LDFLAGS="${pthread_LDFLAGS} -lrt"; have_nanosleep=1], + [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:], [AC_CHECK_LIB(posix4,nanosleep, - [pthread_LDFLAGS="${pthread_LDFLAGS} -lposix4"; have_nanosleep=1])] + [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])] ) ]) -if test x$have_nanosleep = x1; then -AC_DEFINE(HAVE_NANOSLEEP, 1, - Define if nanosleep is available.) +if ${have_nanosleep}; 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_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"]) AC_CHECK_FUNC(inet_aton,,[ -AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv") + AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv") ]) AC_CHECK_FUNC(textdomain,,[ -AC_CHECK_LIB(intl,textdomain, -vlc_LDFLAGS="${vlc_LDFLAGS} -lintl" -plugins_LDFLAGS="${plugins_LDFLAGS} -lintl" -) + AC_CHECK_LIB(intl,textdomain, + LDFLAGS_vlc="${LDFLAGS_vlc} -lintl" + LDFLAGS_plugins="${LDFLAGS_plugins} -lintl" + ) ]) dnl Check for getopt -NEED_GETOPT=0 +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) vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"], -[NEED_GETOPT=1])]) + 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,vlc_LDFLAGS="${vlc_LDFLAGS} -ldl") +AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl") AC_CHECK_LIB(m,cos, -imdct_LDFLAGS="${imdct_LDFLAGS} -lm" -filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm") + LDFLAGS_imdct="${LDFLAGS_imdct} -lm" + LDFLAGS_filter_distort="${LDFLAGS_filter_distort} -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" + 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 ${pthread_LDFLAGS}") + AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread") fi if test "x${THREAD_LIB}" = "xerror"; then - AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads ${pthread_LDFLAGS}") + 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") + 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="" + AC_CHECK_FUNC(pthread_mutex_lock) + THREAD_LIB="" fi dnl Check for cthreads under GNU/Hurd for instance @@ -221,14 +254,14 @@ 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 defines pthread_cond_t.)]) + AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1, + Define if defines pthread_cond_t.)]) AC_EGREP_HEADER(pthread_once,pthread.h,[ -AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1, - Define if defines pthread_once.)]) + AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1, + Define if defines pthread_once.)]) AC_EGREP_HEADER(strncasecmp,strings.h,[ -AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1, - Define if defines strncasecmp.)]) + AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1, + Define if defines strncasecmp.)]) dnl Check for headers AC_CHECK_HEADERS(stdint.h getopt.h strings.h inttypes.h sys/int_types.h) @@ -242,14 +275,14 @@ 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 defines nanosleep.) + AC_DEFINE(HAVE_DECL_NANOSLEEP, 1, + Define if defines nanosleep.) ]) dnl Make sure we have timespecs AC_EGREP_HEADER(timespec,sys/time.h,[ -AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, - Define if defines struct timespec.) + AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, + Define if defines struct timespec.) ]) dnl Check for threads library @@ -257,228 +290,244 @@ 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" + x_includes="/usr/X11R6/include" fi if test "x${x_libraries}" = "xNONE"; then -x_libraries="/usr/X11R6/lib" + x_libraries="/usr/X11R6/lib" fi -dnl Build the gtk_main plugin? +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="${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 defines DPMSInfo.) -]) -]) -CPPFLAGS="${save_CPPFLAGS}" + 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 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="${save_CFLAGS} -Wall -Werror" - AC_TRY_COMPILE([#include ], - [void foo() { int meuh; ntohl(meuh); }], - ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)]) + [ac_cv_c_ntohl_sys_param_h], + [CFLAGS="${CFLAGS_save} -Wall -Werror" + AC_TRY_COMPILE([#include ], + [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 defines ntohl.) + AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if 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)]) + [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 -save_CFLAGS="${save_CFLAGS} -finline-limit-30000"; CFLAGS="${save_CFLAGS}" + 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 ${save_CFLAGS}" - AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)]) + [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 -save_CFLAGS="-Wall -Winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}" + 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 ${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 + 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="${save_CFLAGS} -pipe" - AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)]) + [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 -save_CFLAGS="${save_CFLAGS} -pipe"; CFLAGS="${save_CFLAGS}" + 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="${save_CFLAGS} -O3" - AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)]) + [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="${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" + CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3" 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" + 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 -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)]) + [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" + 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)]) + [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" + 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)]) + [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! -i420_yuy2_mmx_CFLAGS="${i420_yuy2_mmx_CFLAGS} -fomit-frame-pointer" + 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="${save_CFLAGS} -bundle -undefined error -lcc_dynamic" - AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)]) + [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 -plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic" + 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="${save_CFLAGS} -shared" - AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)]) + [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 -plugins_LDFLAGS="${plugins_LDFLAGS} -shared" + LDFLAGS_plugins="${LDFLAGS_plugins} -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 - #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)]) + [ac_cv_cpp_variadic_macros], + [CFLAGS="${CFLAGS_save}" + AC_TRY_COMPILE( + [#include + #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) + 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}"]) + [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]) + 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}" -;; + 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 -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" +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 misc/network/ipv4" +NETWORK_MODULES="access_udp access_http access_rtp 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" +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 +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}" + [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 @@ -487,7 +536,7 @@ fi AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly], [ac_cv_mmxext_inline], - [CFLAGS="${save_CFLAGS}" + [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 @@ -496,7 +545,7 @@ fi AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], - [CFLAGS="${save_CFLAGS}" + [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 @@ -506,7 +555,7 @@ fi AC_CACHE_CHECK([if \$CC groks SSE inline assembly], [ac_cv_sse_inline], - [CFLAGS="${save_CFLAGS}" + [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 @@ -519,10 +568,10 @@ fi if test "x${SYS}" != "xmingw32"; then AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly], [ac_cv_altivec_inline], - [CFLAGS="${save_CFLAGS}" + [CFLAGS="${CFLAGS_save}" AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");], ac_cv_altivec_inline=yes, - [CFLAGS="${save_CFLAGS} -Wa,-m7400" + [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) @@ -530,50 +579,49 @@ AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly], 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}" + 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="${save_CFLAGS} -faltivec" + [CFLAGS="${CFLAGS_save} -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" + 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="${save_CFLAGS}"]) + 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.) - 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}" + 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="${vlc_LDFLAGS} -framework vecLib" + [LDFLAGS="${LDFLAGS_vlc} -framework vecLib" AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no) - LDFLAGS="${save_LDFLAGS}" + LDFLAGS="${LDFLAGS_save}" ]) 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" + 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:]) @@ -584,11 +632,15 @@ 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}" + 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 TUNING="pentiumpro" + 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 TUNING="750"; fi + if test "x${target_cpu}" = "xpowerpc"; then CFLAGS_TUNING="-mtune=750"; fi fi fi @@ -605,9 +657,8 @@ 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 ]) +[ --disable-optimizations disable compiler optimizations (default enabled)]) +AM_CONDITIONAL(OPTIM, test "x${enable_optimizations}" != "xno") dnl dnl AltiVec acceleration @@ -622,19 +673,16 @@ AC_ARG_ENABLE(altivec, 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 ]) +[ --enable-debug debug mode (default disabled)]) +AM_CONDITIONAL(DEBUG, test "x${enable_debug}" = "xyes") 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`" ]) +[ --enable-release activate extra optimizations (default disabled)]) +AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes") dnl dnl Input plugins @@ -649,17 +697,17 @@ AC_ARG_ENABLE(dvd, [ --enable-dvd DVD input module (default enabled)]) if test "x${enable_dvd}" != "xno" then - AC_ARG_WITH(dvdcss, + AC_ARG_WITH(dvdcss, [ --with-dvdcss=PATH libdvdcss headers and libraries]) - AC_ARG_WITH(dvdcss-tree, + 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" ], + [ 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= for dynamic linking (recommended under Unix) or --with-dvdcss-tree= 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 @@ -675,9 +723,9 @@ then 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" + 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) @@ -687,9 +735,9 @@ then ;; 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" + PLUGINS="${PLUGINS} dvd" + CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA" + LDFLAGS_dvd="${LDFLAGS_dvd} -ldl" ;; *) AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss}) @@ -697,9 +745,9 @@ then 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" + 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) @@ -716,23 +764,23 @@ AC_ARG_ENABLE(dvdread, [ --enable-dvdread dvdread input module (default disabled)]) if test "x${enable_dvdread}" != "xno" then - AC_ARG_WITH(dvdread, + AC_ARG_WITH(dvdread, [ --with-dvdread=PATH libdvdread headers and libraries]) if test "x${with_dvdread}" = "x" then - test_LDFLAGS="" - test_CFLAGS="" + LDFLAGS_test="" + CPPFLAGS_test="" else - test_LDFLAGS="-L${with_dvdread}/lib" - test_CFLAGS="-I${with_dvdread}/include" + LDFLAGS_test="-L${with_dvdread}/lib" + CPPFLAGS_test="-I${with_dvdread}/include" fi - CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}" + CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}" AC_CHECK_HEADERS(dvdread/dvd_reader.h, [ AC_TRY_COMPILE([#include ], [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}" + PLUGINS="${PLUGINS} dvdread" + LDFLAGS_dvdread="${LDFLAGS_dvdread} ${LDFLAGS_test} -ldvdread" + CPPFLAGS_dvdread="${CPPFLAGS_dvdread} ${CPPFLAGS_test}" ],[ if test "x${enable_dvdread}" != "x" then @@ -750,7 +798,7 @@ then fi fi ]) - CPPFLAGS="$save_CPPFLAGS" + CPPFLAGS="${CPPFLAGS_save}" fi dnl @@ -758,27 +806,27 @@ dnl dvdplay module: check for libdvdplay dnl AC_ARG_ENABLE(dvdplay, [ --enable-dvdplay dvdplay input module (default disabled)]) -if test "x$enable_dvdplay" != "xno" +if test "x${enable_dvdplay}" != "xno" then - AC_ARG_WITH(dvdplay, + AC_ARG_WITH(dvdplay, [ --with-dvdplay=PATH libdvdplay headers and libraries]) - if test "x$with_dvdplay" = x + if test "x${with_dvdplay}" = x then - test_LDFLAGS="" - test_CFLAGS="" + LDFLAGS_test="" + CPPFLAGS_test="" else - test_LDFLAGS="-L${with_dvdplay}/lib" - test_CFLAGS="-I${with_dvdplay}/include" + LDFLAGS_test="-L${with_dvdplay}/lib" + CPPFLAGS_test="-I${with_dvdplay}/include" fi - CPPFLAGS="$save_CPPFLAGS $test_CFLAGS" + CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}" 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}" + PLUGINS="${PLUGINS} dvdplay" + LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_test} -ldvdplay -ldvdread" + CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_test}" ],[ - if test "x$enable_dvdplay" != x + if test "x${enable_dvdplay}" != x then - if test "x$with_dvdplay" != x + if test "x${with_dvdplay}" != x then AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include]) else @@ -786,7 +834,7 @@ then fi fi ]) - CPPFLAGS="${save_CPPFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" fi @@ -797,7 +845,7 @@ AC_ARG_ENABLE(dvbpsi, [ --enable-dvbpsi dvbpsi ts demux module (default disabled)]) if test "x${enable_dvbpsi}" != "xno" then - AC_ARG_WITH(dvbpsi, + AC_ARG_WITH(dvbpsi, [ --with-dvbpsi=PATH libdvbpsi headers and libraries]) AC_ARG_WITH(dvbpsi, [ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking]) @@ -806,8 +854,8 @@ then 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" ], [], + [ 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}) @@ -822,9 +870,9 @@ then 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" + 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) @@ -839,24 +887,24 @@ then AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi}) if test "x${with_dvbpsi}" = "x" then - test_LDFLAGS="" - test_CFLAGS="" + LDFLAGS_test="" + CPPFLAGS_test="" else - test_LDFLAGS="-L${with_dvbpsi}/lib" - test_CFLAGS="-I${with_dvbpsi}/include" + LDFLAGS_test="-L${with_dvbpsi}/lib" + CPPFLAGS_test="-I${with_dvbpsi}/include" fi - CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}" + CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}" 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}" + 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="${save_CPPFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" ;; esac fi @@ -869,7 +917,7 @@ AC_ARG_ENABLE(v4l, if test "x${enable_v4l}" = "xyes" then AC_CHECK_HEADERS(libv4l/v4l.h, [ - PLUGINS="${PLUGINS} access/v4l/v4l" + PLUGINS="${PLUGINS} v4l" ],[]) fi @@ -882,23 +930,23 @@ AC_ARG_ENABLE(vcd, if test "x${enable_vcd}" != "xno" then AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[ - PLUGINS="${PLUGINS} access/vcd/vcd" + PLUGINS="${PLUGINS} vcd" ]) - + AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[ - PLUGINS="${PLUGINS} access/vcd/vcd" + 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} access/vcd/vcd" + PLUGINS="${PLUGINS} 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" + LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation" fi fi @@ -909,7 +957,7 @@ AC_ARG_ENABLE(satellite, [ --enable-satellite satellite card support (default disabled)], [ if test "x${enable_satellite}" = "xyes" then - PLUGINS="${PLUGINS} access/satellite/satellite" + PLUGINS="${PLUGINS} satellite" fi]) dnl @@ -917,24 +965,24 @@ 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],[ + have_ipv6=false + AC_CHECK_FUNC(inet_pton,[have_ipv6=:],[ AC_CHECK_LIB(resolv,inet_pton, - [have_ipv6=1 - ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"]) + [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=0]) - if test x$have_ipv6 = x1; then - PLUGINS="${PLUGINS} misc/network/ipv6" + [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} misc/network/ipv6"],[AC_MSG_RESULT(no)]) + PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)]) fi dnl @@ -944,7 +992,7 @@ AC_ARG_ENABLE(avi, [ --enable-avi AVI demux module (default enabled)]) if test "x${enable_avi}" != "xno" then - PLUGINS="${PLUGINS} demux/avi/avi" + PLUGINS="${PLUGINS} avi" fi dnl @@ -954,7 +1002,7 @@ AC_ARG_ENABLE(aac, [ --enable-aac AAC demux module (default enabled)]) if test "x${enable_aac}" != "xno" then - PLUGINS="${PLUGINS} demux/aac/aac" + PLUGINS="${PLUGINS} aac" fi dnl @@ -974,8 +1022,8 @@ then [ --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" + CPPFLAGS_mad="${CPPFLAGS_mad} -I${with_mad}/include" + LDFLAGS_mad="${LDFLAGS_mad} -L${with_mad}/lib" fi AC_ARG_WITH(mad-tree, @@ -994,30 +1042,30 @@ then 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}" + 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} codec/mad/mad" - mad_LDFLAGS="${mad_LDFLAGS} -lmad" + BUILTINS="${BUILTINS} mad" + LDFLAGS_mad="${LDFLAGS_mad} -lmad" ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ]) ],[]) - LDFLAGS="${save_LDFLAGS}" + LDFLAGS="${LDFLAGS_save}" 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}" + 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} codec/mad/mad" - mad_LDFLAGS="${mad_LDFLAGS} -lmad" ], + PLUGINS="${PLUGINS} mad" + LDFLAGS_mad="${LDFLAGS_mad} -lmad" ], [ AC_MSG_ERROR([Cannot find libmad library...]) ]) - CFLAGS="${save_CFLAGS}" - LDFLAGS="${save_LDFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" + LDFLAGS="${LDFLAGS_save}" fi fi @@ -1025,9 +1073,9 @@ dnl dnl libid3tag support dnl AC_CHECK_HEADERS(id3tag.h, [ - id3tag_LDFLAGS="${id3tag_LDFLAGS} -lz -lid3tag" - PLUGINS="${PLUGINS} demux/util/id3tag"]) - + LDFLAGS_id3tag="${LDFLAGS_id3tag} -lz -lid3tag" + PLUGINS="${PLUGINS} id3tag"]) + dnl dnl ffmpeg decoder plugin dnl @@ -1039,22 +1087,21 @@ then [ --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" + CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/libffmpeg" + LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib" fi dnl Add postprocessing modules - PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_c" + PLUGINS="${PLUGINS} postprocessing_c" if test "x${ac_cv_mmx_inline}" != "xno"; then - PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_mmx" + PLUGINS="${PLUGINS} postprocessing_mmx" fi if test "x${ac_cv_mmxext_inline}" != "xno"; then - PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_mmxext" + PLUGINS="${PLUGINS} postprocessing_mmxext" fi - - AC_ARG_WITH(ffmpeg-tree, + AC_ARG_WITH(ffmpeg-tree, [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking]) if test "x${with_ffmpeg_tree}" != "x" then @@ -1070,23 +1117,23 @@ then 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" + 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 - CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}" - LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS}" + CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}" + LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}" AC_CHECK_LIB(avcodec, avcodec_init, [ - BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg" - ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec" ], + BUILTINS="${BUILTINS} ffmpeg" + LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" ], [ AC_MSG_ERROR([Cannot find libavcodec library...]) ]) - LDFLAGS="${save_LDFLAGS}" - CFLAGS="${save_CFLAGS}" + LDFLAGS="${LDFLAGS_save}" + CPPFLAGS="${CPPFLAGS_save}" fi fi @@ -1101,12 +1148,12 @@ then [ --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" + CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include" + LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib" fi - faad_LDFLAGS="${faad_LDFLAGS}" + LDFLAGS_faad="${LDFLAGS_faad}" - AC_ARG_WITH(faad-tree, + AC_ARG_WITH(faad-tree, [ --with-faad-tree=PATH faad tree for static linking]) if test "x${with_faad_tree}" != "x" then @@ -1122,41 +1169,41 @@ then 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" + 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 - CFLAGS="${save_CFLAGS} ${faad_CFLAGS}" - LDFLAGS="${save_LDFLAGS} ${faad_LDFLAGS}" + 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} codec/faad/faad" - faad_LDFLAGS="${faad_LDFLAGS} -lfaad" ], + PLUGINS="${PLUGINS} faad" + LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ], [ AC_MSG_ERROR([Cannot find libfaad library...]) ]) - LDFLAGS="${save_LDFLAGS}" - CFLAGS="${save_CFLAGS}" + LDFLAGS="${LDFLAGS_save}" + CPPFLAGS="${CPPFLAGS_save}" fi fi -dnl -dnl MP4 module -dnl +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" + PLUGINS="${PLUGINS} mp4" AC_CHECK_HEADERS(zlib.h, - [ mp4_LDFLAGS="${mp4_LDFLAGS} -lz" ] ) + [ LDFLAGS_mp4="${LDFLAGS_mp4} -lz" ] ) fi dnl @@ -1166,7 +1213,7 @@ AC_ARG_ENABLE(a52, [ --enable-a52 A/52 support with liba52 (default enabled)]) if test "x${enable_a52}" != "xno" then - AC_ARG_WITH(a52, + 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 ],[],[]) @@ -1184,22 +1231,22 @@ then 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}" + 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} audio_filter/converter/a52tofloat32" - a52tofloat32_LDFLAGS="${a52tofloat32_LDFLAGS} -la52 -lm" - a52tofloat32_CFLAGS="${a52tofloat32_CFLAGS} -DUSE_A52DEC_TREE" + 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.4]) + 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="${save_LDFLAGS}" + LDFLAGS="${LDFLAGS_save}" else AC_MSG_RESULT(no) AC_MSG_ERROR([the specified tree doesn't have a52.h]) @@ -1207,21 +1254,19 @@ then else if test "x${with_a52}" = "x" then - test_LDFLAGS="" - test_CFLAGS="" + LDFLAGS_test="" + CPPFLAGS_test="" else - test_LDFLAGS="-L${with_a52}/lib" - test_CFLAGS="-I${with_a52}/include" + LDFLAGS_test="-L${with_a52}/lib" + CPPFLAGS_test="-I${with_a52}/include" fi - save_CPPFLAGS="${CPPFLAGS}" - save_LDFLAGS="${LDFLAGS}" - CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}" - LDFLAGS="${save_LDFLAGS} ${test_LDFLAGS}" + CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}" + LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test}" 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}" + PLUGINS="${PLUGINS} a52" + LDFLAGS_a52="${LDFLAGS_a52} ${LDFLAGS_test} -la52 -lm" + CPPFLAGS_a52="${CPPFLAGS_a52} ${CPPFLAGS_test}" ],[ if test "x${enable_dvbpsi}" != "x" then @@ -1229,8 +1274,8 @@ then fi ],[-lm]) ]) - CPPFLAGS="${save_CPPFLAGS}" - LDFLAGS="${save_LDFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" + LDFLAGS="${LDFLAGS_save}" fi fi @@ -1241,7 +1286,7 @@ AC_ARG_ENABLE(cinepak, [ --enable-cinepak Cinepak decoder (default enabled)]) if test "x${enable_cinepak}" != "xno" then - PLUGINS="${PLUGINS} codec/cinepak/cinepak" + PLUGINS="${PLUGINS} cinepak" fi dnl @@ -1253,23 +1298,23 @@ 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" + #PLUGINS="${PLUGINS} ogg vorbis" + LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis" ],[]) fi dnl dnl DV plugin -dnl +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" + PLUGINS="${PLUGINS} dv" + LDFLAGS_dv="${LDFLAGS_dv} -ldv" ],[]) -fi +fi dnl dnl Video plugins @@ -1285,13 +1330,13 @@ 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}" + CPPFLAGS="${CPPFLAGS_save} -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}" + PLUGINS="${PLUGINS} x11" + LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext" + CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}" ]) - CPPFLAGS="${save_CPPFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" fi dnl @@ -1302,26 +1347,26 @@ 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}" + CPPFLAGS="${CPPFLAGS_save} -I${x_includes}" AC_CHECK_HEADERS(X11/extensions/Xv.h, [ - CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext" + 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} video_output/x11/xvideo" - xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv_pic" - xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}", + 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} video_output/x11/xvideo" - xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv" - xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}", + 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="${save_CFLAGS}" + CFLAGS="${CFLAGS_save}" ] - CPPFLAGS="${save_CPPFLAGS}") + CPPFLAGS="${CPPFLAGS_save}") fi dnl @@ -1354,17 +1399,19 @@ then 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}" + 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 + [ 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}" + 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. @@ -1391,25 +1438,26 @@ then [ --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" + LDFLAGS_test="-L${QTDIR}/lib" + CPPFLAGS_test="-I${QTDIR}/include" else - test_LDFLAGS="-L${with_qte}/lib" - test_CFLAGS="-I${with_qte}/include" + LDFLAGS_test="-L${with_qte}/lib" + CPPFLAGS_test="-I${with_qte}/include" fi - CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}" + CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}" 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" + 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} video_output/qte/qte" + PLUGINS="${PLUGINS} qte" else - BUILTINS="${BUILTINS} video_output/qte/qte" + BUILTINS="${BUILTINS} qte" fi ]) - CPPFLAGS="${save_CPPFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" fi dnl @@ -1421,20 +1469,20 @@ if test "x${enable_directx}" != "xno" then if test "x${SYS}" = "xmingw32" then - AC_ARG_WITH(directx, + 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" ]) + [ 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} video_output/directx/directx" - directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" - directx_CFLAGS="${directx_CFLAGS} -I${with_directx}" + PLUGINS="${PLUGINS} directx" + LDFLAGS_directx="${LDFLAGS_directx} -lgdi32" + CPPFLAGS_directx="${CPPFLAGS_directx} -I${with_directx}" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -1452,7 +1500,7 @@ AC_ARG_ENABLE(fb, if test "x${enable_fb}" != "xno" then AC_CHECK_HEADERS(linux/fb.h, [ - PLUGINS="${PLUGINS} video_output/fb" + PLUGINS="${PLUGINS} fb" ]) fi @@ -1463,7 +1511,7 @@ 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" + PLUGINS="${PLUGINS} mga xmga" fi ]) dnl @@ -1473,8 +1521,8 @@ 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" + PLUGINS="${PLUGINS} svgalib" + LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga" fi dnl @@ -1484,14 +1532,14 @@ 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" + 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 - CFLAGS_GGI="${CFLAGS_GGI} -I${with_ggi}/include" - ggi_LDFLAGS="${ggi_LDFLAGS} -L${with_ggi}/lib" + CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include" + LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib" fi ]) fi @@ -1502,15 +1550,15 @@ 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" + 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 - glide_CFLAGS="${glide_CFLAGS} -I${with_glide}/include" - glide_LDFLAGS="${glide_LDFLAGS} -L${with_glide}/lib" + CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include" + LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib" fi ]) fi @@ -1524,8 +1572,8 @@ 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" + PLUGINS="${PLUGINS} aa" + LDFLAGS_aa="${LDFLAGS_aa} -laa" fi fi @@ -1545,8 +1593,8 @@ 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") + PLUGINS="${PLUGINS} oss" + AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio") ]) fi @@ -1560,9 +1608,9 @@ AC_ARG_ENABLE(esd, 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`" + PLUGINS="${PLUGINS} esd" + CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`" + LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`" fi fi]) @@ -1576,9 +1624,9 @@ AC_ARG_ENABLE(arts, 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 `" + PLUGINS="${PLUGINS} arts" + CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`" + LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `" fi fi]) @@ -1592,8 +1640,8 @@ AC_ARG_ENABLE(alsa, 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" + PLUGINS="${PLUGINS} alsa" + LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl" fi fi]) @@ -1604,8 +1652,8 @@ 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" + PLUGINS="${PLUGINS} waveout" + LDFLAGS_waveout="-lwinmm" fi dnl @@ -1617,7 +1665,7 @@ AC_ARG_WITH(,[Interface plugins:]) dnl special case for BeOS if test "x${SYS}" = "xbeos" then - PLUGINS="${PLUGINS} gui/beos/beos" + PLUGINS="${PLUGINS} beos" fi dnl @@ -1647,10 +1695,10 @@ then 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,,'`" + 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="${save_CPPFLAGS} ${gtk_CFLAGS}" + 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 @@ -1658,11 +1706,11 @@ then ]) if test "x${ac_cv_gtk_headers}" = "xyes" then - PLUGINS="${PLUGINS} gui/gtk/gtk" + PLUGINS="${PLUGINS} gtk" NEED_GTK_MAIN=yes ALIASES="${ALIASES} gvlc" fi - CPPFLAGS="${save_CPPFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" fi fi @@ -1693,10 +1741,10 @@ then 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,,'`" + 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="${save_CPPFLAGS} ${familiar_CFLAGS}" + 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 @@ -1704,10 +1752,10 @@ then ]) if test "x${ac_cv_gtk_headers}" = "xyes" then - PLUGINS="${PLUGINS} gui/familiar/familiar" + PLUGINS="${PLUGINS} familiar" NEED_GTK_MAIN=yes fi - CPPFLAGS="${save_CPPFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" fi fi @@ -1721,20 +1769,21 @@ AC_ARG_ENABLE(gnome, 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,,'`" + 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="${save_CPPFLAGS} ${gnome_CFLAGS}" + CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}" AC_CHECK_HEADERS(gnome.h, [ - PLUGINS="${PLUGINS} gui/gtk/gnome" + 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="${save_CPPFLAGS}" + CPPFLAGS="${CPPFLAGS_save}" fi]) dnl @@ -1743,10 +1792,10 @@ dnl AC_ARG_ENABLE(qt, [ --enable-qt Qt interface support (default disabled)], [if test "x${enable_qt}" = "xyes"; then - PLUGINS="${PLUGINS} gui/qt/qt" + PLUGINS="${PLUGINS} qt" ALIASES="${ALIASES} qvlc" - qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib" - qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include" + 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 @@ -1755,17 +1804,17 @@ AC_ARG_ENABLE(qt, fi fi]) -dnl +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" + PLUGINS="${PLUGINS} 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" + 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 @@ -1784,35 +1833,24 @@ AC_ARG_ENABLE(opie, [ --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" + LDFLAGS_test="-L${QTDIR}/lib" + CPPFLAGS_test="-I${QTDIR}/include" else - test_LDFLAGS="-L${with_qte}/lib" - test_CFLAGS="-I${with_qte}/include" + LDFLAGS_test="-L${with_qte}/lib" + CPPFLAGS_test="-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 + PLUGINS="${PLUGINS} opie" + LDFLAGS_opie="${LDFLAGS_opie} ${LDFLAGS_test} -lqte" + CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_test}" + if test -x ${QTEDIR}/bin/moc then - MOC=${QTDIR}/bin/moc + MOC=${QTEDIR}/bin/moc else MOC=moc fi fi]) - dnl dnl MacOS X module dnl @@ -1820,12 +1858,12 @@ 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" + 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} gui/macosx/macosx" - macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC" + BUILTINS="${BUILTINS} macosx" + LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC" )]) dnl @@ -1836,8 +1874,8 @@ AC_ARG_ENABLE(qnx, if test "x${enable_qnx}" != "xno" then AC_CHECK_HEADERS(Ph.h, [ - PLUGINS="${PLUGINS} gui/qnx/qnx" - qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph" + PLUGINS="${PLUGINS} qnx" + LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph" ]) fi @@ -1848,13 +1886,13 @@ AC_ARG_ENABLE(intfwin, [ --enable-intfwin Win32 interface support (default disabled)], [ if test "x${enable_intfwin}" != "xno" then - AC_ARG_WITH(bcbuilder, + 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" + PLUGINS="${PLUGINS} win32" fi ]) dnl @@ -1863,8 +1901,8 @@ 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" + PLUGINS="${PLUGINS} ncurses" + LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses" fi]) dnl @@ -1880,8 +1918,8 @@ then AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if is pre-1.0.0)) if test "x${have_xosd}" = "xtrue" then - PLUGINS="${PLUGINS} visualization/xosd/xosd" - xosd_LDFLAGS="${xosd_LDFLAGS} -lxosd" + PLUGINS="${PLUGINS} xosd" + LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd" fi fi @@ -1895,8 +1933,8 @@ 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" + PLUGINS="${PLUGINS} lirc" + LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client" fi fi @@ -1934,8 +1972,8 @@ AC_ARG_WITH(words, EOF ] if test -f conftest.c - then - if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \ + 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`" @@ -1964,28 +2002,12 @@ 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 +[ --enable-gprof gprof profiling (default disabled)]) 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 -]) +[ --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 @@ -2015,13 +2037,13 @@ AC_ARG_ENABLE(st, fi]) ]) -vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}" -plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}" +LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}" +LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}" dnl dnl Mozilla plugin dnl -MOZILLA=0 +mozilla=false AC_ARG_ENABLE(mozilla, [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)]) if test "x${enable_mozilla}" = "xyes" @@ -2030,49 +2052,91 @@ then if test "x${MOZILLA_CONFIG}" != "xno" then if test "x${SYS}" != "xmingw32"; then - LDFLAGS="${save_LDFLAGS} -L${x_libraries}" + LDFLAGS="${LDFLAGS_save} -L${x_libraries}" AC_CHECK_LIB(Xt,XtStrings,[ - mozilla_LDFLAGS="${mozilla_LDFLAGS} -L${x_libraries} -lXt" + LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt" ]) - LDFLAGS="${save_LDFLAGS}" + LDFLAGS="${LDFLAGS_save}" fi - MOZILLA=1 + mozilla=: 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`" + [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} 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}" + 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 Plug-ins - this must be AT THE END +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 plug-ins built-in (default plug-ins enabled)], + [ --disable-plugins make all plugins built-in (default plugins enabled)], [if test "x${enable_plugins}" = "xno" then - BUILTINS="${BUILTINS} ${PLUGINS}" - PLUGINS= + plugin_support=false fi]) -dnl Automagically disable plug-ins if there is no system support for .so files +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 plug-in support. All plug-ins will be compiled" - echo "as built-in" + 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 @@ -2084,6 +2148,7 @@ AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command 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) @@ -2093,18 +2158,25 @@ AC_SUBST(PLUGIN_PATH) dnl dnl Restore *FLAGS dnl -CPPFLAGS="${save_CPPFLAGS}" -CFLAGS="${save_CFLAGS}" -LDFLAGS="${save_LDFLAGS}" +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 -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) +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 dnl Configuration is finished dnl AC_SUBST(SYS) @@ -2112,148 +2184,62 @@ 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(XPIDL) +AC_SUBST(LIBEXT) +AC_SUBST(CFLAGS_TUNING) 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_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 - Makefile.config - Makefile.opts - m4/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 ]) -echo " +printf " 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} +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} -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}'. +To build vlc and its plugins, type \`make'. " diff --git a/debian/.cvsignore b/debian/.cvsignore index b650d8bf03..b153086280 100644 --- a/debian/.cvsignore +++ b/debian/.cvsignore @@ -1,3 +1,5 @@ +Makefile +Makefile.in tmp vlc vlc-plugin-* diff --git a/debian/control b/debian/control index c52906bcf9..f5c3fde1b6 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: vlc Section: graphics Priority: optional Maintainer: Samuel Hocevar -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. diff --git a/debian/libvlc0-dev.dirs b/debian/libvlc0-dev.dirs index 12e3c2d190..5b5b3f1431 100644 --- a/debian/libvlc0-dev.dirs +++ b/debian/libvlc0-dev.dirs @@ -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 diff --git a/debian/rules b/debian/rules index a4a8a3079f..3ce57c2049 100755 --- a/debian/rules +++ b/debian/rules @@ -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 index 0000000000..30554242e2 --- /dev/null +++ b/debian/vlc-plugin-dvb.dirs @@ -0,0 +1,2 @@ +usr/lib/vlc/access +usr/share/doc diff --git a/debian/vlc.dirs b/debian/vlc.dirs index ac1793ec7f..c9f5c0751b 100644 --- a/debian/vlc.dirs +++ b/debian/vlc.dirs @@ -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 index 0000000000..282522db03 --- /dev/null +++ b/doc/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/doc/developer/Makefile b/doc/developer/Makefile index 217244f690..7353ba59df 100644 --- a/doc/developer/Makefile +++ b/doc/developer/Makefile @@ -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 index 0000000000..8116af5d43 --- /dev/null +++ b/doc/developer/hacking.xml @@ -0,0 +1,247 @@ + VLC Overview + + LibVLC + + 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 src/ + directory and its subdirectories: + + + + interface/: contains code for + user interaction such as key presses and device ejection. + + + playlist/: manages playlist + interaction such as stop, play, next, or random playback. + + + input/: opens an input module, + reads packets, parses them and passes reconstituted elementary streams + to the decoder(s). + + video_output/: 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. + + audio_output/: initializes the + audio mixer, ie. finds the right playing frequency, and then resamples + audio frames received from the decoder(s). + + stream_output/: TODO + + + misc/: 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. + + + + + + + + + + + + Data flow between modules + + + + + + VLC + + 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. + + + + Modules + + Modules are located in the modules/ + 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). + + Plugin modules are loaded and unloaded dynamically + by functions in src/misc/modules.c and + include/modules*.h. The API for writing modules will + be discussed in a following chapter. + + 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. + + + + Threads + + Thread management + + 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. + + + Our threading structure is modeled on pthreads. + However, for portability reasons, we don't call + pthread_* functions directly, but use a + similar wrapper, made of 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, + and structures vlc_thread_t, vlc_mutex_t, and + vlc_cond_t. + + + + Synchronization + + 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. + + + 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. + + 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 mtime_t type + is a signed 64-bit integer. + + The current date can be retrieved with + mdate(). The execution of a thread can be suspended + until a certain date via mwait + ( mtime_t date ). You can sleep for a fixed number + of microseconds with msleep ( mtime_t + delay ). + + Please remember to wake up slightly + before the presentation date, if some particular + treatment needs to be done (e.g. a chroma transformation). For instance + in modules/codec/mpeg_video/synchro.c, track of the + average decoding times is kept to ensure pictures are not decoded too + late. + + + + + + Code conventions + + Function naming + + +All functions are named accordingly : module name (in lower case) + _ + +function name (in mixed case, without underscores). +For instance : intf_FooFunction. Static functions +don't need usage of the module name. + + + + + Variable naming + + +Hungarian notations are used, that means we have the following prefixes : + + + + i_ for integers (sometimes l_ for long integers) ; + + b_ for booleans ; + d_ for doubles (sometimes f_ for floats) ; + + pf_ for function pointers ; + psz_ for a Pointer to a String terminated by a + Zero (C-string) ; + + More generally, we add a p when the variable is + a pointer to a type. + + + +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 explicit variable name in lower +case. If several words are required, join them with an +underscore (no mixed case). Examples : + + + + + data_packet_t * p_buffer; + + char psz_msg_date[42]; + + int pi_es_refcount[MAX_ES]; + + void (* pf_next_data_packet)( int * ); + + + + + + A few words about white spaces + + +First, never use tabs in the source (you're entitled to use them in the +Makefile :-). Use set expandtab under +vim or the equivalent under +emacs. Indents are 4 spaces long. + + + +Second, put spaces before and after operators, and +inside brackets. For instance : + for( i = 0; i < 12; i++, j += 42 ); + + + +Third, leave braces alone on their lines (GNU style). For instance : + +if( i_es == 42 ) +{ + p_buffer[0] = 0x12; +} + + + + +We write C, so use C-style comments /* ... */. + + + + + + + diff --git a/doc/developer/manual.xml b/doc/developer/manual.xml index 0783051e04..5aea4297d5 100644 --- a/doc/developer/manual.xml +++ b/doc/developer/manual.xml @@ -4,6 +4,7 @@ [ + @@ -57,7 +58,7 @@ VideoLAN project - $Id: manual.xml,v 1.3 2002/08/29 23:53:22 massiot Exp $ + $Id: manual.xml,v 1.4 2002/09/30 11:05:33 sam Exp $ 2001 Christophe Massiot, for IDEALX S.A.S. @@ -83,6 +84,11 @@ &overview; + + +&hacking; + diff --git a/doc/developer/overview.xml b/doc/developer/overview.xml index 562e99a7ec..8116af5d43 100644 --- a/doc/developer/overview.xml +++ b/doc/developer/overview.xml @@ -1,36 +1,46 @@ VLC Overview - Code modules + LibVLC + + 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 src/ + directory and its subdirectories: - -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 : - - - Interface : this is the entry point of the program. It manages - all user interactions and thread spawning. - Input : it opens the input socket, reads packets, parses - them and passes reconstituted elementary streams to the decoder(s). - - 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. - - Audio output : it initializes the audio mixer, ie. - finds the right playing frequency, and then resamples audio frames - received from the decoder(s). - Misc : miscellaneous utilities used in other modules. - This is the only module that will never launch a thread. - - 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 plugins/ in a forthcoming - version] + + interface/: contains code for + user interaction such as key presses and device ejection. + + + playlist/: manages playlist + interaction such as stop, play, next, or random playback. + + + input/: opens an input module, + reads packets, parses them and passes reconstituted elementary streams + to the decoder(s). + + video_output/: 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. + + audio_output/: initializes the + audio mixer, ie. finds the right playing frequency, and then resamples + audio frames received from the decoder(s). + + stream_output/: TODO + + + misc/: 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. + - + @@ -45,29 +55,32 @@ At present, these modules are : - Plug-ins + VLC - -Plugins are located in the plugins/ 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). - + 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. - -Plug-ins are loaded and unloaded dynamically by functions in - src/misc/modules.c and include/modules*.h -. The API for writing plugins will be discussed in a -following chapter. - + - -Plugins can also be built into the VLC main application by changing the - BUILTINS line in -Makefile.opts. - + Modules + + Modules are located in the modules/ + 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). + + Plugin modules are loaded and unloaded dynamically + by functions in src/misc/modules.c and + include/modules*.h. The API for writing modules will + be discussed in a following chapter. + + 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. @@ -75,76 +88,69 @@ Makefile.opts. Thread management - -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. + 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. - -Our threading structure is modeled on pthreads. However, for portability -reasons, we don't call pthread_* functions -directly, but use a similar wrapper, made of 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, and structures -vlc_thread_t, vlc_mutex_t, and vlc_cond_t. - + Our threading structure is modeled on pthreads. + However, for portability reasons, we don't call + pthread_* functions directly, but use a + similar wrapper, made of 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, + and structures vlc_thread_t, vlc_mutex_t, and + vlc_cond_t. Synchronization - -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. - - - -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. - - - -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 mtime_t type is a signed -64-bit integer. - - - -The current date can be retrieved with mdate(). -Te execution of a thread can be suspended until a certain -date via mwait -( mtime_t date ). You can sleep for a fixed number of -microseconds with msleep -( mtime_t delay ). + 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. - - Please remember to wake up a little while before - the presentation date, if some particular treatment - needs to be done (e.g. a YUV transform). For instance in - src/video_parser/vpar_synchro.c, track of the average - decoding times is kept to ensure pictures are not decoded too - late. - + 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. + + 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 mtime_t type + is a signed 64-bit integer. + + The current date can be retrieved with + mdate(). The execution of a thread can be suspended + until a certain date via mwait + ( mtime_t date ). You can sleep for a fixed number + of microseconds with msleep ( mtime_t + delay ). + + Please remember to wake up slightly + before the presentation date, if some particular + treatment needs to be done (e.g. a chroma transformation). For instance + in modules/codec/mpeg_video/synchro.c, track of the + average decoding times is kept to ensure pictures are not decoded too + late. diff --git a/doc/fortunes.txt b/doc/fortunes.txt index 53351ba2fa..fe67139b91 100644 --- a/doc/fortunes.txt +++ b/doc/fortunes.txt @@ -241,3 +241,83 @@ the Boston strangler is to the woman home alone. -- #videolan % + what does vout_CreatePicture do? + asks for a picture to the video output thread + so it just returns the next picture to be displayed? + not necessarily the next + it's your duty to set its display date, afterwards + I'd even say, it is your destiny, Luke, to set its display date + + -- #videolan +% + 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. + yeah + Meuuh: not sure if you sound more like an mpeg guru or a blues + artist + like a cow, maybe ? + or something + + -- #videolan +% + a52old & wi11y? + + -- #videolan +% + bah oui tu peux faire de la doc sur n'importe quoi hein + je fais bien une doc développeur vlc + comme si y'avait des développeurs vlc à part sam et moi ! + + -- #videolan +% + pis comme ca je me tiens au courant de où va vlc :) + dans le mur ? + y'a sam qui rajoute du charbon, moi je m'agrippe au frein + + -- #videolan +% + $grut Dnumgis + Dnumgis: tiår ditt og nødhavn klikk ? + gally: og hva skulle det bety? + gally: what was that supposed to mean? + + -- #videolan +% + $grut + vekt yrer gøten øke utgjøre kan + sam: you're insane + someone have too much spare time + definitely + maybe they should do something useful instead + grunt grunt snort grumpf grumpf gra grunt uiigrumpf uiihiiii snort !! + + -- #videolan +% + mais putain de bordel de chiottes de bite à cul de merde de sa race + I think it may be a good thing that i don't understand that + sentence fully + + -- #videolan +% + I just burned an amb duron trying to compile vlc :( + is it my fault ? + no + unless you wrote blocks.c :) + actually, I did... + + -- #videolan +% + pleasehelp : are you trying with a dolby trailer ? + no... using windows + + -- #videolan +% + hal_3k: don't worry, I'll soon be replaced by a lib + henri: you'll be replaced by a lib? does the lib know how to + program? ;) + do you think henri knows ? :p + + -- #videolan +% diff --git a/doc/vlc.1 b/doc/vlc.1 index 77e67f5ebc..6a769ee17f 100644 --- a/doc/vlc.1 +++ b/doc/vlc.1 @@ -16,11 +16,10 @@ .\" .sp 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 index 0000000000..39a06683b7 --- /dev/null +++ b/extras/GNUgetopt/.cvsignore @@ -0,0 +1 @@ +.deps diff --git a/include/modules_inner.h b/include/modules_inner.h index 431f142e60..e5bd723c0e 100644 --- a/include/modules_inner.h +++ b/include/modules_inner.h @@ -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 * @@ -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__ ) @@ -163,36 +162,3 @@ #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 ) - diff --git a/include/vlc_config.h b/include/vlc_config.h index d38c27fa6e..53680185ba 100644 --- a/include/vlc_config.h +++ b/include/vlc_config.h @@ -237,7 +237,7 @@ /* 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 index a7e9b087f9..0000000000 --- a/include/vlc_symbols.h +++ /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 index 0000000000..282522db03 --- /dev/null +++ b/ipkg/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/lib/.cvsignore b/lib/.cvsignore index 54d99fe3a8..47a5d8a282 100644 --- a/lib/.cvsignore +++ b/lib/.cvsignore @@ -1,3 +1,6 @@ +Makefile +Makefile.in +.dirstamp *.a *.so *.so.* diff --git a/m4/.cvsignore b/m4/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/m4/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/modules/.cvsignore b/modules/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/modules/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/modules/access/.cvsignore b/modules/access/.cvsignore index 435f39ed89..1b393fa18d 100644 --- a/modules/access/.cvsignore +++ b/modules/access/.cvsignore @@ -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 index 9c4a79e8c5..0000000000 --- a/modules/access/Makefile +++ /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 index 1a9f155565..0000000000 --- a/modules/access/dvd/Makefile +++ /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 index 2d87cf4444..0000000000 --- a/modules/access/dvdplay/Makefile +++ /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 index 6e7cf66cbd..0000000000 --- a/modules/access/dvdread/Makefile +++ /dev/null @@ -1 +0,0 @@ -dvdread_SOURCES = dvdread.c input.c diff --git a/modules/access/file.c b/modules/access/file.c index cdda4d139c..fd15236594 100644 --- a/modules/access/file.c +++ b/modules/access/file.c @@ -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 * @@ -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(); diff --git a/modules/access/http.c b/modules/access/http.c index 3d87884df1..4688674763 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -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 * @@ -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 ); diff --git a/modules/access/rtp.c b/modules/access/rtp.c index 8bdc5072cc..9f3de26ada 100644 --- a/modules/access/rtp.c +++ b/modules/access/rtp.c @@ -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 * @@ -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 index dd4d0aa894..0000000000 --- a/modules/access/satellite/Makefile +++ /dev/null @@ -1 +0,0 @@ -satellite_SOURCES = satellite.c access.c dvb.c diff --git a/modules/access/udp.c b/modules/access/udp.c index 04c3c30adb..4610ac6abb 100644 --- a/modules/access/udp.c +++ b/modules/access/udp.c @@ -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 * @@ -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 index b6fbba52db..0000000000 --- a/modules/access/v4l/Makefile +++ /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 index 3a17ed6186..0000000000 --- a/modules/access/vcd/Makefile +++ /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 index b49f81393a..0000000000 --- a/modules/audio_filter/channel_mixer/Makefile +++ /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 index 73bf979a67..0000000000 --- a/modules/audio_filter/converter/Makefile +++ /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 index 6902485cf5..0000000000 --- a/modules/audio_filter/resampler/Makefile +++ /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 index b7d4f2fa62..0000000000 --- a/modules/audio_mixer/Makefile +++ /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 index ea78869c09..0000000000 --- a/modules/audio_output/Makefile +++ /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 diff --git a/modules/audio_output/arts.c b/modules/audio_output/arts.c index d8a29f858a..f8539a0c2e 100644 --- a/modules/audio_output/arts.c +++ b/modules/audio_output/arts.c @@ -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 * Samuel Hocevar @@ -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; diff --git a/modules/audio_output/sdl.c b/modules/audio_output/sdl.c index 7712c6be07..bc388c3952 100644 --- a/modules/audio_output/sdl.c +++ b/modules/audio_output/sdl.c @@ -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 * Samuel Hocevar @@ -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 index d3479bac22..0000000000 --- a/modules/codec/Makefile +++ /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 index f07f59de0b..0000000000 --- a/modules/codec/a52old/Makefile +++ /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 index accc86d126..0000000000 --- a/modules/codec/a52old/downmix/Makefile +++ /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 index 6e31fa1a10..0000000000 --- a/modules/codec/a52old/imdct/Makefile +++ /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 index e47caa07ed..0000000000 --- a/modules/codec/cinepak/Makefile +++ /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 index 35e063678b..0000000000 --- a/modules/codec/dv/Makefile +++ /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 index 41295496bd..0000000000 --- a/modules/codec/faad/Makefile +++ /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 index 89ae572e3b..0000000000 --- a/modules/codec/ffmpeg/Makefile +++ /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 index eb9e03f3d2..0000000000 --- a/modules/codec/ffmpeg/postprocessing/Makefile +++ /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 index c5692341a9..0000000000 --- a/modules/codec/mad/Makefile +++ /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 index 6a1d52a870..0000000000 --- a/modules/codec/mpeg_audio/Makefile +++ /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 index b9e97b9f99..0000000000 --- a/modules/codec/mpeg_video/Makefile +++ /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 index f8c68d50fd..0000000000 --- a/modules/codec/mpeg_video/idct/Makefile +++ /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 index cf79eda0ca..0000000000 --- a/modules/codec/mpeg_video/motion/Makefile +++ /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 index 60e766ecda..0000000000 --- a/modules/codec/spudec/Makefile +++ /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 index 139372dd1f..0000000000 --- a/modules/control/lirc/Makefile +++ /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 index fbb6f2b07c..0000000000 --- a/modules/control/rc/Makefile +++ /dev/null @@ -1 +0,0 @@ -rc_SOURCES = rc.c diff --git a/modules/control/rc/rc.c b/modules/control/rc/rc.c index 075a55389e..95ef652d73 100644 --- a/modules/control/rc/rc.c +++ b/modules/control/rc/rc.c @@ -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 * @@ -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 index 19667644f8..0000000000 --- a/modules/demux/Makefile +++ /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 index 969d856303..0000000000 --- a/modules/demux/aac/Makefile +++ /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 index 1983576f12..0000000000 --- a/modules/demux/avi/Makefile +++ /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 index ed545ed66b..0000000000 --- a/modules/demux/mp4/Makefile +++ /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 index b39a64a640..0000000000 --- a/modules/demux/mpeg/Makefile +++ /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 index 7b2c888129..0000000000 --- a/modules/demux/util/Makefile +++ /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 index 404565800b..0000000000 --- a/modules/gui/beos/Makefile +++ /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 index be8d597e27..0000000000 --- a/modules/gui/familiar/Makefile +++ /dev/null @@ -1 +0,0 @@ -familiar_SOURCES = familiar.c interface.c support.c callbacks.c diff --git a/modules/gui/familiar/callbacks.c b/modules/gui/familiar/callbacks.c index 73d578780a..1c6b39be14 100644 --- a/modules/gui/familiar/callbacks.c +++ b/modules/gui/familiar/callbacks.c @@ -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 * @@ -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; } diff --git a/modules/gui/familiar/callbacks.h b/modules/gui/familiar/callbacks.h index a659e64982..d85fcc5e96 100644 --- a/modules/gui/familiar/callbacks.h +++ b/modules/gui/familiar/callbacks.h @@ -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 * @@ -23,7 +23,7 @@ #include -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 index cfab85edbd..0000000000 --- a/modules/gui/gtk/Makefile +++ /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) diff --git a/modules/gui/gtk/common.h b/modules/gui/gtk/common.h index 86345115a8..04befaa876 100644 --- a/modules/gui/gtk/common.h +++ b/modules/gui/gtk/common.h @@ -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 * @@ -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 * ); diff --git a/modules/gui/gtk/display.c b/modules/gui/gtk/display.c index 6d51fd73b2..0a56dcb99f 100644 --- a/modules/gui/gtk/display.c +++ b/modules/gui/gtk/display.c @@ -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 * Stéphane Borel @@ -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, diff --git a/modules/gui/gtk/display.h b/modules/gui/gtk/display.h index e73d774d66..586a53d2f8 100644 --- a/modules/gui/gtk/display.h +++ b/modules/gui/gtk/display.h @@ -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 * Stéphane Borel @@ -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 * ); diff --git a/modules/gui/gtk/gnome.c b/modules/gui/gtk/gnome.c index e84a8c5d79..4fe11a9a25 100644 --- a/modules/gui/gtk/gnome.c +++ b/modules/gui/gtk/gnome.c @@ -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 * @@ -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; } diff --git a/modules/gui/gtk/gnome.glade b/modules/gui/gtk/gnome.glade index 1d101e13b3..80d36083bf 100644 --- a/modules/gui/gtk/gnome.glade +++ b/modules/gui/gtk/gnome.glade @@ -168,7 +168,7 @@ menubar_exit activate - GtkExit + GnomeExit Sat, 19 May 2001 16:27:52 GMT GNOMEUIINFO_MENU_EXIT_ITEM @@ -1306,7 +1306,7 @@ popup_exit activate - GtkExit + GnomeExit Sat, 19 May 2001 16:21:45 GMT GNOMEUIINFO_MENU_EXIT_ITEM diff --git a/modules/gui/gtk/gnome_interface.c b/modules/gui/gtk/gnome_interface.c index cb92d64be8..94a0b95064 100644 --- a/modules/gui/gtk/gnome_interface.c +++ b/modules/gui/gtk/gnome_interface.c @@ -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 }; diff --git a/modules/gui/gtk/gtk.c b/modules/gui/gtk/gtk.c index 11750271f0..8c8a27e1a7 100644 --- a/modules/gui/gtk/gtk.c +++ b/modules/gui/gtk/gtk.c @@ -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 * @@ -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; } diff --git a/modules/gui/gtk/gtk_callbacks.c b/modules/gui/gtk/gtk_callbacks.c index 64a2e5029b..9ae8b5c8eb 100644 --- a/modules/gui/gtk/gtk_callbacks.c +++ b/modules/gui/gtk/gtk_callbacks.c @@ -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 * Stéphane Borel @@ -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; } diff --git a/modules/gui/gtk/gtk_callbacks.h b/modules/gui/gtk/gtk_callbacks.h index 605c0efc97..cb49b9b261 100644 --- a/modules/gui/gtk/gtk_callbacks.h +++ b/modules/gui/gtk/gtk_callbacks.h @@ -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 * Stéphane Borel @@ -42,7 +42,11 @@ * 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 ); diff --git a/modules/gui/gtk/open.c b/modules/gui/gtk/open.c index f16ea0189e..a337090122 100644 --- a/modules/gui/gtk/open.c +++ b/modules/gui/gtk/open.c @@ -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 * Stéphane Borel @@ -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 index 701f9e2edc..0000000000 --- a/modules/gui/kde/Makefile +++ /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 index 8ade2c539a..0000000000 --- a/modules/gui/macosx/Makefile +++ /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 index ec417edd8c..0000000000 --- a/modules/gui/ncurses/Makefile +++ /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 index be320aa32b..0000000000 --- a/modules/gui/qnx/Makefile +++ /dev/null @@ -1 +0,0 @@ -qnx_SOURCES = qnx.c aout.c vout.c diff --git a/modules/gui/qt/.cvsignore b/modules/gui/qt/.cvsignore index 12c27ba6fd..e1108c686c 100644 --- a/modules/gui/qt/.cvsignore +++ b/modules/gui/qt/.cvsignore @@ -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 index e0e4e8fb38..0000000000 --- a/modules/gui/qt/Makefile +++ /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 $@ - diff --git a/modules/gui/qt/intf.cpp b/modules/gui/qt/intf.cpp index e5cb7c971f..6c14797f5c 100644 --- a/modules/gui/qt/intf.cpp +++ b/modules/gui/qt/intf.cpp @@ -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 * @@ -29,94 +29,7 @@ #include /* strerror() */ #include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -/***************************************************************************** - * 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 index 0000000000..971dfaad4c --- /dev/null +++ b/modules/gui/qt/intf.h @@ -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 + * + * 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 +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/***************************************************************************** + * 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 index f55df00b63..0000000000 --- a/modules/gui/win32/Makefile +++ /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 - - diff --git a/modules/gui/win32/win32.bpr b/modules/gui/win32/win32.bpr index 9b820b1ce2..a5294708ef 100644 --- a/modules/gui/win32/win32.bpr +++ b/modules/gui/win32/win32.bpr @@ -3,7 +3,7 @@ - + @@ -112,4 +112,4 @@ ActiveLang= ProjectLang= RootDir= - \ No newline at end of file + diff --git a/modules/misc/Makefile b/modules/misc/Makefile deleted file mode 100644 index aff05accd3..0000000000 --- a/modules/misc/Makefile +++ /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 index 307e1c7569..0000000000 --- a/modules/misc/dummy/Makefile +++ /dev/null @@ -1 +0,0 @@ -dummy_SOURCES = dummy.c aout.c vout.c interface.c input.c decoder.c diff --git a/modules/misc/gtk_main.c b/modules/misc/gtk_main.c index 583a536ff7..3c684a1a70 100644 --- a/modules/misc/gtk_main.c +++ b/modules/misc/gtk_main.c @@ -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 * @@ -30,7 +30,7 @@ #include -#ifdef HAVE_GNOME_H +#ifdef MODULE_NAME_IS_gnome_main # include #endif @@ -64,11 +64,13 @@ static gtk_main_t * p_gtk_main = NULL; *****************************************************************************/ vlc_module_begin(); set_description( _("Gtk+ helper module") ); +#ifdef MODULE_NAME_IS_gtk_main + set_capability( "gtk_main", 90 ); +#else set_capability( "gtk_main", 100 ); - add_shortcut( "gtk" ); -#ifdef HAVE_GNOME_H add_shortcut( "gnome" ); #endif + add_shortcut( "gtk" ); set_callbacks( Open, Close ); linked_with_a_crap_library_which_uses_atexit(); vlc_module_end(); @@ -153,7 +155,7 @@ static void GtkMain( vlc_object_t *p_this ) /* gtk_init needs to know the command line. We don't care, so we * give it an empty one */ static char *p_args[] = { "" }; -#ifndef HAVE_GNOME_H +#ifdef MODULE_NAME_IS_gtk_main static char **pp_args = p_args; #endif static int i_args = 1; @@ -161,7 +163,7 @@ static void GtkMain( vlc_object_t *p_this ) /* FIXME: deprecated ? */ /* gdk_threads_init(); */ -#ifdef HAVE_GNOME_H +#ifdef MODULE_NAME_IS_gnome_main gnome_init( p_this->p_vlc->psz_object_name, VERSION, i_args, p_args ); #else gtk_set_locale(); diff --git a/modules/misc/logger/Makefile b/modules/misc/logger/Makefile deleted file mode 100644 index 35ed9d76c3..0000000000 --- a/modules/misc/logger/Makefile +++ /dev/null @@ -1 +0,0 @@ -logger_SOURCES = logger.c diff --git a/modules/misc/memcpy/Makefile b/modules/misc/memcpy/Makefile deleted file mode 100644 index ed9ee32d80..0000000000 --- a/modules/misc/memcpy/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -memcpy_SOURCES = memcpy.c -memcpymmx_SOURCES = memcpy.c -memcpymmxext_SOURCES = memcpy.c -memcpy3dn_SOURCES = memcpy.c -memcpyaltivec_SOURCES = memcpyaltivec.c diff --git a/modules/misc/network/Makefile b/modules/misc/network/Makefile deleted file mode 100644 index 6c75b41efc..0000000000 --- a/modules/misc/network/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ipv4_SOURCES = ipv4.c -ipv6_SOURCES = ipv6.c diff --git a/modules/video_chroma/Makefile b/modules/video_chroma/Makefile deleted file mode 100644 index 8a6a9845af..0000000000 --- a/modules/video_chroma/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -i420_rgb_SOURCES = i420_rgb.c i420_rgb8.c i420_rgb16.c -i420_rgb_mmx_SOURCES = i420_rgb.c i420_rgb16.c -i420_yuy2_SOURCES = i420_yuy2.c -i420_yuy2_mmx_SOURCES = i420_yuy2.c -i422_yuy2_SOURCES = i422_yuy2.c -i422_yuy2_mmx_SOURCES = i422_yuy2.c -i420_ymga_SOURCES = i420_ymga.c -i420_ymga_mmx_SOURCES = i420_ymga.c diff --git a/modules/video_filter/Makefile b/modules/video_filter/Makefile deleted file mode 100644 index 44f9b0e65e..0000000000 --- a/modules/video_filter/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -transform_SOURCES = transform.c -invert_SOURCES = invert.c -distort_SOURCES = distort.c -wall_SOURCES = wall.c -clone_SOURCES = clone.c -crop_SOURCES = crop.c -motionblur_SOURCES = motionblur.c diff --git a/modules/video_filter/deinterlace/Makefile b/modules/video_filter/deinterlace/Makefile deleted file mode 100644 index 38beb063ee..0000000000 --- a/modules/video_filter/deinterlace/Makefile +++ /dev/null @@ -1 +0,0 @@ -deinterlace_SOURCES = deinterlace.c diff --git a/modules/video_output/Makefile b/modules/video_output/Makefile deleted file mode 100644 index f297b1e2cd..0000000000 --- a/modules/video_output/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -aa_SOURCES = aa.c -fb_SOURCES = fb.c -ggi_SOURCES = ggi.c -glide_SOURCES = glide.c -sdl_SOURCES = sdl.c -svgalib_SOURCES = svgalib.c diff --git a/modules/video_output/directx/Makefile b/modules/video_output/directx/Makefile deleted file mode 100644 index 4f6b1d3cf0..0000000000 --- a/modules/video_output/directx/Makefile +++ /dev/null @@ -1 +0,0 @@ -directx_SOURCES = directx.c vout.c events.c aout.c diff --git a/modules/video_output/directx/aout.c b/modules/video_output/directx/aout.c index ed201dacc5..df3704edc2 100644 --- a/modules/video_output/directx/aout.c +++ b/modules/video_output/directx/aout.c @@ -2,7 +2,7 @@ * aout.c: Windows DirectX audio output method ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: aout.c,v 1.10 2002/09/18 21:21:24 massiot Exp $ + * $Id: aout.c,v 1.11 2002/09/30 11:05:40 sam Exp $ * * Authors: Gildas Bazin * @@ -91,6 +91,9 @@ struct aout_sys_t /***************************************************************************** * Local prototypes. *****************************************************************************/ +int E_(OpenAudio) ( vlc_object_t * ); +void E_(CloseAudio) ( vlc_object_t * ); + static void Play ( aout_instance_t * ); /* local functions */ diff --git a/modules/video_output/mga/Makefile b/modules/video_output/mga/Makefile deleted file mode 100644 index 5f2c872a31..0000000000 --- a/modules/video_output/mga/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -mga_SOURCES = mga.c -xmga_SOURCES = xmga.c diff --git a/modules/video_output/qte/Makefile b/modules/video_output/qte/Makefile deleted file mode 100644 index 2bfda21f38..0000000000 --- a/modules/video_output/qte/Makefile +++ /dev/null @@ -1 +0,0 @@ -qte_SOURCES = qte.cpp diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c index e7a25b4f52..6ab18f6ee0 100644 --- a/modules/video_output/sdl.c +++ b/modules/video_output/sdl.c @@ -2,7 +2,7 @@ * sdl.c: SDL video output display method ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: sdl.c,v 1.2 2002/09/19 21:56:40 massiot Exp $ + * $Id: sdl.c,v 1.3 2002/09/30 11:05:40 sam Exp $ * * Authors: Samuel Hocevar * Pierre Baillet @@ -103,6 +103,7 @@ static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); vlc_module_begin(); set_description( _("Simple DirectMedia Layer video module") ); set_capability( "video output", 40 ); + add_shortcut( "sdl" ); set_callbacks( Open, Close ); vlc_module_end(); diff --git a/modules/video_output/x11/Makefile b/modules/video_output/x11/Makefile deleted file mode 100644 index a2e53c05f8..0000000000 --- a/modules/video_output/x11/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -x11_SOURCES = x11.c xcommon.c -xvideo_SOURCES = xvideo.c xcommon.c diff --git a/modules/visualization/scope/Makefile b/modules/visualization/scope/Makefile deleted file mode 100644 index 12eedae677..0000000000 --- a/modules/visualization/scope/Makefile +++ /dev/null @@ -1 +0,0 @@ -scope_SOURCES = scope.c diff --git a/modules/visualization/xosd/Makefile b/modules/visualization/xosd/Makefile deleted file mode 100644 index 07c05422a5..0000000000 --- a/modules/visualization/xosd/Makefile +++ /dev/null @@ -1 +0,0 @@ -xosd_SOURCES = xosd.c diff --git a/mozilla/Makefile b/mozilla/Makefile deleted file mode 100644 index 0717c1141f..0000000000 --- a/mozilla/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -############################################################################### -# vlc (VideoLAN Client) Mozilla plugin Makefile -# (c)2002 VideoLAN -############################################################################### - -# -# Source objects -# -CPP_SRC = vlcplugin.cpp vlcpeer.cpp vlcshell.cpp -C_SRC = npunix.c -CPP_OBJ = $(CPP_SRC:%.cpp=%.o) -C_OBJ = $(C_SRC:%.c=%.o) - -PLUGIN_OBJ = libvlcplugin.so -COMPONENT = vlcintf.xpt - -# -# Virtual targets -# -all: $(PLUGIN_OBJ) - -distclean: clean - -clean: - rm -f *.o *.so - rm -Rf .dep - -install: - mkdir -p $(DESTDIR)$(libdir)/mozilla/plugins - $(INSTALL) -m 644 $(PLUGIN_OBJ) $(DESTDIR)$(libdir)/mozilla/plugins - mkdir -p $(DESTDIR)$(libdir)/mozilla/components - $(INSTALL) -m 644 $(COMPONENT) $(DESTDIR)$(libdir)/mozilla/components - -uninstall: - rm -f $(DESTDIR)$(libdir)/mozilla/plugins/$(PLUGIN_OBJ) - -rmdir $(DESTDIR)$(libdir)/mozilla/plugins - rm -f $(DESTDIR)$(libdir)/mozilla/components/$(COMPONENT) - -rmdir $(DESTDIR)$(libdir)/mozilla/components - -rmdir $(DESTDIR)$(libdir)/mozilla - -FORCE: - -$(PLUGIN_OBJ): Makefile ../lib/libvlc.a $(BUILTIN_OBJ:%=../%) $(C_OBJ) $(CPP_OBJ) $(COMPONENT) - $(CC) -shared $(LDFLAGS) -L../lib $(mozilla_LDFLAGS) $(C_OBJ) $(CPP_OBJ) -lvlc $(BUILTIN_OBJ:%=../%) $(builtins_LDFLAGS) -o $@ - -$(CPP_OBJ): %.o: %.cpp vlcplugin.h vlcpeer.h vlcintf.h classinfo.h - $(CC) $(CFLAGS) -I.. -I../include $(mozilla_CFLAGS) -c $< -o $@ - -$(C_OBJ): %.o: %.c vlcplugin.h vlcpeer.h vlcintf.h classinfo.h - $(CC) $(CFLAGS) -I.. -I../include $(mozilla_CFLAGS) -c $< -o $@ - -vlcintf.xpt: vlcintf.idl - /usr/lib/mozilla/xpidl -I/usr/share/idl/mozilla -m typelib \ - -o vlcintf vlcintf.idl - -vlcintf.h: vlcintf.idl - /usr/lib/mozilla/xpidl -I/usr/share/idl/mozilla -m header \ - -o vlcintf vlcintf.idl - -../%: - @cd .. && $(MAKE) $(@:../%=%) - diff --git a/mozilla/vlcintf.idl b/mozilla/vlcintf.idl index ac88892dde..8241041bfb 100644 --- a/mozilla/vlcintf.idl +++ b/mozilla/vlcintf.idl @@ -8,5 +8,7 @@ interface VlcIntf : nsISupports void play(); void pause(); void stop(); + + void fullscreen(); }; diff --git a/mozilla/vlcpeer.cpp b/mozilla/vlcpeer.cpp index bd3f517d35..1e71bbd510 100644 --- a/mozilla/vlcpeer.cpp +++ b/mozilla/vlcpeer.cpp @@ -1,8 +1,8 @@ /***************************************************************************** - * vlcpeer.cpp: a VideoLAN Client plugin for Mozilla + * vlcpeer.cpp: scriptable peer descriptor ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: vlcpeer.cpp,v 1.1 2002/09/17 08:18:24 sam Exp $ + * $Id: vlcpeer.cpp,v 1.2 2002/09/30 11:05:41 sam Exp $ * * Authors: Samuel Hocevar * @@ -32,9 +32,11 @@ #include "nsMemory.h" - NS_IMPL_ISUPPORTS2( VlcPeer, VlcIntf, nsIClassInfo ) +/***************************************************************************** + * Scriptable peer constructor and destructor + *****************************************************************************/ VlcPeer::VlcPeer() { NS_INIT_ISUPPORTS(); @@ -51,11 +53,29 @@ VlcPeer::~VlcPeer() ; } +/***************************************************************************** + * Scriptable peer methods + *****************************************************************************/ +void VlcPeer::Disable() +{ + p_plugin = NULL; +} + +/***************************************************************************** + * Scriptable peer plugin methods + *****************************************************************************/ NS_IMETHODIMP VlcPeer::Play() { if( p_plugin ) { - p_plugin->Play(); + if( !p_plugin->b_stream && p_plugin->psz_target ) + { + vlc_add_target_r( p_plugin->p_vlc, p_plugin->psz_target, + PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); + p_plugin->b_stream = 1; + } + + vlc_play_r( p_plugin->p_vlc ); } return NS_OK; } @@ -64,7 +84,7 @@ NS_IMETHODIMP VlcPeer::Pause() { if( p_plugin ) { - p_plugin->Pause(); + vlc_pause_r( p_plugin->p_vlc ); } return NS_OK; } @@ -73,7 +93,17 @@ NS_IMETHODIMP VlcPeer::Stop() { if( p_plugin ) { - p_plugin->Stop(); + vlc_stop_r( p_plugin->p_vlc ); + p_plugin->b_stream = 0; + } + return NS_OK; +} + +NS_IMETHODIMP VlcPeer::Fullscreen() +{ + if( p_plugin ) + { + vlc_fullscreen_r( p_plugin->p_vlc ); } return NS_OK; } diff --git a/mozilla/vlcpeer.h b/mozilla/vlcpeer.h index 971434b169..d80deacee1 100644 --- a/mozilla/vlcpeer.h +++ b/mozilla/vlcpeer.h @@ -1,8 +1,8 @@ /***************************************************************************** - * vlcpeer.h: a VideoLAN plugin for Mozilla + * vlcpeer.h: scriptable peer descriptor ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: vlcpeer.h,v 1.1 2002/09/17 08:18:24 sam Exp $ + * $Id: vlcpeer.h,v 1.2 2002/09/30 11:05:41 sam Exp $ * * Authors: Samuel Hocevar * @@ -24,8 +24,6 @@ #include "vlcintf.h" #include "classinfo.h" -#include "nsMemory.h" - class VlcPlugin; class VlcPeer : public VlcIntf, public ClassInfo @@ -34,13 +32,11 @@ public: NS_DECL_ISUPPORTS NS_DECL_VLCINTF - VlcPeer(); - VlcPeer( VlcPlugin * ); - - void Disable() { p_plugin = NULL; } - + VlcPeer(); + VlcPeer( VlcPlugin * ); virtual ~VlcPeer(); - /* additional members */ + + void Disable(); private: VlcPlugin * p_plugin; diff --git a/mozilla/vlcplugin.cpp b/mozilla/vlcplugin.cpp index 75ba43b15a..64bab097bb 100644 --- a/mozilla/vlcplugin.cpp +++ b/mozilla/vlcplugin.cpp @@ -2,7 +2,7 @@ * vlcplugin.cpp: a VideoLAN Client plugin for Mozilla ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: vlcplugin.cpp,v 1.1 2002/09/17 08:18:24 sam Exp $ + * $Id: vlcplugin.cpp,v 1.2 2002/09/30 11:05:41 sam Exp $ * * Authors: Samuel Hocevar * @@ -24,15 +24,15 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include - #include +#include + #include "vlcpeer.h" #include "vlcplugin.h" /***************************************************************************** - * VlcPlugin methods + * VlcPlugin constructor and destructor *****************************************************************************/ VlcPlugin::VlcPlugin( NPP instance ) { @@ -51,6 +51,9 @@ VlcPlugin::~VlcPlugin() } +/***************************************************************************** + * VlcPlugin methods + *****************************************************************************/ void VlcPlugin::SetInstance( NPP instance ) { p_instance = instance; @@ -63,9 +66,25 @@ NPP VlcPlugin::GetInstance() } +VlcIntf* VlcPlugin::GetPeer() +{ + if( !p_peer ) + { + p_peer = new VlcPeer( this ); + if( p_peer == NULL ) + { + return NULL; + } + + NS_ADDREF( p_peer ); + } + + NS_ADDREF( p_peer ); + return p_peer; +} + void VlcPlugin::SetFileName(const char * filename) { -fprintf(stderr, "VlcPlugin::SetFilename %s\n", filename); #if 0 FILE * fh; fh = fopen(filename, "rb"); @@ -97,35 +116,3 @@ fprintf(stderr, "VlcPlugin::SetFilename %s\n", filename); return; } -void VlcPlugin::Play() -{ -fprintf(stderr, "VlcPlugin::Play\n"); -} - -void VlcPlugin::Pause() -{ -fprintf(stderr, "VlcPlugin::Pause\n"); -} - -void VlcPlugin::Stop() -{ -fprintf(stderr, "VlcPlugin::Stop\n"); -} - -VlcIntf* VlcPlugin::getScriptable() -{ - if( !p_peer ) - { - p_peer = new VlcPeer( this ); - if( p_peer == NULL ) - { - return NULL; - } - - NS_ADDREF( p_peer ); - } - // a getter should addref for its caller. - NS_ADDREF( p_peer ); - return p_peer; -} - diff --git a/mozilla/vlcplugin.h b/mozilla/vlcplugin.h index 6cf9574dd9..a7ec5b67d4 100644 --- a/mozilla/vlcplugin.h +++ b/mozilla/vlcplugin.h @@ -2,7 +2,7 @@ * vlcplugin.h: a VideoLAN plugin for Mozilla ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: vlcplugin.h,v 1.3 2002/09/17 08:18:24 sam Exp $ + * $Id: vlcplugin.h,v 1.4 2002/09/30 11:05:41 sam Exp $ * * Authors: Samuel Hocevar * @@ -32,13 +32,9 @@ public: void SetInstance( NPP ); NPP GetInstance(); + VlcIntf* GetPeer(); void SetFileName( const char* ); - void Play(); - void Pause(); - void Stop(); - - VlcIntf* getScriptable(); /* Window settings */ NPWindow* fWindow; @@ -53,6 +49,7 @@ public: /* vlc data members */ vlc_t * p_vlc; int b_stream; + int b_autoplay; char * psz_target; private: diff --git a/mozilla/vlcshell.cpp b/mozilla/vlcshell.cpp index 2fe7a94e91..d6910f2305 100644 --- a/mozilla/vlcshell.cpp +++ b/mozilla/vlcshell.cpp @@ -2,7 +2,7 @@ * vlcshell.c: a VideoLAN Client plugin for Mozilla ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: vlcshell.cpp,v 1.1 2002/09/17 08:18:24 sam Exp $ + * $Id: vlcshell.cpp,v 1.2 2002/09/30 11:05:41 sam Exp $ * * Authors: Samuel Hocevar * @@ -27,29 +27,33 @@ #include #include -/* Mozilla stuff */ -#include - -/* X11 stuff */ -#include -#include -#include - /* vlc stuff */ #include #include "config.h" +/* Mozilla stuff */ +#include + +#ifdef WIN32 + +#else + /* X11 stuff */ +# include +# include +# include +#endif + #include "vlcpeer.h" #include "vlcplugin.h" -/****************************************************************************** +/***************************************************************************** * Unix-only declarations - ******************************************************************************/ +******************************************************************************/ #ifndef WIN32 static void Redraw( Widget w, XtPointer closure, XEvent *event ); #endif -/****************************************************************************** +/***************************************************************************** * Windows-only declarations *****************************************************************************/ #ifdef WIN32 @@ -106,7 +110,7 @@ NPError NPP_GetValue( NPP instance, NPPVariable variable, void *value ) switch( variable ) { case NPPVpluginScriptableInstance: - *(nsISupports**)value = p_plugin->getScriptable(); + *(nsISupports**)value = p_plugin->GetPeer(); if( *(nsISupports**)value == NULL ) { return NPERR_OUT_OF_MEMORY_ERROR; @@ -158,11 +162,11 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, "vlc" /*, "--plugin-path", "/home/sam/videolan/vlc_MAIN/plugins"*/ , "--vout", "xvideo,x11,dummy" - /*, "--aout", "none"*/ + , "--aout", "dsp" , "--intf", "dummy" /*, "--noaudio"*/ - , "-q" - /*, "-v"*/ + /*, "-q"*/ + , "-v" }; if( instance == NULL ) @@ -203,35 +207,38 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, vlc_set_r( p_plugin->p_vlc, "vout", "xvideo,x11,dummy" ); vlc_set_r( p_plugin->p_vlc, "intf", "dummy" ); - vlc_set_r( p_plugin->p_vlc, "audio", "0" ); - - i_ret = vlc_run_r( p_plugin->p_vlc ); - if( i_ret ) - { - vlc_destroy_r( p_plugin->p_vlc ); - p_plugin->p_vlc = NULL; - delete p_plugin; - p_plugin = NULL; - return NPERR_GENERIC_ERROR; - } p_plugin->b_stream = 0; + p_plugin->b_autoplay = 0; p_plugin->psz_target = NULL; for( i = 0; i < argc ; i++ ) { - fprintf(stderr, "arg %i: '%s' = '%s'\n", i, argn[i], argv[i]); - if( !strcmp(argn[i],"target") ) + if( !strcmp( argn[i], "target" ) ) { - fprintf(stderr, "target specified: %s\n", argv[i]); - p_plugin->psz_target = strdup( argv[i] ); + p_plugin->psz_target = argv[i]; } - else + else if( !strcmp( argn[i], "autoplay" ) ) { - /*vlc_set_r( p_plugin->psz_target, argn[i], argv[i] );*/ + if( !strcmp( argv[i], "yes" ) ) + { + p_plugin->b_autoplay = 1; + } + } + else if( !strcmp( argn[i], "loop" ) ) + { + if( !strcmp( argv[i], "yes" ) ) + { + vlc_set_r( p_plugin->p_vlc, "loop", "1" ); + } } } + if( p_plugin->psz_target ) + { + p_plugin->psz_target = strdup( p_plugin->psz_target ); + } + return NPERR_NO_ERROR; } @@ -248,6 +255,7 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save ) { if( p_plugin->p_vlc != NULL ) { + vlc_stop_r( p_plugin->p_vlc ); vlc_destroy_r( p_plugin->p_vlc ); p_plugin->p_vlc = NULL; } @@ -308,13 +316,18 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window ) #if 1 if( !p_plugin->b_stream ) { - p_plugin->b_stream = 1; + int i_mode = PLAYLIST_APPEND; + + if( p_plugin->b_autoplay ) + { + i_mode |= PLAYLIST_GO; + } + if( p_plugin->psz_target ) { vlc_add_target_r( p_plugin->p_vlc, p_plugin->psz_target, - PLAYLIST_APPEND, PLAYLIST_END ); - vlc_add_target_r( p_plugin->p_vlc, "vlc:loop", - PLAYLIST_APPEND, PLAYLIST_END ); + i_mode, PLAYLIST_END ); + p_plugin->b_stream = 1; } } #endif @@ -330,7 +343,9 @@ NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream, return NPERR_INVALID_INSTANCE_ERROR; } +#if 0 VlcPlugin* p_plugin = (VlcPlugin*)instance->pdata; +#endif fprintf(stderr, "NPP_NewStream - FILE mode !!\n"); @@ -379,7 +394,7 @@ int32 NPP_Write( NPP instance, NPStream *stream, int32 offset, { fprintf(stderr, "NPP_Write %i\n", len); - if (instance != NULL) + if( instance != NULL ) { /*VlcPlugin* p_plugin = (VlcPlugin*) instance->pdata;*/ } @@ -395,8 +410,6 @@ NPError NPP_DestroyStream( NPP instance, NPStream *stream, NPError reason ) return NPERR_INVALID_INSTANCE_ERROR; } - VlcPlugin* p_plugin = (VlcPlugin*) instance->pdata; - return NPERR_NO_ERROR; } @@ -411,9 +424,8 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname ) VlcPlugin* p_plugin = (VlcPlugin*)instance->pdata; fprintf(stderr, "NPP_StreamAsFile\n"); - vlc_add_target_r( p_plugin->p_vlc, fname, PLAYLIST_APPEND, PLAYLIST_END ); - vlc_add_target_r( p_plugin->p_vlc, "vlc:loop", - PLAYLIST_APPEND, PLAYLIST_END ); + vlc_add_target_r( p_plugin->p_vlc, fname, + PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); } #if 0 @@ -440,15 +452,19 @@ void NPP_URLNotify( NPP instance, const char* url, void NPP_Print( NPP instance, NPPrint* printInfo ) { - if(printInfo == NULL) + if( printInfo == NULL ) + { return; + } - if (instance != NULL) { - /***** Insert NPP_Print code here *****\ + if( instance != NULL ) + { + /***** Insert NPP_Print code here *****\ PluginInstance* p_plugin = (PluginInstance*) instance->pdata; - \**************************************/ + \**************************************/ - if (printInfo->mode == NP_FULL) { + if( printInfo->mode == NP_FULL ) + { /* * PLUGIN DEVELOPERS: * If your plugin would like to take over @@ -466,17 +482,19 @@ void NPP_Print( NPP instance, NPPrint* printInfo ) * etc. */ - /***** Insert NPP_Print code here *****\ + /***** Insert NPP_Print code here *****\ void* platformPrint = printInfo->print.fullPrint.platformPrint; NPBool printOne = printInfo->print.fullPrint.printOne; - \**************************************/ + \**************************************/ /* Do the default*/ printInfo->print.fullPrint.pluginPrinted = FALSE; } - else { /* If not fullscreen, we must be embedded */ + else + { + /* If not fullscreen, we must be embedded */ /* * PLUGIN DEVELOPERS: * If your plugin is embedded, or is full-screen @@ -489,12 +507,12 @@ void NPP_Print( NPP instance, NPPrint* printInfo ) * device context. */ - /***** Insert NPP_Print code here *****\ + /***** Insert NPP_Print code here *****\ NPWindow* printWindow = &(printInfo->print.embedPrint.window); void* platformPrint = printInfo->print.embedPrint.platformPrint; - \**************************************/ + \**************************************/ } } } @@ -508,18 +526,22 @@ static void Redraw( Widget w, XtPointer closure, XEvent *event ) VlcPlugin* p_plugin = (VlcPlugin*)closure; GC gc; XGCValues gcv; - const char* text = "hello d00dZ, I'm in void Redraw()"; - - XtVaGetValues(w, XtNbackground, &gcv.background, - XtNforeground, &gcv.foreground, 0); - gc = XCreateGC(p_plugin->display, p_plugin->window, - GCForeground|GCBackground, &gcv); - XDrawRectangle(p_plugin->display, p_plugin->window, gc, - 0, 0, p_plugin->width-1, p_plugin->height-1); - XDrawString(p_plugin->display, p_plugin->window, gc, - p_plugin->width/2 - 100, p_plugin->height/2, - text, strlen(text)); - return; + const char * psz_text = "(no picture)"; + + gcv.foreground = BlackPixel( p_plugin->display, 0 ); + gc = XCreateGC( p_plugin->display, p_plugin->window, GCForeground, &gcv ); + + XFillRectangle( p_plugin->display, p_plugin->window, gc, + 0, 0, p_plugin->width, p_plugin->height ); + + gcv.foreground = WhitePixel( p_plugin->display, 0 ); + XChangeGC( p_plugin->display, gc, GCForeground, &gcv ); + + XDrawString( p_plugin->display, p_plugin->window, gc, + p_plugin->width / 2 - 40, p_plugin->height / 2, + psz_text, strlen(psz_text) ); + + XFreeGC( p_plugin->display, gc ); } #endif diff --git a/po/.cvsignore b/po/.cvsignore index dd122c4a69..f2ddf5bf9b 100644 --- a/po/.cvsignore +++ b/po/.cvsignore @@ -1,5 +1,6 @@ Makefile Makefile.in +Makefile.in.in POTFILES *.mo *.gmo diff --git a/po/POTFILES.in b/po/POTFILES.in index d2e9d3fcb8..52b5cdea0b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,89 +1,3 @@ src/libvlc.c src/libvlc.h src/misc/configuration.c -plugins/a52/a52.c -plugins/aa/aa.c -plugins/ac3_adec/ac3_adec.c -plugins/ac3_spdif/ac3_spdif.c -plugins/access/file.c -plugins/access/http.c -plugins/access/udp.c -plugins/alsa/alsa.c -plugins/arts/arts.c -plugins/beos/beos.cpp -plugins/chroma/i420_rgb.c -plugins/chroma/i420_ymga.c -plugins/chroma/i420_yuy2.c -plugins/chroma/i422_yuy2.c -plugins/directx/directx.c -plugins/downmix/downmix.c -plugins/downmix/downmix3dn.c -plugins/downmix/downmixsse.c -plugins/dsp/dsp.c -plugins/dummy/dummy.c -plugins/dummy/null.c -plugins/dvd/dvd.c -plugins/dvdread/dvdread.c -plugins/esd/esd.c -plugins/fb/fb.c -plugins/filter/deinterlace.c -plugins/filter/distort.c -plugins/filter/invert.c -plugins/filter/transform.c -plugins/filter/wall.c -plugins/fx/scope.c -plugins/ggi/ggi.c -plugins/glide/glide.c -plugins/gtk/gtk.c -plugins/gtk/gnome.c -plugins/gtk/gtk_interface.c -plugins/gtk/gnome_interface.c -plugins/gtk/gtk_preferences.c -plugins/gtk/gtk_menu.c -plugins/idct/idct.c -plugins/idct/idctaltivec.c -plugins/idct/idctclassic.c -plugins/idct/idctmmx.c -plugins/idct/idctmmxext.c -plugins/imdct/imdct.c -plugins/imdct/imdct3dn.c -plugins/imdct/imdctsse.c -plugins/kde/kde.cpp -plugins/lirc/lirc.c -plugins/lpcm_adec/lpcm_adec.c -plugins/macosx/macosx.m -plugins/macosx/intf_macosx.m -plugins/macosx/intf_controls.m -plugins/macosx/intf_playlist.m -plugins/macosx/intf_open.m -plugins/mad/mad_adec.c -plugins/memcpy/memcpy.c -plugins/memcpy/memcpyaltivec.c -plugins/mga/mga.c -plugins/mga/xmga.c -plugins/motion/motion.c -plugins/motion/motion3dnow.c -plugins/motion/motionaltivec.c -plugins/motion/motionmmx.c -plugins/motion/motionmmxext.c -plugins/mpeg_adec/mpeg_adec.c -plugins/mpeg_system/mpeg_es.c -plugins/mpeg_system/mpeg_ps.c -plugins/mpeg_system/mpeg_ts.c -plugins/mpeg_vdec/video_parser.c -plugins/network/ipv4.c -plugins/network/ipv6.c -plugins/qnx/qnx.c -plugins/qt/qt.cpp -plugins/satellite/satellite.c -plugins/sdl/sdl.c -plugins/spudec/spu_decoder.c -plugins/text/logger.c -plugins/text/ncurses.c -plugins/text/rc.c -plugins/vcd/vcd.c -plugins/win32/preferences.cpp -plugins/win32/waveout.c -plugins/win32/win32.cpp -plugins/x11/x11.c -plugins/x11/xvideo.c diff --git a/share/.cvsignore b/share/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/share/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/src/.cvsignore b/src/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/src/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/src/misc/modules.c b/src/misc/modules.c index 8389033488..b84652c29b 100644 --- a/src/misc/modules.c +++ b/src/misc/modules.c @@ -2,7 +2,7 @@ * modules.c : Builtin and plugin modules management functions ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules.c,v 1.92 2002/08/21 17:31:58 sam Exp $ + * $Id: modules.c,v 1.93 2002/09/30 11:05:42 sam Exp $ * * Authors: Samuel Hocevar * Ethan C. Baldridge @@ -588,7 +588,6 @@ static void AllocateAllPlugins( vlc_object_t *p_this ) static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, int i_maxdepth ) { -#define PLUGIN_EXT ".so" int i_dirlen; DIR * dir; char * psz_file; @@ -613,7 +612,7 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, while( (file = readdir( dir )) ) { struct stat statbuf; - int i_len = strlen( file->d_name ); + int i_len; /* Skip ".", ".." and anything starting with "." */ if( !*file->d_name || *file->d_name == '.' ) @@ -621,6 +620,8 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, continue; } + i_len = strlen( file->d_name ); + psz_file = malloc( i_dirlen + 1 /* / */ + i_len + 1 /* \0 */ ); sprintf( psz_file, "%s/%s", psz_dir, file->d_name ); @@ -628,10 +629,10 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, { AllocatePluginDir( p_this, psz_file, i_maxdepth - 1 ); } - else if( i_len > strlen( PLUGIN_EXT ) - /* We only load files ending with ".so" */ - && !strncmp( file->d_name + i_len - strlen( PLUGIN_EXT ), - PLUGIN_EXT, strlen( PLUGIN_EXT ) ) ) + else if( i_len > strlen( LIBEXT ) + /* We only load files ending with LIBEXT */ + && !strncmp( file->d_name + i_len - strlen( LIBEXT ), + LIBEXT, strlen( LIBEXT ) ) ) { AllocatePluginFile( p_this, psz_file ); } diff --git a/src/misc/modules_plugin.h b/src/misc/modules_plugin.h deleted file mode 100644 index 84441f7a14..0000000000 --- a/src/misc/modules_plugin.h +++ /dev/null @@ -1,337 +0,0 @@ -/***************************************************************************** - * modules_plugin.h : Plugin management functions used by the core application. - ***************************************************************************** - * Copyright (C) 2001 VideoLAN - * Automatically generated from src/misc/modules_plugin.h.in by bootstrap.sh - * - * Authors: Samuel Hocevar - * - * 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. - *****************************************************************************/ - -/***************************************************************************** - * Inline functions for handling dynamic modules - *****************************************************************************/ - -/***************************************************************************** - * module_load: load a dynamic library - ***************************************************************************** - * This function loads a dynamically linked library using a system dependant - * method, and returns a non-zero value on error, zero otherwise. - *****************************************************************************/ -static int module_load( const char * psz_filename, module_handle_t * handle ) -{ -#ifdef SYS_BEOS - *handle = load_add_on( psz_filename ); - return( *handle < 0 ); - -#elif defined(WIN32) - *handle = LoadLibrary( psz_filename ); - return( *handle == NULL ); - -#elif defined(RTLD_NOW) -# if defined(SYS_LINUX) - /* We should NOT open modules with RTLD_GLOBAL, or we are going to get - * namespace collisions when two modules have common public symbols, - * but ALSA is being a pest here. */ - if( strstr( psz_filename, "alsa.so" ) ) - { - *handle = dlopen( psz_filename, RTLD_NOW | RTLD_GLOBAL ); - return( *handle == NULL ); - } -# endif - *handle = dlopen( psz_filename, RTLD_NOW ); - return( *handle == NULL ); - -#else - *handle = dlopen( psz_filename, DL_LAZY ); - return( *handle == NULL ); - -#endif -} - -/***************************************************************************** - * module_unload: unload a dynamic library - ***************************************************************************** - * This function unloads a previously opened dynamically linked library - * using a system dependant method. No return value is taken in consideration, - * since some libraries sometimes refuse to close properly. - *****************************************************************************/ -static void module_unload( module_handle_t handle ) -{ -#ifdef SYS_BEOS - unload_add_on( handle ); - -#elif defined(WIN32) - FreeLibrary( handle ); - -#else - dlclose( handle ); - -#endif - return; -} - -/***************************************************************************** - * module_getsymbol: get a symbol from a dynamic library - ***************************************************************************** - * This function queries a loaded library for a symbol specified in a - * string, and returns a pointer to it. We don't check for dlerror() or - * similar functions, since we want a non-NULL symbol anyway. - *****************************************************************************/ -static void * _module_getsymbol( module_handle_t handle, - const char * psz_function ) -{ -#ifdef SYS_BEOS - void * p_symbol; - if( B_OK == get_image_symbol( handle, psz_function, - B_SYMBOL_TYPE_TEXT, &p_symbol ) ) - { - return( p_symbol ); - } - else - { - return( NULL ); - } - -#elif defined(WIN32) - return( (void *)GetProcAddress( handle, psz_function ) ); - -#else - return( dlsym( handle, psz_function ) ); - -#endif -} - -static void * module_getsymbol( module_handle_t handle, - const char * psz_function ) -{ - void * p_symbol = _module_getsymbol( handle, psz_function ); - - /* MacOS X dl library expects symbols to begin with "_". So do - * some other operating systems. That's really lame, but hey, what - * can we do ? */ - if( p_symbol == NULL ) - { - char *psz_call = malloc( strlen( psz_function ) + 2 ); - - strcpy( psz_call + 1, psz_function ); - psz_call[ 0 ] = '_'; - p_symbol = _module_getsymbol( handle, psz_call ); - free( psz_call ); - } - - return p_symbol; -} - -/***************************************************************************** - * module_error: wrapper for dlerror() - ***************************************************************************** - * This function returns the error message of the last module operation. It - * returns the string "failed" on systems which do not have a dlerror() like - * function. psz_buffer can be used to store temporary data, it is guaranteed - * to be kept intact until the return value of module_error has been used. - *****************************************************************************/ -static const char * module_error( char *psz_buffer ) -{ -#if defined(SYS_BEOS) - return( "failed" ); - -#elif defined(WIN32) - int i, i_error = GetLastError(); - - FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, i_error, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) psz_buffer, 256, NULL); - - /* Go to the end of the string */ - for( i = 0; - psz_buffer[i] && psz_buffer[i] != '\r' && psz_buffer[i] != '\n'; - i++ ) {}; - - if( psz_buffer[i] ) - { - snprintf( psz_buffer + i, 256 - i, " (error %i)", i_error ); - psz_buffer[ 255 ] = '\0'; - } - - return psz_buffer; - -#else - return( dlerror() ); - -#endif -} - -/***************************************************************************** - * STORE_SYMBOLS: store known symbols into p_symbols for plugin access. - *****************************************************************************/ -#define STORE_SYMBOLS( p_symbols ) \ - (p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \ - (p_symbols)->aout_FormatNbChannels_inner = aout_FormatNbChannels; \ - (p_symbols)->aout_FifoPop_inner = aout_FifoPop; \ - (p_symbols)->aout_VolumeSoftInit_inner = aout_VolumeSoftInit; \ - (p_symbols)->aout_VolumeNoneInit_inner = aout_VolumeNoneInit; \ - (p_symbols)->__aout_New_inner = __aout_New; \ - (p_symbols)->aout_Delete_inner = aout_Delete; \ - (p_symbols)->aout_DateInit_inner = aout_DateInit; \ - (p_symbols)->aout_DateSet_inner = aout_DateSet; \ - (p_symbols)->aout_DateMove_inner = aout_DateMove; \ - (p_symbols)->aout_DateGet_inner = aout_DateGet; \ - (p_symbols)->aout_DateIncrement_inner = aout_DateIncrement; \ - (p_symbols)->__aout_DecNew_inner = __aout_DecNew; \ - (p_symbols)->aout_DecDelete_inner = aout_DecDelete; \ - (p_symbols)->aout_DecNewBuffer_inner = aout_DecNewBuffer; \ - (p_symbols)->aout_DecDeleteBuffer_inner = aout_DecDeleteBuffer; \ - (p_symbols)->aout_DecPlay_inner = aout_DecPlay; \ - (p_symbols)->aout_VolumeGet_inner = aout_VolumeGet; \ - (p_symbols)->aout_VolumeSet_inner = aout_VolumeSet; \ - (p_symbols)->aout_VolumeInfos_inner = aout_VolumeInfos; \ - (p_symbols)->aout_VolumeUp_inner = aout_VolumeUp; \ - (p_symbols)->aout_VolumeDown_inner = aout_VolumeDown; \ - (p_symbols)->aout_Restart_inner = aout_Restart; \ - (p_symbols)->__config_GetInt_inner = __config_GetInt; \ - (p_symbols)->__config_PutInt_inner = __config_PutInt; \ - (p_symbols)->__config_GetFloat_inner = __config_GetFloat; \ - (p_symbols)->__config_PutFloat_inner = __config_PutFloat; \ - (p_symbols)->__config_GetPsz_inner = __config_GetPsz; \ - (p_symbols)->__config_PutPsz_inner = __config_PutPsz; \ - (p_symbols)->__config_LoadCmdLine_inner = __config_LoadCmdLine; \ - (p_symbols)->config_GetHomeDir_inner = config_GetHomeDir; \ - (p_symbols)->__config_LoadConfigFile_inner = __config_LoadConfigFile; \ - (p_symbols)->__config_SaveConfigFile_inner = __config_SaveConfigFile; \ - (p_symbols)->config_FindConfig_inner = config_FindConfig; \ - (p_symbols)->config_Duplicate_inner = config_Duplicate; \ - (p_symbols)->config_SetCallbacks_inner = config_SetCallbacks; \ - (p_symbols)->config_UnsetCallbacks_inner = config_UnsetCallbacks; \ - (p_symbols)->InitBitstream_inner = InitBitstream; \ - (p_symbols)->NextDataPacket_inner = NextDataPacket; \ - (p_symbols)->BitstreamNextDataPacket_inner = BitstreamNextDataPacket; \ - (p_symbols)->UnalignedShowBits_inner = UnalignedShowBits; \ - (p_symbols)->UnalignedRemoveBits_inner = UnalignedRemoveBits; \ - (p_symbols)->UnalignedGetBits_inner = UnalignedGetBits; \ - (p_symbols)->CurrentPTS_inner = CurrentPTS; \ - (p_symbols)->NextPTS_inner = NextPTS; \ - (p_symbols)->DecoderError_inner = DecoderError; \ - (p_symbols)->__input_SetStatus_inner = __input_SetStatus; \ - (p_symbols)->__input_Seek_inner = __input_Seek; \ - (p_symbols)->__input_Tell_inner = __input_Tell; \ - (p_symbols)->input_DumpStream_inner = input_DumpStream; \ - (p_symbols)->input_OffsetToTime_inner = input_OffsetToTime; \ - (p_symbols)->input_ToggleES_inner = input_ToggleES; \ - (p_symbols)->input_ChangeArea_inner = input_ChangeArea; \ - (p_symbols)->input_ChangeProgram_inner = input_ChangeProgram; \ - (p_symbols)->input_InitStream_inner = input_InitStream; \ - (p_symbols)->input_EndStream_inner = input_EndStream; \ - (p_symbols)->input_FindProgram_inner = input_FindProgram; \ - (p_symbols)->input_AddProgram_inner = input_AddProgram; \ - (p_symbols)->input_DelProgram_inner = input_DelProgram; \ - (p_symbols)->input_SetProgram_inner = input_SetProgram; \ - (p_symbols)->input_AddArea_inner = input_AddArea; \ - (p_symbols)->input_DelArea_inner = input_DelArea; \ - (p_symbols)->input_FindES_inner = input_FindES; \ - (p_symbols)->input_AddES_inner = input_AddES; \ - (p_symbols)->input_DelES_inner = input_DelES; \ - (p_symbols)->input_SelectES_inner = input_SelectES; \ - (p_symbols)->input_UnselectES_inner = input_UnselectES; \ - (p_symbols)->input_DecodePES_inner = input_DecodePES; \ - (p_symbols)->input_ClockManageControl_inner = input_ClockManageControl; \ - (p_symbols)->input_ClockManageRef_inner = input_ClockManageRef; \ - (p_symbols)->input_ClockGetTS_inner = input_ClockGetTS; \ - (p_symbols)->input_InfoCategory_inner = input_InfoCategory; \ - (p_symbols)->input_AddInfo_inner = input_AddInfo; \ - (p_symbols)->input_BuffersEnd_inner = input_BuffersEnd; \ - (p_symbols)->input_NewBuffer_inner = input_NewBuffer; \ - (p_symbols)->input_ReleaseBuffer_inner = input_ReleaseBuffer; \ - (p_symbols)->input_ShareBuffer_inner = input_ShareBuffer; \ - (p_symbols)->input_NewPacket_inner = input_NewPacket; \ - (p_symbols)->input_DeletePacket_inner = input_DeletePacket; \ - (p_symbols)->input_NewPES_inner = input_NewPES; \ - (p_symbols)->input_DeletePES_inner = input_DeletePES; \ - (p_symbols)->input_FillBuffer_inner = input_FillBuffer; \ - (p_symbols)->input_Peek_inner = input_Peek; \ - (p_symbols)->input_SplitBuffer_inner = input_SplitBuffer; \ - (p_symbols)->input_AccessInit_inner = input_AccessInit; \ - (p_symbols)->input_AccessReinit_inner = input_AccessReinit; \ - (p_symbols)->input_AccessEnd_inner = input_AccessEnd; \ - (p_symbols)->__input_FDClose_inner = __input_FDClose; \ - (p_symbols)->__input_FDNetworkClose_inner = __input_FDNetworkClose; \ - (p_symbols)->input_FDRead_inner = input_FDRead; \ - (p_symbols)->input_FDNetworkRead_inner = input_FDNetworkRead; \ - (p_symbols)->input_FDSeek_inner = input_FDSeek; \ - (p_symbols)->__intf_Create_inner = __intf_Create; \ - (p_symbols)->intf_RunThread_inner = intf_RunThread; \ - (p_symbols)->intf_StopThread_inner = intf_StopThread; \ - (p_symbols)->intf_Destroy_inner = intf_Destroy; \ - (p_symbols)->__intf_Eject_inner = __intf_Eject; \ - (p_symbols)->GetLang_1_inner = GetLang_1; \ - (p_symbols)->GetLang_2T_inner = GetLang_2T; \ - (p_symbols)->GetLang_2B_inner = GetLang_2B; \ - (p_symbols)->DecodeLanguage_inner = DecodeLanguage; \ - (p_symbols)->__module_Need_inner = __module_Need; \ - (p_symbols)->__module_Unneed_inner = __module_Unneed; \ - (p_symbols)->mstrtime_inner = mstrtime; \ - (p_symbols)->mdate_inner = mdate; \ - (p_symbols)->mwait_inner = mwait; \ - (p_symbols)->msleep_inner = msleep; \ - (p_symbols)->__network_ChannelJoin_inner = __network_ChannelJoin; \ - (p_symbols)->__network_ChannelCreate_inner = __network_ChannelCreate; \ - (p_symbols)->__sout_NewInstance_inner = __sout_NewInstance; \ - (p_symbols)->sout_DeleteInstance_inner = sout_DeleteInstance; \ - (p_symbols)->__vout_CreateThread_inner = __vout_CreateThread; \ - (p_symbols)->vout_DestroyThread_inner = vout_DestroyThread; \ - (p_symbols)->vout_ChromaCmp_inner = vout_ChromaCmp; \ - (p_symbols)->vout_CreatePicture_inner = vout_CreatePicture; \ - (p_symbols)->vout_AllocatePicture_inner = vout_AllocatePicture; \ - (p_symbols)->vout_DestroyPicture_inner = vout_DestroyPicture; \ - (p_symbols)->vout_DisplayPicture_inner = vout_DisplayPicture; \ - (p_symbols)->vout_DatePicture_inner = vout_DatePicture; \ - (p_symbols)->vout_LinkPicture_inner = vout_LinkPicture; \ - (p_symbols)->vout_UnlinkPicture_inner = vout_UnlinkPicture; \ - (p_symbols)->vout_PlacePicture_inner = vout_PlacePicture; \ - (p_symbols)->vout_CreateSubPicture_inner = vout_CreateSubPicture; \ - (p_symbols)->vout_DestroySubPicture_inner = vout_DestroySubPicture; \ - (p_symbols)->vout_DisplaySubPicture_inner = vout_DisplaySubPicture; \ - (p_symbols)->__msg_Generic_inner = __msg_Generic; \ - (p_symbols)->__msg_Info_inner = __msg_Info; \ - (p_symbols)->__msg_Err_inner = __msg_Err; \ - (p_symbols)->__msg_Warn_inner = __msg_Warn; \ - (p_symbols)->__msg_Dbg_inner = __msg_Dbg; \ - (p_symbols)->__msg_Subscribe_inner = __msg_Subscribe; \ - (p_symbols)->__msg_Unsubscribe_inner = __msg_Unsubscribe; \ - (p_symbols)->__vlc_object_create_inner = __vlc_object_create; \ - (p_symbols)->__vlc_object_destroy_inner = __vlc_object_destroy; \ - (p_symbols)->__vlc_object_attach_inner = __vlc_object_attach; \ - (p_symbols)->__vlc_object_detach_inner = __vlc_object_detach; \ - (p_symbols)->__vlc_object_find_inner = __vlc_object_find; \ - (p_symbols)->__vlc_object_yield_inner = __vlc_object_yield; \ - (p_symbols)->__vlc_object_release_inner = __vlc_object_release; \ - (p_symbols)->__vlc_list_find_inner = __vlc_list_find; \ - (p_symbols)->vlc_list_release_inner = vlc_list_release; \ - (p_symbols)->__vlc_liststructure_inner = __vlc_liststructure; \ - (p_symbols)->__vlc_dumpstructure_inner = __vlc_dumpstructure; \ - (p_symbols)->playlist_Command_inner = playlist_Command; \ - (p_symbols)->playlist_Add_inner = playlist_Add; \ - (p_symbols)->playlist_Delete_inner = playlist_Delete; \ - (p_symbols)->__vlc_threads_init_inner = __vlc_threads_init; \ - (p_symbols)->__vlc_threads_end_inner = __vlc_threads_end; \ - (p_symbols)->__vlc_mutex_init_inner = __vlc_mutex_init; \ - (p_symbols)->__vlc_mutex_destroy_inner = __vlc_mutex_destroy; \ - (p_symbols)->__vlc_cond_init_inner = __vlc_cond_init; \ - (p_symbols)->__vlc_cond_destroy_inner = __vlc_cond_destroy; \ - (p_symbols)->__vlc_thread_create_inner = __vlc_thread_create; \ - (p_symbols)->__vlc_thread_ready_inner = __vlc_thread_ready; \ - (p_symbols)->__vlc_thread_join_inner = __vlc_thread_join; \ - diff --git a/src/misc/modules_plugin.h.in b/src/misc/modules_plugin.h.in index 873f4c39a7..3ec284aec7 100644 --- a/src/misc/modules_plugin.h.in +++ b/src/misc/modules_plugin.h.in @@ -2,7 +2,7 @@ * modules_plugin.h : Plugin management functions used by the core application. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules_plugin.h.in,v 1.3 2002/08/08 00:35:11 sam Exp $ + * $Id: modules_plugin.h.in,v 1.4 2002/09/30 11:05:42 sam Exp $ * * Authors: Samuel Hocevar * @@ -46,7 +46,7 @@ static int module_load( const char * psz_filename, module_handle_t * handle ) /* We should NOT open modules with RTLD_GLOBAL, or we are going to get * namespace collisions when two modules have common public symbols, * but ALSA is being a pest here. */ - if( strstr( psz_filename, "alsa.so" ) ) + if( strstr( psz_filename, "alsa" LIBEXT ) ) { *handle = dlopen( psz_filename, RTLD_NOW | RTLD_GLOBAL ); return( *handle == NULL ); diff --git a/src/misc/symbols.c b/src/misc/symbols.c deleted file mode 100644 index e81b0b97c9..0000000000 --- a/src/misc/symbols.c +++ /dev/null @@ -1,111 +0,0 @@ -/***************************************************************************** - * symbols.c : Extra file used to force linking with some shared symbols - ***************************************************************************** - * Copyright (C) 2002 VideoLAN - * $Id: symbols.c,v 1.2 2002/06/01 12:32:01 sam Exp $ - * - * Authors: Samuel Hocevar - * - * 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. - *****************************************************************************/ - -/***************************************************************************** - * Rationale for this file: - * - * On certain architectures, such as IA64 or HPPA, it is forbidden to link - * static objects with objects which have relocation information. This - * basically means that if you are building libfoo.so, you cannot add libbar.a - * to the link process. To bypass this restriction, we link the main app with - * libbar.a, but then we need to tell the compiler that we will need symbols - * from libbar.a, this is why this file is here. - *****************************************************************************/ - -/***************************************************************************** - * Preamble - *****************************************************************************/ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/***************************************************************************** - * Local prototypes - *****************************************************************************/ -void _Use ( int, ... ); -void _Beurk ( void ); - -/***************************************************************************** - * - *****************************************************************************/ -void _Use( int i_dummy, ... ) -{ - ; -} - -/***************************************************************************** - * - *****************************************************************************/ -void _Beurk( void ) -{ - /* for i in Xxf86dga Xxf86vm Xv - * do nm /usr/X11R6/lib/lib$i.a | grep ' T ' | awk '{ print $3 }' - * done - */ - _Use( 0, XF86DGADirectVideo, XF86DGADirectVideoLL, XF86DGAForkApp, - XF86DGAGetVidPage, XF86DGAGetVideo, XF86DGAGetVideoLL, - XF86DGAGetViewPortSize, XF86DGAInstallColormap, - XF86DGAQueryDirectVideo, XF86DGAQueryExtension, - XF86DGAQueryVersion, XF86DGASetVidPage, XF86DGASetViewPort, - XF86DGAViewPortChanged ); - - _Use( 0, XDGAChangePixmapMode, XDGACloseFramebuffer, XDGACopyArea, - XDGACopyTransparentArea, XDGACreateColormap, XDGAFillRectangle, - /* XDGAGetMappedMemory, */ XDGAGetViewportStatus, - XDGAInstallColormap, XDGAKeyEventToXKeyEvent, - /* XDGAMapFramebuffer, */ XDGAOpenFramebuffer, XDGAQueryExtension, - XDGAQueryModes, XDGAQueryVersion, XDGASelectInput, - XDGASetClientVersion, XDGASetMode, XDGASetViewport, XDGASync - /* XDGAUnmapFramebuffer, */ /* xdga_find_display */ ); - - _Use( 0, XF86VidModeAddModeLine, XF86VidModeDeleteModeLine, - XF86VidModeGetAllModeLines, XF86VidModeGetDotClocks, - XF86VidModeGetGamma, XF86VidModeGetGammaRamp, - XF86VidModeGetGammaRampSize, XF86VidModeGetModeLine, - XF86VidModeGetMonitor, XF86VidModeGetViewPort, - XF86VidModeLockModeSwitch, XF86VidModeModModeLine, - XF86VidModeQueryExtension, XF86VidModeQueryVersion, - XF86VidModeSetClientVersion, XF86VidModeSetGamma, - XF86VidModeSetGammaRamp, XF86VidModeSetViewPort, - XF86VidModeSwitchMode, XF86VidModeSwitchToMode, - XF86VidModeValidateModeLine ); - - _Use( 0, XvCreateImage, XvFreeAdaptorInfo, XvFreeEncodingInfo, - XvGetPortAttribute, XvGetStill, XvGetVideo, XvGrabPort, - XvListImageFormats, XvPutImage, XvPutStill, XvPutVideo, - XvQueryAdaptors, XvQueryBestSize, XvQueryEncodings, - XvQueryExtension, XvQueryPortAttributes, XvSelectPortNotify, - XvSelectVideoNotify, XvSetPortAttribute, XvShmCreateImage, - XvShmPutImage, XvStopVideo, XvUngrabPort ); -} - diff --git a/vlc-config.in b/vlc-config.in index 9287997f91..687d924eef 100644 --- a/vlc-config.in +++ b/vlc-config.in @@ -56,7 +56,7 @@ while test $# -gt 0; do ;; --cflags) if test "@includedir@" != /usr/include ; then - includes="-I@includedir@ @vlc_CFLAGS@" + includes="-I@includedir@" fi echo_cflags=yes ;; @@ -80,5 +80,5 @@ if test "$echo_cflags" = "yes"; then echo -I@INCLUDE@ $includes fi if test "$echo_libs" = "yes"; then - echo "-L@libdir@ -lvlc @libvlc_LDFLAGS@" + echo "-L@libdir@ -lvlc @LDFLAGS_libvlc@" fi -- 2.39.2