changeset 3597:336dd10930d1 trunk

Add -rpath in configure.
author Jonathan Schleifer <js@h3c.de>
date Sat, 22 Sep 2007 11:25:51 +0200
parents 42e255437b69
children 9fd97ab30fdc
files configure.ac
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sat Sep 22 11:05:37 2007 +0200
+++ b/configure.ac	Sat Sep 22 11:25:51 2007 +0200
@@ -181,6 +181,13 @@
 AC_DEFINE_UNQUOTED(SHARED_SUFFIX, "${SHARED_SUFFIX}",
 	[Define the shared module suffix extension on your platform.])
 
+# Use -rpath?
+AC_ARG_ENABLE(rpath,
+	      [  --enable-rpath	   enable use of -rpath on ELF systems (default=yes)], [enable_rpath=$enableval], [enable_rpath=no])
+if test "x$enable_rpath" = "xyes"; then
+	test x"`$CC -dM -E - </dev/null | grep __ELF__`" != x"" && LDFLAGS="$LDFLAGS -Wl,-rpath $libdir"
+fi
+
 AC_MSG_CHECKING([if you are running Apple-GCC])
 case "$target" in
 	*-apple-*)