Ticket #1401: pcre.pm.patch

File pcre.pm.patch, 1.0 KB (added by ronaldws, 11 years ago)

Have pcre.pm report back "no" if no pcre rather than done

  • config/auto/pcre.pm

     
    3535 
    3636    my $without = $conf->options->get( qw| without-pcre | ); 
    3737 
    38     if ($without) { 
    39         $conf->data->set( HAS_PCRE => 0 ); 
    40         $self->set_result('no'); 
    41         return 1; 
    42     } 
     38    $self->set_result('no'); 
     39    $conf->data->set( HAS_PCRE => 0 ); 
    4340 
     41    return 1 if ($without); 
     42 
    4443    my $osname = $conf->data->get('osname'); 
    4544 
    4645    my $extra_libs = $self->_select_lib( { 
     
    5352 
    5453    $conf->cc_gen('config/auto/pcre/pcre_c.in'); 
    5554    eval { $conf->cc_build( q{}, $extra_libs ) }; 
    56     my $has_pcre = 0; 
    5755    if ( !$@ ) { 
    5856        my $test = $conf->cc_run(); 
    59         $has_pcre = $self->_evaluate_cc_run($conf, $test); 
     57        if ( my $has_pcre = $self->_evaluate_cc_run($conf, $test) ) { 
     58            $conf->data->set( HAS_PCRE => $has_pcre); 
     59        } 
    6060    } 
    61     $conf->data->set( HAS_PCRE => $has_pcre); 
    6261 
    6362    return 1; 
    6463}