diff --git a/Configure.pl b/Configure.pl index c3359d95d1e..c1726709296 100755 --- a/Configure.pl +++ b/Configure.pl @@ -17,6 +17,7 @@ my $lclang = lc $lang; my $uclang = uc $lang; my $win = $^O eq 'MSWin32'; +my $unix = is_OS_type_Unix(); my $slash = $win ? '\\' : '/'; # We don't use ExtUtils::Command in Configure.pl, but it is used in the Makefile # Try `use`ing it here so users know if they need to install this module @@ -148,11 +149,13 @@ $config{'runner_suffix'} = $win ? '.bat' : ''; my $make = 'make'; - if ($^O eq 'solaris') { - if (not -X '/usr/bin/gmake') { - die "gmake is required to compile rakudo. Please install by 'pkg install gnu-make'"; + if ($unix) { + my $has_make = 0 == system('make --version >/dev/null 2>&1'); + unless ($has_make) { + my $has_gmake = 0 == system('gmake --version >/dev/null 2>&1'); + die "gmake is required to compile rakudo. Please install it with your operating system's package manager or from source." unless $has_gmake; + $make = 'gmake'; } - $make = 'gmake'; } if ($win) { @@ -189,7 +192,7 @@ print $MAKEFILE "\n# Makefile code generated by Configure.pl:\n"; - if ( is_OS_type_Unix() ) { + if ($unix) { $config{mkpath} = 'mkdir -p --'; $config{chmod} = 'chmod --'; $config{cp} = 'cp --';