library-directory names are in LIBDIRS; and the library names themselves
are in LIBS.
"""
- spec = '%s >= %s' % (pkg, version)
+
def weird(what, word):
raise ValueError \
("Unexpected `%s' item `%s' from package `%s'" % (what, word, pkg))
+
+ spec = '%s >= %s' % (pkg, version)
+
for word in progoutput(['pkg-config', '--cflags', spec]).split():
- if word.startswith('-I'):
- INCLUDEDIRS.append(word[2:])
- else:
- weird('--cflags', word)
+ if word.startswith('-I'): INCLUDEDIRS.append(word[2:])
+ else: weird('--cflags', word)
+
for word in progoutput(['pkg-config', '--libs', spec]).split():
- if word.startswith('-L'):
- LIBDIRS.append(word[2:])
- elif word.startswith('-l'):
- LIBS.append(word[2:])
- else:
- weird('--libs', word)
+ if word.startswith('-L'): LIBDIRS.append(word[2:])
+ elif word.startswith('-l'): LIBS.append(word[2:])
+ else: weird('--libs', word)
###--------------------------------------------------------------------------
### Substituting variables in files.