Index: config/auto/readline.pm =================================================================== --- config/auto/readline.pm (revision 43076) +++ config/auto/readline.pm (working copy) @@ -61,6 +61,7 @@ else { # a second chance with ncurses $extra_libs .= ' '; + my $tmp = $extra_libs; $extra_libs .= $self->_select_lib( { conf => $conf, osname => $osname, @@ -75,6 +76,23 @@ } _handle_readline($conf, $extra_libs); } + else { + # a third chance with curses + $extra_libs = $tmp . $self->_select_lib( { + conf => $conf, + osname => $osname, + cc => $cc, + win32_nongcc => 'curses.lib', + default => '-lcurses', + } ); + eval { $conf->cc_build( q{}, $extra_libs) }; + if ( !$@ ) { + if ( $conf->cc_run() ) { + $has_readline = $self->_evaluate_cc_run($verbose); + } + _handle_readline($conf, $extra_libs); + } + } } $conf->data->set( HAS_READLINE => $has_readline ); $self->set_result($has_readline ? 'yes' : 'no');