Module: check_mk
Branch: master
Commit: 3bab5b0dd45e494e1488d24aae1c8cdda8b3caf3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3bab5b0dd45e49…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Jan 16 09:57:34 2018 +0100
Use our common hack: Detect the right C++ compiler.
Change-Id: I7a7ccb54cd16ae9008e16c435d8c6fec91395334
---
omd/packages/re2/Makefile | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/omd/packages/re2/Makefile b/omd/packages/re2/Makefile
index 808ec13..0dd8293 100644
--- a/omd/packages/re2/Makefile
+++ b/omd/packages/re2/Makefile
@@ -11,7 +11,20 @@ DIR = $(NAME)-$(VERSION)
build:
tar xzf $(DIR).tar.gz
- $(MAKE) -C $(DIR) DESTDIR=$(abspath dest) prefix=$(OMD_ROOT) install
+# basically what part of AC_PROC_CXX does
+ @CXX="" ; \
+ for PROG in g++-7 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 ; \
+ test -z "$$DIR" && DIR=. ; \
+ ABS_PROG="$$DIR/$$PROG" ; \
+ test -x "$$ABS_PROG" && { CXX="$$ABS_PROG"; echo
"$$CXX"; break 2; } ; \
+ done ; \
+ echo "no"; IFS=$$SAVED_IFS ; \
+ done ; \
+ test -z "$$CXX" && { echo "error: no C++ compiler found"
>&2 ; exit 1; } ; \
+ $(MAKE) -C $(DIR) CXX="$$CXX" DESTDIR=$(abspath dest) prefix=$(OMD_ROOT)
install
install: