# Define LLVM specific info and directories based on the autoconf variables
LLVMPackageName := @PACKAGE_TARNAME@
LLVMVersion := @PACKAGE_VERSION@
+LLVM_VERSION_MAJOR := @LLVM_VERSION_MAJOR@
+LLVM_VERSION_MINOR := @LLVM_VERSION_MINOR@
LLVM_CONFIGTIME := @LLVM_CONFIGTIME@
###########################################################################
# Target hardware architecture
ARCH=@ARCH@
TARGET_NATIVE_ARCH := $(ARCH)
+LLVM_NATIVE_ARCH := @LLVM_NATIVE_ARCH@
# Indicates, whether we're cross-compiling LLVM or not
LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@
PDFROFF := @PDFROFF@
ZIP := @ZIP@
+HAVE_LIBZ := @HAVE_LIBZ@
+HAVE_DLOPEN := @HAVE_DLOPEN@
HAVE_PTHREAD := @HAVE_PTHREAD@
+HAVE_TERMINFO := @HAVE_TERMINFO@
LIBS := @LIBS@
+# Targets that are possible to build
+ALL_TARGETS := @ALL_TARGETS@
+
# Targets that we should build
TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
+# Targets supporting JIT
+TARGETS_WITH_JIT := @TARGETS_WITH_JIT@
+
# Path to directory where object files should be stored during a build.
# Set OBJ_ROOT to "." if you do not want to use a separate place for
# object files.
# When ENABLE_WERROR is enabled, we'll pass -Werror on the command line
ENABLE_WERROR = @ENABLE_WERROR@
+# When ENABLE_TERMINFO is enabled, we use terminfo.
+ENABLE_TERMINFO = @ENABLE_TERMINFO@
+
# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
# into the "Release" directories. Otherwise, LLVM code is not optimized and
# output is put in the "Debug" directories.
dnl Initialize autoconf and define the package name, version number and
dnl address for reporting bugs.
AC_INIT([LLVM],[3.5svn],[http://llvm.org/bugs/])
-AC_DEFINE([LLVM_VERSION_MAJOR], [3], [Major version of the LLVM API])
-AC_DEFINE([LLVM_VERSION_MINOR], [5], [Minor version of the LLVM API])
+LLVM_DEFINE_SUBST([LLVM_VERSION_MAJOR], [3], [Major version of the LLVM API])
+LLVM_DEFINE_SUBST([LLVM_VERSION_MINOR], [5], [Minor version of the LLVM API])
dnl Provide a copyright substitution and ensure the copyright notice is included
dnl in the output of --version option of the generated configure script.
dnl Define a substitution, ARCH, for the target architecture
AC_SUBST(ARCH,$llvm_cv_target_arch)
+AC_SUBST(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCH)
dnl Determine what our host architecture.
dnl This will allow MCJIT regress tests runs only for supported
esac
fi
+TARGETS_WITH_JIT="AArch64 ARM Mips PowerPC SystemZ X86"
+AC_SUBST(TARGETS_WITH_JIT,$TARGETS_WITH_JIT)
+
dnl Allow enablement of building and installing docs
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
[Define to enable crash handling overrides])
fi
+dnl List all possible targets
+ALL_TARGETS="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600"
+AC_SUBST(ALL_TARGETS,$ALL_TARGETS)
+
dnl Allow specific targets to be specified for building (or not)
TARGETS_TO_BUILD=""
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
enableval=host
fi
case "$enableval" in
- all) TARGETS_TO_BUILD="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600" ;;
+ all) TARGETS_TO_BUILD="$ALL_TARGETS" ;;
*)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
case "$a_target" in
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
*) AC_MSG_ERROR([Invalid setting for --enable-terminfo. Use "yes" or "no"]) ;;
esac],
llvm_cv_enable_terminfo="yes")
+case "$llvm_cv_enable_terminfo" in
+ yes) AC_SUBST(ENABLE_TERMINFO,[1]) ;;
+ no) AC_SUBST(ENABLE_TERMINFO,[0]) ;;
+esac
dnl --enable-libedit: check whether the user wants to turn off libedit.
AC_ARG_ENABLE(libedit,AS_HELP_STRING(
fi
dnl dlopen() is required for plugin support.
-AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1],
+AC_SEARCH_LIBS(dlopen,dl,LLVM_DEFINE_SUBST([HAVE_DLOPEN],[1],
[Define if dlopen() is available on this platform.]),
AC_MSG_WARN([dlopen() not found - disabling plugin support]))
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(setupterm,tinfo terminfo curses ncurses ncursesw,
- AC_DEFINE([HAVE_TERMINFO],[1],
- [Define if the setupterm() function is supported this platform.]))
+ LLVM_DEFINE_SUBST([HAVE_TERMINFO],[1],
+ [Define if the setupterm() function is supported this platform.]))
fi
dnl The libedit library is optional; used by lib/LineEditor
build_alias
host_alias
target_alias
+LLVM_VERSION_MAJOR
+LLVM_VERSION_MINOR
LLVM_COPYRIGHT
CC
CFLAGS
LLVM_ON_UNIX
LLVM_ON_WIN32
ARCH
+LLVM_NATIVE_ARCH
HOST_ARCH
LLVM_CROSS_COMPILING
BUILD_CC
KEEP_SYMBOLS
JIT
TARGET_HAS_JIT
+TARGETS_WITH_JIT
ENABLE_DOCS
ENABLE_DOXYGEN
LLVM_ENABLE_THREADS
ENABLE_SHARED
ENABLE_EMBED_STDCXX
ENABLE_TIMESTAMPS
+ALL_TARGETS
TARGETS_TO_BUILD
LLVM_ENUM_TARGETS
LLVM_ENUM_ASM_PRINTERS
EXTRA_LD_OPTIONS
CLANG_SRC_ROOT
BINUTILS_INCDIR
+ENABLE_TERMINFO
INTERNAL_PREFIX
NM
ifGNUmake
NO_MAYBE_UNINITIALIZED
NO_UNINITIALIZED
PYTHON
+HAVE_DLOPEN
+HAVE_TERMINFO
USE_UDIS86
USE_OPROFILE
USE_INTEL_JITEVENTS
+
cat >>confdefs.h <<\_ACEOF
#define LLVM_VERSION_MAJOR 3
_ACEOF
+LLVM_VERSION_MAJOR='3'
+
+
+
cat >>confdefs.h <<\_ACEOF
#define LLVM_VERSION_MINOR 5
_ACEOF
+LLVM_VERSION_MINOR='5'
+
+
LLVM_COPYRIGHT="Copyright (c) 2003-2014 University of Illinois at Urbana-Champaign."
ARCH=$llvm_cv_target_arch
+LLVM_NATIVE_ARCH=$LLVM_NATIVE_ARCH
+
case $host in
i?86-*) host_arch="x86" ;;
esac
fi
+TARGETS_WITH_JIT="AArch64 ARM Mips PowerPC SystemZ X86"
+TARGETS_WITH_JIT=$TARGETS_WITH_JIT
+
+
# Check whether --enable-docs was given.
if test "${enable_docs+set}" = set; then
enableval=$enable_docs;
fi
+ALL_TARGETS="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600"
+ALL_TARGETS=$ALL_TARGETS
+
+
TARGETS_TO_BUILD=""
# Check whether --enable-targets was given.
if test "${enable_targets+set}" = set; then
enableval=host
fi
case "$enableval" in
- all) TARGETS_TO_BUILD="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600" ;;
+ all) TARGETS_TO_BUILD="$ALL_TARGETS" ;;
*)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
case "$a_target" in
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
llvm_cv_enable_terminfo="yes"
fi
+case "$llvm_cv_enable_terminfo" in
+ yes) ENABLE_TERMINFO=1
+ ;;
+ no) ENABLE_TERMINFO=0
+ ;;
+esac
# Check whether --enable-libedit was given.
if test "${enable_libedit+set}" = set; then
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10681 "configure"
+#line 10713 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
cat >>confdefs.h <<\_ACEOF
#define HAVE_DLOPEN 1
_ACEOF
+HAVE_DLOPEN='1'
+
+
else
{ echo "$as_me:$LINENO: WARNING: dlopen() not found - disabling plugin support" >&5
echo "$as_me: WARNING: dlopen() not found - disabling plugin support" >&2;}
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
cat >>confdefs.h <<\_ACEOF
#define HAVE_TERMINFO 1
_ACEOF
+HAVE_TERMINFO='1'
+
+
fi
fi
build_alias!$build_alias$ac_delim
host_alias!$host_alias$ac_delim
target_alias!$target_alias$ac_delim
+LLVM_VERSION_MAJOR!$LLVM_VERSION_MAJOR$ac_delim
+LLVM_VERSION_MINOR!$LLVM_VERSION_MINOR$ac_delim
LLVM_COPYRIGHT!$LLVM_COPYRIGHT$ac_delim
CC!$CC$ac_delim
CFLAGS!$CFLAGS$ac_delim
LLVM_ON_UNIX!$LLVM_ON_UNIX$ac_delim
LLVM_ON_WIN32!$LLVM_ON_WIN32$ac_delim
ARCH!$ARCH$ac_delim
+LLVM_NATIVE_ARCH!$LLVM_NATIVE_ARCH$ac_delim
HOST_ARCH!$HOST_ARCH$ac_delim
LLVM_CROSS_COMPILING!$LLVM_CROSS_COMPILING$ac_delim
BUILD_CC!$BUILD_CC$ac_delim
DEBUG_SYMBOLS!$DEBUG_SYMBOLS$ac_delim
KEEP_SYMBOLS!$KEEP_SYMBOLS$ac_delim
JIT!$JIT$ac_delim
-TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
-ENABLE_DOCS!$ENABLE_DOCS$ac_delim
-ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
+TARGETS_WITH_JIT!$TARGETS_WITH_JIT$ac_delim
+ENABLE_DOCS!$ENABLE_DOCS$ac_delim
+ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
LLVM_ENABLE_THREADS!$LLVM_ENABLE_THREADS$ac_delim
ENABLE_PTHREADS!$ENABLE_PTHREADS$ac_delim
LLVM_ENABLE_ZLIB!$LLVM_ENABLE_ZLIB$ac_delim
ENABLE_SHARED!$ENABLE_SHARED$ac_delim
ENABLE_EMBED_STDCXX!$ENABLE_EMBED_STDCXX$ac_delim
ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
+ALL_TARGETS!$ALL_TARGETS$ac_delim
TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim
LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim
EXTRA_LD_OPTIONS!$EXTRA_LD_OPTIONS$ac_delim
CLANG_SRC_ROOT!$CLANG_SRC_ROOT$ac_delim
BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim
+ENABLE_TERMINFO!$ENABLE_TERMINFO$ac_delim
INTERNAL_PREFIX!$INTERNAL_PREFIX$ac_delim
NM!$NM$ac_delim
ifGNUmake!$ifGNUmake$ac_delim
NO_MAYBE_UNINITIALIZED!$NO_MAYBE_UNINITIALIZED$ac_delim
NO_UNINITIALIZED!$NO_UNINITIALIZED$ac_delim
PYTHON!$PYTHON$ac_delim
+HAVE_DLOPEN!$HAVE_DLOPEN$ac_delim
+HAVE_TERMINFO!$HAVE_TERMINFO$ac_delim
USE_UDIS86!$USE_UDIS86$ac_delim
USE_OPROFILE!$USE_OPROFILE$ac_delim
USE_INTEL_JITEVENTS!$USE_INTEL_JITEVENTS$ac_delim
LLVM_DATADIR!$LLVM_DATADIR$ac_delim
LLVM_DOCSDIR!$LLVM_DOCSDIR$ac_delim
LLVM_ETCDIR!$LLVM_ETCDIR$ac_delim
-LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim
-LLVM_INFODIR!$LLVM_INFODIR$ac_delim
-LLVM_MANDIR!$LLVM_MANDIR$ac_delim
-LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim
-BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim
-ALL_BINDINGS!$ALL_BINDINGS$ac_delim
-OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim
-ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim
+LLVM_INFODIR!$LLVM_INFODIR$ac_delim
+LLVM_MANDIR!$LLVM_MANDIR$ac_delim
+LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim
+BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim
+ALL_BINDINGS!$ALL_BINDINGS$ac_delim
+OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim
+ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
RPATH!$RPATH$ac_delim
RDYNAMIC!$RDYNAMIC$ac_delim
program_prefix!$program_prefix$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 5; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5