]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - configure
Fix the log message in the disable module.
[user/henk/code/inspircd.git] / configure
index 4a1ba596a91fb7614d12fb37abfc84f16162c170..2fb332b59ed5951a777fdf495960f5ff238b5277 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,17 +1,18 @@
 #!/usr/bin/env perl
-
 #
 # InspIRCd -- Internet Relay Chat Daemon
 #
-#   Copyright (C) 2012-2017 Sadie Powell <sadie@witchery.services>
-#   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
-#   Copyright (C) 2007, 2009 Dennis Friis <peavey@inspircd.org>
-#   Copyright (C) 2003, 2006-2008 Craig Edwards <craigedwards@brainbox.cc>
-#   Copyright (C) 2006-2008 Robin Burchell <robin+git@viroteck.net>
+#   Copyright (C) 2019 Matt Schatz <genius3000@g3k.solutions>
+#   Copyright (C) 2019 Anatole Denis <natolumin@rezel.net>
+#   Copyright (C) 2017 emerson <github@emersonveenstra.net>
+#   Copyright (C) 2013-2020 Sadie Powell <sadie@witchery.services>
+#   Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
+#   Copyright (C) 2012 ChrisTX <xpipe@hotmail.de>
+#   Copyright (C) 2010 Daniel De Graaf <danieldg@inspircd.org>
 #   Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
-#   Copyright (C) 2007 John Brooks <john.brooks@dereferenced.net>
-#   Copyright (C) 2006 Oliver Lupton <oliverlupton@gmail.com>
-#   Copyright (C) 2003-2006 Craig McLure <craig@chatspike.net>
+#   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+#   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
+#   Copyright (C) 2006-2008 Craig Edwards <brain@inspircd.org>
 #
 # This file is part of InspIRCd.  InspIRCd is free software: you can
 # redistribute it and/or modify it under the terms of the GNU General Public
@@ -105,8 +106,8 @@ exit 1 unless GetOptions(
 );
 
 if (scalar(@opt_enableextras) + scalar(@opt_disableextras) > 0) {
-       @opt_enableextras = split /,/, join(',', @opt_enableextras);
-       @opt_disableextras = split /,/, join(',', @opt_disableextras);
+       @opt_enableextras = split /[, ]+/, join(',', @opt_enableextras);
+       @opt_disableextras = split /[, ]+/, join(',', @opt_disableextras);
        enable_extras(@opt_enableextras);
        disable_extras(@opt_disableextras);
        list_extras;
@@ -225,6 +226,7 @@ unprivileged user/group to build and run as or pass the '--gid [id|name]' flag
 to specify an unprivileged group to run as.
 EOW
                if (!prompt_bool $interactive, "Are you sure you want to build as the $group[0] group?", 0) {
+                       # PACKAGERS: You do not need to delete this check. Use `--gid $(id -g)` or `--gid 0` instead.
                        say STDERR "If you are sure you want to build as the $group[0] group pass the --gid $group[2] flag." unless $interactive;
                        exit 1;
                }
@@ -251,6 +253,7 @@ unprivileged user/group to build and run as or pass the '--uid [id|name]' flag
 to specify an unprivileged user to run as.
 EOW
                if (!prompt_bool $interactive, "Are you sure you want to build as the $user[0] user?", 0) {
+                       # PACKAGERS: You do not need to delete this check. Use `--uid $(id -u)` or `--uid 0` instead.
                        say STDERR "If you are sure you want to build as the $user[0] user pass the --uid $user[2] flag." unless $interactive;
                        exit 1;
                }
@@ -430,7 +433,7 @@ print_format <<"EOM";
 <|GREEN Execution User:|>  $config{USER} ($config{UID})
 <|GREEN Socket Engine:|>   $config{SOCKETENGINE}
 
-To build with these settings run '<|GREEN make -j${\get_cpu_count} install|>' now.
+To build with these settings run '<|GREEN make -j${\(get_cpu_count() + 1)} install|>' now.
 
 EOM
 
@@ -533,6 +536,8 @@ EXTRA:      for my $extra (@extras) {
 sub enable_extras (@) {
        my (@extras) = @_;
        for my $extra (@extras) {
+               $extra = "m_$extra" unless $extra =~ /^m_/;
+               $extra = "$extra.cpp" unless $extra =~ /\.cpp$/;
                my $extrapath = "src/modules/extra/$extra";
                if (!-e $extrapath) {
                        print STDERR "Cannot enable \e[32;1m$extra\e[0m : No such file or directory in src/modules/extra\n";
@@ -568,6 +573,8 @@ sub disable_extras (@)
        closedir $dd;
        my (@extras) = @_;
 EXTRA: for my $extra (@extras) {
+               $extra = "m_$extra" unless $extra =~ /^m_/;
+               $extra = "$extra.cpp" unless $extra =~ /\.cpp$/;
                my $extrapath = "src/modules/extra/$extra";
                my $source = "src/modules/$extra";
                if (!-e $extrapath) {