Skip to content
configure 659 KiB
Newer Older
cat >>confdefs.h <<\_ACEOF
#define LLVM_ON_WIN32 1
_ACEOF
{ echo "$as_me:$LINENO: checking target architecture" >&5
echo $ECHO_N "checking target architecture... $ECHO_C" >&6; }
if test "${llvm_cv_target_arch+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
Torok Edwin's avatar
Torok Edwin committed
else
  case $target in
  i?86-*)                 llvm_cv_target_arch="x86" ;;
  amd64-* | x86_64-*)     llvm_cv_target_arch="x86_64" ;;
  sparc*-*)               llvm_cv_target_arch="Sparc" ;;
  powerpc*-*)             llvm_cv_target_arch="PowerPC" ;;
  arm*-*)                 llvm_cv_target_arch="ARM" ;;
  aarch64*-*)             llvm_cv_target_arch="AArch64" ;;
  mips-* | mips64-*)      llvm_cv_target_arch="Mips" ;;
  mipsel-* | mips64el-*)  llvm_cv_target_arch="Mips" ;;
  xcore-*)                llvm_cv_target_arch="XCore" ;;
  msp430-*)               llvm_cv_target_arch="MSP430" ;;
Tony Linthicum's avatar
Tony Linthicum committed
  hexagon-*)              llvm_cv_target_arch="Hexagon" ;;
Ulrich Weigand's avatar
 
Ulrich Weigand committed
  s390x-*)                llvm_cv_target_arch="SystemZ" ;;
Torok Edwin's avatar
Torok Edwin committed
fi
{ echo "$as_me:$LINENO: result: $llvm_cv_target_arch" >&5
echo "${ECHO_T}$llvm_cv_target_arch" >&6; }
if test "$llvm_cv_target_arch" = "Unknown" ; then
  { echo "$as_me:$LINENO: WARNING: Configuring LLVM for an unknown target archicture" >&5
echo "$as_me: WARNING: Configuring LLVM for an unknown target archicture" >&2;}
Torok Edwin's avatar
Torok Edwin committed
fi
case "$llvm_cv_target_arch" in
    x86)     LLVM_NATIVE_ARCH="X86" ;;
    x86_64)  LLVM_NATIVE_ARCH="X86" ;;
    *)       LLVM_NATIVE_ARCH="$llvm_cv_target_arch" ;;
esac
case $host in
  i?86-*)                 host_arch="x86" ;;
  amd64-* | x86_64-*)     host_arch="x86_64" ;;
  sparc*-*)               host_arch="Sparc" ;;
  powerpc*-*)             host_arch="PowerPC" ;;
  arm*-*)                 host_arch="ARM" ;;
  aarch64*-*)             host_arch="AArch64" ;;
  mips-* | mips64-*)      host_arch="Mips" ;;
  mipsel-* | mips64el-*)  host_arch="Mips" ;;
  xcore-*)                host_arch="XCore" ;;
  msp430-*)               host_arch="MSP430" ;;
  hexagon-*)              host_arch="Hexagon" ;;
Ulrich Weigand's avatar
 
Ulrich Weigand committed
  s390x-*)                host_arch="SystemZ" ;;
  *)                      host_arch="Unknown" ;;
esac

if test "$host_arch" = "Unknown" ; then
  { echo "$as_me:$LINENO: WARNING: Configuring LLVM for an unknown host archicture" >&5
echo "$as_me: WARNING: Configuring LLVM for an unknown host archicture" >&2;}
fi

HOST_ARCH=$host_arch


if test "$cross_compiling" = yes; then
  LLVM_CROSS_COMPILING=1
{ echo "$as_me:$LINENO: checking for executable suffix on build platform" >&5
echo $ECHO_N "checking for executable suffix on build platform... $ECHO_C" >&6; }
if test "${ac_cv_build_exeext+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
else
  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  ac_cv_build_exeext=.exe
else
  ac_build_prefix=${build_alias}-

  # Extract the first word of "${ac_build_prefix}gcc", so it can be a program name with args.
set dummy ${ac_build_prefix}gcc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_BUILD_CC+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
else
  if test -n "$BUILD_CC"; then
  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_BUILD_CC="${ac_build_prefix}gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
Torok Edwin's avatar
Torok Edwin committed
fi
fi
BUILD_CC=$ac_cv_prog_BUILD_CC
if test -n "$BUILD_CC"; then
  { echo "$as_me:$LINENO: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6; }
Torok Edwin's avatar
Torok Edwin committed
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
Torok Edwin's avatar
Torok Edwin committed
fi
  if test -z "$BUILD_CC"; then
     # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_BUILD_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$BUILD_CC"; then
  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_BUILD_CC="gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
BUILD_CC=$ac_cv_prog_BUILD_CC
if test -n "$BUILD_CC"; then
  { echo "$as_me:$LINENO: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
Torok Edwin's avatar
Torok Edwin committed
fi
     if test -z "$BUILD_CC"; then
       # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_BUILD_CC+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
else
  if test -n "$BUILD_CC"; then
  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_BUILD_CC="cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_BUILD_CC
  shift
  if test $# != 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set BUILD_CC to just the basename; use the full file name.
    shift
    ac_cv_prog_BUILD_CC="$as_dir/$ac_word${1+' '}$@"
  fi
fi
BUILD_CC=$ac_cv_prog_BUILD_CC
if test -n "$BUILD_CC"; then
  { echo "$as_me:$LINENO: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6; }
Torok Edwin's avatar
Torok Edwin committed
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
Torok Edwin's avatar
Torok Edwin committed
fi
     fi
  fi
  test -z "$BUILD_CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }
  ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  rm -f conftest*
  echo 'int main () { return 0; }' > conftest.$ac_ext
  ac_cv_build_exeext=
  if { (eval echo "$as_me:$LINENO: \"$ac_build_link\"") >&5
  (eval $ac_build_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
    for file in conftest.*; do
      case $file in
      *.c | *.o | *.obj | *.dSYM) ;;
      *) ac_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
      esac
    done
  else
    { { echo "$as_me:$LINENO: error: installation or configuration problem: compiler cannot create executables." >&5
echo "$as_me: error: installation or configuration problem: compiler cannot create executables." >&2;}
   { (exit 1); exit 1; }; }
  fi
  rm -f conftest*
  test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank
fi
BUILD_EXEEXT=""
test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext}
{ echo "$as_me:$LINENO: result: ${ac_cv_build_exeext}" >&5
echo "${ECHO_T}${ac_cv_build_exeext}" >&6; }
ac_build_exeext=$BUILD_EXEEXT
  ac_build_prefix=${build_alias}-
  # Extract the first word of "${ac_build_prefix}g++", so it can be a program name with args.
set dummy ${ac_build_prefix}g++; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_BUILD_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$BUILD_CXX"; then
  ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_BUILD_CXX="${ac_build_prefix}g++"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS
fi
fi
BUILD_CXX=$ac_cv_prog_BUILD_CXX
if test -n "$BUILD_CXX"; then
  { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5
echo "${ECHO_T}$BUILD_CXX" >&6; }
Torok Edwin's avatar
Torok Edwin committed
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
Torok Edwin's avatar
Torok Edwin committed
fi
  if test -z "$BUILD_CXX"; then
     # Extract the first word of "g++", so it can be a program name with args.
set dummy g++; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_BUILD_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$BUILD_CXX"; then
  ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_BUILD_CXX="g++"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS
fi
fi
BUILD_CXX=$ac_cv_prog_BUILD_CXX
if test -n "$BUILD_CXX"; then
  { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5
echo "${ECHO_T}$BUILD_CXX" >&6; }
Torok Edwin's avatar
Torok Edwin committed
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
Torok Edwin's avatar
Torok Edwin committed
fi
     if test -z "$BUILD_CXX"; then
       # Extract the first word of "c++", so it can be a program name with args.
set dummy c++; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_BUILD_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
Torok Edwin's avatar
Torok Edwin committed
else
  if test -n "$BUILD_CXX"; then
  ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test.
else
  ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/c++"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_BUILD_CXX="c++"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_BUILD_CXX
  shift
  if test $# != 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set BUILD_CXX to just the basename; use the full file name.
    shift
    ac_cv_prog_BUILD_CXX="$as_dir/$ac_word${1+' '}$@"
Torok Edwin's avatar
Torok Edwin committed
fi
fi
BUILD_CXX=$ac_cv_prog_BUILD_CXX
if test -n "$BUILD_CXX"; then
  { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5
echo "${ECHO_T}$BUILD_CXX" >&6; }
Torok Edwin's avatar
Torok Edwin committed
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
Torok Edwin's avatar
Torok Edwin committed
fi

if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then
  cvsbuild="yes"
  optimize="no"
  CVSBUILD=CVSBUILD=1

Torok Edwin's avatar
Torok Edwin committed
else
# Check whether --enable-libcpp was given.
if test "${enable_libcpp+set}" = set; then
  enableval=$enable_libcpp;
else
  enableval=default
fi

case "$enableval" in
  yes) ENABLE_LIBCPP=1
 ;;
  no)  ENABLE_LIBCPP=0
 ;;
  default) ENABLE_LIBCPP=0
;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

# Check whether --enable-cxx11 was given.
if test "${enable_cxx11+set}" = set; then
  enableval=$enable_cxx11;
else
  enableval=default
fi

case "$enableval" in
  yes) ENABLE_CXX11=1
 ;;
  no)  ENABLE_CXX11=0
 ;;
  default) ENABLE_CXX11=0
;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

# Check whether --enable-split-dwarf was given.
if test "${enable_split_dwarf+set}" = set; then
  enableval=$enable_split_dwarf;
else
  enableval=default
fi

case "$enableval" in
  yes) ENABLE_SPLIT_DWARF=1
 ;;
  no)  ENABLE_SPLIT_DWARF=0
 ;;
  default) ENABLE_SPLIT_DWARF=0
;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-split-dwarf. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-split-dwarf. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

clang_arcmt="yes"
# Check whether --enable-clang-arcmt was given.
if test "${enable_clang_arcmt+set}" = set; then
  enableval=$enable_clang_arcmt; clang_arcmt="$enableval"
else
  enableval="yes"
fi

case "$enableval" in
  yes) ENABLE_CLANG_ARCMT=1
 ;;
  no)  ENABLE_CLANG_ARCMT=0
 ;;
  default) ENABLE_CLANG_ARCMT=1
;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-arcmt. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-clang-arcmt. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

clang_static_analyzer="yes"
# Check whether --enable-clang-static-analyzer was given.
if test "${enable_clang_static_analyzer+set}" = set; then
  enableval=$enable_clang_static_analyzer; clang_static_analyzer="$enableval"
else
  enableval="yes"
fi

case "$enableval" in
  yes) ENABLE_CLANG_STATIC_ANALYZER=1
 ;;
  no)
    if test ${clang_arcmt} != "no" ; then
      { { echo "$as_me:$LINENO: error: Cannot enable clang ARC Migration Tool while disabling static analyzer." >&5
echo "$as_me: error: Cannot enable clang ARC Migration Tool while disabling static analyzer." >&2;}
   { (exit 1); exit 1; }; }
    fi
    ENABLE_CLANG_STATIC_ANALYZER=0
  default) ENABLE_CLANG_STATIC_ANALYZER=1
;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-static-analyzer. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-clang-static-analyzer. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

# Check whether --enable-clang-rewriter was given.
if test "${enable_clang_rewriter+set}" = set; then
  enableval=$enable_clang_rewriter;
else
  enableval="yes"
fi

case "$enableval" in
  yes) ENABLE_CLANG_REWRITER=1
 ;;
  no)
    if test ${clang_arcmt} != "no" ; then
      { { echo "$as_me:$LINENO: error: Cannot enable clang ARC Migration Tool while disabling rewriter." >&5
echo "$as_me: error: Cannot enable clang ARC Migration Tool while disabling rewriter." >&2;}
   { (exit 1); exit 1; }; }
    fi
    if test ${clang_static_analyzer} != "no" ; then
      { { echo "$as_me:$LINENO: error: Cannot enable clang static analyzer while disabling rewriter." >&5
echo "$as_me: error: Cannot enable clang static analyzer while disabling rewriter." >&2;}
   { (exit 1); exit 1; }; }
    fi
    ENABLE_CLANG_REWRITER=0

    ;;
  default) ENABLE_CLANG_REWRITER=1
;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-rewriter. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-clang-rewriter. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

# Check whether --enable-optimized was given.
if test "${enable_optimized+set}" = set; then
  enableval=$enable_optimized;

if test ${enableval} = "no" ; then
  ENABLE_OPTIMIZED=

Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
# Check whether --enable-profiling was given.
if test "${enable_profiling+set}" = set; then
  enableval=$enable_profiling;

if test ${enableval} = "no" ; then
  ENABLE_PROFILING=

Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
# Check whether --enable-assertions was given.
if test "${enable_assertions+set}" = set; then
  enableval=$enable_assertions;
else
  enableval="yes"
Torok Edwin's avatar
Torok Edwin committed
fi
if test ${enableval} = "yes" ; then
  DISABLE_ASSERTIONS=
Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then
  enableval=$enable_werror;
else
  enableval="no"
fi

case "$enableval" in
  yes) ENABLE_WERROR=1
 ;;
  no)  ENABLE_WERROR=0
 ;;
  default) ENABLE_WERROR=0
;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-werror. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-werror. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

# Check whether --enable-expensive-checks was given.
if test "${enable_expensive_checks+set}" = set; then
  enableval=$enable_expensive_checks;

if test ${enableval} = "yes" ; then
  ENABLE_EXPENSIVE_CHECKS=ENABLE_EXPENSIVE_CHECKS=1

  EXPENSIVE_CHECKS=yes

Torok Edwin's avatar
Torok Edwin committed
else
# Check whether --enable-debug-runtime was given.
if test "${enable_debug_runtime+set}" = set; then
  enableval=$enable_debug_runtime;
Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
# Check whether --enable-debug-symbols was given.
if test "${enable_debug_symbols+set}" = set; then
  enableval=$enable_debug_symbols;
Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
if test ${enableval} = "no" ; then
  DEBUG_SYMBOLS=
Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
Daniel Dunbar's avatar
Daniel Dunbar committed
# Check whether --enable-keep-symbols was given.
if test "${enable_keep_symbols+set}" = set; then
  enableval=$enable_keep_symbols;
else
  enableval=no
fi

if test ${enableval} = "no" ; then
  KEEP_SYMBOLS=

else
  KEEP_SYMBOLS=KEEP_SYMBOLS=1

fi

# Check whether --enable-jit was given.
if test "${enable_jit+set}" = set; then
  enableval=$enable_jit;
Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
else
  case "$llvm_cv_target_arch" in
    x86)         TARGET_HAS_JIT=1
 ;;
    Sparc)       TARGET_HAS_JIT=0
 ;;
    PowerPC)     TARGET_HAS_JIT=1
 ;;
    x86_64)      TARGET_HAS_JIT=1
 ;;
    ARM)         TARGET_HAS_JIT=1
 ;;
    AArch64)     TARGET_HAS_JIT=0
 ;;
    Mips)        TARGET_HAS_JIT=1
 ;;
    XCore)       TARGET_HAS_JIT=0
 ;;
    MSP430)      TARGET_HAS_JIT=0
Tony Linthicum's avatar
Tony Linthicum committed
 ;;
    Hexagon)     TARGET_HAS_JIT=0
Ulrich Weigand's avatar
 
Ulrich Weigand committed
 ;;
    SystemZ)     TARGET_HAS_JIT=1
 ;;
    *)           TARGET_HAS_JIT=0
 ;;
  esac
fi

# Check whether --enable-docs was given.
if test "${enable_docs+set}" = set; then
  enableval=$enable_docs;
Torok Edwin's avatar
Torok Edwin committed
else
  enableval=default
fi

case "$enableval" in
  yes) ENABLE_DOCS=1
 ;;
  no)  ENABLE_DOCS=0
 ;;
  default) ENABLE_DOCS=1
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-docs. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-docs. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac
# Check whether --enable-doxygen was given.
if test "${enable_doxygen+set}" = set; then
  enableval=$enable_doxygen;
else
  enableval=default
Torok Edwin's avatar
Torok Edwin committed
fi

case "$enableval" in
  yes) ENABLE_DOXYGEN=1
 ;;
  no)  ENABLE_DOXYGEN=0
 ;;
  default) ENABLE_DOXYGEN=0
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

# Check whether --enable-threads was given.
if test "${enable_threads+set}" = set; then
  enableval=$enable_threads;
else
  enableval=default
Torok Edwin's avatar
Torok Edwin committed
fi
  yes) LLVM_ENABLE_THREADS=1
  no)  LLVM_ENABLE_THREADS=0
  default) LLVM_ENABLE_THREADS=1
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

cat >>confdefs.h <<_ACEOF
#define LLVM_ENABLE_THREADS $LLVM_ENABLE_THREADS
_ACEOF


# Check whether --enable-pthreads was given.
if test "${enable_pthreads+set}" = set; then
  enableval=$enable_pthreads;
Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
case "$enableval" in
  yes) ENABLE_PTHREADS=1
 ;;
  no)  ENABLE_PTHREADS=0
 ;;
  default) ENABLE_PTHREADS=1
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-pthreads. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-pthreads. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac
# Check whether --enable-zlib was given.
if test "${enable_zlib+set}" = set; then
  enableval=$enable_zlib;
else
  enableval=default
fi

case "$enableval" in
  yes) LLVM_ENABLE_ZLIB=1
 ;;
  no)  LLVM_ENABLE_ZLIB=0
 ;;
  default) LLVM_ENABLE_ZLIB=1
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-zlib. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-zlib. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

cat >>confdefs.h <<_ACEOF
#define LLVM_ENABLE_ZLIB $LLVM_ENABLE_ZLIB
_ACEOF


# Check whether --enable-pic was given.
if test "${enable_pic+set}" = set; then
  enableval=$enable_pic;
else
  enableval=default
fi
case "$enableval" in
  yes) ENABLE_PIC=1
 ;;
  no)  ENABLE_PIC=0
 ;;
  default) ENABLE_PIC=1
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-pic. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-pic. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
Torok Edwin's avatar
Torok Edwin committed
esac
cat >>confdefs.h <<_ACEOF
#define ENABLE_PIC $ENABLE_PIC
_ACEOF
# Check whether --enable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval=$enable_shared;
else
  enableval=default
fi

case "$enableval" in
  yes) ENABLE_SHARED=1
 ;;
  no)  ENABLE_SHARED=0
 ;;
  default) ENABLE_SHARED=0
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
# Check whether --enable-embed-stdcxx was given.
if test "${enable_embed_stdcxx+set}" = set; then
  enableval=$enable_embed_stdcxx;
Torok Edwin's avatar
Torok Edwin committed
else
case "$enableval" in
  yes) ENABLE_EMBED_STDCXX=1
 ;;
  no)  ENABLE_EMBED_STDCXX=0
 ;;
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-embed-stdcxx. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-embed-stdcxx. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
# Check whether --enable-timestamps was given.
if test "${enable_timestamps+set}" = set; then
  enableval=$enable_timestamps;
else
  enableval=default
Torok Edwin's avatar
Torok Edwin committed
fi
case "$enableval" in
  yes) ENABLE_TIMESTAMPS=1
 ;;
  no)  ENABLE_TIMESTAMPS=0
 ;;
  default) ENABLE_TIMESTAMPS=1
 ;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-timestamps. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-timestamps. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
esac
cat >>confdefs.h <<_ACEOF
#define ENABLE_TIMESTAMPS $ENABLE_TIMESTAMPS
# Check whether --enable-backtraces was given.
if test "${enable_backtraces+set}" = set; then
  enableval=$enable_backtraces; case "$enableval" in
    yes) llvm_cv_enable_backtraces="yes" ;;
    no)  llvm_cv_enable_backtraces="no"  ;;
    *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-backtraces. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-backtraces. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; } ;;
  esac
  llvm_cv_enable_backtraces="yes"
if test "$llvm_cv_enable_backtraces" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define ENABLE_BACKTRACES 1
_ACEOF

fi

# Check whether --enable-crash-overrides was given.
if test "${enable_crash_overrides+set}" = set; then
  enableval=$enable_crash_overrides; case "$enableval" in
    yes) llvm_cv_enable_crash_overrides="yes" ;;
    no)  llvm_cv_enable_crash_overrides="no"  ;;
    *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-crash-overrides. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-crash-overrides. Use \"yes\" or \"no\"" >&2;}
  esac
else
  llvm_cv_enable_crash_overrides="yes"
fi
if test "$llvm_cv_enable_crash_overrides" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define ENABLE_CRASH_OVERRIDES 1
TARGETS_TO_BUILD=""
# Check whether --enable-targets was given.
if test "${enable_targets+set}" = set; then
  enableval=$enable_targets;
else
  enableval=all
fi

if test "$enableval" = host-only ; then
  enableval=host
fi
case "$enableval" in
  all) TARGETS_TO_BUILD="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600" ;;
  *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
      case "$a_target" in
        x86)      TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
        x86_64)   TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
        sparc)    TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;;
        powerpc)  TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;;
        aarch64)  TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;;
        arm)      TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;;
        mips)     TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
        mipsel)   TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
        mips64)   TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
        mips64el) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
        xcore)    TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;;
        msp430)   TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;;
        cpp)      TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;;
Tony Linthicum's avatar
Tony Linthicum committed
        hexagon)  TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
        nvptx)    TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
Ulrich Weigand's avatar
 
Ulrich Weigand committed
        systemz)  TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
        r600)     TARGETS_TO_BUILD="R600 $TARGETS_TO_BUILD" ;;
        host) case "$llvm_cv_target_arch" in
            x86)         TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
            x86_64)      TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
            Sparc)       TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;;
            PowerPC)     TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;;
            AArch64)     TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;;
            ARM)         TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;;
            Mips)        TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
            XCore)       TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;;
            MSP430)      TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;;
Tony Linthicum's avatar
Tony Linthicum committed
            Hexagon)     TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
            NVPTX)       TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
Ulrich Weigand's avatar
 
Ulrich Weigand committed
            SystemZ)     TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
            *)       { { echo "$as_me:$LINENO: error: Can not set target to build" >&5
echo "$as_me: error: Can not set target to build" >&2;}
   { (exit 1); exit 1; }; } ;;
          esac ;;
        *) { { echo "$as_me:$LINENO: error: Unrecognized target $a_target" >&5