#
# 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
#
# 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
push @socketengines, 'epoll' if test_header $compiler, 'sys/epoll.h';
push @socketengines, 'kqueue' if test_file $compiler, 'kqueue.cpp';
push @socketengines, 'poll' if test_header $compiler, 'poll.h';
push @socketengines, 'epoll' if test_header $compiler, 'sys/epoll.h';
push @socketengines, 'kqueue' if test_file $compiler, 'kqueue.cpp';
push @socketengines, 'poll' if test_header $compiler, 'poll.h';
foreach my $socketengine (@socketengines) {
say "Attempting to build using the $compiler compiler and the $socketengine socket engine...";
foreach my $socketengine (@socketengines) {
say "Attempting to build using the $compiler compiler and the $socketengine socket engine...";
- system './configure', '--enable-extras', $ENV{TEST_BUILD_MODULES} if defined $ENV{TEST_BUILD_MODULES};
- if (system './configure', '--development', '--socketengine', $socketengine) {
- say "Failed to configure using the $compiler compiler and the $socketengine socket engine!";
- exit 1;
+ my @configure_flags;
+ if (defined $ENV{TEST_BUILD_MODULES}) {
+ execute './configure', '--enable-extras', $ENV{TEST_BUILD_MODULES};
+ push @configure_flags, '--disable-auto-extras';
- $ENV{INSPIRCD_STATIC} = 1;
- if (system 'make', '-j'.get_cpu_count, 'install') {
- say "Failed to compile with static modules using the $compiler compiler and the $socketengine socket engine!";
+ if (execute './configure', '--development', '--socketengine', $socketengine, @configure_flags) {
+ say "Failed to configure using the $compiler compiler and the $socketengine socket engine!";
- delete $ENV{INSPIRCD_STATIC};
- if (system 'make', '-j'.get_cpu_count, 'install') {
- say "Failed to compile with dynamic modules using the $compiler compiler and the $socketengine socket engine!";
+ if (execute 'make', '--jobs', get_cpu_count() + 1, 'install') {
+ say "Failed to compile using the $compiler compiler and the $socketengine socket engine!";