diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-20 21:41:29 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-20 21:41:29 +0000 |
commit | 5784c4396975b75809613b9cddb93dafc22a5517 (patch) | |
tree | e82d855a01f3f3e62349315141450debd2f0e126 /make/configure.pm | |
parent | bcdacaac9b1c345acb0b93039c34d3ab29a278a4 (diff) |
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
Diffstat (limited to 'make/configure.pm')
-rw-r--r-- | make/configure.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/make/configure.pm b/make/configure.pm index 7965436c2..7b0a35454 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -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"; |