Revision: | 1.3 |
Committed: | Wed Sep 7 17:12:40 2005 UTC (18 years, 10 months ago) by root |
Branch: | MAIN |
CVS Tags: | rel-1_73, rel-1_72, rel-1_71, rel-2_2, rel-2_3, rel-2_0, rel-2_1, rel-1_8, rel-2_31, rel-1_7, rel-1_61, rel-2_21 |
Changes since 1.2: | +1 -1 lines |
Log Message: | *** empty log message *** |
# | Content |
---|---|
1 | package autoconf; |
2 | |
3 | # I plan to improve this and make it a standalone ExtUtils::Autoconf module, |
4 | # but right now it just runs an external configure script. |
5 | |
6 | use Config; |
7 | |
8 | sub run_script(;$$) { |
9 | my ($wd, $file) = @_; |
10 | $wd ||= "autoconf"; |
11 | $script ||= "./configure"; |
12 | |
13 | local %ENV = %ENV; |
14 | |
15 | while (my ($k, $v) = each %Config) { |
16 | $ENV{$k} = $v; |
17 | } |
18 | |
19 | $ENV{MAKE} = $Config{make}; |
20 | $ENV{SHELL} = $Config{sh}; |
21 | $ENV{CC} = $Config{cc}; |
22 | $ENV{CPPFLAGS} = $Config{cppflags}; |
23 | $ENV{CFLAGS} = $Config{ccflags}; |
24 | $ENV{LDFLAGS} = $Config{ldflags}; |
25 | $ENV{LIBS} = ""; |
26 | $ENV{LINKER} = $Config{ld}; # nonstandard |
27 | |
28 | my $status = system $ENV{SHELL}, -c => "cd \Q$wd\E && \Q$script\E --prefix \Q$Config{prefix}\E"; |
29 | |
30 | $status |
31 | } |
32 | |
33 | 1 |