Skip to content
Snippets Groups Projects
Commit 0d9c848e authored by Daniel Salzman's avatar Daniel Salzman
Browse files

configure: don't automatically disable fastparser with Clang compiler

parent 5f8b715f
Branches
Tags
No related merge requests found
......@@ -127,27 +127,9 @@ AM_CONDITIONAL([HAVE_LIBUTILS], test "$enable_utilities" != "no" -o \
######################
AC_ARG_ENABLE([fastparser],
AS_HELP_STRING([--disable-fastparser], [Disable use of fastest zone parser]),[],[
# Set zone parser type - fastest on release build, slowest on dev build
AS_IF([test -d ".git" -o "$PATCH_VERSION" = "dev"],[
enable_fastparser=no
],[
enable_fastparser=yes
])
])
AX_CC_CLANG
AS_IF([test "$enable_fastparser" = "yes"],[
AS_IF([test -n "$CC_CLANG_VERSION"],[
enable_fastparser=no
AC_MSG_WARN([Fast zone parser disabled due to possible compiler bug.])
AC_MSG_WARN([See https://llvm.org/bugs/show_bug.cgi?id=23490 for details.])
AC_MSG_WARN([Use --enable-fastparser=force if your know your clang is fixed.])
])
])
AS_IF([test "$enable_fastparser" = "force"],[enable_fastparser=yes])
AS_HELP_STRING([--disable-fastparser], [Disable use of fast zone parser]),
[], [AS_IF([test -d ".git"], [enable_fastparser=no], [enable_fastparser=yes])]
)
AM_CONDITIONAL([FAST_PARSER], [test "$enable_fastparser" = "yes"])
# GnuTLS crypto backend
......
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
])
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment