clang used on Linux only if explicitly enabled with option --with-clang
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 19 Oct 2017 13:55:34 +0000 (16:55 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 19 Oct 2017 13:55:34 +0000 (16:55 +0300)
configure.ac

index f88a985..f2873f5 100644 (file)
@@ -151,6 +151,12 @@ AC_ARG_WITH(runtime-state-dir,
    RUNTIME_STATE_DIR="$withval"
 ])
 
+AC_ARG_WITH(clang,
+[AS_HELP_STRING(--with-clang,use clang C++ compiler on Linux if available)],
+[
+       ALLOW_CLANG="yes"
+])
+
 AC_ARG_WITH(server,
 [AS_HELP_STRING(--with-server,build server)],
 [
@@ -1054,7 +1060,7 @@ if test "x$PLATFORM" = "xMinix"; then
        AC_CHECK_PROG([CC], [clang], [clang])
        AC_CHECK_PROG([CCC], [clang++], [clang++])
 fi
-if test "x$PLATFORM" = "xLinux"; then
+if test "x$PLATFORM" = "xLinux" -a "x$ALLOW_CLANG" = "xyes"; then
        AC_CHECK_PROG([CC], [clang], [clang])
        AC_CHECK_PROG([CCC], [clang++], [clang++])
 fi