Skip to content
configure 599 KiB
Newer Older
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_c_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
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_Header=no"
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Header'}'` = yes; then
Torok Edwin's avatar
Torok Edwin committed
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Torok Edwin's avatar
Torok Edwin committed
_ACEOF
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
done
{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
Torok Edwin's avatar
Torok Edwin committed
else
  # See if sys/param.h defines the BYTE_ORDER macro.
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.  */
#include <sys/types.h>
Torok Edwin's avatar
Torok Edwin committed
int
main ()
{
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
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_c_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
  # It does; now see whether it defined to BIG_ENDIAN or not.
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.  */
#include <sys/types.h>
Torok Edwin's avatar
Torok Edwin committed
int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
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_c_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
  ac_cv_c_bigendian=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_c_bigendian=no
Torok Edwin's avatar
Torok Edwin committed
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
	# It does not; compile a test program.
if test "$cross_compiling" = yes; then
  # try to guess the endianness by grepping values into an object file
  ac_cv_c_bigendian=unknown
  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.  */
short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
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_c_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
  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Torok Edwin's avatar
Torok Edwin committed
  ac_cv_c_bigendian=yes
fi
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
  if test "$ac_cv_c_bigendian" = unknown; then
    ac_cv_c_bigendian=no
  else
    # finding both strings is unlikely to happen, but who knows?
    ac_cv_c_bigendian=unknown
  fi
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
Torok Edwin's avatar
Torok Edwin committed
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  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.  */
$ac_includes_default
int
main ()
{
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long int l;
    char c[sizeof (long int)];
  } u;
  u.l = 1;
  return u.c[sizeof (long int) - 1] == 1;
Torok Edwin's avatar
Torok Edwin committed
  ;
  return 0;
}
_ACEOF
rm -f 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>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./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
Torok Edwin's avatar
Torok Edwin committed
  ac_cv_c_bigendian=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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
fi
{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
case $ac_cv_c_bigendian in
  yes)
    ENDIAN=big
 ;;
  no)
    ENDIAN=little
 ;;
  *)
    { { echo "$as_me:$LINENO: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" >&5
echo "$as_me: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
   { (exit 1); exit 1; }; } ;;
esac


if test "$cross_compiling" = yes; then
Torok Edwin's avatar
Torok Edwin committed
  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
  echo $ECHO_N "(cached) $ECHO_C" >&6
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}-
Torok Edwin's avatar
Torok Edwin committed
  # 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
  echo $ECHO_N "(cached) $ECHO_C" >&6
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
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
Torok Edwin's avatar
Torok Edwin committed
    ac_cv_prog_BUILD_CC="${ac_build_prefix}gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Torok Edwin's avatar
Torok Edwin committed
    break 2
  fi
done
Torok Edwin's avatar
Torok Edwin committed
IFS=$as_save_IFS
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
Torok Edwin's avatar
Torok Edwin committed
  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
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
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
Torok Edwin's avatar
Torok Edwin committed
    ac_cv_prog_BUILD_CC="gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Torok Edwin's avatar
Torok Edwin committed
    break 2
  fi
done
Torok Edwin's avatar
Torok Edwin committed
IFS=$as_save_IFS
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
Torok Edwin's avatar
Torok Edwin committed
     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
  echo $ECHO_N "(cached) $ECHO_C" >&6
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.
Torok Edwin's avatar
Torok Edwin committed
  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
Torok Edwin's avatar
Torok Edwin committed
    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
Torok Edwin's avatar
Torok Edwin committed
    break 2
Torok Edwin's avatar
Torok Edwin committed
done
Torok Edwin's avatar
Torok Edwin committed
IFS=$as_save_IFS
Torok Edwin's avatar
Torok Edwin committed
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
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
Torok Edwin's avatar
Torok Edwin committed
     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; }; }
Torok Edwin's avatar
Torok Edwin committed
  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
Torok Edwin's avatar
Torok Edwin committed
  (eval $ac_build_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
Torok Edwin's avatar
Torok Edwin committed
    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; }; }
Torok Edwin's avatar
Torok Edwin committed
  fi
  rm -f conftest*
  test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank
fi
fi
Torok Edwin's avatar
Torok Edwin committed
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; }
Torok Edwin's avatar
Torok Edwin committed
ac_build_exeext=$BUILD_EXEEXT
Torok Edwin's avatar
Torok Edwin committed
  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
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
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
Torok Edwin's avatar
Torok Edwin committed
    ac_cv_prog_BUILD_CXX="${ac_build_prefix}g++"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Torok Edwin's avatar
Torok Edwin committed
    break 2
  fi
done
Torok Edwin's avatar
Torok Edwin committed
IFS=$as_save_IFS
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
Torok Edwin's avatar
Torok Edwin committed
  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
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
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
Torok Edwin's avatar
Torok Edwin committed
    ac_cv_prog_BUILD_CXX="g++"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Torok Edwin's avatar
Torok Edwin committed
    break 2
  fi
done
Torok Edwin's avatar
Torok Edwin committed
IFS=$as_save_IFS
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
Torok Edwin's avatar
Torok Edwin committed
     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
Torok Edwin's avatar
Torok Edwin committed
    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
Torok Edwin's avatar
Torok Edwin committed
    break 2
  fi
done
Torok Edwin's avatar
Torok Edwin committed
IFS=$as_save_IFS
Torok Edwin's avatar
Torok Edwin committed
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+' '}$@"
  fi
fi
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
Torok Edwin's avatar
Torok Edwin committed
     fi
  fi
else
  LLVM_CROSS_COMPILING=0
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
if test -d "CVS" -o -d "${srcdir}/CVS" -o -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
  cvsbuild="no"
  optimize="yes"
fi
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-optimized was given.
if test "${enable_optimized+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_optimized;
else
  enableval=$optimize
fi
Torok Edwin's avatar
Torok Edwin committed
if test ${enableval} = "no" ; then
  ENABLE_OPTIMIZED=
Torok Edwin's avatar
Torok Edwin committed
else
  ENABLE_OPTIMIZED=ENABLE_OPTIMIZED=1
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-profiling was given.
if test "${enable_profiling+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_profiling;
else
  enableval="no"
fi
Torok Edwin's avatar
Torok Edwin committed
if test ${enableval} = "no" ; then
  ENABLE_PROFILING=
Torok Edwin's avatar
Torok Edwin committed
else
  ENABLE_PROFILING=ENABLE_PROFILING=1
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-assertions was given.
if test "${enable_assertions+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_assertions;
Torok Edwin's avatar
Torok Edwin committed
  enableval="yes"
Torok Edwin's avatar
Torok Edwin committed
if test ${enableval} = "yes" ; then
  DISABLE_ASSERTIONS=
Torok Edwin's avatar
Torok Edwin committed
else
  DISABLE_ASSERTIONS=DISABLE_ASSERTIONS=1
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-expensive-checks was given.
if test "${enable_expensive_checks+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_expensive_checks;
else
  enableval="no"
fi
Torok Edwin's avatar
Torok Edwin committed
if test ${enableval} = "yes" ; then
  ENABLE_EXPENSIVE_CHECKS=ENABLE_EXPENSIVE_CHECKS=1
Torok Edwin's avatar
Torok Edwin committed
  EXPENSIVE_CHECKS=yes
Torok Edwin's avatar
Torok Edwin committed
else
  ENABLE_EXPENSIVE_CHECKS=
Torok Edwin's avatar
Torok Edwin committed
  EXPENSIVE_CHECKS=no
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-debug-runtime was given.
if test "${enable_debug_runtime+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_debug_runtime;
else
  enableval=no
fi
Torok Edwin's avatar
Torok Edwin committed
if test ${enableval} = "no" ; then
  DEBUG_RUNTIME=
Torok Edwin's avatar
Torok Edwin committed
else
  DEBUG_RUNTIME=DEBUG_RUNTIME=1
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-debug-symbols was given.
if test "${enable_debug_symbols+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_debug_symbols;
else
  enableval=no
fi
Torok Edwin's avatar
Torok Edwin committed
if test ${enableval} = "no" ; then
  DEBUG_SYMBOLS=
Torok Edwin's avatar
Torok Edwin committed
else
  DEBUG_SYMBOLS=DEBUG_SYMBOLS=1
Torok Edwin's avatar
Torok Edwin committed
fi
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-jit was given.
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_jit;
else
  enableval=default
fi
Torok Edwin's avatar
Torok Edwin committed
if test ${enableval} = "no"
then
  JIT=
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
 ;;
    Alpha)       TARGET_HAS_JIT=1
 ;;
    ARM)         TARGET_HAS_JIT=1
 ;;
    Mips)        TARGET_HAS_JIT=0
 ;;
    PIC16)       TARGET_HAS_JIT=0
 ;;
    XCore)       TARGET_HAS_JIT=0
 ;;
    MSP430)      TARGET_HAS_JIT=0
 ;;
    SystemZ)     TARGET_HAS_JIT=0
 ;;
    Blackfin)    TARGET_HAS_JIT=0
 ;;
    *)           TARGET_HAS_JIT=0
 ;;
  esac
fi
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-doxygen was given.
if test "${enable_doxygen+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_doxygen;
else
  enableval=default
fi
Torok Edwin's avatar
Torok Edwin committed
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; }; } ;;
Torok Edwin's avatar
Torok Edwin committed
esac
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-threads was given.
if test "${enable_threads+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_threads;
else
  enableval=default
fi
Torok Edwin's avatar
Torok Edwin committed
case "$enableval" in
  yes) ENABLE_THREADS=1
 ;;
  no)  ENABLE_THREADS=0
 ;;
  default) 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; }; } ;;
Torok Edwin's avatar
Torok Edwin committed
esac
Torok Edwin's avatar
Torok Edwin committed
cat >>confdefs.h <<_ACEOF
#define ENABLE_THREADS $ENABLE_THREADS
_ACEOF
Torok Edwin's avatar
Torok Edwin committed
# Check whether --enable-pic was given.
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_pic;
else
  enableval=default
fi
Torok Edwin's avatar
Torok Edwin committed
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
Torok Edwin's avatar
Torok Edwin committed
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; }; } ;;
esac

Torok Edwin's avatar
Torok Edwin committed
TARGETS_TO_BUILD=""
# Check whether --enable-targets was given.
if test "${enable_targets+set}" = set; then
Torok Edwin's avatar
Torok Edwin committed
  enableval=$enable_targets;
Torok Edwin's avatar
Torok Edwin committed
  enableval=all
Torok Edwin's avatar
Torok Edwin committed
if test "$enableval" = host-only ; then
  enableval=host
Torok Edwin's avatar
Torok Edwin committed
case "$enableval" in
  all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend" ;;
  *)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" ;;
        alpha)    TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;;
        arm)      TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;;
        mips)     TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
        spu)      TARGETS_TO_BUILD="CellSPU $TARGETS_TO_BUILD" ;;
        pic16)    TARGETS_TO_BUILD="PIC16 $TARGETS_TO_BUILD" ;;
        xcore)    TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;;
        msp430)   TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;;
        systemz)  TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
        blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;;
        cbe)      TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;;
        msil)     TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;;
        cpp)      TARGETS_TO_BUILD="CppBackend $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" ;;
            Alpha)       TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;;
            ARM)         TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;;
            Mips)        TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
            CellSPU|SPU) TARGETS_TO_BUILD="CellSPU $TARGETS_TO_BUILD" ;;
            PIC16)       TARGETS_TO_BUILD="PIC16 $TARGETS_TO_BUILD" ;;
            XCore)       TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;;
            MSP430)      TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;;
            s390x)       TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
            Blackfin)    TARGETS_TO_BUILD="Blackfin $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; }; } ;;
Torok Edwin's avatar
Torok Edwin committed
          esac ;;
        *) { { echo "$as_me:$LINENO: error: Unrecognized target $a_target" >&5
echo "$as_me: error: Unrecognized target $a_target" >&2;}
   { (exit 1); exit 1; }; } ;;
Torok Edwin's avatar
Torok Edwin committed
      esac
  done
  ;;
Torok Edwin's avatar
Torok Edwin committed
TARGETS_TO_BUILD=$TARGETS_TO_BUILD
Torok Edwin's avatar
Torok Edwin committed
# Determine whether we are building LLVM support for the native architecture.
# If so, define LLVM_NATIVE_ARCH to that LLVM target.
for a_target in $TARGETS_TO_BUILD; do
  if test "$a_target" = "$LLVM_NATIVE_ARCH"; then
    LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target"

cat >>confdefs.h <<_ACEOF
#define LLVM_NATIVE_ARCH $LLVM_NATIVE_ARCHTARGET
_ACEOF
Torok Edwin's avatar
Torok Edwin committed
# Build the LLVM_TARGET and LLVM_... macros for Targets.def and the individual
# target feature def files.
LLVM_ENUM_TARGETS=""
LLVM_ENUM_ASM_PRINTERS=""
LLVM_ENUM_ASM_PARSERS=""
LLVM_ENUM_DISASSEMBLERS=""
for target_to_build in $TARGETS_TO_BUILD; do
  LLVM_ENUM_TARGETS="LLVM_TARGET($target_to_build) $LLVM_ENUM_TARGETS"
  if test -f ${srcdir}/lib/Target/${target_to_build}/AsmPrinter/Makefile ; then
    LLVM_ENUM_ASM_PRINTERS="LLVM_ASM_PRINTER($target_to_build) $LLVM_ENUM_ASM_PRINTERS";
  fi
  if test -f ${srcdir}/lib/Target/${target_to_build}/AsmParser/Makefile ; then
    LLVM_ENUM_ASM_PARSERS="LLVM_ASM_PARSER($target_to_build) $LLVM_ENUM_ASM_PARSERS";
  fi
  if test -f ${srcdir}/lib/Target/${target_to_build}/Disassembler/Makefile ; then
    LLVM_ENUM_DISASSEMBLERS="LLVM_DISASSEMBLER($target_to_build) $LLVM_ENUM_DISASSEMBLERS";
  fi
done

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