summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRalf Nolden <nolden@kde.org>2016-05-26 08:36:57 +0200
committerRalf Nolden <nolden@kde.org>2016-05-27 19:40:51 +0000
commit614e86f564450fd31de39d3288866332298802c0 (patch)
treec08c3b24982287af395b21cfe837acaf37f94328 /configure
parentc85f988fc785690ade283305181de8e7256d4040 (diff)
Platform detection: Use freebsd-g++ on systems < 10, otherwise -clang
FreeBSD uses gcc as the default compiler until FreeBSD 10 where it was switched to clang for the whole system. Choose freebsd-clang for any system release > 10, otherwise choose freebsd-g++ by default. Change-Id: I2bf38aa027453c25ed2a29d587c2962ded5fcd4a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 11 insertions, 4 deletions
diff --git a/configure b/configure
index 0e0a36b00f..d175ed32b5 100755
--- a/configure
+++ b/configure
@@ -2859,10 +2859,17 @@ if [ -z "$PLATFORM" ]; then
PLATFORM=ultrix-g++
;;
FreeBSD:*)
- PLATFORM=freebsd-clang
- PLATFORM_NOTES="
- - Also available for FreeBSD: freebsd-g++
- "
+ if [ "$(uname -r | cut -d. -f1)" -ge 10 ]; then
+ PLATFORM=freebsd-clang
+ PLATFORM_NOTES="
+ - Also available for FreeBSD: freebsd-g++
+ "
+ else
+ PLATFORM=freebsd-g++
+ PLATFORM_NOTES="
+ - Also available for FreeBSD: freebsd-clang
+ "
+ fi
;;
OpenBSD:*)
PLATFORM=openbsd-g++