Skip to content
configure 558 KiB
Newer Older
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="Haiku"
    llvm_cv_platform_type="Unix" ;;
  *-unknown-eabi*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="Freestanding"
    llvm_cv_platform_type="Unix" ;;
  *-unknown-elf*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="Freestanding"
    llvm_cv_platform_type="Unix" ;;
  *)
    llvm_cv_link_all_option=""
    llvm_cv_no_link_all_option=""
    llvm_cv_os_type="Unknown"
    llvm_cv_platform_type="Unknown" ;;
esac
Torok Edwin's avatar
Torok Edwin committed
fi
{ echo "$as_me:$LINENO: result: $llvm_cv_os_type" >&5
echo "${ECHO_T}$llvm_cv_os_type" >&6; }

{ echo "$as_me:$LINENO: checking type of operating system we're going to target" >&5
echo $ECHO_N "checking type of operating system we're going to target... $ECHO_C" >&6; }
if test "${llvm_cv_target_os_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
Torok Edwin's avatar
Torok Edwin committed
else
  case $target in
  *-*-aix*)
    llvm_cv_target_os_type="AIX" ;;
  *-*-irix*)
    llvm_cv_target_os_type="IRIX" ;;
  *-*-cygwin*)
    llvm_cv_target_os_type="Cygwin" ;;
  *-*-darwin*)
    llvm_cv_target_os_type="Darwin" ;;
  *-*-minix*)
    llvm_cv_target_os_type="Minix" ;;
  *-*-kfreebsd-gnu)
    llvm_cv_target_os_type="GNU/kFreeBSD" ;;
  *-*-openbsd*)
    llvm_cv_target_os_type="OpenBSD" ;;
  *-*-netbsd*)
    llvm_cv_target_os_type="NetBSD" ;;
  *-*-dragonfly*)
    llvm_cv_target_os_type="DragonFly" ;;
  *-*-hpux*)
    llvm_cv_target_os_type="HP-UX" ;;
  *-*-interix*)
    llvm_cv_target_os_type="Interix" ;;
  *-*-linux*)
    llvm_cv_target_os_type="Linux" ;;
  *-*-gnu*)
    llvm_cv_target_os_type="GNU" ;;
  *-*-solaris*)
    llvm_cv_target_os_type="SunOS" ;;
  *-*-win32*)
    llvm_cv_target_os_type="Win32" ;;
  *-*-mingw*)
    llvm_cv_target_os_type="MingW" ;;
  *-*-haiku*)
    llvm_cv_target_os_type="Haiku" ;;
  *-*-rtems*)
    llvm_cv_target_os_type="RTEMS" ;;
  *-*-nacl*)
    llvm_cv_target_os_type="NativeClient" ;;
  *-unknown-eabi*)
    llvm_cv_target_os_type="Freestanding" ;;
  *)
    llvm_cv_target_os_type="Unknown" ;;
esac
Torok Edwin's avatar
Torok Edwin committed
fi
{ echo "$as_me:$LINENO: result: $llvm_cv_target_os_type" >&5
echo "${ECHO_T}$llvm_cv_target_os_type" >&6; }
if test "$llvm_cv_os_type" = "Unknown" ; then
  { { echo "$as_me:$LINENO: error: Operating system is unknown, configure can't continue" >&5
echo "$as_me: error: Operating system is unknown, configure can't continue" >&2;}
Torok Edwin's avatar
Torok Edwin committed
fi
NOLINKALL=$llvm_cv_no_link_all_option
cat >>confdefs.h <<\_ACEOF
#define LLVM_ON_UNIX 1
_ACEOF
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" ;;
  arm64*-*)               llvm_cv_target_arch="AArch64" ;;
  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" ;;
  arm64*-*)               host_arch="AArch64" ;;
  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-compiler-version-checks was given.
if test "${enable_compiler_version_checks+set}" = set; then
  enableval=$enable_compiler_version_checks;
else
  enableval=default
fi

case "$enableval" in
  no)
    ;;
  yes|default)
    ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

    case "$llvm_cv_cxx_compiler" in
    clang)
      { echo "$as_me:$LINENO: checking whether Clang is new enough" >&5
echo $ECHO_N "checking whether Clang is new enough... $ECHO_C" >&6; }
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 1)
#error This version of Clang is too old to build LLVM
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
           { { echo "$as_me:$LINENO: error:
The selected Clang compiler is not new enough to build LLVM. Please upgrade to
Clang 3.1. You may pass --disable-compiler-version-checks to configure to
bypass these sanity checks." >&5
echo "$as_me: error:
The selected Clang compiler is not new enough to build LLVM. Please upgrade to
Clang 3.1. You may pass --disable-compiler-version-checks to configure to
bypass these sanity checks." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

                                          if test "$ENABLE_LIBCPP" -eq 0 ; then
        { echo "$as_me:$LINENO: checking whether Clang will select a modern C++ standard library" >&5
echo $ECHO_N "checking whether Clang will select a modern C++ standard library... $ECHO_C" >&6; }
        llvm_cv_old_cxxflags="$CXXFLAGS"
        CXXFLAGS="$CXXFLAGS -std=c++0x"
        cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <atomic>
std::atomic<float> x(0.0f);
int main() { return (float)x; }

_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
We detected a missing feature in the standard C++ library that was known to be
missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
than 4.7. You will need to update your system and ensure Clang uses the newer
standard library.

If this error is incorrect or you need to force things to work, you may pass
'--disable-compiler-version-checks' to configure to bypass this test." >&5
echo "$as_me: error:
We detected a missing feature in the standard C++ library that was known to be
missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
than 4.7. You will need to update your system and ensure Clang uses the newer
standard library.

If this error is incorrect or you need to force things to work, you may pass
'--disable-compiler-version-checks' to configure to bypass this test." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
      ;;
    gcc)
      { echo "$as_me:$LINENO: checking whether GCC is new enough" >&5
echo $ECHO_N "checking whether GCC is new enough... $ECHO_C" >&6; }
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
#error This version of GCC is too old to build LLVM
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
           { { echo "$as_me:$LINENO: error:
The selected GCC C++ compiler is not new enough to build LLVM. Please upgrade
to GCC 4.7. You may pass --disable-compiler-version-checks to configure to
bypass these sanity checks." >&5
echo "$as_me: error:
The selected GCC C++ compiler is not new enough to build LLVM. Please upgrade
to GCC 4.7. You may pass --disable-compiler-version-checks to configure to
bypass these sanity checks." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      ;;
    unknown)
      ;;
    esac
    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    ;;
  *)
    { { echo "$as_me:$LINENO: error: Invalid setting for --enable-compiler-version-checks. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-compiler-version-checks. Use \"yes\" or \"no\"" >&2;}
   { (exit 1); exit 1; }; }
    ;;
esac

# Check whether --enable-cxx1y was given.
if test "${enable_cxx1y+set}" = set; then
  enableval=$enable_cxx1y;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-cxx1y. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-cxx1y. Use \"yes\" or \"no\"" >&2;}
# 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_plugin_support="yes"
# Check whether --enable-clang-plugin-support was given.
if test "${enable_clang_plugin_support+set}" = set; then
  enableval=$enable_clang_plugin_support; clang_plugin_support="$enableval"
else
  enableval="yes"
fi

case "$enableval" in
  yes) CLANG_PLUGIN_SUPPORT=1
 ;;
  no)  CLANG_PLUGIN_SUPPORT=0
 ;;
  default) CLANG_PLUGIN_SUPPORT=1
;;
  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-plugin-support. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-clang-plugin-support. 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-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.