mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Fixes to make ./configure prompt for libs if all else fails (discussed earlier with w00t).
The values prompted for are cached, so if you specify them then ./configure -update wont prompt again for them git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6408 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
bcdacaac9b
commit
5784c43969
4
configure
vendored
4
configure
vendored
@ -309,6 +309,7 @@ sub update
|
||||
$has_epoll = $config{HAS_EPOLL};
|
||||
$has_kqueue = $config{HAS_KQUEUE};
|
||||
writefiles(1);
|
||||
makecache();
|
||||
print "Complete.\n";
|
||||
exit;
|
||||
}
|
||||
@ -331,6 +332,7 @@ sub modupdate
|
||||
$has_epoll = $config{HAS_EPOLL};
|
||||
$has_kqueue = $config{HAS_KQUEUE};
|
||||
writefiles(0);
|
||||
makecache();
|
||||
print "Complete.\n";
|
||||
exit;
|
||||
}
|
||||
@ -710,8 +712,8 @@ if (($config{USE_GNUTLS} eq "n") && ($config{USE_OPENSSL} eq "n")) {
|
||||
}
|
||||
|
||||
getosflags();
|
||||
makecache();
|
||||
writefiles(1);
|
||||
makecache();
|
||||
|
||||
print "\n\n";
|
||||
print "To build your server with these settings, please type '\033[1;32m$config{MAKEPROG}\033[0m' now.\n";
|
||||
|
@ -2,7 +2,7 @@ package make::configure;
|
||||
use Exporter 'import';
|
||||
use POSIX;
|
||||
use make::utilities;
|
||||
@EXPORT = qw(promptnumeric dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies resolve_directory yesno showhelp);
|
||||
@EXPORT = qw(promptnumeric promptstring dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies resolve_directory yesno showhelp);
|
||||
|
||||
my $no_svn = 0;
|
||||
|
||||
@ -139,6 +139,19 @@ sub promptnumeric($$)
|
||||
}
|
||||
}
|
||||
|
||||
sub promptstring($$$)
|
||||
{
|
||||
my ($prompt, $configitem, $default) = @_;
|
||||
print "\nPlease enter the $prompt?\n";
|
||||
print "[\033[1;32m$default\033[0m] -> ";
|
||||
chomp($var = <STDIN>);
|
||||
if ($var eq "")
|
||||
{
|
||||
$var = $default;
|
||||
}
|
||||
$main::config{$configitem} = $var;
|
||||
}
|
||||
|
||||
sub dumphash()
|
||||
{
|
||||
print "\n\033[1;32mPre-build configuration is complete!\033[0m\n\n";
|
||||
|
@ -1,5 +1,6 @@
|
||||
package make::utilities;
|
||||
use Exporter 'import';
|
||||
use make::configure;
|
||||
use POSIX;
|
||||
@EXPORT = qw(make_rpath pkgconfig_get_include_dirs pkgconfig_get_lib_dirs translate_functions);
|
||||
|
||||
@ -71,7 +72,17 @@ sub pkgconfig_get_include_dirs($$$;$)
|
||||
chomp($ret);
|
||||
if (($ret eq " ") || (!defined $ret))
|
||||
{
|
||||
print "\033[1;32mUsing defaults\033[0m\n";
|
||||
my $key = "default_includedir_$packagename";
|
||||
if (exists $config{$key})
|
||||
{
|
||||
$ret = $config{$key};
|
||||
}
|
||||
else
|
||||
{
|
||||
$headername =~ s/^\///;
|
||||
promptstring("path to the directory containing $headername", $key, "/usr/include");
|
||||
$ret = $config{$key};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -110,7 +121,17 @@ sub pkgconfig_get_lib_dirs($$$;$)
|
||||
chomp($ret);
|
||||
if (($ret eq " ") || (!defined $ret))
|
||||
{
|
||||
print "\033[1;32mUsing defaults\033[0m\n";
|
||||
my $key = "default_libdir_$packagename";
|
||||
if (exists $config{$key})
|
||||
{
|
||||
$ret = $config{$key};
|
||||
}
|
||||
else
|
||||
{
|
||||
$libname =~ s/^\///;
|
||||
promptstring("path to the directory containing $libname", $key, "/usr/lib");
|
||||
$ret = $config{$key};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user