From: Arran Cudbard-Bell Date: Fri, 1 Mar 2013 04:55:16 +0000 (-0500) Subject: Pass rpath when linking in directories that are probably outside of the normal linker... X-Git-Tag: debian/3.0.0git+dfsg+moonshot3-2~69 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=ef54090509f7b9c689f1892cbb4f750b6084f0e7 Pass rpath when linking in directories that are probably outside of the normal linker path --- diff --git a/acinclude.m4 b/acinclude.m4 index a962cec..6bc3e6d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -200,10 +200,10 @@ dnl # the wrong version. dnl # if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - LIBS="-L$try -l$1 $old_LIBS" + LIBS="-L$try -l$1 $old_LIBS -Wl,-rpath,$try" AC_TRY_LINK([extern char $2();], [ $2()], - smart_lib="-L$try -l$1") + smart_lib="-L$try -l$1 -rpath$try") if test "x$smart_lib" != "x"; then break; fi @@ -230,10 +230,10 @@ if test "x$smart_lib" = "x"; then FR_LOCATE_DIR(smart_lib_dir,[lib$1.a]) for try in $smart_lib_dir /usr/local/lib /opt/lib; do - LIBS="-L$try -l$1 $old_LIBS" + LIBS="-L$try -rpath$try -l$1 $old_LIBS -Wl,-rpath,$try" AC_TRY_LINK([extern char $2();], [ $2()], - smart_lib="-L$try -l$1") + smart_lib="-L$try -l$1,-rpath$try") if test "x$smart_lib" != "x"; then break; fi