summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-02-21 23:07:45 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-02-21 23:07:45 +0000
commit5b46a65efaea9902516ba88503b258c140ad4fc5 (patch)
treeef0182a18fe1ca34286bcbd687e960bfb875adb2
parent1806b4fbeee52df73f7a431adc2279264c17cead (diff)
downloadxine-lib-5b46a65efaea9902516ba88503b258c140ad4fc5.tar.gz
xine-lib-5b46a65efaea9902516ba88503b258c140ad4fc5.tar.bz2
Make -Wl,-z,defs an opt-in ldflag, if available. The $(xineplug_ldflags) variable can be injected in _LDFLAGS for the xine plugins, and already provides -avoid-version -module and -Wl,-z,defs if supported. Right now only wavpack plugin actually make use of this but that can be fixed as the Makefiles are edited.
CVS patchset: 8618 CVS date: 2007/02/21 23:07:45
-rw-r--r--configure.ac21
-rw-r--r--misc/Makefile.common2
-rw-r--r--src/combined/Makefile.am2
3 files changed, 13 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 7ce85620f..ed6642988 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2605,17 +2605,16 @@ AC_TRY_CFLAGS([-Wstrict-aliasing], [wsa="-Wstrict-aliasing"])
AC_TRY_CFLAGS([-Wstrict-aliasing=2], [wsa="-Wstrict-aliasing=2"])
CFLAGS="$CFLAGS $wsa"
-dnl disabled "-Wl,-z,defs": it breaks compilation for vidix drivers.
-dnl note: no, linking twice to libdha.a is not an acceptable solution.
-dnl case $host_or_hostalias in
-dnl dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
-dnl dnl are requested, as different implementations are present; to avoid problems
-dnl dnl use -Wl,-z,defs only for those platform not behaving this way.
-dnl *-freebsd*) ;;
-dnl *)
-dnl AC_TRY_LDFLAGS([-Wl,-z,defs], [LDFLAGS="$LDFLAGS -Wl,-z,defs"])
-dnl ;;
-dnl esac
+case $host_or_hostalias in
+ dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
+ dnl are requested, as different implementations are present; to avoid problems
+ dnl use -Wl,-z,defs only for those platform not behaving this way.
+ *-freebsd*) ;;
+ *)
+ AC_TRY_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"])
+ ;;
+esac
+AC_SUBST([NOUNDEF])
dnl Common cflags for all platforms
CFLAGS="-DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE \$(MULTIPASS_CFLAGS) $CFLAGS"
diff --git a/misc/Makefile.common b/misc/Makefile.common
index 39fd94541..200617c2a 100644
--- a/misc/Makefile.common
+++ b/misc/Makefile.common
@@ -1,5 +1,7 @@
XINE_LIB = $(top_builddir)/src/xine-engine/libxine.la
+
xineplugdir = $(XINE_PLUGINDIR)
+xineplug_ldflags = $(NOUNDEF) -avoid-version -module
$(XINE_LIB):
@cd $(top_srcdir)/src/xine-engine && $(MAKE)
diff --git a/src/combined/Makefile.am b/src/combined/Makefile.am
index 9733481e3..37bff5dcd 100644
--- a/src/combined/Makefile.am
+++ b/src/combined/Makefile.am
@@ -9,4 +9,4 @@ xineplug_LTLIBRARIES = $(xineplug_wavpack)
xineplug_wavpack_la_SOURCES = demux_wavpack.c decoder_wavpack.c combined_wavpack.c combined_wavpack.h
xineplug_wavpack_la_CFLAGS = $(WAVPACK_CFLAGS) -I$(srcdir)/../demuxers
xineplug_wavpack_la_LIBADD = $(XINE_LIB) $(WAVPACK_LIBS)
-xineplug_wavpack_la_LDFLAGS = -avoid-version -module
+xineplug_wavpack_la_LDFLAGS = $(xineplug_ldflags)