Commit 343ef81a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

*Partially* fix static builds

parent df3b5eec
......@@ -249,6 +249,10 @@ nodist_EXTRA_vlc_SOURCES = extras/zsh.cpp src/misc/darwin_specific.m
vlc_DEPENDENCIES = $(LIBVLC) $(DATA_win32_rc)
vlc_LDADD = $(DATA_win32_rc) $(LIBVLC) $(LTLIBINTL)
vlc_LDFLAGS =
if !HAVE_PLUGINS
vlc_LDFLAGS += `$(VLC_CONFIG) --target plugin | sed -e 's/\_plugin /_plugin.la /g'`
endif
vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
LIB_libvlc = libvlc.la
......@@ -274,7 +278,7 @@ vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
objc) cmd="$(OBJCLINK)" ;; \
c|*) cmd="$(LINK)" ;; \
esac ; \
cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD)" ; \
cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDFLAGS) $(vlc_LDADD)" ; \
echo $$cmd ; \
eval $$cmd
......@@ -1020,22 +1024,18 @@ update-po:
###############################################################################
# Stamp rules
###############################################################################
stamp-builtin: FORCE
@for dep in "" `$(VLC_CONFIG) --target builtin`; do \
if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
rm -f $@; \
stamp-builtin:
@for dep in "" `$(VLC_CONFIG) --target plugin`; do \
if test "$${dep}.la" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
touch "$@"; \
break; \
fi; \
done
@if test ! -f $@; then printf "" > $@; fi
.PHONY: stamp-builtin
###############################################################################
# Enforce Mac OS X deployment target environment variable
###############################################################################
macosx-sdk: Makefile.in $(HEADERS_include) vlc-config
export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)
###############################################################################
# Force rule
###############################################################################
FORCE:
......@@ -5874,42 +5874,36 @@ fi
dnl
dnl Plugin and builtin checks
dnl
builtin_support=false
plugin_support=:
dnl Support for plugins - this must be AT THE END
AC_ARG_ENABLE(plugins,
[ --disable-plugins make all plugins built-in (default plugins enabled)],
[if test "${enable_plugins}" = "no"
then
plugin_support=false
fi])
plugin_support=yes
dnl Automagically disable plugins if there is no system support for
dnl dynamically loadable files (.so, .dll, .dylib).
dnl don't forget vlc-win32 still can load .dll as plugins
if test "${ac_cv_have_plugins}" = "no"
then
echo "*** Your system doesn't have plugin support. All plugins will be built"
echo "statically."
plugin_support=false
fi
AS_IF([test "${ac_cv_have_plugins}" = "no"], [
AC_MSG_WARN([*** No plugin support! Building statically! ***])
plugin_support=no
])
AS_IF([test "${enable_shared}" = "no"], [
plugin_support=no
])
AS_IF([${plugin_support}], [
AS_IF([test "${plugin_support}" != "no"], [
AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, Define if we have support for dynamic plugins)
], [
VLC_ADD_BUILTINS([${PLUGINS}])
PLUGINS=""
])
AM_CONDITIONAL(HAVE_PLUGINS, [test "${plugin_support}" != "no"])
dnl Temporary(?) hack for plugins/builtins transition
VLC_ADD_PLUGINS([${BUILTINS}])
BUILTINS=""
dnl
dnl Pic and shared libvlc stuff
dnl
VLC_ADD_PLUGINS([${BUILTINS}])
AS_IF([test "${SYS}" = "mingw32"], [
FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
])
BUILTINS=""
dnl
dnl Stuff used by the program
......
......@@ -10,8 +10,6 @@ EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym
BUILT_SOURCES = modules/builtin.h misc/revision.c
CLEANFILES = $(BUILT_SOURCES)
TOOLBOX = srcdir=$(top_srcdir) builddir=$(top_builddir) $(top_srcdir)/toolbox
###############################################################################
# Headers
###############################################################################
......@@ -86,9 +84,28 @@ HEADERS_include = \
../include/vlc_vout_synchro.h \
$(NULL)
modules/builtin.h: modules/builtin.h.in
$(TOOLBOX) --update-includes
touch $@
modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
rm -f -- "$@.tmp"
cat "$<" > "$@.tmp"
if !HAVE_PLUGINS
plugins="$$($(VLC_CONFIG) --list plugin)" ; \
test -n "$${plugins}" && \
for p in $${plugins}; do \
echo "int vlc_entry__$$p (module_t *);" ; \
done >> "$@.tmp"
endif
echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
echo " do \\" >> "$@.tmp"
echo " { \\" >> "$@.tmp"
if !HAVE_PLUGINS
plugins="$$($(VLC_CONFIG) --list plugin)" ; \
test -n "$${plugins}" && \
for p in $${plugins}; do \
echo " ALLOCATE_BUILTIN($$p); \\" ; \
done >> "$@.tmp"
endif
echo ' } while( 0 );' >> "$@.tmp"
mv -f -- "$@.tmp" "$@"
modules/modules.c: modules/builtin.h
......@@ -109,7 +126,7 @@ libvlc_la_LIBADD = $(LTLIBINTL)
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --libs libvlc` \
libvlc_la_LDFLAGS = `$(VLC_CONFIG) --libs libvlc` $(AM_LDFLAGS) \
-version-info 1:0:0
if HAVE_COMPILER_EXPORT
libvlc_la_LDFLAGS += -export-dynamic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment