X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fconfigure.pm;h=dd2dc90896bd68af3e9596d577adbb90fbc889db;hb=4934648e234538a7324c0a47836350a9be8b1fc0;hp=a082492239c28ba0d7f2a59470a91660266e5f2a;hpb=c1f88cfa9c653c0df9574edb6995a7385543be83;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/configure.pm b/make/configure.pm index a08249223..dd2dc9089 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -1,8 +1,17 @@ +# +# Copyright 2002-2007 The ChatSpike Development Team +# +# +# +# Licensed under GPL, please see the COPYING file +# for more information +# + 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 dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies resolve_directory yesno showhelp promptstring); my $no_svn = 0; @@ -139,6 +148,18 @@ sub promptnumeric($$) } } +sub promptstring($$) +{ + my ($prompt,$default) = @_; + my $var; + print "$prompt\n"; + print "[\033[1;32m$default\033[0m] -> "; + chomp($var = ); + $var = $default if $var eq ""; + print "\n"; + return $var; +} + sub dumphash() { print "\n\033[1;32mPre-build configuration is complete!\033[0m\n\n";