diff options
author | Simon Warta <[email protected]> | 2015-06-22 11:12:39 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-22 11:12:39 +0200 |
commit | 624b21b900aee236d79da91ec18651710d3c31ed (patch) | |
tree | 5bd32f365fe6f7450e78237daafadca7f1a3b291 /configure.py | |
parent | d1bf8d1193820cecf96df2acef7fa2dea9758d6a (diff) |
Set RPATH to $ORIGIN for ./botan and ./botan-test
This makes setting LD_LIBRARY_PATH obsolete when Botan lib and botan
/botan-test binary are in the same directory. This behavior is default
on Windows.
LD_LIBRARY_PATH can still be used to override the RPATH.
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.py b/configure.py index 963a1d3d0..888f9e71e 100755 --- a/configure.py +++ b/configure.py @@ -1283,7 +1283,9 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): # This can be made constistent over all platforms in the future 'libname': 'botan' if options.os == 'windows' else 'botan-%d.%d' % (build_config.version_major, build_config.version_minor), - 'so_link': cc.so_link_command_for(osinfo.basename), + 'lib_link_cmd': cc.so_link_command_for(osinfo.basename), + 'app_link_cmd': '$(CXX) -Wl,-rpath=\$$ORIGIN' if options.os == 'linux' else '$(CXX)', + 'test_link_cmd': '$(CXX) -Wl,-rpath=\$$ORIGIN' if options.os == 'linux' else '$(CXX)', 'link_to': ' '.join([cc.add_lib_option + lib for lib in link_to()]), |