* configure.ac: Propagate $(top_srcdir) to the vlc-config call.
# 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 = intl modules . share po m4
+SUBDIRS = intl modules mozilla . share po m4
DIST_SUBDIRS = $(SUBDIRS) src debian doc ipkg lib autotools
EXTRA_DIST = \
# Clean up
rm -Rf $(srcdir)/tmp
-###############################################################################
-# Building the Mozilla plugin
-###############################################################################
-
-noinst_LIBRARIES = $(noinst_LIBRARIES_mozilla)
-
-MOSTLYCLEANFILES = $(LIBRARIES_mozilla)
-
-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/support/classinfo.h \
- $(SOURCES_mozilla_win32) \
- $(SOURCES_mozilla_macosx) \
- $(SOURCES_mozilla_unix) \
- $(NULL)
-
-# Under Win32, Mozilla plugins need to be named NP******.DLL, but under Unix
-# the common naming scheme is lib******plugin.so. Also, we need npwin.cpp
-# under Win32 and npunix.c under Unix.
-if HAVE_WIN32
-LIBRARIES_mozilla = mozilla/npvlc$(LIBEXT)
-SOURCES_mozilla_win32 = mozilla/support/npwin.cpp
-CPPFLAGS_mozilla_EXTRA = -DXP_WIN -DXP_WIN32
-else
-if HAVE_DARWIN
-# We don't define LIBRARIES_mozilla because we'll be using project builder
-SOURCES_mozilla_macosx = mozilla/support/npmac.cpp
-else
-LIBRARIES_mozilla = mozilla/libvlcplugin$(LIBEXT)
-SOURCES_mozilla_unix = mozilla/support/npunix.c
-endif
-endif
-
-if BUILD_MOZILLA
-if UNTRUE
-noinst_LIBRARIES_mozilla = mozilla/libplugin.a
-endif
-
-mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla)
-mozilla_libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla pic` \
- $(CPPFLAGS_mozilla_EXTRA) -Imozilla
-mozilla_libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla pic` \
- $(CPPFLAGS_mozilla_EXTRA) -Imozilla
-mozilla_libplugin_a_DEPENDENCIES = lib/libvlc_pic.a $(DATA_npvlc_rc)
-
-BUILT_SOURCES_mozilla = mozilla/vlcintf.h
-$(SOURCES_mozilla): mozilla/vlcintf.h
-
-mozilla_plugin_DATA = $(LIBRARIES_mozilla)
-mozilla_plugindir = $(libdir)/mozilla/plugins
-$(LIBRARIES_mozilla): $(mozilla_libplugin_a_OBJECTS) \
- $(mozilla_libplugin_a_DEPENDENCIES) stamp-pic
- $(CXXLINK) $(mozilla_libplugin_a_OBJECTS) $(DATA_npvlc_rc) \
- lib/libvlc_pic.a -shared \
- `$(VLC_CONFIG) --libs vlc mozilla builtin pic`
-
-mozilla_vlcintf_xpt_DATA = mozilla/vlcintf.xpt
-mozilla_vlcintf_xptdir = $(libdir)/mozilla/components
-mozilla/vlcintf.xpt: mozilla/vlcintf.idl
- $(XPIDL) -I/usr/share/idl/mozilla -I/usr/lib/mozilla/include/idl \
- -m typelib -o mozilla/vlcintf $(srcdir)/mozilla/vlcintf.idl
-
-mozilla/vlcintf.h: mozilla/vlcintf.idl
- $(XPIDL) -I/usr/share/idl/mozilla -I/usr/lib/mozilla/include/idl \
- -m header -o mozilla/vlcintf $(srcdir)/mozilla/vlcintf.idl
-
-if HAVE_WIN32
-DATA_npvlc_rc = $(noinst_mozilla_npvlc_rc_DATA)
-noinst_mozilla_npvlc_rc_DATA = mozilla/npvlc_rc.$(OBJEXT)
-noinst_mozilla_npvlc_rcdir = $(libdir)
-mozilla/npvlc_rc.$(OBJEXT): mozilla/npvlc_rc.rc
- $(WINDRES) --include-dir $(srcdir)/mozilla -i $< -o $@
-endif
-endif
-
###############################################################################
# Stamp rules
###############################################################################
dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.31 2003/07/16 16:06:56 sam Exp $
+dnl $Id: configure.ac,v 1.32 2003/07/17 12:06:10 sam Exp $
AC_INIT(vlc,0.6.0)
dnl
dnl Handle substvars that use $(top_srcdir)
dnl
-VLC_CONFIG="\$(top_builddir)/vlc-config"
+VLC_CONFIG="top_srcdir=\"\$(top_srcdir)\" \$(top_builddir)/vlc-config"
AC_SUBST(VLC_CONFIG)
CPPFLAGS_save="${CPPFLAGS_save} -I\$(top_srcdir)/include"
ipkg/Makefile
lib/Makefile
modules/Makefile
+ mozilla/Makefile
m4/Makefile
po/Makefile.in
share/Makefile
+.deps
+.dirstamp
+*.lo
+*.la
*.dll
+*.dylib
+*.sl
+*.so
+Makefile.in
+Makefile
vlcintf.h
vlcintf.xpt
-.deps
-.dirstamp
--- /dev/null
+###############################################################################
+# Building the Mozilla plugin
+###############################################################################
+
+noinst_LIBRARIES = $(noinst_LIBRARIES_mozilla)
+
+MOSTLYCLEANFILES = $(LIBRARIES_mozilla)
+EXTRA_DIST = $(SOURCES_mozilla) vlcintf.idl
+BUILT_SOURCES = $(BUILT_SOURCES_mozilla)
+
+SOURCES_mozilla = \
+ vlcshell.cpp \
+ vlcplugin.cpp \
+ vlcplugin.h \
+ vlcpeer.cpp \
+ vlcpeer.h \
+ support/classinfo.h \
+ $(SOURCES_win32) \
+ $(SOURCES_macosx) \
+ $(SOURCES_unix) \
+ $(NULL)
+
+# Under Win32, Mozilla plugins need to be named NP******.DLL, but under Unix
+# the common naming scheme is lib******plugin.so. Also, we need npwin.cpp
+# under Win32 and npunix.c under Unix.
+if HAVE_WIN32
+LIBRARIES_mozilla = npvlc$(LIBEXT)
+SOURCES_win32 = support/npwin.cpp
+CPPFLAGS_mozilla_EXTRA = -DXP_WIN -DXP_WIN32
+else
+if HAVE_DARWIN
+# We don't define LIBRARIES_mozilla because we'll be using project builder
+SOURCES_macosx = support/npmac.cpp
+else
+LIBRARIES_mozilla = libvlcplugin$(LIBEXT)
+SOURCES_unix = support/npunix.c
+endif
+endif
+
+if BUILD_MOZILLA
+if UNTRUE
+noinst_LIBRARIES_mozilla = libplugin.a
+endif
+
+libplugin_a_SOURCES = $(SOURCES_mozilla)
+libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla pic` \
+ $(CPPFLAGS_mozilla_EXTRA) -Imozilla
+libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla pic` \
+ $(CPPFLAGS_mozilla_EXTRA) -Imozilla
+libplugin_a_DEPENDENCIES = $(DATA_npvlc_rc)
+
+BUILT_SOURCES_mozilla = vlcintf.h
+$(SOURCES_mozilla): vlcintf.h
+
+plugin_DATA = $(LIBRARIES_mozilla)
+plugindir = $(libdir)/mozilla/plugins
+$(LIBRARIES_mozilla): $(libplugin_a_OBJECTS) \
+ $(libplugin_a_DEPENDENCIES) $(top_builddir)/stamp-pic
+ $(CXXLINK) $(libplugin_a_OBJECTS) $(DATA_npvlc_rc) \
+ $(top_builddir)/lib/libvlc_pic.a -shared \
+ `$(VLC_CONFIG) --libs vlc mozilla builtin pic`
+
+vlcintf_xpt_DATA = vlcintf.xpt
+vlcintf_xptdir = $(libdir)/mozilla/components
+vlcintf.xpt: vlcintf.idl
+ $(XPIDL) -I/usr/share/idl/mozilla -I/usr/lib/mozilla/include/idl \
+ -m typelib -o vlcintf $(srcdir)/vlcintf.idl
+
+vlcintf.h: vlcintf.idl
+ $(XPIDL) -I/usr/share/idl/mozilla -I/usr/lib/mozilla/include/idl \
+ -m header -o vlcintf $(srcdir)/vlcintf.idl
+
+if HAVE_WIN32
+DATA_npvlc_rc = $(noinst_npvlc_rc_DATA)
+noinst_npvlc_rc_DATA = npvlc_rc.$(OBJEXT)
+noinst_npvlc_rcdir = $(libdir)
+npvlc_rc.$(OBJEXT): npvlc_rc.rc
+ $(WINDRES) --include-dir $(srcdir)/mozilla -i $< -o $@
+endif
+endif
+
+###############################################################################
+# Stamp rules
+###############################################################################
+clean: clean-stamp
+clean-stamp:
+ rm -f stamp-pic
+
+stamp-pic: FORCE
+ @for dep in "" `$(VLC_CONFIG) --target builtin pic`; do \
+ if test "$${dep}" -nt "$(LIBRARIES_mozilla)"; then \
+ rm -f $@; \
+ break; \
+ fi; \
+ done
+ @if test ! -f $@; then printf "" > $@; fi
+
+###############################################################################
+# Force rule
+###############################################################################
+FORCE:
# No need to include the default @*FLAGS@ values here because they are
# automatically added when using $(COMPILE), $(CXXCOMPILE) or $(OBJCCOMPILE)
#
-if test "@includedir@" != /usr/include ; then
+if test "@includedir@" != "/usr/include"; then
includes="-I@includedir@"
fi
+if test "${top_srcdir}" != ""; then
+ top_srcdir="${top_srcdir}/"
+fi
cppflags="${includes}"
libs="-L@libdir@"
module=""
for module in `echo "${plugins}"`; do
register_targets "${module}"
done
- for target in `echo "${list}"`; do printf "modules/${target}_plugin "; done
+ for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}_plugin "; done
printf '\n'
fi
if test "${echo_builtin}" = yes; then
register_targets "${module}"
done
if test "${echo_pic}" = yes; then
- for target in `echo "${list}"`; do printf "modules/${target}_pic.a "; done
+ for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}_pic.a "; done
else
- for target in `echo "${list}"`; do printf "modules/${target}.a "; done
+ for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}.a "; done
fi
printf '\n'
fi
register_flags "${module}"
done
if test "${echo_pic}" = yes; then
- for target in `echo "${list}"`; do printf "modules/${target}_pic.a "; done
+ for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}_pic.a "; done
else
- for target in `echo "${list}"`; do printf "modules/${target}.a "; done
+ for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}.a "; done
fi
fi
echo "${libs} ${ldflags}"