Commit 53e66037 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Separate LDFLAGS from LIBS for real.

Should fix problems with building libvlc.so.1 when libvlc.so.0 is installed.
Cannot test since the tree is currently broken.
parent a83d27a6
...@@ -248,8 +248,8 @@ nodist_EXTRA_vlc_SOURCES = extras/zsh.cpp src/misc/darwin_specific.m ...@@ -248,8 +248,8 @@ nodist_EXTRA_vlc_SOURCES = extras/zsh.cpp src/misc/darwin_specific.m
vlc_DEPENDENCIES = $(DATA_win32_rc) vlc_DEPENDENCIES = $(DATA_win32_rc)
vlc_LDADD = $(DATA_win32_rc) $(LIBVLC) $(LTLIBINTL) vlc_LDADD = $(DATA_win32_rc) $(LIBVLC) $(LTLIBINTL) `$(VLC_CONFIG) -libs vlc`
vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc` vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
if !HAVE_PLUGINS if !HAVE_PLUGINS
vlc_LDFLAGS += `$(VLC_CONFIG) --target plugin | sed -e 's/\_plugin /_plugin.la /g'` vlc_LDFLAGS += `$(VLC_CONFIG) --target plugin | sed -e 's/\_plugin /_plugin.la /g'`
endif endif
......
...@@ -75,8 +75,9 @@ axvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex` ...@@ -75,8 +75,9 @@ axvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex`
axvlc_la_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc) $(LIBRARIES_libvlc) axvlc_la_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc) $(LIBRARIES_libvlc)
axvlc_la_LDFLAGS = $(srcdir)/axvlc.def -Wl,$(DATA_axvlc_rc) \ axvlc_la_LDFLAGS = $(srcdir)/axvlc.def -Wl,$(DATA_axvlc_rc) \
-no-undefined -avoid-version -module \ -no-undefined -avoid-version -module \
`$(VLC_CONFIG) --libs activex libvlc` `$(VLC_CONFIG) --ldflags activex libvlc`
axvlc_la_LIBADD = $(LIBRARIES_libvlc) axvlc_la_LIBADD = $(LIBRARIES_libvlc) \
`$(VLC_CONFIG) -libs activex`
DATA_axvlc_rc = $(noinst_axvlc_rc_DATA) DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT) noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT)
......
...@@ -141,8 +141,12 @@ EOF ...@@ -141,8 +141,12 @@ EOF
lib${mod}_plugin_la_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\` lib${mod}_plugin_la_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
lib${mod}_plugin_la_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\` lib${mod}_plugin_la_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
lib${mod}_plugin_la_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\` lib${mod}_plugin_la_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`
lib${mod}_plugin_la_LDFLAGS = \`\$(VLC_CONFIG) --libs plugin ${mod}\` \$(AM_LDFLAGS) lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) \\
lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD) \`\$(VLC_CONFIG) --ldflags plugin ${mod}\`
lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD) \\
\`\$(VLC_CONFIG) -libs plugin ${mod}\`
# Automake does not understand \`...\` very well inside LIBADD...
lib${mod}_plugin_la_DEPENDENCIES = \$(AM_LIBADD)
EOF EOF
done done
......
...@@ -42,9 +42,9 @@ npvlc_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support) ...@@ -42,9 +42,9 @@ npvlc_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support)
npvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` $(CPPFLAGS_mozilla_extra) npvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` $(CPPFLAGS_mozilla_extra)
npvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla` $(CPPFLAGS_mozilla_extra) npvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla` $(CPPFLAGS_mozilla_extra)
npvlc_la_DEPENDENCIES = $(DATA_npvlc_rc) $(LIBRARIES_libvlc) npvlc_la_DEPENDENCIES = $(DATA_npvlc_rc) $(LIBRARIES_libvlc)
npvlc_la_LDFLAGS = `$(VLC_CONFIG) --libs mozilla` -module -avoid-version \ npvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags mozilla` -module -avoid-version \
$(LDFLAGS_mozilla_EXTRA) $(LDFLAGS_mozilla_EXTRA)
npvlc_la_LIBADD = $(LIBRARIES_libvlc) npvlc_la_LIBADD = `$(VLC_CONFIG) -libs mozilla` $(LIBRARIES_libvlc)
DATA_npvlc_rc = $(noinst_npvlc_rc_DATA) DATA_npvlc_rc = $(noinst_npvlc_rc_DATA)
noinst_npvlc_rc_DATA = npvlc_rc.$(OBJEXT) noinst_npvlc_rc_DATA = npvlc_rc.$(OBJEXT)
...@@ -78,9 +78,10 @@ npvlc_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support) ...@@ -78,9 +78,10 @@ npvlc_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support)
npvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` $(CPPFLAGS_mozilla_EXTRA) npvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` $(CPPFLAGS_mozilla_EXTRA)
npvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla` $(CPPFLAGS_mozilla_EXTRA) npvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla` $(CPPFLAGS_mozilla_EXTRA)
npvlc_la_DEPENDENCIES = $(LIBRARIES_libvlc) npvlc_la_DEPENDENCIES = $(LIBRARIES_libvlc)
npvlc_la_LDFLAGS = `$(VLC_CONFIG) --libs mozilla` -module -avoid-version \ npvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags mozilla` -module -avoid-version \
$(LDFLAGS_mozilla_EXTRA) $(LDFLAGS_mozilla_EXTRA)
npvlc_la_LIBADD = $(LIBRARIES_libvlc) npvlc_la_LIBADD = `$(VLC_CONFIG) -libs mozilla` $(LIBRARIES_libvlc)
noinst_DATA = npvlc.rsrc VLC\ Plugin.plugin noinst_DATA = npvlc.rsrc VLC\ Plugin.plugin
MOSTLYCLEANFILES += npvlc.rsrc MOSTLYCLEANFILES += npvlc.rsrc
...@@ -171,8 +172,8 @@ SOURCES_support = support/npunix.c ...@@ -171,8 +172,8 @@ SOURCES_support = support/npunix.c
libvlcplugin_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support) libvlcplugin_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support)
libvlcplugin_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` libvlcplugin_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla`
libvlcplugin_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla` libvlcplugin_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla`
libvlcplugin_la_LDFLAGS = `$(VLC_CONFIG) --libs mozilla` -module -avoid-version -shrext $(LIBEXT) libvlcplugin_la_LDFLAGS = `$(VLC_CONFIG) --ldflags mozilla` -module -avoid-version -shrext $(LIBEXT)
libvlcplugin_la_LIBADD = $(LIBRARIES_libvlc) libvlcplugin_la_LIBADD = `$(VLC_CONFIG) -libs mozilla` $(LIBRARIES_libvlc)
endif endif
endif endif
......
...@@ -128,17 +128,17 @@ endif ...@@ -128,17 +128,17 @@ endif
libvlc_la_SOURCES = $(SOURCES_libvlc) libvlc_la_SOURCES = $(SOURCES_libvlc)
nodist_libvlc_la_SOURCES = misc/revision.c nodist_libvlc_la_SOURCES = misc/revision.c
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 = `$(VLC_CONFIG) --libs libvlc` $(AM_LDFLAGS) \ libvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags 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
else else
libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym
endif endif
libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
libvlc_la_DEPENDENCIES = libvlc.sym libvlc_la_DEPENDENCIES = libvlc.sym
......
...@@ -193,7 +193,10 @@ while test $# -gt 0; do ...@@ -193,7 +193,10 @@ while test $# -gt 0; do
--objcflags) --objcflags)
echo_objcflags=yes echo_objcflags=yes
;; ;;
--libs) --ldflags)
echo_ldflags=yes
;;
--libs|-libs)
echo_libs=yes echo_libs=yes
;; ;;
-*) -*)
...@@ -216,7 +219,7 @@ while test $# -gt 0; do ...@@ -216,7 +219,7 @@ while test $# -gt 0; do
;; ;;
external) external)
echo_external=yes echo_external=yes
ldflags="${ldflags} -lvlc -lvlc-control" libs="${libs} -lvlc -lvlc-control"
;; ;;
*) *)
module="$1" module="$1"
...@@ -307,6 +310,9 @@ fi ...@@ -307,6 +310,9 @@ fi
if test "${echo_objcflags}" = yes; then if test "${echo_objcflags}" = yes; then
echo "${cppflags} ${objcflags}" echo "${cppflags} ${objcflags}"
fi fi
if test "${echo_ldflags}" = yes; then
echo "${ldflags}"
fi
# Libs # Libs
# There are 4 possibilities # There are 4 possibilities
...@@ -328,12 +334,12 @@ if test "${echo_libs}" = yes; then ...@@ -328,12 +334,12 @@ if test "${echo_libs}" = yes; then
fi fi
if test "${echo_external}" = yes; then if test "${echo_external}" = yes; then
for module in `echo "${builtins}"`; do for module in `echo "${builtins}"`; do
ldflags="${ldflags} @libdir@/vlc/lib${module}.a" libs="${libs} @libdir@/vlc/lib${module}.a"
done done
for module in `echo "${builtins}"`; do for module in `echo "${builtins}"`; do
register_flags "${module}" register_flags "${module}"
done done
register_flags "vlc" register_flags "vlc"
fi fi
echo "${libs} ${ldflags}" echo "${libs}"
fi fi
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