diff options
author | Peter Powell <petpow@saberuk.com> | 2013-07-04 18:46:46 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-07-05 07:12:02 +0100 |
commit | 90a068af714dac058fba97e1b413dc8c0dbd5bcf (patch) | |
tree | 5f625e430edcc2c1f4d2c2b49c89064786c33361 | |
parent | 77a08e490c340ffeca089fb15043490f1ce4b7de (diff) |
Rename configuration variable to CXX to match everything else.
-rwxr-xr-x | configure | 24 | ||||
-rw-r--r-- | make/template/main.mk | 2 |
2 files changed, 13 insertions, 13 deletions
@@ -234,14 +234,14 @@ if ($config{OSNAME} =~ /darwin/i) $config{STARTSCRIPT} = "org.inspircd.plist"; # start script for OSX. } -$config{CC} = defined $ENV{CXX} && !system("$ENV{CXX} -v > /dev/null 2>&1") ? $ENV{CXX} : find_compiler(); -if ($config{CC} eq "") { +$config{CXX} = defined $ENV{CXX} && !system("$ENV{CXX} -v > /dev/null 2>&1") ? $ENV{CXX} : find_compiler(); +if ($config{CXX} eq "") { print "A C++ compiler could not be detected on your system!\n"; print "Set the CXX environment variable to the full path if this is incorrect.\n"; exit 1; } -our %cxx = get_compiler_info($config{CC}); +our %cxx = get_compiler_info($config{CXX}); if ($cxx{UNSUPPORTED}) { print "Your C++ compiler is too old to build InspIRCd!\n"; print "Reason: $cxx{REASON}\n"; @@ -301,7 +301,7 @@ $config{SYSTEM} = lc $^O; print "Checking operating system version... $config{SYSTEM}\n"; print "Checking whether <stdint.h> exists... "; -if (test_header($config{CC}, "stdint.h")) { +if (test_header($config{CXX}, "stdint.h")) { $config{HAS_STDINT} = "true"; print "yes\n"; } else { @@ -310,7 +310,7 @@ if (test_header($config{CC}, "stdint.h")) { } printf "Checking whether clock_gettime() exists... "; -if (test_file($config{CC}, "clock_gettime.cpp", "-lrt")) { +if (test_file($config{CXX}, "clock_gettime.cpp", "-lrt")) { $config{HAS_CLOCK_GETTIME} = "true"; print "yes\n"; } else { @@ -319,7 +319,7 @@ if (test_file($config{CC}, "clock_gettime.cpp", "-lrt")) { } printf "Checking whether eventfd() exists... "; -if (test_file($config{CC}, "eventfd.cpp")) { +if (test_file($config{CXX}, "eventfd.cpp")) { $config{HAS_EVENTFD} = "true"; print "yes\n"; } else { @@ -328,10 +328,10 @@ if (test_file($config{CC}, "eventfd.cpp")) { } printf "Checking if a TCP deferring mechanism is available... "; -if (test_file($config{CC}, "tcp_defer_accept.cpp")) { +if (test_file($config{CXX}, "tcp_defer_accept.cpp")) { $config{HAS_DEFER} = "TCP_DEFER_ACCEPT"; print "yes (TCP_DEFER_ACCEPT)\n"; -} elsif (test_file($config{CC}, "so_acceptfilter.cpp")) { +} elsif (test_file($config{CXX}, "so_acceptfilter.cpp")) { $config{HAS_DEFER} = "SO_ACCEPTFILTER"; print "yes (SO_ACCEPTFILTER)\n"; } else { @@ -340,15 +340,15 @@ if (test_file($config{CC}, "tcp_defer_accept.cpp")) { } print "Checking whether epoll is available... "; -$has_epoll = test_header($config{CC}, "sys/epoll.h"); +$has_epoll = test_header($config{CXX}, "sys/epoll.h"); print $has_epoll ? "yes\n" : "no\n"; print "Checking whether Kqueue is available... "; -$has_kqueue = test_file($config{CC}, "kqueue.cpp"); +$has_kqueue = test_file($config{CXX}, "kqueue.cpp"); print $has_kqueue ? "yes\n" : "no\n"; print 'Checking whether Solaris IOCP is available... '; -$has_ports = test_header($config{CC}, 'port.h'); +$has_ports = test_header($config{CXX}, 'port.h'); print $has_ports ? "yes\n" : "no\n"; $config{HAS_EPOLL} = $has_epoll; @@ -884,7 +884,7 @@ EOF $config{BUILD_DIR} ||= resolve_directory($config{ME}."/build"); for my $var (qw( - CC SYSTEM BASE_DIR CONFIG_DIR MODULE_DIR BINARY_DIR BUILD_DIR DATA_DIR UID + CXX SYSTEM BASE_DIR CONFIG_DIR MODULE_DIR BINARY_DIR BUILD_DIR DATA_DIR UID STARTSCRIPT DESTINATION SOCKETENGINE )) { s/\@$var\@/$config{$var}/g; diff --git a/make/template/main.mk b/make/template/main.mk index fd094b578..5350e113e 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -30,7 +30,7 @@ # -CXX = @CC@ +CXX = @CXX@ SYSTEM = @SYSTEM@ BUILDPATH = @BUILD_DIR@ SOCKETENGINE = @SOCKETENGINE@ |