X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=configure;h=0a91e65c5bc4e24bd75693f43fd0ad3274a804a8;hb=45ca2908a3c7f3d4c56325e1fbc404bd11bdba3b;hp=6fba700ceb4e4ce4f5043abb0b2ee908ccdc4bb5;hpb=02267976f636e3c4fffc8732a949b4777a771ca2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index 6fba700ce..0a91e65c5 100755 --- a/configure +++ b/configure @@ -116,7 +116,7 @@ if (defined $opt_base_dir) { } if (defined $opt_system) { - $config{UID} = $opt_uid || 'ircd'; + $config{UID} = defined $opt_uid ? $opt_uid : 'ircd'; $config{CONFIG_DIR} = '/etc/inspircd'; $config{MODULE_DIR} = '/usr/lib/inspircd'; $config{BINARY_DIR} = '/usr/sbin/'; @@ -124,7 +124,7 @@ if (defined $opt_system) { $config{DATA_DIR} = '/var/inspircd'; $config{LOG_DIR} = '/var/log/inspircd'; } else { - $config{UID} = $opt_uid || $<; + $config{UID} = defined $opt_uid ? $opt_uid : $<; $config{CONFIG_DIR} = rel2abs($config{BASE_DIR}."/conf"); $config{MODULE_DIR} = rel2abs($config{BASE_DIR}."/modules"); $config{BINARY_DIR} = rel2abs($config{BASE_DIR}."/bin"); @@ -153,12 +153,12 @@ chomp($config{HAS_OPENSSL} = `pkg-config --modversion openssl 2>/dev/null`); chomp(our $gnutls_ver = $config{HAS_GNUTLS}); chomp(our $openssl_ver = $config{HAS_OPENSSL}); -$config{USE_GNUTLS} = "n"; +$config{USE_GNUTLS} = 0; if (defined $opt_use_gnutls) { $config{USE_GNUTLS} = "y"; # Use gnutls. } -$config{USE_OPENSSL} = "n"; # Use openssl. +$config{USE_OPENSSL} = 0; # Use openssl. if (defined $opt_use_openssl) { $config{USE_OPENSSL} = "y"; @@ -263,7 +263,7 @@ if ($interactive) # Display Introduction Message.. print <<"STOP" ; -Welcome to the \e[1mInspIRCd\e[0m Configuration program! (\e[1minteractive mode\e[0m) +Welcome to the \e[1mInspIRCd\e[0m configuration program! (\e[1minteractive mode\e[0m) \e[1mPackage maintainers: Type ./configure --help for non-interactive help\e[0m *** If you are unsure of any of these values, leave it blank for *** @@ -281,6 +281,21 @@ STOP print "\e[0m\n\n"; print "The following compiler has been detected: \e[1;32m$cxx{NAME} $cxx{VERSION}\e[0m ($config{CXX})\n\n"; + # Check that the user actually wants this version. + if (index($version, '+') != -1) { + print <<"EOW" ; +\e[1;31mWARNING!\e[0m You are building a development version. This contains code which has +not been tested as heavily and may contain various faults which could seriously +affect the running of your server. It is recommended that you use a stable +version instead. + +You can obtain the latest stable version from https://github.com/inspircd/inspircd/releases +or by running `git checkout insp20` if you are installing from Git. + +EOW + exit 1 unless prompt_bool(1, 'I understand this warning and want to continue anyway.', 0); + } + # Directory Settings.. my $tmpbase = $config{BASE_DIR}; $config{BASE_DIR} = prompt_dir(1, 'What directory do you wish to install the InspIRCd base?', $config{BASE_DIR}); @@ -377,12 +392,12 @@ symlink "extra/m_regex_posix.cpp", "src/modules/m_regex_posix.cpp"; if (($config{USE_GNUTLS}) && ($config{HAS_GNUTLS} ne "y")) { - print "Sorry, but i couldn't detect gnutls. Make sure pkg-config is in your path.\n"; + print "Sorry, but I couldn't detect GnuTLS. Make sure pkg-config is in your path.\n"; exit 1; } if (($config{USE_OPENSSL}) && ($config{HAS_OPENSSL} ne "y")) { - print "Sorry, but i couldn't detect openssl. Make sure pkg-config is in your path.\n"; + print "Sorry, but I couldn't detect OpenSSL. Make sure pkg-config is in your path.\n"; exit 1; } @@ -397,7 +412,7 @@ if ($config{USE_GNUTLS} || $config{USE_OPENSSL}) { print "Done.\n\n"; } } else { - print "SSL Certificates found, skipping.\n\n" + print "SSL certificates found, skipping.\n\n" } } else { print "Skipping SSL certificate generation in non-interactive mode.\n\n"; @@ -416,7 +431,7 @@ print "To build your server with these settings, please run '\e[1;32mmake\e[0m' if ($config{USE_GNUTLS} || $config{USE_OPENSSL}) { print "Please note: for \e[1;32mSSL support\e[0m you will need to load required\n"; print "modules in your config. This configure script has added those modules to the\n"; - print "build process. For more info please refer to:\n"; + print "build process. For more info, please refer to:\n"; print "\e[1;32mhttp://wiki.inspircd.org/Installation_From_Tarball\e[0m\n"; } print "*** \e[1;32mRemember to edit your configuration files!!!\e[0m ***\n\n"; @@ -440,6 +455,7 @@ sub writefiles { #define VERSION "$version" #define REVISION "$revision" #define SYSTEM "$incos" +#define INSPIRCD_SOCKETENGINE_NAME "$config{SOCKETENGINE}" #define CONFIG_PATH "$config{CONFIG_DIR}" #define DATA_PATH "$config{DATA_DIR}"