fi
fi
+dnl
+dnl Check if linker supports -Bsymbolic
+dnl
+save_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
+AC_MSG_CHECKING([if ld supports -Bsymbolic])
+AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([int main() { return 0;}])],
+ [AC_MSG_RESULT([yes])
+ BSYMBOLIC="-Wl,-Bsymbolic";],
+ [AC_MSG_RESULT([no])
+ BSYMBOLIC="";])
+LDFLAGS=$save_LDFLAGS
+
+AC_SUBST([BSYMBOLIC])
+
dnl
dnl Check if linker supports garbage collection
dnl
AC_SUBST([LD_NO_UNDEFINED])
+dnl
+dnl Check if linker supports version scripts
+dnl
+AC_MSG_CHECKING([if the linker supports version-scripts])
+save_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+cat > conftest.map <<EOF
+VERSION_1 {
+ global:
+ main;
+
+ local:
+ *;
+};
+EOF
+AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([int main() { return 0;}])],
+ [have_ld_version_script=yes;AC_MSG_RESULT(yes)],
+ [have_ld_version_script=no; AC_MSG_RESULT(no)])
+LDFLAGS=$save_LDFLAGS
+AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+
dnl
dnl compatibility symlinks
dnl
with_dri_drivers="swrast"
fi
;;
+ darwin*)
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DGLX_ALIAS_UNSUPPORTED"
+ if test "x$with_dri_drivers" = "xyes"; then
+ with_dri_drivers="swrast"
+ fi
+ ;;
esac
# default drivers
-shrext .so \
-module \
-avoid-version \
+if HAVE_LD_VERSION_SCRIPT
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym \
+endif
$(GC_SECTIONS)
GALLIUM_VDPAU_LINKER_FLAGS = \
-module \
-no-undefined \
-version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
+if HAVE_LD_VERSION_SCRIPT
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym \
+endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
-module \
-no-undefined \
-version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
+if HAVE_LD_VERSION_SCRIPT
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym \
+endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
-module \
-no-undefined \
-avoid-version \
+if HAVE_LD_VERSION_SCRIPT
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym \
+endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)