From 477e831bbf71947b6e8fae52c9fa1e807b56614e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 17 Oct 2005 14:15:27 +0000 Subject: r11118: syncing up some changez from 3.0 tree for the first 3.0.21 preview release --- source/python/setup.py | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'source/python/setup.py') diff --git a/source/python/setup.py b/source/python/setup.py index a8b2c2c26d6..18f1f2648ab 100755 --- a/source/python/setup.py +++ b/source/python/setup.py @@ -52,21 +52,28 @@ obj_list = string.split(samba_objs) libraries = [] library_dirs = [] +next_is_path = 0 +next_is_flag = 0 + for lib in string.split(samba_libs): - if lib[0:2] == "-l": - libraries.append(lib[2:]) - continue - if lib[0:8] == "-pthread": + if next_is_path != 0: + library_dirs.append(lib); + next_is_path = 0; + elif next_is_flag != 0: + next_is_flag = 0; + elif lib == "-Wl,-rpath": + next_is_path = 1; + elif lib[0:2] in ("-l","-pthread"): libraries.append(lib[2:]) - continue - if lib[0:2] == "-L": + elif lib[0:2] == "-L": library_dirs.append(lib[2:]) - continue - if lib[0:2] == "-W": - # Skip linker flags - continue - print "Unknown entry '%s' in $LIBS variable passed to setup.py" % lib - sys.exit(1) + elif lib[0:2] in ("-W","-s"): + pass # Skip linker flags + elif lib[0:2] == "-z": + next_is_flag = 1 # Skip linker flags + else: + print "Unknown entry '%s' in $LIBS variable passed to setup.py" % lib + sys.exit(1) flags_list = string.split(samba_cflags) -- cgit