configure: Introduce CLANG variable
authorHilko Bengen <bengen@debian.org>
Tue, 22 Jan 2019 17:10:47 +0000 (18:10 +0100)
committerSascha Steinbiss <satta@debian.org>
Thu, 28 Apr 2022 06:51:06 +0000 (07:51 +0100)
Gbp-Pq: Name configure-clang-variable.patch

configure.ac

index 71ee73c4c275308c339c976ad9d03ceb7e1cf0e2..c5fe251edb80f5fe9b1c5810032c1e38e2447e69 100644 (file)
 
     AC_SUBST([CLANG])
 
+    AC_ARG_WITH([clang],
+                [CLANG compiler],
+                [CLANG="$withval"],
+                [AS_IF([test "$compiler" = clang],
+                       [CLANG="$CC"],
+                       [AC_PATH_PROG([CLANG],[clang])])])
+
+    AC_SUBST([CLANG])
+
     case "$compiler" in
         clang)
             CLANG_CFLAGS="-Wextra -Werror-implicit-function-declaration -Wno-error=unused-command-line-argument"