Commit 3a22524a authored by Damien Fouilleul's avatar Damien Fouilleul

libtool: prefer -export-dynamic over -export-regex, -export-symbols if...

libtool: prefer -export-dynamic over -export-regex, -export-symbols if compiler already supports symbol visibility (gcc 4.x), this should also deprecate libvlc.sym
parent 659646b5
......@@ -224,8 +224,12 @@ include Modules.am
LTLIBVLC = -L\$(top_builddir)/src -lvlc
AM_LDFLAGS = -rpath '\$(libvlcdir)' -avoid-version \\
-module -no-undefined -shrext \$(LIBEXT) \\
-export-symbol-regex ^\$(VLC_ENTRY)\$\$
-module -no-undefined -shrext \$(LIBEXT)
if HAVE_COMPILER_EXPORT
AM_LDFLAGS += -export-dynamic
else
AM_LDFLAGS += -export-symbol-regex ^\$(VLC_ENTRY)\$\$
endif
AM_LIBADD = \$(LTLIBVLC)
all: all-modules
......
......@@ -1058,6 +1058,8 @@ if test "${ac_cv_c_visibility_hidden}" != "no"; then
VLC_ADD_CFLAGS([libvlc plugin],[-fvisibility=hidden])
fi
AM_CONDITIONAL(HAVE_COMPILER_EXPORT, [test "$SYS" = "mingw32" -o "${ac_cv_c_visibility_hidden}" != "no"])
dnl Check for -fvisibility-inlines-hidden (breaks x86_64 linkers)
dnl AC_LANG_PUSH(C++)
dnl AC_CACHE_CHECK([if \$CXX accepts -fvisibility-inlines-hidden],
......
......@@ -110,7 +110,13 @@ 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` \
-export-symbols $(srcdir)/libvlc.sym -version-info 1:0:0
-version-info 1:0:0
if HAVE_COMPILER_EXPORT
libvlc_la_LDFLAGS += -export-dynamic
else
libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym
endif
libvlc_la_DEPENDENCIES = libvlc.sym
libvlc_control_la_SOURCES = $(SOURCES_libvlc_control)
......@@ -118,6 +124,12 @@ libvlc_control_la_LIBADD = libvlc.la
libvlc_control_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
libvlc_control_la_LDFLAGS = $(AM_LDFLAGS) -export-symbols-regex '^_?(libvlc|mediacontrol)_.*' \
-version-info 0:0:0
if HAVE_COMPILER_EXPORT
libvlc_control_la_LDFLAGS += -export-dynamic
else
libvlc_control_la_LDFLAGS += -export-symbols-regex '^_?(libvlc|mediacontrol)_.*'
endif
EXTRA_libvlc_la_SOURCES = \
$(SOURCES_libvlc_beos) \
......
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