summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-02-24 17:52:27 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-04-28 11:08:59 +0000
commitaef12b1689ac8256941fe5e24b30c695d0deccbb (patch)
tree1c54d5ec03361f83eec7231269bbb3dd226f5878 /configure.ac
parentc45721453334ede854bdc9e57a929a2e118b5cb0 (diff)
Check if rpath is supported before setting it
Some systems don't have rpath. In that case the backends need to be made available by some external mechanism. Warn about it. Change-Id: I873bd1808addf3f7f29616d7197101ca4f6fd483 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index efcd3c0b..b9435477 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,6 +204,18 @@ fi
AC_SUBST([dso_LDFLAGS])
+AC_CACHE_CHECK([for rpath support], ac_cv_rpath, [dnl
+save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$save_LDFLAGS -Wl,--enable-new-dtags,-rpath,/foo/bar"
+AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_cv_rpath=yes, ac_cv_rpath=no)
+LDFLAGS="$save_LDFLAGS"
+])
+if test "$ac_cv_rpath" = "no"; then
+ AC_MSG_WARN([rpath is not supported. libdw will not automatically
+ find the ebl backends.])
+fi
+AM_CONDITIONAL(RPATH, test "$ac_cv_rpath" = "yes")
+
AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
# Use the same flags that we use for our DSOs, so the test is representative.
# Some old compiler/linker/libc combinations fail some ways and not others.