X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=configure;h=62f7b341bf06374c91e1d5ac1737b81c57972074;hb=51ff3d67ed1b6f1594373d3745293ef155a26f44;hp=696d94886023ae4c127a2e0af5e181252ff5929c;hpb=3ad1a0bad2c701e19792618264d01f551c59a1bd;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index 696d94886..62f7b341b 100755 --- a/configure +++ b/configure @@ -143,13 +143,19 @@ if ($interactive) { $config{CXX} = find_compiler($config{CXX} // $ENV{CXX}); unless ($config{CXX}) { - print "A suitable C++ compiler could not be detected on your system!\n"; - print "Set the CXX environment variable to the compiler binary path if this is incorrect.\n"; - exit 1; + say 'A suitable C++ compiler could not be detected on your system!'; + unless ($interactive) { + say 'Set the CXX environment variable to the path to a C++ compiler binary if this is incorrect.'; + exit 1; + } + until ($config{CXX}) { + my $compiler_path = prompt_string 1, 'Please enter the path to a C++ compiler binary:', 'c++'; + $config{CXX} = find_compiler $compiler_path; + } } my %compiler = get_compiler_info($config{CXX}); -$config{HAS_CLOCK_GETTIME} = run_test 'clock_gettime()', test_file($config{CXX}, 'clock_gettime.cpp', '-lrt'); +$config{HAS_CLOCK_GETTIME} = run_test 'clock_gettime()', test_file($config{CXX}, 'clock_gettime.cpp', $^O eq 'darwin' ? undef : '-lrt'); $config{HAS_EVENTFD} = run_test 'eventfd()', test_file($config{CXX}, 'eventfd.cpp'); if ($config{HAS_EPOLL} = run_test 'epoll', test_header($config{CXX}, 'sys/epoll.h')) {