diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-04-13 04:26:06 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-04-13 04:26:06 +0000 |
commit | 93f70fc291c56287bff7aefd924d171f005fdcc7 (patch) | |
tree | c5f3e34b7e3680a7c47a6b91babe353e9b16f6dc /autoconf | |
parent | ef5facd90de2e6c91a8630b8982e80c709656872 (diff) | |
download | external_llvm-93f70fc291c56287bff7aefd924d171f005fdcc7.zip external_llvm-93f70fc291c56287bff7aefd924d171f005fdcc7.tar.gz external_llvm-93f70fc291c56287bff7aefd924d171f005fdcc7.tar.bz2 |
Link against libffi if available, fall back to "no external calls from
interpreter mode" when it's not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index fb89e41..6441eaa 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -737,8 +737,9 @@ AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1], AC_MSG_WARN([dlopen() not found - disabling plugin support])) dnl libffi is optional; used to call external functions from the interpreter -AC_CHECK_LIB(ffi,ffi_call,[have_libffi=1], - AC_MSG_WARN([libffi not found - disabling external calls from interpreter])) +AC_SEARCH_LIBS(ffi_call,ffi,AC_DEFINE([HAVE_FFI_CALL],[1], + [Define if libffi is available on this platform.]), + AC_MSG_WARN([libffi not found - disabling external calls from interpreter])) dnl mallinfo is optional; the code can compile (minus features) without it AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1], @@ -802,10 +803,8 @@ else AC_SUBST(HAVE_PTHREAD, 0) fi -dnl Once we know we have libffi, try to find ffi.h. -if test -n "$have_libffi" ; then - AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [AC_SUBST(HAVE_FFI, 1)]) -fi +dnl Try to find ffi.h. +AC_CHECK_HEADERS([ffi.h ffi/ffi.h]) dnl===-----------------------------------------------------------------------=== dnl=== |