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 ...@@ -249,6 +249,10 @@ nodist_EXTRA_vlc_SOURCES = extras/zsh.cpp src/misc/darwin_specific.m
vlc_DEPENDENCIES = $(LIBVLC) $(DATA_win32_rc) vlc_DEPENDENCIES = $(LIBVLC) $(DATA_win32_rc)
vlc_LDADD = $(DATA_win32_rc) $(LIBVLC) $(LTLIBINTL) 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` vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
LIB_libvlc = libvlc.la LIB_libvlc = libvlc.la
...@@ -274,7 +278,7 @@ vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES) ...@@ -274,7 +278,7 @@ vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
objc) cmd="$(OBJCLINK)" ;; \ objc) cmd="$(OBJCLINK)" ;; \
c|*) cmd="$(LINK)" ;; \ c|*) cmd="$(LINK)" ;; \
esac ; \ esac ; \
cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD)" ; \ cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDFLAGS) $(vlc_LDADD)" ; \
echo $$cmd ; \ echo $$cmd ; \
eval $$cmd eval $$cmd
...@@ -1020,22 +1024,18 @@ update-po: ...@@ -1020,22 +1024,18 @@ update-po:
############################################################################### ###############################################################################
# Stamp rules # Stamp rules
############################################################################### ###############################################################################
stamp-builtin: FORCE stamp-builtin:
@for dep in "" `$(VLC_CONFIG) --target builtin`; do \ @for dep in "" `$(VLC_CONFIG) --target plugin`; do \
if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \ if test "$${dep}.la" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
rm -f $@; \ touch "$@"; \
break; \ break; \
fi; \ fi; \
done done
@if test ! -f $@; then printf "" > $@; fi
.PHONY: stamp-builtin
############################################################################### ###############################################################################
# Enforce Mac OS X deployment target environment variable # Enforce Mac OS X deployment target environment variable
############################################################################### ###############################################################################
macosx-sdk: Makefile.in $(HEADERS_include) vlc-config macosx-sdk: Makefile.in $(HEADERS_include) vlc-config
export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET) export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)
###############################################################################
# Force rule
###############################################################################
FORCE:
...@@ -5874,42 +5874,36 @@ fi ...@@ -5874,42 +5874,36 @@ fi
dnl dnl
dnl Plugin and builtin checks dnl Plugin and builtin checks
dnl dnl
builtin_support=false plugin_support=yes
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])
dnl Automagically disable plugins if there is no system support for dnl Automagically disable plugins if there is no system support for
dnl dynamically loadable files (.so, .dll, .dylib). dnl dynamically loadable files (.so, .dll, .dylib).
dnl don't forget vlc-win32 still can load .dll as plugins dnl don't forget vlc-win32 still can load .dll as plugins
if test "${ac_cv_have_plugins}" = "no" AS_IF([test "${ac_cv_have_plugins}" = "no"], [
then AC_MSG_WARN([*** No plugin support! Building statically! ***])
echo "*** Your system doesn't have plugin support. All plugins will be built" plugin_support=no
echo "statically." ])
plugin_support=false
fi 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) 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
dnl Pic and shared libvlc stuff dnl Pic and shared libvlc stuff
dnl dnl
VLC_ADD_PLUGINS([${BUILTINS}])
AS_IF([test "${SYS}" = "mingw32"], [ AS_IF([test "${SYS}" = "mingw32"], [
FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll" FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
]) ])
BUILTINS=""
dnl dnl
dnl Stuff used by the program dnl Stuff used by the program
......
...@@ -10,8 +10,6 @@ EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym ...@@ -10,8 +10,6 @@ EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym
BUILT_SOURCES = modules/builtin.h misc/revision.c BUILT_SOURCES = modules/builtin.h misc/revision.c
CLEANFILES = $(BUILT_SOURCES) CLEANFILES = $(BUILT_SOURCES)
TOOLBOX = srcdir=$(top_srcdir) builddir=$(top_builddir) $(top_srcdir)/toolbox
############################################################################### ###############################################################################
# Headers # Headers
############################################################################### ###############################################################################
...@@ -86,9 +84,28 @@ HEADERS_include = \ ...@@ -86,9 +84,28 @@ HEADERS_include = \
../include/vlc_vout_synchro.h \ ../include/vlc_vout_synchro.h \
$(NULL) $(NULL)
modules/builtin.h: modules/builtin.h.in modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
$(TOOLBOX) --update-includes rm -f -- "$@.tmp"
touch $@ 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 modules/modules.c: modules/builtin.h
...@@ -109,7 +126,7 @@ libvlc_la_LIBADD = $(LTLIBINTL) ...@@ -109,7 +126,7 @@ libvlc_la_LIBADD = $(LTLIBINTL)
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc` libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags 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 -version-info 1:0:0
if HAVE_COMPILER_EXPORT if HAVE_COMPILER_EXPORT
libvlc_la_LDFLAGS += -export-dynamic 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