automake: check if the linker supports --dynamic-list
[mesa.git] / src / gallium / targets / dri / Makefile.am
index 70b19b8d5e20ca42bc2d7ad63ce35139c4043ce8..1c33a91dff0c08f2632fe8ce3c1ab752fab06ffe 100644 (file)
@@ -26,7 +26,6 @@ gallium_dri_la_LDFLAGS = \
        -shrext .so \
        -module \
        -avoid-version \
-       -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn \
        $(GC_SECTIONS)
 
 if HAVE_LD_VERSION_SCRIPT
@@ -34,6 +33,11 @@ gallium_dri_la_LDFLAGS += \
        -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri/dri.sym
 endif # HAVE_LD_VERSION_SCRIPT
 
+if HAVE_LD_DYNAMIC_LIST
+gallium_dri_la_LDFLAGS += \
+       -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
+endif # HAVE_LD_DYNAMIC_LIST
+
 gallium_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/libmesagallium.la \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \