From: Ralph Boehme Date: Thu, 18 Dec 2014 05:37:28 +0000 (+0100) Subject: wafsamba: check for rpath compiler/linker flags X-Git-Tag: samba-4.2.0rc5~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b5744352fef07c4a6f9492946a6bf0a9a4a4c9a;p=thirdparty%2Fsamba.git wafsamba: check for rpath compiler/linker flags Older SunOS linker only support -Wl,-R,/path instead of -Wl,-rpath,/path. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Ralph Boehme Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett (cherry picked from commit 89cc31f5cf9181f04f3ca1a5f7000ee15a74e86e) --- diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 1a2cfe661f8..1a30d2fa936 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -295,6 +295,10 @@ def configure(conf): headers='stdio.h', msg='Checking simple C program') + # check which compiler/linker flags are needed for rpath support + if not conf.CHECK_LDFLAGS(['-Wl,-rpath,.']) and conf.CHECK_LDFLAGS(['-Wl,-R,.']): + conf.env['RPATH_ST'] = '-Wl,-R,%s' + # check for rpath if conf.CHECK_LIBRARY_SUPPORT(rpath=True): support_rpath = True