# pyTables expects that LIBS is a list of library names and will add
# a -l by itself.
# ward.poelmans@ugent.be
diff -ur PyTables-v.3.2.2/setup.py PyTables-v.3.2.2.new/setup.py
--- PyTables-v.3.2.2/setup.py   2015-09-22 05:54:51.000000000 +0200
+++ PyTables-v.3.2.2.new/setup.py       2016-01-11 15:38:07.512454000 +0100
@@ -433,6 +433,10 @@
 # is not a good idea.
 CFLAGS = os.environ.get('CFLAGS', '').split()
 LIBS = os.environ.get('LIBS', '').split()
+for idx, lib in enumerate(LIBS):
+    if lib.startswith("-l"):
+        LIBS[idx] = lib.replace("-l", "")
+
 # We start using pkg-config since some distributions are putting HDF5
 # (and possibly other libraries) in exotic locations.  See issue #442.
 if distutils.spawn.find_executable(PKG_CONFIG):
