From: Jon TURNEY Date: Sun, 11 May 2014 13:38:52 +0000 (+0100) Subject: Fix build for darwin X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff90a8784cf22ada7bba75f90460b063818abda7;p=mesa.git Fix build for darwin Fix build for darwin, when ./configured --disable-driglx-direct - darwin ld doesn't support -Bsymbolic or --version-script, so check if ld supports those options before using them - define GLX_ALIAS_UNSUPPORTED as config/darwin used to, as aliasing of non-weak symbols isn't supported - default to -with-dri-drivers=swrast v2: Use -Wl,-Bsymbolic, as before, not -Bsymbolic Test that ld --version-script works, rather than just looking for it in ld --help Don't use -Wl,--no-undefined on darwin, either Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Emil Velikov --- diff --git a/configure.ac b/configure.ac index 76d13337f9e..675a4a67faa 100644 --- a/configure.ac +++ b/configure.ac @@ -315,6 +315,22 @@ if test "x$enable_debug" = xyes; then 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 @@ -344,6 +360,28 @@ esac 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 <