I'm attaching a patch to source/python/setup.py that permits to parse a larger amount of linker flags. Trivial cosmetic note: with the if...else contruct, it could be possible to remove the 'continue' instruction at every check. I leave it to you, since I don't now if further instructions are needed in the for loop.
Created attachment 1491 [details] source/python/setup.py patch: samba_libs parsing
Yes your comments about the if/else stuff are well taken. It does look pretty awful.
OK I've applied your patch - thanks! I ditched the continue bit. However the extensions haven't been built in a while so are broken after Jeremy's rpc client rewrite. )-: