Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.
[oota-llvm.git] / autoconf / configure.ac
index c9bd8f25130fbc5adaf5c54e1b19083f25b8fca6..9b852d970ff372c4edd786d18a417ca04252af53 100644 (file)
@@ -31,7 +31,7 @@ dnl===
 dnl===-----------------------------------------------------------------------===
 dnl Initialize autoconf and define the package name, version number and
 dnl email address for reporting bugs.
-AC_INIT([[llvm]],[[2.5svn]],[llvmbugs@cs.uiuc.edu])
+AC_INIT([[llvm]],[[2.6svn]],[llvmbugs@cs.uiuc.edu])
 
 dnl Provide a copyright substitution and ensure the copyright notice is included
 dnl in the output of --version option of the generated configure script.
@@ -363,15 +363,15 @@ case "$enableval" in
 esac
 AC_DEFINE_UNQUOTED([ENABLE_THREADS],$ENABLE_THREADS,[Define if threads enabled])
 
-dnl Allow building with position independent code
+dnl Allow building without position independent code
 AC_ARG_ENABLE(pic,
   AS_HELP_STRING([--enable-pic],
-                 [Build LLVM with Position Independent Code (default is NO)]),,
+                 [Build LLVM with Position Independent Code (default is YES)]),,
                  enableval=default)
 case "$enableval" in
   yes) AC_SUBST(ENABLE_PIC,[1]) ;;
   no)  AC_SUBST(ENABLE_PIC,[0]) ;;
-  default) AC_SUBST(ENABLE_PIC,[0]) ;;
+  default) AC_SUBST(ENABLE_PIC,[1]) ;;
   *) AC_MSG_ERROR([Invalid setting for --enable-pic. Use "yes" or "no"]) ;;
 esac
 AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC,
@@ -514,6 +514,24 @@ case "$withval" in
   *) AC_MSG_ERROR([Invalid path for --with-ocaml-libdir. Provide full path]) ;;
 esac
 
+dnl Allow linking of LLVM with GPLv3 binutils code.
+AC_ARG_WITH(binutils-include,
+  AS_HELP_STRING([--with-binutils-include],
+    [Specify path to binutils/include/ containing plugin-api.h file for gold plugin.]),,
+  withval=default)
+case "$withval" in
+  default) WITH_BINUTILS_INCDIR=default ;;
+  /* | [[A-Za-z]]:[[\\/]]*)      WITH_BINUTILS_INCDIR=$withval ;;
+  *) AC_MSG_ERROR([Invalid path for --with-binutils-include. Provide full path]) ;;
+esac
+if test "x$WITH_BINUTILS_INCDIR" != xdefault ; then
+  AC_SUBST(BINUTILS_INCDIR,$WITH_BINUTILS_INCDIR)
+  if test ! -f "$WITH_BINUTILS_INCDIR/plugin-api.h"; then
+     echo "$WITH_BINUTILS_INCDIR/plugin-api.h"
+     AC_MSG_ERROR([Invalid path to directory containing plugin-api.h.]);
+  fi
+fi
+
 dnl===-----------------------------------------------------------------------===
 dnl===
 dnl=== SECTION 4: Check for programs we need and that they are the right version
@@ -524,8 +542,6 @@ dnl Check for compilation tools
 AC_PROG_CPP
 AC_PROG_CC(gcc)
 AC_PROG_CXX(g++)
-AC_PROG_FLEX
-AC_PROG_BISON
 
 AC_PROG_NM
 AC_SUBST(NM)
@@ -717,6 +733,10 @@ AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1],
                [Define if dlopen() is available on this platform.]),
                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]))
+
 dnl mallinfo is optional; the code can compile (minus features) without it
 AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1],
                [Define if mallinfo() is available on this platform.]))
@@ -773,12 +793,17 @@ AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h])
 AC_CHECK_HEADERS([sys/types.h malloc/malloc.h mach/mach.h])
 if test "$ENABLE_THREADS" -eq 1 ; then
   AC_CHECK_HEADERS(pthread.h,
-                  AC_SUBST(HAVE_PTHREAD, 1),
-                  AC_SUBST(HAVE_PTHREAD, 0))
+                   AC_SUBST(HAVE_PTHREAD, 1),
+                   AC_SUBST(HAVE_PTHREAD, 0))
 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===-----------------------------------------------------------------------===
 dnl===
 dnl=== SECTION 7: Check for types and structures
@@ -936,7 +961,7 @@ AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR",
 AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
                    [Time at which LLVM was configured])
 AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$host",
-                  [Host triple we were built on])
+                   [Host triple we were built on])
 
 # Determine which bindings to build.
 if test "$BINDINGS_TO_BUILD" = auto ; then