Yurttas/PL/SL/python/docs/core-python-programming/doc/20/dist/node14.html
3.3.4 Library options
You can also specify the libraries to link against when building your extension, and the directories to search for those libraries. The libraries option is a list of libraries to link against, library_dirs is a list of directories to search for libraries at link-time, and runtime_library_dirs is a list of directories to search for shared (dynamically loaded) libraries at run-time.
For example, if you need to link against libraries known to be in the standard library search path on target systems
Extension(...,
libraries=["gdbm", "readline"])
If you need to link with libraries in a non-standard location, you'll have to include the location in library_dirs:
Extension(...,
library_dirs=["/usr/X11R6/lib"],
libraries=["X11", "Xt"])
(Again, this sort of non-portable construct should be avoided if you intend to distribute your code.)
** still undocumented: extra_objects, extra_compile_args, extra_link_args, export_symbols--none of which are frequently needed, some of which might be completely unnecessary! **
See About this document... for information on suggesting changes.