Permalink
Browse files

remove restriction that both cflags and libs are provided

  • Loading branch information...
1 parent 5b46f28 commit 7ab4d2dd048c5eb7cbfe9ba8248f1675d49c3ab4 @jberger jberger committed Mar 19, 2012
Showing with 5 additions and 16 deletions.
  1. +5 −16 t/yy-system_installed.t
View
@@ -21,24 +21,13 @@ if ( $? ) {
my @installed = shuffle map { /^(\S+)/ ? $1 : () } `pkg-config --list-all`;
-my ($lib, $cflags, $libs);
+my $lib = shift @installed;
-while (1) {
- $lib = shift @installed;
+chomp( my $cflags = `pkg-config --cflags $lib` );
+chomp( my $libs = `pkg-config --libs $lib` );
- chomp( $cflags = `pkg-config --cflags $lib` );
- chomp( $libs = `pkg-config --libs $lib` );
-
- $cflags =~ s/\s*$//;
- $libs =~ s/\s*$//;
-
- if ($cflags and $libs) {
- last;
- } else {
- undef $cflags;
- undef $libs;
- }
-}
+$cflags =~ s/\s*$//;
+$libs =~ s/\s*$//;
my $builder = Alien::Base::ModuleBuild->new(
module_name => 'MyTest',

0 comments on commit 7ab4d2d

Please sign in to comment.