summaryrefslogtreecommitdiffstats
path: root/autoconf/configure.ac
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-03-05 08:20:21 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-03-05 08:20:21 +0000
commit18f99072a61429cc6aec9bd3dc611867819d962b (patch)
tree6dcfde0fba6f2f8201c13ee1a9307f963d3aee88 /autoconf/configure.ac
parent323c58d862cca19e45d07996a5abacd0667f264d (diff)
downloadexternal_llvm-18f99072a61429cc6aec9bd3dc611867819d962b.zip
external_llvm-18f99072a61429cc6aec9bd3dc611867819d962b.tar.gz
external_llvm-18f99072a61429cc6aec9bd3dc611867819d962b.tar.bz2
Autodetect the availability of -export-dynamic in the linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf/configure.ac')
-rw-r--r--autoconf/configure.ac24
1 files changed, 18 insertions, 6 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index e58dc66..44397b8 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -636,9 +636,12 @@ AC_PATH_PROGS(OCAMLDEP, [ocamldep])
AC_PATH_PROGS(OCAMLDOC, [ocamldoc])
AC_PATH_PROGS(GAS, [gas as])
-dnl Determine if the linker supports the -R option.
+dnl Determine whether the linker supports the -R option.
AC_LINK_USE_R
+dnl Determine whether the linker supports the -export-dynamic option.
+AC_LINK_EXPORT_DYNAMIC
+
dnl Check for libtool and the library that has dlopen function (which must come
dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with
dnl libtool).
@@ -1013,16 +1016,25 @@ if test "$binding_prereqs_failed" = 1 ; then
AC_MSG_ERROR([Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings.])
fi
-dnl Determine if the compiler supports -fvisibility-inlines-hidden.
+dnl Determine whether the compiler supports -fvisibility-inlines-hidden.
AC_CXX_USE_VISIBILITY_INLINES_HIDDEN
dnl Determine linker rpath flag
-case $llvm_cv_os_type in
- SunOS) RPATH="-Wl,-R" ;;
- *) RPATH="-Wl,-rpath" ;;
-esac
+if test "$llvm_cv_link_use_r" = "yes" ; then
+ RPATH="-Wl,-R"
+else
+ RPATH="-Wl,-rpath"
+fi
AC_SUBST(RPATH)
+dnl Determine linker rdynamic flag
+if test "$llvm_cv_link_use_export_dynamic" = "yes" ; then
+ RDYNAMIC="-Wl,-export-dynamic"
+else
+ RDYNAMIC=""
+fi
+AC_SUBST(RDYNAMIC)
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 10: Specify the output files and generate it