Update ctypesgen to accept a list of library dirs to look in for modules.
Update ctypesgen to accept a list of library dirs to look in for
modules.

Patch by: Eric Gillespie <epg@pretzelnet.org>
(Log message tweaked by me.)

* wrap.py
  (find_library_in_dirs): Rename find_library to find_library_in_dirs.
  Take new optional libdirs argument, which configures which dirs to
  look in.
  (load_library): Take new optional libdirs argument, and pass this
  to the new find_library_in_dirs function.
  (CtypesWrapper.begin_output): Save new optional libdirs argument in
  self.libdirs for foo.
  (CtypesWrapper.print_preamble): Pass self.libdirs along to load_library.
  (option_W): Add optparse callback to parse -Wl,-prefixed linker
  options (typically used as -Wl,-R/some/dir to specify RPATH).
  (main): Handle -L, -R, --rpath, and -W (using option_W) options, storing
  values into options.libdirs list.



git-svn-id: 397be6d5b34b040010577acc149a81bea378be26@38 1754e6c4-832e-0410-bb55-0fb906f63d99

davidjamesca/ctypesgen,novas0x2a/ctypesgen,kanzure/ctypesgen,kanzure/ctypesgen,kanzure/ctypesgen