Skip to content
Permalink
Browse files

Detect Clang 7, too.

Change-Id: Icbf20fb7919b5f69eecd36d64518b901b0e1eeb6
  • Loading branch information...
svenpanne committed Oct 25, 2018
1 parent 167db3b commit 3be223b3becb5f69a650b3e51f7c93ad5ce3c513
@@ -49,12 +49,12 @@ AS_IF([test "x$enable_rrd_is_thread_safe" != "xno"], [RRDLIB_TO_CHECK=rrd],
[RRDLIB_TO_CHECK=rrd_th])

# Checks for programs.
AC_PROG_CC([gcc-8 gcc-7 clang-6.0 clang-5.0 gcc clang])
AC_PROG_CC([gcc-8 clang-7 gcc-7 clang-6.0 clang-5.0 gcc clang])
AC_PROG_CC_C99([], [])
if test "x$ac_cv_prog_cc_c99" = xno; then
AC_MSG_ERROR([Need a C99-compliant C compiler])
fi
AC_PROG_CXX([g++-8 g++-7 clang++-6.0 clang++-5.0 g++ clang++])
AC_PROG_CXX([g++-8 clang++-7 g++-7 clang++-6.0 clang++-5.0 g++ clang++])
AC_DEFINE_UNQUOTED([BUILD_CXX], ["`$CXX --version | head -n1`"], [C++ compiler])
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
AC_PROG_RANLIB
@@ -23,7 +23,7 @@ build: check-python
tar xjf $(NAME)_$(VERSION).tar.bz2
# basically what part of AC_PROC_CXX does
@CXX="" ; \
for PROG in g++-8 g++-7 clang++-6.0 clang++-5.0 g++-6 clang++-4.0 g++-5 clang++-3.9 clang++-3.8 clang++-3.7 clang++-3.6 clang++-3.5 g++-4.9 g++ clang++; do \
for PROG in g++-8 clang++-7 g++-7 clang++-6.0 clang++-5.0 g++-6 clang++-4.0 g++-5 clang++-3.9 clang++-3.8 clang++-3.7 clang++-3.6 clang++-3.5 g++-4.9 g++ clang++; do \
echo -n "checking for $$PROG... "; SAVED_IFS=$$IFS; IFS=: ; \
for DIR in $$PATH; do \
IFS=$$SAVED_IFS ; \
@@ -37,7 +37,7 @@ $(DIR)/Makefile: $(DIR)/Makefile.in
#
#basically what part of AC_PROC_CXX does
@CXX="" ; \
for PROG in g++-8 g++-7 clang++-6.0 clang++-5.0 g++-6 clang++-4.0 g++-5 clang++-3.9 clang++-3.8 clang++-3.7 clang++-3.6 clang++-3.5 g++-4.9 g++ clang++; do \
for PROG in g++-8 clang++-7 g++-7 clang++-6.0 clang++-5.0 g++-6 clang++-4.0 g++-5 clang++-3.9 clang++-3.8 clang++-3.7 clang++-3.6 clang++-3.5 g++-4.9 g++ clang++; do \
echo -n "checking for $$PROG... "; SAVED_IFS=$$IFS; IFS=: ; \
for DIR in $$PATH; do \
IFS=$$SAVED_IFS ; \
@@ -51,7 +51,7 @@ sitecustomize.pyc: sitecustomize.py
# The compiler detection code below is basically what part of AC_PROC_CXX does.
bin/gcc:
@CC="" ; \
for PROG in gcc-8 gcc-7 clang-6.0 clang-5.0 gcc-6 clang-4.0 gcc-5 clang-3.9 clang-3.8 clang-3.7 clang-3.6 clang-3.5 gcc-4.9 gcc clang; do \
for PROG in gcc-8 clang-7 gcc-7 clang-6.0 clang-5.0 gcc-6 clang-4.0 gcc-5 clang-3.9 clang-3.8 clang-3.7 clang-3.6 clang-3.5 gcc-4.9 gcc clang; do \
echo -n "checking for $$PROG... "; SAVED_IFS=$$IFS; IFS=: ; \
for DIR in $$PATH; do \
IFS=$$SAVED_IFS ; \
@@ -68,7 +68,7 @@ bin/gcc:

bin/g++:
@CXX="" ; \
for PROG in g++-8 g++-7 clang++-6.0 clang++-5.0 g++-6 clang++-4.0 g++-5 clang++-3.9 clang++-3.8 clang++-3.7 clang++-3.6 clang++-3.5 g++-4.9 g++ clang++; do \
for PROG in g++-8 clang++-7 g++-7 clang++-6.0 clang++-5.0 g++-6 clang++-4.0 g++-5 clang++-3.9 clang++-3.8 clang++-3.7 clang++-3.6 clang++-3.5 g++-4.9 g++ clang++; do \
echo -n "checking for $$PROG... "; SAVED_IFS=$$IFS; IFS=: ; \
for DIR in $$PATH; do \
IFS=$$SAVED_IFS ; \
@@ -12,7 +12,7 @@ DIR = $(NAME)-$(VERSION)
build: unpack
# basically what part of AC_PROC_CXX does
@CXX="" ; \
for PROG in g++-8 g++-7 clang++-6.0 clang++-5.0 g++-6 clang++-4.0 g++-5 clang++-3.9 clang++-3.8 clang++-3.7 clang++-3.6 clang++-3.5 g++-4.9 g++ clang++; do \
for PROG in g++-8 clang++-7 g++-7 clang++-6.0 clang++-5.0 g++-6 clang++-4.0 g++-5 clang++-3.9 clang++-3.8 clang++-3.7 clang++-3.6 clang++-3.5 g++-4.9 g++ clang++; do \
echo -n "checking for $$PROG... "; SAVED_IFS=$$IFS; IFS=: ; \
for DIR in $$PATH; do \
IFS=$$SAVED_IFS ; \
@@ -25,6 +25,8 @@
# TODO(sp) We should really use autotools here...
ifneq ($(shell which g++-8 2>/dev/null),)
CXX := g++-8 -std=c++17
else ifneq ($(shell which clang++-7 2>/dev/null),)
CXX := clang++-7 -std=c++17
else ifneq ($(shell which g++-7 2>/dev/null),)
CXX := g++-7 -std=c++17
else ifneq ($(shell which clang++-6.0 2>/dev/null),)

0 comments on commit 3be223b

Please sign in to comment.
You can’t perform that action at this time.