X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=6336af807b44b60086f209bb64f409114c9a645b;hb=3f455b1747f822e867c37bc8902e51b5a36efba7;hp=d1b95db57f2387456eea593c3da5b92698529217;hpb=56d9b1701edab7880d9f911a9a941eb6928e26ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index d1b95db57..6336af807 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ # InspIRCd Configuration Script # -# Copyright 2003 The ChatSpike Development Team +# Copyright 2002-2006 The ChatSpike Development Team # # # @@ -12,12 +12,14 @@ # ######################################## +require 5.6.0; use Cwd; use Getopt::Long; GetOptions ( 'enable-gnutls' => \$opt_use_gnutls, 'enable-openssl' => \$opt_use_openssl, + 'disable-interactive' => \$opt_nointeractive, 'with-nick-length=i' => \$opt_nick_length, 'with-channel-length=i' => \$opt_chan_length, 'with-max-channels=i' => \$opt_maxchans, @@ -45,8 +47,8 @@ GetOptions ( 'binary-dir=s' => \$opt_binary_dir, 'library-dir=s' => \$opt_library_dir, 'help' => sub { showhelp(); }, - 'modupdate' => sub { update(); }, - 'update' => sub { modupdate(); }, + 'modupdate' => sub { modupdate(); }, + 'update' => sub { update(); }, 'svnupdate' => sub { svnupdate(); }, 'clean' => sub { clean(); }, ); @@ -58,6 +60,7 @@ my $non_interactive = ( (defined $opt_module_dir) || (defined $opt_base_dir) || (defined $opt_binary_dir) || + (defined $opt_nointeractive) || (defined $opt_away) || (defined $opt_gecos) || (defined $opt_kick) || @@ -244,7 +247,7 @@ if (defined $opt_away) $no_svn = 0; -$config{HAS_OPENSSL} =~ /OpenSSL ([-[:digit:].]+)([a-z])? (\w{3}|[0-9]+) (\w{3}|[0-9]+) [0-9]{4}/; +$config{HAS_OPENSSL} =~ /OpenSSL ([-[:digit:].]+)([a-z])?(\-[a-z][0-9])? (\w{3}|[0-9]+) (\w{3}|[0-9]+) [0-9]{4}/; $config{HAS_OPENSSL} = $1; if ($config{GCCVER} eq "") { @@ -291,6 +294,9 @@ sub clean sub update { + chomp($topdir = getcwd()); + $this = resolve_directory($topdir); # PWD, Regardless. + getmodules(); # Does the cache file exist? if (!getcache()) { # No, No it doesn't.. *BASH* @@ -310,6 +316,9 @@ sub update sub modupdate { + chomp($topdir = getcwd()); + $this = resolve_directory($topdir); # PWD, Regardless. + getmodules(); # Does the cache file exist? if (!getcache()) { # No, No it doesn't.. *BASH* @@ -346,11 +355,10 @@ sub svnupdate } print "Running non-interactive configure...\n" unless $interactive; - -print "Checking for cache from previous configure...\n"; -getcache(); -print "Checking operating system version...\n"; -getosflags(); +print "Checking for cache from previous configure... "; +print ((getcache() eq "true") ? "found\n" : "not found\n"); +print "Checking operating system version... "; +print getosflags() . "\n"; if (defined $opt_maxclients) { @@ -870,6 +878,17 @@ print "\033[0mIPv6 to IPv4 Links:\033[1;32m\t\t$config{SUPPORT_IP6LINKS}\033[0m\ print "\033[0mGnuTLS Support:\033[1;32m\t\t\t$config{USE_GNUTLS}\033[0m\n"; print "\033[0mOpenSSL Support:\033[1;32m\t\t$config{USE_OPENSSL}\033[0m\n\n"; +if (($config{USE_GNUTLS} eq "y") && ($config{HAS_GNUTLS} ne "y")) +{ + print "Sorry, but i couldn't detect gnutls. Make sure gnutls-config is in your path.\n"; + exit(0); +} +if (($config{USE_OPENSSL} eq "y") && ($config{HAS_OPENSSL} ne "y")) +{ + print "Sorry, but i couldn't detect openssl. Make sure openssl is in your path.\n"; + exit(0); +} + if ($config{USE_GNUTLS} eq "y") { $failed = 0; open(TMP, "