]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge pull request #1005 from SaberUK/master+minor-tweaks
authorAttila Molnar <attilamolnar@hush.com>
Sun, 22 Mar 2015 23:54:40 +0000 (00:54 +0100)
committerAttila Molnar <attilamolnar@hush.com>
Sun, 22 Mar 2015 23:54:40 +0000 (00:54 +0100)
Various changes mainly relating to the build system.

configure
include/modules/cap.h
make/configure.pm
make/console.pm
tools/test-build

index d7cf0d732917a1e02e0b6c6053933ca2d24039be..1ff38bad12b4947075f0f08363c892e7a776ef4c 100755 (executable)
--- a/configure
+++ b/configure
@@ -46,6 +46,7 @@ use make::console;
 my ($opt_binary_dir,
     $opt_config_dir,
     $opt_data_dir,
+    $opt_development,
     $opt_disable_interactive,
     $opt_distribution_label,
     $opt_gid,
@@ -71,6 +72,7 @@ GetOptions(
        'help'   => \&cmd_help,
        'update' => \&cmd_update,
 
+       'development'          => \$opt_development,
        'disable-interactive'  => \$opt_disable_interactive,
        'distribution-label=s' => \$opt_distribution_label,
        'binary-dir=s'         => \$opt_binary_dir,
@@ -107,6 +109,7 @@ our $interactive = !(
        defined $opt_binary_dir ||
        defined $opt_config_dir ||
        defined $opt_data_dir ||
+       defined $opt_development ||
        defined $opt_disable_interactive ||
        defined $opt_distribution_label ||
        defined $opt_gid ||
@@ -233,7 +236,7 @@ $config{UID}  = $user[2];
 system 'tput', 'clear' if $interactive;
 
 # Check that the user actually wants this version.
-if ($version{LABEL} ne 'release' && $interactive) {
+if ($version{LABEL} ne 'release') {
        print_warning <<'EOW';
 You are building a development version. This contains code which has
 not been tested as heavily and may contain various faults which could seriously
@@ -242,9 +245,11 @@ version instead.
 
 You can obtain the latest stable version from http://www.inspircd.org/ or by
 running `git checkout insp20` if you are installing from Git.
-
 EOW
-exit 1 unless prompt_bool $interactive, 'I understand this warning and want to continue anyway.', !$interactive;
+       if (!prompt_bool $interactive, 'I understand this warning and want to continue anyway.', $opt_development || 0) {
+               print STDERR "If you understand this warning and still want to continue pass the --development flag.\n" unless $interactive;
+               exit 1;
+       }
 }
 
 # Configure directory settings.
@@ -267,10 +272,10 @@ if (prompt_bool $interactive, $question, 0) {
        foreach my $key (qw(BINARY_DIR CONFIG_DIR DATA_DIR LOG_DIR MANUAL_DIR MODULE_DIR)) {
                $config{$key} =~ s/^\Q$original_base_dir\E/$config{BASE_DIR}/;
        }
-       $config{BINARY_DIR} = prompt_dir $interactive, 'In what directory should the InspIRCd binary be placed?',     $config{BINARY_DIR};
+       $config{BINARY_DIR} = prompt_dir $interactive, 'In what directory should the InspIRCd binary be placed?', $config{BINARY_DIR};
        $config{CONFIG_DIR} = prompt_dir $interactive, 'In what directory are configuration files to be stored?', $config{CONFIG_DIR};
-       $config{DATA_DIR}   = prompt_dir $interactive, 'In what directory are variable data files to be stored?',     $config{DATA_DIR};
-       $config{LOG_DIR}    = prompt_dir $interactive, 'In what directory are log files to be stored?',               $config{LOG_DIR};
+       $config{DATA_DIR}   = prompt_dir $interactive, 'In what directory are variable data files to be stored?', $config{DATA_DIR};
+       $config{LOG_DIR}    = prompt_dir $interactive, 'In what directory are log files to be stored?',           $config{LOG_DIR};
        $config{MANUAL_DIR} = prompt_dir $interactive, 'In what directory are manual pages to be placed?',        $config{MANUAL_DIR};
        $config{MODULE_DIR} = prompt_dir $interactive, 'In what directory are modules to be placed?',             $config{MODULE_DIR};
 }
index 7aa60cd218517077f0ca38dd6fca21df371e8c34..b1bfbc3f92eea175b85582384588dd42b512a34f 100644 (file)
@@ -55,7 +55,7 @@ class GenericCap : public Events::ModuleEventListener
        {
        }
 
-       void OnCapEvent(CapEvent& ev) CXX11_OVERRIDE
+       void OnCapEvent(CapEvent& ev)
        {
                if (!active)
                        return;
index 2cd5beb607495feea5c47a76d5db358b58ab6a7c..84f076483c6b7322a24cbb5633fc4d417aa6e141 100644 (file)
@@ -167,7 +167,7 @@ FLAGS
                                 will search for c++, g++, clang++ or icpc.
 
 If you have any problems with configuring InspIRCd then visit our IRC channel
-at irc.ChatSpike.net #InspIRCd.
+at irc.inspircd.org #InspIRCd for support.
 
 EOH
        exit 0;
index 9be5ef47c3ad40331e6c87776dce16bd55eeb845..045df8a704c61afd2b6e15c398df597c0447e4c7 100644 (file)
@@ -80,13 +80,13 @@ sub prompt_bool($$$) {
        return $answer =~ /y/i;
 }
 
-sub prompt_dir($$$) {
-       my ($interactive, $question, $default) = @_;
+sub prompt_dir($$$;$) {
+       my ($interactive, $question, $default, $create_now) = @_;
        my ($answer, $create);
        do {
                $answer = rel2abs(prompt_string($interactive, $question, $default));
                $create = prompt_bool($interactive && !-d $answer, "$answer does not exist. Create it?", 'y');
-               if ($create) {
+               if ($create && $create_now) {
                        my $mkpath = eval {
                                mkpath($answer, 0, 0750);
                                return 1;
index b809a401eb1d02769c7c1f0366baf0dede8dcd2a..1b0192e31b959a204f0f09333dbed822b9079660 100755 (executable)
@@ -51,7 +51,7 @@ foreach my $compiler (@compilers) {
        foreach my $socketengine (@socketengines) {
                print "Attempting to build using the $compiler compiler and the $socketengine socket engine...\n";
                system './configure', '--enable-extras', $ENV{TEST_BUILD_MODULES} if defined $ENV{TEST_BUILD_MODULES};
-               if (system './configure', '--disable-interactive', '--socketengine', $socketengine) {
+               if (system './configure', '--development', '--socketengine', $socketengine) {
                        print "Failed to configure using the $compiler compiler and the $socketengine socket engine!\n";
                        exit 1;
                }