Branch: Tag:

2005-07-08

2005-07-08 12:22:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added detection of compiler default ABI.

Rev: src/configure.in:1.908

1: - AC_REVISION("$Id: configure.in,v 1.907 2005/06/23 18:21:21 grubba Exp $") + AC_REVISION("$Id: configure.in,v 1.908 2005/07/08 12:22:15 grubba Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
414:      AC_ARG_WITH(abi, MY_DESCR([--with-abi=32/64],    [specify ABI to use in case there are multiple])) +  + AC_MSG_CHECKING([default compiler ABI]) + AC_CACHE_VAL(pike_cv_default_compiler_abi, [ +  cat >"conftest.$ac_ext" <<\EOF + int main(int argc, char **argv) + { +  return 0; + } + EOF +  pike_cv_default_compiler_abi="unknown" +  if (eval $ac_compile) 2>&5; then +  filetype=`file "conftest.$ac_cv_objext" 2>/dev/null | sed -e 's/.*://'` +  case "$filetype" in +  *64-bit*) +  pike_cv_default_compiler_abi=64 +  ;; +  *32-bit*) +  pike_cv_default_compiler_abi=32 +  ;; +  *64*) +  pike_cv_default_compiler_abi=64 +  ;; +  *32*) +  pike_cv_default_compiler_abi=32 +  ;; +  esac +  fi +  rm -f conftest.$ac_cv_objext conftest.$ac_ext + ]) + AC_MSG_RESULT($pike_cv_default_compiler_abi) +    AC_MSG_CHECKING([which ABI to use])   case "x$with_abi" in    *32)
468:    AC_SYS_COMPILER_FLAG(-xarch=generic32, xarch_generic32, CC)    if test "$pike_cv_option_q32:$pike_cv_option_m32:$pike_cv_option_xtarget_generic32:$pike_cv_option_xarch_generic32" = "no:no:no:no"; then    PIKE_MSG_WARN([Found no option to force 64 bit ABI.]) +  +  if test "x$pike_cv_default_compiler_abi" = "xunknown"; then :; else +  if test "x$pike_cv_default_compiler_abi" = "x$with_abi"; then +  :    else -  +  PIKE_MSG_WARN([Using compiler default ABI: $pike_cv_default_compiler_abi]) +  with_abi="$pike_cv_default_compiler_abi" +  fi +  fi +  else    PIKE_MSG_WARN([$CC does not support 64 bit ABI.])    with_abi=32    fi
488:    AC_SYS_COMPILER_FLAG(-xarch=generic64, arch_generic64, CC)    if test "$pike_cv_option_q64:$pike_cv_option_m64:$pike_cv_option_xtarget_generic64:$pike_cv_option_xarch_generic64" = "no:no:no:no"; then    PIKE_MSG_WARN([Found no option to force 32 bit ABI.]) +  +  if test "x$pike_cv_default_compiler_abi" = "xunknown"; then :; else +  if test "x$pike_cv_default_compiler_abi" = "x$with_abi"; then +  :    else -  +  PIKE_MSG_WARN([Using compiler default ABI: $pike_cv_default_compiler_abi]) +  with_abi="$pike_cv_default_compiler_abi" +  fi +  fi +  else    PIKE_MSG_WARN([$CC does not support 32 bit ABI.])    with_abi=64    fi
2389:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.907 2005/06/23 18:21:21 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.908 2005/07/08 12:22:15 grubba Exp $.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2427:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.907 2005/06/23 18:21:21 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.908 2005/07/08 12:22:15 grubba Exp $.   # POSIX-version. Do NOT edit.   cat   EOF
2436:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.907 2005/06/23 18:21:21 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.908 2005/07/08 12:22:15 grubba Exp $.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF