---
Backported from FFmpeg. FFmpeg had two authors touching these additions;
I didn't care because the changes are too trivial. Tell me if you want
me to backport them with accurate author information.
---
 configure | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 03742f0..5256b69 100755
--- a/configure
+++ b/configure
@@ -86,6 +86,8 @@ Standard options:
   --shlibdir=DIR           install shared libs in DIR [PREFIX/lib]
   --incdir=DIR             install includes in DIR [PREFIX/include]
   --mandir=DIR             install man page in DIR [PREFIX/share/man]
+  --enable-rpath           use rpath to allow installing libraries in paths
+                           not part of the dynamic linker search path
 
 Licensing options:
   --enable-gpl             allow use of GPL code, the resulting libs
@@ -1595,6 +1597,7 @@ CMDLINE_SELECT="
     logging
     lto
     optimizations
+    rpath
 "
 
 PATHS_LIST="
@@ -4251,6 +4254,7 @@ check_disable_warning -Wno-pointer-sign
 # add some linker flags
 check_ldflags -Wl,--warn-common
 check_ldflags 
-Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
+enabled rpath && add_ldflags -Wl,-rpath,$libdir
 test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
 
 # add some strip flags
@@ -4756,7 +4760,7 @@ Version: $version
 Requires: $(enabled shared || echo $requires)
 Requires.private: $(enabled shared && echo $requires)
 Conflicts:
-Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
+Libs: -L\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") 
-l${shortname} $(enabled shared || echo $libs)
 Libs.private: $(enabled shared && echo $libs)
 Cflags: -I\${includedir}
 EOF
@@ -4771,7 +4775,7 @@ Description: $comment
 Version: $version
 Requires: $requires
 Conflicts:
-Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
+Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} -Wl,-rpath,\${libdir}  $libs
 Cflags: -I\${includedir}
 EOF
 }
-- 
2.0.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to