diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:53:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:53:35 +0000 |
commit | 69c6a41ffb878ef98c9378ed4b1634a404cfaa7f (patch) | |
tree | b2a4f704565d62fbb129ab9dc3b35977c50e6e7f /m4/ax_cc_clang.m4 | |
parent | Initial commit. (diff) | |
download | knot-upstream.tar.xz knot-upstream.zip |
Adding upstream version 2.7.6.upstream/2.7.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | m4/ax_cc_clang.m4 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/m4/ax_cc_clang.m4 b/m4/ax_cc_clang.m4 new file mode 100644 index 0000000..abf2991 --- /dev/null +++ b/m4/ax_cc_clang.m4 @@ -0,0 +1,18 @@ +dnl Check to see if the C compiler is clang and which version it is +dnl +AC_DEFUN([AX_CC_CLANG],[ + AC_REQUIRE([AC_PROG_CC]) + AC_MSG_CHECKING([whether C compiler is clang]) + CC_CLANG_VERSION=$( + $CC -x c -dM -E /dev/null | \ + $GREP '__clang_version__' | \ + $GREP -o '".*"' | \ + $SED 's/^"\(.*\)"$/\1/g' + ) + AC_SUBST([CC_CLANG_VERSION]) + if test -n "$CC_CLANG_VERSION"; then + AC_MSG_RESULT([$CC_CLANG_VERSION]) + else + AC_MSG_RESULT([no]) + fi + ]) |