llvm.org GIT mirror llvm / 84bd075
Add a flag to permit disabling libffi. Also, there were a bunch of flags with no text in --help because the square brackets were in the wrong place. I've fixed those too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72989 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 11 years ago
1 changed file(s) with 23 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
278278
279279 dnl --enable-optimized : check whether they want to do an optimized build:
280280 AC_ARG_ENABLE(optimized, AS_HELP_STRING(
281 [--enable-optimized,Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
281 --enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
282282 if test ${enableval} = "no" ; then
283283 AC_SUBST(ENABLE_OPTIMIZED,[[]])
284284 else
287287
288288 dnl --enable-profiling : check whether they want to do a profile build:
289289 AC_ARG_ENABLE(profiling, AS_HELP_STRING(
290 [--enable-profiling,Compile with profiling enabled (default is NO)]),,enableval="no")
290 --enable-profiling,[Compile with profiling enabled (default is NO)]),,enableval="no")
291291 if test ${enableval} = "no" ; then
292292 AC_SUBST(ENABLE_PROFILING,[[]])
293293 else
296296
297297 dnl --enable-assertions : check whether they want to turn on assertions or not:
298298 AC_ARG_ENABLE(assertions,AS_HELP_STRING(
299 [--enable-assertions,Compile with assertion checks enabled (default is YES)]),, enableval="yes")
299 --enable-assertions,[Compile with assertion checks enabled (default is YES)]),, enableval="yes")
300300 if test ${enableval} = "yes" ; then
301301 AC_SUBST(DISABLE_ASSERTIONS,[[]])
302302 else
305305
306306 dnl --enable-expensive-checks : check whether they want to turn on expensive debug checks:
307307 AC_ARG_ENABLE(expensive-checks,AS_HELP_STRING(
308 [--enable-expensive-checks,Compile with expensive debug checks enabled (default is NO)]),, enableval="no")
308 --enable-expensive-checks,[Compile with expensive debug checks enabled (default is NO)]),, enableval="no")
309309 if test ${enableval} = "yes" ; then
310310 AC_SUBST(ENABLE_EXPENSIVE_CHECKS,[[ENABLE_EXPENSIVE_CHECKS=1]])
311311 AC_SUBST(EXPENSIVE_CHECKS,[[yes]])
316316
317317 dnl --enable-debug-runtime : should runtime libraries have debug symbols?
318318 AC_ARG_ENABLE(debug-runtime,
319 AS_HELP_STRING([--enable-debug-runtime,Build runtime libs with debug symbols (default is NO)]),,enableval=no)
319 AS_HELP_STRING(--enable-debug-runtime,[Build runtime libs with debug symbols (default is NO)]),,enableval=no)
320320 if test ${enableval} = "no" ; then
321321 AC_SUBST(DEBUG_RUNTIME,[[]])
322322 else
552552 fi
553553 fi
554554
555 dnl --enable-libffi : check whether the user wants to turn off libffi:
556 AC_ARG_ENABLE(libffi,AS_HELP_STRING(
557 --enable-libffi,[Check for the presence of libffi (default is YES)]),,
558 enableval=yes)
559 case "$enableval" in
560 yes) llvm_cv_enable_libffi="yes" ;;
561 no) llvm_cv_enable_libffi="no" ;;
562 *) AC_MSG_ERROR([Invalid setting for --enable-libffi. Use "yes" or "no"]) ;;
563 esac
564
555565 dnl===-----------------------------------------------------------------------===
556566 dnl===
557567 dnl=== SECTION 4: Check for programs we need and that they are the right version
768778 AC_MSG_WARN([dlopen() not found - disabling plugin support]))
769779
770780 dnl libffi is optional; used to call external functions from the interpreter
771 AC_SEARCH_LIBS(ffi_call,ffi,AC_DEFINE([HAVE_FFI_CALL],[1],
772 [Define if libffi is available on this platform.]),
773 AC_MSG_WARN([libffi not found - disabling external calls from interpreter]))
781 if test "$llvm_cv_enable_libffi" = "yes" ; then
782 AC_SEARCH_LIBS(ffi_call,ffi,AC_DEFINE([HAVE_FFI_CALL],[1],
783 [Define if libffi is available on this platform.]),
784 AC_MSG_WARN([libffi not found - disabling external calls from interpreter]))
785 fi
774786
775787 dnl mallinfo is optional; the code can compile (minus features) without it
776788 AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1],
835847 fi
836848
837849 dnl Try to find ffi.h.
838 AC_CHECK_HEADERS([ffi.h ffi/ffi.h])
850 if test "$llvm_cv_enable_libffi" = "yes" ; then
851 AC_CHECK_HEADERS([ffi.h ffi/ffi.h])
852 fi
839853
840854 dnl===-----------------------------------------------------------------------===
841855 dnl===