[tracker/tracker-1.0] build: link with --enable-new-dtags if available, this replaces the hardcoded RPATH with RUNPATH



commit a3077b82f25a7dc263d212cf9729d8aacb3a4af4
Author: Tim Lunn <tim feathertop org>
Date:   Thu Jul 31 11:25:29 2014 +1000

    build: link with --enable-new-dtags if available, this replaces the hardcoded RPATH with RUNPATH
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733857

 configure.ac |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 233088c..fe768b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,8 @@ AC_CONFIG_HEADERS([config.h])
 
 AM_INIT_AUTOMAKE([1.11 no-define tar-ustar -Wno-portability])
 
+AC_PROG_LIBTOOL
+
 AM_SILENT_RULES([yes])
 
 dnl http://people.gnome.org/~walters/docs/build-api.txt
@@ -579,6 +581,20 @@ AC_SUBST(BUILD_CFLAGS)
 AC_SUBST(BUILD_LIBS)
 
 ####################################################################
+# Check if linker supports --enable-new-dtags
+####################################################################
+AC_MSG_CHECKING([whether $CC supports -Wl,--enable-new-dtags])
+save_LDFLAGS=$LDFLAGS
+LDFLAGS="-Wl,--enable-new-dtags $LDFLAGS"
+
+AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+             [enable_new_dtags=yes; AC_MSG_RESULT(yes)], [enable_new_dtags=no; AC_MSG_RESULT(no)])
+LDFLAGS=$save_LDFLAGS
+if test "x$enable_new_dtags" = "xyes"; then
+    LDFLAGS="-Wl,--enable-new-dtags $LDFLAGS"
+fi
+
+####################################################################
 # Check for minimal
 ####################################################################
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]