Changeset 7449 for inc

Show
Ignore:
Timestamp:
10/08/05 21:39:07 (3 years ago)
Author:
autrijus
Message:

* xinming++ for pointing out that for nonstand GHC locations,

our ./Setup configure did not catch any them up. This should
fix it for real.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • inc/Module/Install/Pugs.pm

    r7359 r7449  
    176176    } 
    177177    chomp $ghc_flags; 
    178     return ($ghc, $ghc_version, $ghc_flags); 
     178 
     179    return ($ghc, $ghc_version, $ghc_flags, $self->assert_ghc_pkg); 
    179180} 
    180181 
    181182sub has_ghc_package { 
    182183    my ($self, $package) = @_; 
     184    my $ghc_pkg = $self->assert_ghc_pkg; 
     185    `$ghc_pkg describe $package` =~ /package-url/; 
     186} 
     187 
     188sub assert_ghc_pkg { 
     189    my $self = shift; 
    183190    my $ghc_pkg = $ENV{GHC_PKG}; 
    184191 
     
    190197    } 
    191198 
    192     `$ghc_pkg describe $package` =~ /package-url/; 
    193 } 
     199    die "*** Cannot find ghc-pkg; please set it in your GHC_PKG environment variable.\n" 
     200        unless $ghc_pkg; 
     201 
     202    return $ghc_pkg; 
     203} 
     204 
    194205 
    195206sub fixpaths {