Branch: Tag:

2005-06-08

2005-06-08 17:27:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added --with-abi.
Added possibility to disable checks for specific compiler options.

Rev: src/configure.in:1.886

1: - AC_REVISION("$Id: configure.in,v 1.885 2005/06/01 15:14:31 grubba Exp $") + AC_REVISION("$Id: configure.in,v 1.886 2005/06/08 17:27:52 grubba Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
291:   AC_DEFUN(AC_SYS_COMPILER_FLAG,   [    AC_MSG_CHECKING($1) +  if test "x[$]pike_disabled_option_$2" = "xyes"; then +  AC_MSG_RESULT(disabled) +  $4 +  else    AC_CACHE_VAL(pike_cv_option_$2,    [    OLD_CPPFLAGS="[$]CPPFLAGS"
377:    AC_MSG_RESULT(no)    $4    fi +  fi   ])      # arch, option, cache_name, variable
413:      #############################################################################    + # ABI selection. +  + AC_ARG_WITH(abi, MY_DESCR([--with-abi=32/64], +  [specify ABI to use in case there are multiple])) + AC_MSG_CHECKING([which ABI to use]) + case "x$with_abi" in +  *32) +  with_abi="32" +  ;; +  *64) +  with_abi="64" +  ;; +  *) +  # Defaults +  with_abi="32" +  case "x`uname -m`" in +  xia64) +  with_abi="64" +  ;; +  xx86_64) +  with_abi="64" +  ;; +  esac +  if type isainfo 2>/dev/null >/dev/null; then +  # Solaris +  with_abi="`isainfo -b`" +  elif type sysctl 2>/dev/null >/dev/null; then +  # MacOS X or Linux. +  # +  # On MacOS X hw.optional.64bitop is set to 1 if +  # 64bit is supported and useful. +  if test "`sysctl -n hw.optional.64bitops 2>/dev/null`" = "1"; then +  with_abi="64" +  fi +  fi +  ;; + esac + AC_MSG_RESULT($with_abi) +  + if test "x$with_abi" = "x64"; then +  # +  # We want 64bit mode if possible. +  # +  AC_SYS_COMPILER_FLAG(-q64, q64, CFLAGS) +  AC_SYS_COMPILER_FLAG(-m64, m64, CFLAGS) + else +  # +  # Try to force 32bit mode. +  # +  AC_SYS_COMPILER_FLAG(-q32, q32, CFLAGS) +  AC_SYS_COMPILER_FLAG(-m32, m32, CFLAGS) +  # +  # Make sure no later tests will add -q64 or -m64. +  # +  pike_disabled_option_q64=yes +  pike_disabled_option_m64=yes + fi +  + # FIXME: Detect which architecture the ABI corresponds to. +  + ############################################################################# +    if test "x$GCC" = "x"; then    GCC=no   else
420:   fi      if test "x$GCC" = "xno" -a "x$TCC" = "xno"; then -  # -  # We want 64bit mode if possible. -  # +     -  AC_SYS_COMPILER_FLAG(-q64, q64, CFLAGS) -  +     if test "x$ac_cv_prog_cc_cross" = "xyes"; then    # The AIX 5L/cc beta can not generate working binaries without a    # data-segment...
2261:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.885 2005/06/01 15:14:31 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.886 2005/06/08 17:27:52 grubba Exp $.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2299:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.885 2005/06/01 15:14:31 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.886 2005/06/08 17:27:52 grubba Exp $.   # POSIX-version. Do NOT edit.   cat   EOF
2308:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.885 2005/06/01 15:14:31 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.886 2005/06/08 17:27:52 grubba Exp $.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF
2410:    do    if test "$dd" = "/lib"; then continue; fi    if test "$dd" = "/usr/lib"; then continue; fi -  for suff in '' 32 64 '/64'; do +  for suff in "$with_abi" "/$with_abi" ""; do    d="$dd$suff"    AC_MSG_CHECKING($d)    if test -d "$d/." ; then
7805:   build information:   source path..... $srcdir   build path...... $BUILDDIR + ABI............. $with_abi   cpp............. $CPP   cc.............. $CC   ld.............. $LD