Skip to content
configure 632 KiB
Newer Older
Torok Edwin's avatar
Torok Edwin committed
  return 0;
}
_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
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	CXXFLAGS=""
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
Torok Edwin's avatar
Torok Edwin committed
/* end confdefs.h.  */
Torok Edwin's avatar
Torok Edwin committed
int
main ()
{
Torok Edwin's avatar
Torok Edwin committed
  ;
  return 0;
}
_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
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
Torok Edwin's avatar
Torok Edwin committed
/* end confdefs.h.  */
Torok Edwin's avatar
Torok Edwin committed
int
main ()
{
Torok Edwin's avatar
Torok Edwin committed
  ;
  return 0;
}
_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
Torok Edwin's avatar
Torok Edwin committed
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

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

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Torok Edwin's avatar
Torok Edwin committed
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
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
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: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
Torok Edwin's avatar
Torok Edwin committed
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
Torok Edwin's avatar
Torok Edwin committed
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
Torok Edwin's avatar
Torok Edwin committed
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
{ echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Torok Edwin's avatar
Torok Edwin committed
fi
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

Torok Edwin's avatar
Torok Edwin committed
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
Torok Edwin's avatar
Torok Edwin committed
/* end confdefs.h.  */
Torok Edwin's avatar
Torok Edwin committed
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
Torok Edwin's avatar
Torok Edwin committed
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5

rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
Torok Edwin's avatar
Torok Edwin committed
fi
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




if test -d ${srcdir}/projects/llvm-gcc ; then
  subdirs="$subdirs projects/llvm-gcc"
if test -d ${srcdir}/projects/test-suite ; then
  subdirs="$subdirs projects/test-suite"

if test -d ${srcdir}/projects/llvm-test ; then
  subdirs="$subdirs projects/llvm-test"
if test -d ${srcdir}/projects/poolalloc ; then
  subdirs="$subdirs projects/poolalloc"
if test -d ${srcdir}/projects/llvm-poolalloc ; then
  subdirs="$subdirs projects/llvm-poolalloc"

fi

for i in `ls ${srcdir}/projects`
Torok Edwin's avatar
Torok Edwin committed
do
  if test -d ${srcdir}/projects/${i} ; then
    case ${i} in
      sample)       subdirs="$subdirs projects/sample"
    ;;
      privbracket)  subdirs="$subdirs projects/privbracket"
 ;;
      llvm-stacker) subdirs="$subdirs projects/llvm-stacker"
 ;;
      llvm-reopt)   subdirs="$subdirs projects/llvm-reopt"
;;
      llvm-java)    subdirs="$subdirs projects/llvm-java"
 ;;
      llvm-tv)      subdirs="$subdirs projects/llvm-tv"
   ;;
      safecode)     subdirs="$subdirs projects/safecode"
 ;;
      llvm-kernel)  subdirs="$subdirs projects/llvm-kernel"
 ;;
      llvm-gcc)       ;;
      test-suite)     ;;
      llvm-test)      ;;
      poolalloc)      ;;
      llvm-poolalloc) ;;
      *)
        { echo "$as_me:$LINENO: WARNING: Unknown project (${i}) won't be configured automatically" >&5
echo "$as_me: WARNING: Unknown project (${i}) won't be configured automatically" >&2;}
        ;;
    esac
Torok Edwin's avatar
Torok Edwin committed
  fi
done
# Check whether --enable-polly was given.
if test "${enable_polly+set}" = set; then
  enableval=$enable_polly;
else
  enableval=default
Torok Edwin's avatar
Torok Edwin committed
fi

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


if (test -d ${srcdir}/tools/polly) && (test $ENABLE_POLLY -eq 1) ; then
  LLVM_HAS_POLLY=1

  subdirs="$subdirs tools/polly"

Torok Edwin's avatar
Torok Edwin committed
fi


# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
   { (exit 1); exit 1; }; }

{ echo "$as_me:$LINENO: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
if test "${ac_cv_build+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
Torok Edwin's avatar
Torok Edwin committed
else
  ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
   { (exit 1); exit 1; }; }
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
   { (exit 1); exit 1; }; }

Torok Edwin's avatar
Torok Edwin committed
fi
{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
echo "$as_me: error: invalid value of canonical build" >&2;}
   { (exit 1); exit 1; }; };;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
{ echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
if test "${ac_cv_host+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
else
  if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
Torok Edwin's avatar
Torok Edwin committed
else
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
   { (exit 1); exit 1; }; }
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
fi
{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
echo "$as_me: error: invalid value of canonical host" >&2;}
   { (exit 1); exit 1; }; };;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
{ echo "$as_me:$LINENO: checking target system type" >&5
echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
if test "${ac_cv_target+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
else
  if test "x$target_alias" = x; then
  ac_cv_target=$ac_cv_host
  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
   { (exit 1); exit 1; }; }
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
fi
{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
echo "${ECHO_T}$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
echo "$as_me: error: invalid value of canonical target" >&2;}
   { (exit 1); exit 1; }; };;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_target
shift
target_cpu=$1
target_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
target_os=$*
IFS=$ac_save_IFS
case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac


# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

{ echo "$as_me:$LINENO: checking type of operating system we're going to host on" >&5
echo $ECHO_N "checking type of operating system we're going to host on... $ECHO_C" >&6; }
if test "${llvm_cv_os_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $host in
  *-*-aix*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="AIX"
    llvm_cv_platform_type="Unix" ;;
  *-*-irix*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="IRIX"
    llvm_cv_platform_type="Unix" ;;
  *-*-cygwin*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="Cygwin"
    llvm_cv_platform_type="Unix" ;;
  *-*-darwin*)
    llvm_cv_link_all_option="-Wl,-all_load"
    llvm_cv_no_link_all_option="-Wl,-noall_load"
    llvm_cv_os_type="Darwin"
    llvm_cv_platform_type="Unix" ;;
  *-*-minix*)
    llvm_cv_link_all_option="-Wl,-all_load"
    llvm_cv_no_link_all_option="-Wl,-noall_load"
    llvm_cv_os_type="Minix"
    llvm_cv_platform_type="Unix" ;;
  *-*-freebsd*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="FreeBSD"
    llvm_cv_platform_type="Unix" ;;
  *-*-openbsd*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="OpenBSD"
    llvm_cv_platform_type="Unix" ;;
  *-*-netbsd*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="NetBSD"
    llvm_cv_platform_type="Unix" ;;
  *-*-dragonfly*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="DragonFly"
    llvm_cv_platform_type="Unix" ;;
  *-*-hpux*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="HP-UX"
    llvm_cv_platform_type="Unix" ;;
  *-*-interix*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="Interix"
    llvm_cv_platform_type="Unix" ;;
  *-*-linux*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="Linux"
    llvm_cv_platform_type="Unix" ;;
  *-*-solaris*)
    llvm_cv_link_all_option="-Wl,-z,allextract"
    llvm_cv_no_link_all_option="-Wl,-z,defaultextract"
    llvm_cv_os_type="SunOS"
    llvm_cv_platform_type="Unix" ;;
  *-*-auroraux*)
    llvm_cv_link_all_option="-Wl,-z,allextract"
    llvm_cv_link_all_option="-Wl,-z,defaultextract"
    llvm_cv_os_type="AuroraUX"
    llvm_cv_platform_type="Unix" ;;
  *-*-win32*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="Win32"
    llvm_cv_platform_type="Win32" ;;
  *-*-mingw*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="MingW"
    llvm_cv_platform_type="Win32" ;;
  *-*-haiku*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    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" ;;
  *-*-freebsd*)
    llvm_cv_target_os_type="FreeBSD" ;;
  *-*-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" ;;
  *-*-solaris*)
    llvm_cv_target_os_type="SunOS" ;;
  *-*-auroraux*)
    llvm_cv_target_os_type="AuroraUX" ;;
  *-*-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" ;;
  arm*-*)                 llvm_cv_target_arch="ARM" ;;
  mips-*)                 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" ;;
  mblaze-*)               llvm_cv_target_arch="MBlaze" ;;
  ptx-*)                  llvm_cv_target_arch="PTX" ;;
  *)                      llvm_cv_target_arch="Unknown" ;;
esac
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
# Determine the LLVM native architecture for the target
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
{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
Torok Edwin's avatar
Torok Edwin committed
else
  # Extract the first word of "grep ggrep" to use in msg output
if test -z "$GREP"; then
set dummy grep ggrep; ac_prog_name=$2
if test "${ac_cv_path_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
Torok Edwin's avatar
Torok Edwin committed
else
  ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_prog in grep ggrep; do
  for ac_exec_ext in '' $ac_executable_extensions; do
    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
    { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
    # Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    echo 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    ac_count=`expr $ac_count + 1`
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
Torok Edwin's avatar
Torok Edwin committed
fi
GREP="$ac_cv_path_GREP"
if test -z "$GREP"; then
  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
   { (exit 1); exit 1; }; }
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
else
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
fi
{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"
{ echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
Torok Edwin's avatar
Torok Edwin committed
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     # Extract the first word of "egrep" to use in msg output
if test -z "$EGREP"; then