summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@civ.zcu.cz>2010-10-23 13:18:24 +0200
committerFrantišek Dvořák <valtri@civ.zcu.cz>2010-10-23 13:18:24 +0200
commit2af0f16f1fdadf1e85493f8506d441df09199fa6 (patch)
tree8e17d074f1aa138a6ef173d0f33cfd81fd111cb6
parent4099627e7ce56690bcfda1dbfc322a8572144f37 (diff)
downloadxine-lib-2af0f16f1fdadf1e85493f8506d441df09199fa6.tar.gz
xine-lib-2af0f16f1fdadf1e85493f8506d441df09199fa6.tar.bz2
mingw32-w64 port: '-no-undefined' part
- use -no-undefined flag only for building shared libraries (libxine, plugins) - plugins LDFLAGS unification - move -no-undefined into LDFLAGS_NOUNDEFINED - attributes.m4 fix
-rw-r--r--configure.ac1
-rw-r--r--m4/attributes.m49
-rw-r--r--src/audio_out/Makefile.am18
-rw-r--r--src/demuxers/Makefile.am1
-rw-r--r--src/dxr3/Makefile.am6
-rw-r--r--src/input/Makefile.am34
-rw-r--r--src/input/libdvdnav/Makefile.am2
-rw-r--r--src/input/librtsp/Makefile.am2
-rw-r--r--src/input/vcd/Makefile.am2
-rw-r--r--src/libspucc/Makefile.am2
-rw-r--r--src/libxineadec/gsm610/Makefile.am2
-rw-r--r--src/post/audio/Makefile.am2
-rw-r--r--src/post/deinterlace/Makefile.am2
-rw-r--r--src/post/deinterlace/plugins/Makefile.am2
-rw-r--r--src/post/goom/Makefile.am2
-rw-r--r--src/post/mosaico/Makefile.am4
-rw-r--r--src/post/planar/Makefile.am2
-rw-r--r--src/post/visualizations/Makefile.am2
-rw-r--r--src/xine-engine/Makefile.am2
19 files changed, 44 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac
index 2fe20f48d..7abade21c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,7 +282,6 @@ case "$host_os" in
dnl iberty has been needed only in older versions
AC_CHECK_LIB(iberty, strncomp, [GOOM_LIBS="-liberty"])
fi
- LDFLAGS="-no-undefined $LDFLAGS"
;;
esac
AC_SUBST(GOOM_LIBS)
diff --git a/m4/attributes.m4 b/m4/attributes.m4
index c7ef73e68..4f0442865 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -109,14 +109,21 @@ AC_DEFUN([CC_NOUNDEFINED], [
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.
+ dnl
+ dnl MinGW platforms: for libraries required -no-undefined,
+ dnl use it only for libraries in mingw32-w64
+
*-freebsd* | *-openbsd*) ;;
+ *-mingw*)
+ LDFLAGS_NOUNDEFINED="-no-undefined"
+ ;;
*)
dnl First of all check for the --no-undefined variant of GNU ld. This allows
dnl for a much more readable commandline, so that people can understand what
dnl it does without going to look for what the heck -z defs does.
for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do
CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"])
- break
+ if test "x$LDFLAGS_NOUNDEFINED" = "x"; then break; fi
done
;;
esac
diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am
index 745fafadd..750d03915 100644
--- a/src/audio_out/Makefile.am
+++ b/src/audio_out/Makefile.am
@@ -2,6 +2,7 @@ include $(top_builddir)/misc/Makefile.plugins
include $(top_srcdir)/misc/Makefile.common
AM_CPPFLAGS = -DXINE_COMPILE
+AM_LDFLAGS = $(xineplug_ldflags)
EXTRA_DIST = audio_irixal_out.c
@@ -77,81 +78,66 @@ xineplug_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \
xineplug_ao_out_none_la_SOURCES = audio_none_out.c
xineplug_ao_out_none_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
xineplug_ao_out_none_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_none_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_file_la_SOURCES = audio_file_out.c
xineplug_ao_out_file_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
xineplug_ao_out_file_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_file_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_oss_la_SOURCES = audio_oss_out.c
xineplug_ao_out_oss_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
xineplug_ao_out_oss_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_oss_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c
xineplug_ao_out_alsa_la_LIBADD = $(XINE_LIB) $(ALSA_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_ao_out_alsa_la_CFLAGS = $(VISIBILITY_FLAG) $(ALSA_CFLAGS)
-xineplug_ao_out_alsa_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_esd_la_SOURCES = audio_esd_out.c
xineplug_ao_out_esd_la_LIBADD = $(XINE_LIB) $(ESD_LIBS) $(LTLIBINTL)
xineplug_ao_out_esd_la_CFLAGS = $(VISIBILITY_FLAG) $(ESD_CFLAGS)
-xineplug_ao_out_esd_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_sun_la_SOURCES = audio_sun_out.c
xineplug_ao_out_sun_la_LIBADD = $(XINE_LIB)
xineplug_ao_out_sun_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_sun_la_LDFLAGS = -avoid-version -module
#xineplug_ao_out_irixal_la_SOURCES = audio_irixal_out.c
#xineplug_ao_out_irixal_la_LIBADD = $(IRIXAL_LIBS)
#xineplug_ao_out_irixal_la_CFLAGS = $(VISIBILITY_FLAG) $(IRIXAL_CFLAGS)
-#xineplug_ao_out_irixal_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_arts_la_SOURCES = audio_arts_out.c
xineplug_ao_out_arts_la_LIBADD = $(XINE_LIB) $(ARTS_LIBS)
xineplug_ao_out_arts_la_CFLAGS = $(VISIBILITY_FLAG) $(ARTS_CFLAGS)
-xineplug_ao_out_arts_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_directx_la_SOURCES = audio_directx_out.c
xineplug_ao_out_directx_la_CPPFLAGS = $(DIRECTX_CPPFLAGS)
xineplug_ao_out_directx_la_LIBADD = $(XINE_LIB) $(DIRECTX_AUDIO_LIBS) $(LTLIBINTL)
xineplug_ao_out_directx_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_directx_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_coreaudio_la_SOURCES = audio_coreaudio_out.c
xineplug_ao_out_coreaudio_la_LIBADD = $(XINE_LIB)
# The "-Wl,-framework -Wl,..." is needed for libtool versions before
# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220)
-xineplug_ao_out_coreaudio_la_LDFLAGS = \
+xineplug_ao_out_coreaudio_la_LDFLAGS = $(AM_LDFLAGS) \
-Wl,-framework -Wl,Cocoa -framework CoreAudio \
-Wl,-framework -Wl,AudioUnit -framework AudioUnit \
- -avoid-version -module
xineplug_ao_out_coreaudio_la_CFLAGS = -framework CoreAudio -framework AudioUnit $(VISIBILITY_FLAG)
xineplug_ao_out_pulseaudio_la_SOURCES = audio_pulse_out.c
xineplug_ao_out_pulseaudio_la_LIBADD = $(XINE_LIB) $(PULSEAUDIO_LIBS) $(LTLIBINTL)
xineplug_ao_out_pulseaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(PULSEAUDIO_CFLAGS)
-xineplug_ao_out_pulseaudio_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_directx2_la_SOURCES = audio_directx2_out.c
xineplug_ao_out_directx2_la_CPPFLAGS = $(DIRECTX_CPPFLAGS)
xineplug_ao_out_directx2_la_LIBADD = $(XINE_LIB) $(DIRECTX_AUDIO_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_ao_out_directx2_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_directx2_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_fusionsound_la_SOURCES = audio_fusionsound_out.c
xineplug_ao_out_fusionsound_la_LIBADD = $(XINE_LIB) $(FUSIONSOUND_LIBS)
xineplug_ao_out_fusionsound_la_CFLAGS = $(VISIBILITY_FLAG) $(FUSIONSOUND_CFLAGS)
-xineplug_ao_out_fusionsound_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_jack_la_SOURCES = audio_jack_out.c
xineplug_ao_out_jack_la_LIBADD = $(XINE_LIB) $(JACK_LIBS) $(LTLIBINTL)
xineplug_ao_out_jack_la_CFLAGS = $(VISIBILITY_FLAG) $(JACK_CFLAGS)
-xineplug_ao_out_jack_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_sndio_la_SOURCES = audio_sndio_out.c
xineplug_ao_out_sndio_la_LIBADD = $(XINE_LIB) $(SNDIO_LIBS)
xineplug_ao_out_sndio_la_CFLAGS = $(VISIBILITY_FLAG) $(SNDIO_CFLAGS)
-xineplug_ao_out_sndio_la_LDFLAGS = -avoid-version -module
diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am
index 027f6750f..01ec2a93e 100644
--- a/src/demuxers/Makefile.am
+++ b/src/demuxers/Makefile.am
@@ -106,7 +106,6 @@ xineplug_dmx_games_la_SOURCES = group_games.c demux_eawve.c \
demux_film.c demux_smjpeg.c demux_4xm.c \
demux_vmd.c
xineplug_dmx_games_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
-xineplug_dmx_games_la_LDFLAGS = -avoid-version -module
xineplug_dmx_audio_la_SOURCES = group_audio.c demux_aud.c demux_aiff.c \
demux_cdda.c demux_mpgaudio.c $(nsf_demuxer) \
diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am
index 1027d0e44..fadb8b736 100644
--- a/src/dxr3/Makefile.am
+++ b/src/dxr3/Makefile.am
@@ -25,7 +25,7 @@ xineplug_LTLIBRARIES = $(dxr3_modules)
xineplug_decode_dxr3_video_la_SOURCES = dxr3_decode_video.c
xineplug_decode_dxr3_video_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
xineplug_decode_dxr3_video_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_decode_dxr3_video_la_LDFLAGS = -avoid-version -module
+xineplug_decode_dxr3_video_la_LDFLAGS = $(xineplug_ldflags)
if HAVE_DVDNAV
AM_CPPFLAGS = $(DVDNAV_CFLAGS)
@@ -37,7 +37,7 @@ xineplug_decode_dxr3_spu_la_SOURCES = dxr3_decode_spu.c nav_read.c
xineplug_decode_dxr3_spu_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
endif
xineplug_decode_dxr3_spu_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_decode_dxr3_spu_la_LDFLAGS = -avoid-version -module
+xineplug_decode_dxr3_spu_la_LDFLAGS = $(xineplug_ldflags)
xineplug_vo_out_dxr3_la_SOURCES = \
dxr3_mpeg_encoders.c \
@@ -47,7 +47,7 @@ xineplug_vo_out_dxr3_la_SOURCES = \
xineplug_vo_out_dxr3_la_LIBADD = $(XINE_LIB) $(link_fame) $(link_rte) $(link_x_libs) $(LTLIBINTL) $(DYNAMIC_LD_LIBS) -lm
xineplug_vo_out_dxr3_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_vo_out_dxr3_la_LDFLAGS = -avoid-version -module
+xineplug_vo_out_dxr3_la_LDFLAGS = $(xineplug_ldflags)
noinst_HEADERS = \
em8300.h \
diff --git a/src/input/Makefile.am b/src/input/Makefile.am
index beb101f8c..2b75f7338 100644
--- a/src/input/Makefile.am
+++ b/src/input/Makefile.am
@@ -81,87 +81,87 @@ xineplug_LTLIBRARIES = \
xineplug_inp_file_la_SOURCES = input_file.c
xineplug_inp_file_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
xineplug_inp_file_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_file_la_LDFLAGS = -avoid-version -module
+xineplug_inp_file_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_dvd_la_SOURCES = input_dvd.c media_helper.c
xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL)
xineplug_inp_dvd_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module
+xineplug_inp_dvd_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c
xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_net_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_net_la_LDFLAGS = -avoid-version -module
+xineplug_inp_net_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_mms_la_SOURCES = input_mms.c net_buf_ctrl.c mms.c mmsh.c http_helper.c ../demuxers/asfheader.c
xineplug_inp_mms_la_LIBADD = $(XINE_LIB) $(LTLIBICONV) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_mms_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_mms_la_LDFLAGS = -avoid-version -module
+xineplug_inp_mms_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_vcdo_la_SOURCES = input_vcd.c media_helper.c
xineplug_inp_vcdo_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
xineplug_inp_vcdo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_vcdo_la_LDFLAGS = -avoid-version -module
+xineplug_inp_vcdo_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_stdin_fifo_la_SOURCES = input_stdin_fifo.c net_buf_ctrl.c
xineplug_inp_stdin_fifo_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_stdin_fifo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module
+xineplug_inp_stdin_fifo_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_rtp_la_SOURCES = input_rtp.c net_buf_ctrl.c
xineplug_inp_rtp_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_rtp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module
+xineplug_inp_rtp_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_http_la_SOURCES = input_http.c net_buf_ctrl.c http_helper.c
xineplug_inp_http_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_http_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_http_la_LDFLAGS = -avoid-version -module
+xineplug_inp_http_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_pnm_la_SOURCES = input_pnm.c net_buf_ctrl.c pnm.c
xineplug_inp_pnm_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_pnm_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_pnm_la_LDFLAGS = -avoid-version -module
+xineplug_inp_pnm_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_dvb_la_SOURCES = input_dvb.c net_buf_ctrl.c
xineplug_inp_dvb_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_dvb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_dvb_la_LDFLAGS = -avoid-version -module
+xineplug_inp_dvb_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_rtsp_la_SOURCES = input_rtsp.c net_buf_ctrl.c
xineplug_inp_rtsp_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) libreal/libreal.la librtsp/librtsp.la
xineplug_inp_rtsp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_rtsp_la_LDFLAGS = -avoid-version -module
+xineplug_inp_rtsp_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_cdda_la_SOURCES = input_cdda.c media_helper.c sha1.c sha1.h base64.c base64.h
xineplug_inp_cdda_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
xineplug_inp_cdda_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_cdda_la_LDFLAGS = -avoid-version -module
+xineplug_inp_cdda_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_v4l_la_SOURCES = input_v4l.c
xineplug_inp_v4l_la_LIBADD = $(XINE_LIB) $(ALSA_LIBS) $(LTLIBINTL)
xineplug_inp_v4l_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_v4l_la_LDFLAGS = -avoid-version -module
+xineplug_inp_v4l_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_v4l2_la_SOURCES = input_v4l2.c
xineplug_inp_v4l2_la_LIBADD = $(XINE_LIB) $(ALSA_LIBS) $(LTLIBINTL) $(V4L2_LIBS)
xineplug_inp_v4l2_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) $(V4L2_CFLAGS)
-xineplug_inp_v4l2_la_LDFLAGS = -avoid-version -module
+xineplug_inp_v4l2_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_gnome_vfs_la_SOURCES = input_gnome_vfs.c net_buf_ctrl.c
xineplug_inp_gnome_vfs_la_LIBADD = $(XINE_LIB) $(GNOME_VFS_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_gnome_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_gnome_vfs_la_LDFLAGS = -avoid-version -module
+xineplug_inp_gnome_vfs_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_smb_la_SOURCES = input_smb.c
xineplug_inp_smb_la_LIBADD = $(XINE_LIB) $(LIBSMBCLIENT_LIBS) $(LTLIBINTL)
xineplug_inp_smb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_smb_la_LDFLAGS = -avoid-version -module
+xineplug_inp_smb_la_LDFLAGS = $(xineplug_ldflags)
xineplug_inp_pvr_la_SOURCES = input_pvr.c
xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_inp_pvr_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_pvr_la_LDFLAGS = -avoid-version -module
+xineplug_inp_pvr_la_LDFLAGS = $(xineplug_ldflags)
xineinclude_HEADERS = input_plugin.h
noinst_HEADERS = net_buf_ctrl.h mms.h mmsh.h pnm.h media_helper.h videodev2.h http_helper.h
diff --git a/src/input/libdvdnav/Makefile.am b/src/input/libdvdnav/Makefile.am
index 1cf60a0e2..4d355bb4b 100644
--- a/src/input/libdvdnav/Makefile.am
+++ b/src/input/libdvdnav/Makefile.am
@@ -24,7 +24,7 @@ libdvdnav_la_SOURCES = \
dvd_udf.c
libdvdnav_la_LIBADD = $(PTHREAD_LIBS)
libdvdnav_la_CFLAGS = $(VISIBILITY_FLAG)
-libdvdnav_la_LDFLAGS = -avoid-version -module
+libdvdnav_la_LDFLAGS = $(xineplug_ldflags)
noinst_HEADERS = \
decoder.h \
diff --git a/src/input/librtsp/Makefile.am b/src/input/librtsp/Makefile.am
index bb85f9cf4..9ff7482af 100644
--- a/src/input/librtsp/Makefile.am
+++ b/src/input/librtsp/Makefile.am
@@ -9,7 +9,7 @@ librtsp_la_SOURCES = \
rtsp_session.c
librtsp_la_CFLAGS = $(VISIBILITY_FLAG)
-librtsp_la_LDFLAGS = -avoid-version -module
+librtsp_la_LDFLAGS = $(xineplug_ldflags)
noinst_HEADERS = \
rtsp.h \
diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am
index 61eac753b..e529bb6dc 100644
--- a/src/input/vcd/Makefile.am
+++ b/src/input/vcd/Makefile.am
@@ -13,7 +13,7 @@ xineplug_LTLIBRARIES = xineplug_inp_vcd.la
AM_CFLAGS = $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS)
xineplug_inp_vcd_la_SOURCES = $(vcd_SRCS)
-xineplug_inp_vcd_la_LDFLAGS = -avoid-version -module
+xineplug_inp_vcd_la_LDFLAGS = $(xineplug_ldflags)
if HAVE_VCDNAV
xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) $(LIBVCDINFO_LIBS)
else
diff --git a/src/libspucc/Makefile.am b/src/libspucc/Makefile.am
index 1e170cdd5..cde6ecf05 100644
--- a/src/libspucc/Makefile.am
+++ b/src/libspucc/Makefile.am
@@ -6,6 +6,6 @@ xineplug_LTLIBRARIES = xineplug_decode_spucc.la
xineplug_decode_spucc_la_SOURCES = cc_decoder.c xine_cc_decoder.c
xineplug_decode_spucc_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing
xineplug_decode_spucc_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
-xineplug_decode_spucc_la_LDFLAGS = -avoid-version -module
+xineplug_decode_spucc_la_LDFLAGS = $(xineplug_ldflags)
noinst_HEADERS = cc_decoder.h
diff --git a/src/libxineadec/gsm610/Makefile.am b/src/libxineadec/gsm610/Makefile.am
index fe25ad9c3..6ec2e0a5e 100644
--- a/src/libxineadec/gsm610/Makefile.am
+++ b/src/libxineadec/gsm610/Makefile.am
@@ -15,7 +15,7 @@ libgsm610_la_SOURCES = \
table.c
libgsm610_la_CFLAGS = $(VISIBILITY_FLAG)
-libgsm610_la_LDFLAGS = -avoid-version -module
+libgsm610_la_LDFLAGS = $(xineplug_ldflags)
noinst_HEADERS = \
gsm_config.h \
diff --git a/src/post/audio/Makefile.am b/src/post/audio/Makefile.am
index 5e587ef2f..78b94cd43 100644
--- a/src/post/audio/Makefile.am
+++ b/src/post/audio/Makefile.am
@@ -9,5 +9,5 @@ xineplug_post_audio_filters_la_SOURCES = \
upmix.c upmix_mono.c filter.c window.c stretch.c volnorm.c audio_filters.c
xineplug_post_audio_filters_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) -lm
xineplug_post_audio_filters_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_audio_filters_la_LDFLAGS = -avoid-version -module
+xineplug_post_audio_filters_la_LDFLAGS = $(xineplug_ldflags)
diff --git a/src/post/deinterlace/Makefile.am b/src/post/deinterlace/Makefile.am
index bf5b281a8..079ed5baf 100644
--- a/src/post/deinterlace/Makefile.am
+++ b/src/post/deinterlace/Makefile.am
@@ -13,7 +13,7 @@ xineplug_post_tvtime_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) $(PTHREAD_LIBS) \
$(top_builddir)/src/post/deinterlace/plugins/libdeinterlaceplugins.la
xineplug_post_tvtime_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_tvtime_la_LDFLAGS = -avoid-version -module \
+xineplug_post_tvtime_la_LDFLAGS = $(xineplug_ldflags) \
@IMPURE_TEXT_LDFLAGS@
noinst_HEADERS = deinterlace.h pulldown.h speedtools.h speedy.h tvtime.h
diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am
index 5f0997eb8..5e50c25f4 100644
--- a/src/post/deinterlace/plugins/Makefile.am
+++ b/src/post/deinterlace/plugins/Makefile.am
@@ -49,6 +49,6 @@ libdeinterlaceplugins_la_SOURCES = \
kdetv_greedyh.c \
kdetv_tomsmocomp.c
libdeinterlaceplugins_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-libdeinterlaceplugins_la_LDFLAGS = -avoid-version -module
+libdeinterlaceplugins_la_LDFLAGS = $(xineplug_ldflags)
noinst_HEADERS = plugins.h greedyhmacros.h
diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am
index cd022c9b0..386c0b351 100644
--- a/src/post/goom/Makefile.am
+++ b/src/post/goom/Makefile.am
@@ -31,7 +31,7 @@ xineplug_post_goom_la_SOURCES = $(extra_files) xine_goom.c \
plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c
xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) -lm
xineplug_post_goom_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_goom_la_LDFLAGS = -avoid-version -module
+xineplug_post_goom_la_LDFLAGS = $(xineplug_ldflags)
noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h goom.h \
goom_config.h goom_config_param.h goom_filters.h goom_fx.h goom_graphic.h \
diff --git a/src/post/mosaico/Makefile.am b/src/post/mosaico/Makefile.am
index 56426c711..83f2b8f2a 100644
--- a/src/post/mosaico/Makefile.am
+++ b/src/post/mosaico/Makefile.am
@@ -6,9 +6,9 @@ xinepost_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la
xineplug_post_mosaico_la_SOURCES = mosaico.c
xineplug_post_mosaico_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_post_mosaico_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_mosaico_la_LDFLAGS = -avoid-version -module
+xineplug_post_mosaico_la_LDFLAGS = $(xineplug_ldflags)
xineplug_post_switch_la_SOURCES = switch.c
xineplug_post_switch_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_post_switch_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_switch_la_LDFLAGS = -avoid-version -module
+xineplug_post_switch_la_LDFLAGS = $(xineplug_ldflags)
diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am
index 751ea390a..319152cba 100644
--- a/src/post/planar/Makefile.am
+++ b/src/post/planar/Makefile.am
@@ -27,7 +27,7 @@ xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \
denoise3d.c eq.c eq2.c unsharp.c pp.c noise.c
xineplug_post_planar_la_DEPENDENCIES = $(postproc_dep)
xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS) $(LTLIBINTL)
-xineplug_post_planar_la_LDFLAGS = -avoid-version -module \
+xineplug_post_planar_la_LDFLAGS = $(xineplug_ldflags) \
@IMPURE_TEXT_LDFLAGS@
xineplug_post_planar_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
diff --git a/src/post/visualizations/Makefile.am b/src/post/visualizations/Makefile.am
index a766bc10a..f3a759fae 100644
--- a/src/post/visualizations/Makefile.am
+++ b/src/post/visualizations/Makefile.am
@@ -9,6 +9,6 @@ xineplug_post_visualizations_la_SOURCES = \
visualizations.c fft.c fftscope.c oscope.c fftgraph.c
xineplug_post_visualizations_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -lm
xineplug_post_visualizations_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_visualizations_la_LDFLAGS = -avoid-version -module
+xineplug_post_visualizations_la_LDFLAGS = $(xineplug_ldflags)
noinst_HEADERS = fft.h visualizations.h
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index 17dd96b10..576c61b14 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -10,7 +10,7 @@ lib_LTLIBRARIES = libxine.la
XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la
DEF_FILE = libxine-$(XINE_MAJOR).def
if WIN32
-def_ldflags="-Wl,--output-def,$(DEF_FILE)"
+def_ldflags=-Wl,--output-def,$(DEF_FILE) $(LDFLAGS_NOUNDEFINED)
endif
libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \