commit fe1456e2431a3b8bd27aadc5bbc6998ebc8cd00c Author: Nils Philippsen Date: Mon Aug 31 16:38:23 2009 +0200 patch: rpath Squashed commit of the following: commit c37206c9fa724e19f6929d8a77e5399ca6b87f1f Author: Nils Philippsen Date: Mon Aug 31 16:34:42 2009 +0200 fix --enable-rpath commit be2982b2d1ae4d889b4cecec289336b4b03579aa Author: Nils Philippsen Date: Tue Jun 2 16:12:23 2009 +0200 add --enable-rpath to configure.in make using runtime library search path configurable diff --git a/acinclude.m4 b/acinclude.m4 index 6413b60..b2bb065 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -383,19 +383,29 @@ dnl AC_DEFUN([SANE_LINKER_RPATH], [dnl AC_REQUIRE([AC_SUBST])dnl This line resulted in an empty AC_SUBST() !! - AC_CACHE_CHECK([linker parameter to set runtime link path], my_cv_LINKER_RPATH, - [my_cv_LINKER_RPATH= - case "$host_os" in - linux* | freebsd* | netbsd* | openbsd* | irix*) - # I believe this only works with GNU ld [pere 2001-04-16] - my_cv_LINKER_RPATH="-Wl,-rpath," - ;; - solaris*) - my_cv_LINKER_RPATH="-R " - ;; - esac - ]) - LINKER_RPATH="$my_cv_LINKER_RPATH" + AC_MSG_CHECKING([whether runtime link path should be used]) + AC_ARG_ENABLE([rpath], + [AS_HELP_STRING([--enable-rpath], + [use runtime library search path @<:@default=yes@:>@])]) + + LINKER_RPATH= + AS_IF([test "x$enable_rpath" != xno], + AC_MSG_RESULT([yes]) + [AC_CACHE_CHECK([linker parameter to set runtime link path], my_cv_LINKER_RPATH, + [my_cv_LINKER_RPATH= + case "$host_os" in + linux* | freebsd* | netbsd* | openbsd* | irix*) + # I believe this only works with GNU ld [pere 2001-04-16] + my_cv_LINKER_RPATH="-Wl,-rpath," + ;; + solaris*) + my_cv_LINKER_RPATH="-R " + ;; + esac + ]) + LINKER_RPATH="$my_cv_LINKER_RPATH"], + [AC_MSG_RESULT([no]) + LINKER_RPATH=]) AC_SUBST(LINKER_RPATH)dnl ])