dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,
dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc).
-${CFLAGS=}
-${CXXFLAGS=}
+: ${CFLAGS=}
+: ${CXXFLAGS=}
dnl We need to check for the compiler up here to avoid anything else
dnl starting with a different one.
enableval="yes")
case "$enableval" in
yes) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[1]) ;;
- no) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[0]) ;;
+ no)
+ if test ${clang_arcmt} != "no" ; then
+ AC_MSG_ERROR([Cannot enable clang ARC Migration Tool while disabling static analyzer.])
+ fi
+ AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[0])
+ ;;
default) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[1]);;
*) AC_MSG_ERROR([Invalid setting for --enable-clang-static-analyzer. Use "yes" or "no"]) ;;
esac
AC_DEFINE_UNQUOTED([ENABLE_TIMESTAMPS],$ENABLE_TIMESTAMPS,
[Define if timestamp information (e.g., __DATE__) is allowed])
-dnl Enable embedding timestamp information into build.
+dnl Enable support for showing backtraces.
+AC_ARG_ENABLE(backtraces, AS_HELP_STRING(
+ [--enable-backtraces],
+ [Enable embedding backtraces on crash (default is YES)]),
+ [case "$enableval" in
+ yes) llvm_cv_enable_backtraces="yes" ;;
+ no) llvm_cv_enable_backtraces="no" ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-backtraces. Use "yes" or "no"]) ;;
+ esac],
+ llvm_cv_enable_backtraces="yes")
+if test "$llvm_cv_enable_backtraces" = "yes" ; then
+ AC_DEFINE([ENABLE_BACKTRACES],[1],
+ [Define if you want backtraces on crash])
+fi
-AC_ARG_ENABLE(backtraces,
- AS_HELP_STRING([--enable-backtraces],
- [Enable embedding backtraces on crash (default is YES)]),,
- enableval=default)
-case "$enableval" in
- yes) AC_SUBST(ENABLE_BACKTRACES,[1]) ;;
- no) AC_SUBST(ENABLE_BACKTRACES,[0]) ;;
- default) AC_SUBST(ENABLE_BACKTRACES,[1]) ;;
- *) AC_MSG_ERROR([Invalid setting for --enable-backtraces. Use "yes" or "no"]) ;;
-esac
-AC_DEFINE_UNQUOTED([ENABLE_BACKTRACES],$ENABLE_BACKTRACES,
- [Define if you want backtraces on crash])
+dnl Enable installing platform specific signal handling overrides, for improved
+dnl CrashRecovery support or interaction with crash reporting software. This
+dnl support may be inappropriate for some clients embedding LLVM as a library.
+AC_ARG_ENABLE(crash-overrides, AS_HELP_STRING(
+ [--enable-crash-overrides],
+ [Enable crash handling overrides (default is YES)]),
+ [case "$enableval" in
+ yes) llvm_cv_enable_crash_overrides="yes" ;;
+ no) llvm_cv_enable_crash_overrides="no" ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-crash-overrides. Use "yes" or "no"]) ;;
+ esac],
+ llvm_cv_enable_crash_overrides="yes")
+if test "$llvm_cv_enable_crash_overrides" = "yes" ; then
+ AC_DEFINE([ENABLE_CRASH_OVERRIDES],[1],
+ [Define to enable crash handling overrides])
+fi
dnl Allow specific targets to be specified for building (or not)
TARGETS_TO_BUILD=""
AC_DEFINE_UNQUOTED(BUG_REPORT_URL,"$withval",
[Bug report URL.])
-dnl --enable-curses: check whether the user wants to control use of curses:
-AC_ARG_ENABLE(curses,AS_HELP_STRING(
- [--enable-curses],
- [Use curses for querying terminal infomation if available (default is YES)]),
+dnl --enable-terminfo: check whether the user wants to control use of terminfo:
+AC_ARG_ENABLE(terminfo,AS_HELP_STRING(
+ [--enable-terminfo],
+ [Query the terminfo database if available (default is YES)]),
[case "$enableval" in
- yes) llvm_cv_enable_curses="yes" ;;
- no) llvm_cv_enable_curses="no" ;;
- *) AC_MSG_ERROR([Invalid setting for --enable-curses. Use "yes" or "no"]) ;;
+ yes) llvm_cv_enable_terminfo="yes" ;;
+ no) llvm_cv_enable_terminfo="no" ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-terminfo. Use "yes" or "no"]) ;;
esac],
- llvm_cv_enable_curses="yes")
+ llvm_cv_enable_terminfo="yes")
dnl --enable-libffi : check whether the user wants to turn off libffi:
AC_ARG_ENABLE(libffi,AS_HELP_STRING(
AC_SEARCH_LIBS(clock_gettime,rt)
dnl The curses library is optional; used for querying terminal info
-if test "$llvm_cv_enable_curses" = "yes" ; then
+if test "$llvm_cv_enable_terminfo" = "yes" ; then
dnl We need the has_color functionality in curses for it to be useful.
- AC_SEARCH_LIBS(has_colors,curses ncurses ncursesw,
- AC_DEFINE([HAVE_CURSES],[1],
- [Define if curses provides the has_color() function on this platform.]))
+ AC_SEARCH_LIBS(setupterm,tinfo terminfo curses ncurses ncursesw,
+ AC_DEFINE([HAVE_TERMINFO],[1],
+ [Define if the setupterm() function is supported this platform.]))
fi
dnl libffi is optional; used to call external functions from the interpreter
AC_SUBST(HAVE_LIBZ, 0)
fi
-dnl Try to find a suitable curses header.
-if test "$llvm_cv_enable_curses" = "yes" ; then
- AC_CHECK_HEADERS([curses.h ncurses.h ncursesw.h ncurses/curses.h ncursesw/curses.h])
-fi
-
dnl Try to find ffi.h.
if test "$llvm_cv_enable_libffi" = "yes" ; then
AC_CHECK_HEADERS([ffi.h ffi/ffi.h])