X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=1245f2b61cd9b66a3193355089bc0f03a9b2d003;hb=67cf8f594aa36edfca40511d245626dae258999a;hp=d1b95db57f2387456eea593c3da5b92698529217;hpb=56d9b1701edab7880d9f911a9a941eb6928e26ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index d1b95db57..1245f2b61 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) || @@ -346,11 +349,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) { @@ -1081,7 +1083,9 @@ sub getosflags { $config{CC} = "eg++"; chomp($config{GCCVER} = `eg++ -dumpversion | cut -c 1`); # we must redo these if we change the compiler path } + return "OpenBSD"; } + return $config{OSNAME}; } else { $config{LDLIBS} = "-ldl -lstdc++"; $config{FLAGS} = "-fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}"; @@ -1091,6 +1095,7 @@ sub getosflags { $config{LDLIBS} = ""; $config{MAKEPROG} = "/usr/bin/make"; $config{MAKEORDER} = "ircd mods"; + return "Cygwin"; } elsif ($config{OSNAME} eq "CYG-STATIC") { $config{FLAGS} = "-Wall -Woverloaded-virtual $config{OPTIMISATI}"; $config{LDLIBS} = ""; @@ -1098,7 +1103,9 @@ sub getosflags { $config{MAKEORDER} = "mods ircd"; $config{STATICLIBS} = "modules/mods.a"; $config{STATIC_LINK} = "yes"; + return "Cygwin-Static"; } + return "Linux"; } if ($config{OSNAME} =~ /SunOS/) @@ -1109,12 +1116,14 @@ sub getosflags { # rt = POSIX realtime extensions # resolv = inet_aton only (why isnt this in nsl?!) $config{LDLIBS} = $config{LDLIBS} . " -lsocket -lnsl -lrt -lresolv"; + return "Solaris"; } if($config{OSNAME} eq "MINGW32") { # All code is position-independent on windows $config{FLAGS} =~ s/-fPIC //; + return "MinGW"; } } @@ -1850,6 +1859,7 @@ ITEM sub showhelp { + chomp($PWD = `pwd`); print "Usage: configure [options] Options: [defaults in brackets after descriptions] @@ -1862,16 +1872,17 @@ is started, and any omitted values are defaulted. Arguments with a single \"-\" symbol, as in InspIRCd 1.0.x, are also allowed. - --update Update makefiles - --modupdate Detect new modules - --svnupdate {rebuild} Update working copy - {and optionally rebuild} - --clean Remove .config.cache + --disable-interactive Sets no options intself, but + will disable any interactive prompting. + --update Update makefiles and dependencies + --modupdate Detect new modules and write makefiles + --svnupdate {rebuild} Update working copy via subversion + {and optionally rebuild it} + --clean Remove .config.cache file and go interactive --enable-gnutls Enable GnuTLS module [no] --enable-openssl Enable OpenSSL module [no] --with-nick-length=[n] Specify max. nick length [32] - --with-channel-length=[n] Specify max. channel length - [64] + --with-channel-length=[n] Specify max. channel length [64] --with-max-channels=[n] Specify max. number of channels a normal user may join [20] --with-max-oper-channels=[n] Specify max. number of channels @@ -1879,10 +1890,8 @@ InspIRCd 1.0.x, are also allowed. --with-max-clients=[n] Specify maximum number of users which may connect locally --enable-optimization=[n] Optimize using -O[n] gcc flag - --enable-epoll Enable epoll() where supported - [set] - --enable-kqueue Enable kqueue() where supported - [set] + --enable-epoll Enable epoll() where supported [set] + --enable-kqueue Enable kqueue() where supported [set] --disable-epoll Do not enable epoll(), fall back to select() [not set] --disable-kqueue Do not enable kqueue(), fall back @@ -1890,8 +1899,7 @@ InspIRCd 1.0.x, are also allowed. --enable-ipv6 Build ipv6 native InspIRCd [no] --enable-remote-ipv6 Build with ipv6 support for remote servers on the network [yes] - --disable-remote-ipv6 Do not allow remote ipv6 servers - [not set] + --disable-remote-ipv6 Do not allow remote ipv6 servers [not set] --with-cc=[filename] Use an alternative g++ binary to build InspIRCd [g++] --with-ident-length=[n] Specify max length of ident [12] @@ -1902,13 +1910,19 @@ InspIRCd 1.0.x, are also allowed. --with-away-length=[n] Specify max length of away [150] --with-max-modes=[n] Specify max modes per line which have parameters [20] - --prefix=[directory] Base directory to install into - [current directory] - --config-dir=[directory] Config file directory [prefix/conf] - --module-dir=[directory] Modules directory [prefix/modules] - --binary-dir=[directory] Binaries directory [prefix/bin] - --library-dir=[directory] Library directory [prefix/lib] - --help Show this help text + --prefix=[directory] Base directory to install into (if defined, + can automatically define config, module, bin + and library dirs as subdirectories of prefix) + [$PWD] + --config-dir=[directory] Config file directory for config and SSL certs + [$PWD/conf] + --module-dir=[directory] Modules directory for loadable modules + [$PWD/modules] + --binary-dir=[directory] Binaries directory for core binary + [$PWD/bin] + --library-dir=[directory] Library directory for core libraries + [$PWD/lib] + --help Show this help text and exit "; exit(0);