AC_SUBST(LLVM_CROSS_COMPILING, [0])
fi
-dnl Check to see if there's a "CVS" (or .svn) directory indicating that this
-dnl build is being done from a checkout. This sets up several defaults for the
-dnl command line switches. When we build with a CVS directory, we get a
-dnl debug with assertions turned on. Without, we assume a source release and we
-dnl get an optimized build without assertions. See --enable-optimized and
-dnl --enable-assertions below
-if test -d "CVS" -o -d "${srcdir}/CVS" -o -d ".svn" -o -d "${srcdir}/.svn"; then
+dnl Check to see if there's a "CVS" (or .svn or .git) directory indicating
+dnl that this build is being done from a checkout. This sets up several
+dnl defaults for the command line switches. When we build with a CVS directory,
+dnl we get a debug with assertions turned on. Without, we assume a source
+dnl release and we get an optimized build without assertions.
+dnl See --enable-optimized and --enable-assertions below
+if test -d "CVS" -o -d "${srcdir}/CVS" -o -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then
cvsbuild="yes"
optimize="no"
AC_SUBST(CVSBUILD,[[CVSBUILD=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],
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===