1 | --- gettext-1.05/Makefile.PL.orig 2005-01-31 10:30:22.000000000 +1100 |
---|
2 | +++ gettext-1.05/Makefile.PL 2012-10-03 15:45:12.000000000 +1000 |
---|
3 | @@ -7,6 +7,10 @@ |
---|
4 | } else { |
---|
5 | $cc = $Config{'cc'}; |
---|
6 | } |
---|
7 | +my $cflags = ''; |
---|
8 | +if (defined($ENV{'CFLAGS'})) { |
---|
9 | + $cflags = $ENV{'CFLAGS'}; |
---|
10 | +} |
---|
11 | my $libs = ''; |
---|
12 | |
---|
13 | unless (conftest("char *x = gettext(\"foo\");", "gettext", 0)) { |
---|
14 | @@ -35,6 +39,8 @@ |
---|
15 | NAME => "Locale::gettext", |
---|
16 | LIBS => ($libs eq '') ? [] : [$libs], |
---|
17 | VERSION_FROM => 'gettext.pm', |
---|
18 | + CC => $cc, |
---|
19 | + LD => $cc, |
---|
20 | ); |
---|
21 | |
---|
22 | sub conftest { |
---|
23 | @@ -50,7 +56,7 @@ |
---|
24 | close TEST; |
---|
25 | open(SAVE, ">&STDERR"); |
---|
26 | open(STDERR, ">/dev/null"); |
---|
27 | - system($cc . " -o conftest " . $libs . " conftest.c"); |
---|
28 | + system($cc . " " . $cflags . " -o conftest " . $libs . " conftest.c"); |
---|
29 | my $exitstatus = $?; |
---|
30 | open(STDERR, ">&SAVE"); |
---|
31 | if ($exitstatus != 0) { |
---|