Subject: | Pass cflags from pkg-config |
Hi there,
Got a minor patch to pass through CFLAGS as well as LIBS, I needed this
to pick up on my locally-installed portaudio which needed extra include
directories.
best regards,
Tom
Subject: | portaudio-cflags.patch |
--- Audio-PortAudio-0.03-aG1WTT/Makefile.PL 2007-01-26 20:53:05.000000000 +0000
+++ Audio-PortAudio-0.03-LiQss5/Makefile.PL 2011-06-18 19:27:47.918320001 +0100
@@ -5,9 +5,10 @@
my $fallbacklibs = "-lportaudio -lm -lpthread";
my $libs = "";
+my $cflags = "";
print "Testing for pkg-config...";
-my $pcversion = `pkg-config --version`;
+chomp(my $pcversion = `pkg-config --version`);
if ($pcversion) {
print "ok ($pcversion)\n";
my $paversion;
@@ -17,6 +18,7 @@
if ($paversion && $paversion >= 19) {
print "found (v$paversion)\n";
chomp($libs = `pkg-config --libs $_`);
+ chomp($cflags = `pkg-config --cflags $_`);
last;
}
print $paversion ? "unsuitable (v$paversion)\n" : "not found\n";
@@ -85,7 +87,8 @@
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(AUTHOR => 'Joost Diepenmaat <jdiepen AT cpan.org>') : ()),
- LIBS => [$libs], # e.g., '-lm'
+ LIBS => [$libs], # e.g., '-lm'
+ 'CCFLAGS' => $cflags, # e.g., '-Isomething'
'EXE_FILES' => [],
'OPTIMIZE' => '-O',
);