Skip to content

Commit

Permalink
using Alien::PNG
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Leich committed Apr 18, 2010
1 parent 23d4e29 commit 0295f66
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions inc/My/Builder/Unix.pm
Expand Up @@ -5,6 +5,7 @@ use warnings;
use base 'My::Builder';

use File::Spec::Functions qw(catdir catfile rel2abs);
use Alien::PNG;
use Config;

my $inc_lib_candidates = {
Expand Down Expand Up @@ -97,8 +98,8 @@ sub _get_configure_cmd {
}

if($pack eq 'SDL_image') {
$extra_cflags .= ' -I/usr/local/include';
$extra_ldflags .= ' -L/usr/local/lib';
#$extra_cflags .= ' -I/usr/local/include';
#$extra_ldflags .= ' -L/usr/local/lib';
}

if(($pack eq 'SDL') && ($Config{archname} =~ /(powerpc|ppc)/)) {
Expand Down Expand Up @@ -130,6 +131,9 @@ sub _get_configure_cmd {
else {
$cmd = "./configure --prefix=$prefixdir --enable-static=no --enable-shared=yes $extra" .
" CFLAGS=\"$extra_cflags\" LDFLAGS=\"$extra_ldflags\"";

$cmd .= ' LIBPNG_CFLAGS="' . Alien::PNG->config('cflags') . '"'
. ' LIBPNG_LIBS="' . Alien::PNG->config('libs') . '"' if 'SDL_image' eq $pack;
}

# we need to have $prefixdir/bin in PATH while running ./configure
Expand Down

0 comments on commit 0295f66

Please sign in to comment.