diff --git a/bochs/configure b/bochs/configure index fb78bb3cc..cd7e446ce 100755 --- a/bochs/configure +++ b/bochs/configure @@ -1,25 +1,23 @@ #! /bin/sh -# From configure.in Id: configure.in,v 1.134 2002/09/26 18:23:34 bdenney Exp . +# From configure.in Id: configure.in,v 1.135 2002/09/27 20:06:57 bdenney Exp . # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52. +# Generated by GNU Autoconf 2.53. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -29,8 +27,165 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + # Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -58,22 +213,12 @@ rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. @@ -82,7 +227,8 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -97,7 +243,8 @@ exec 6>&1 ac_default_prefix=/usr/local cross_compiling=no subdirs= -MFLAGS= MAKEFLAGS= +MFLAGS= +MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. @@ -105,6 +252,13 @@ SHELL=${CONFIG_SHELL-/bin/sh} # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + ac_unique_file="bochs.h" # Factoring default headers for most tests. ac_includes_default="\ @@ -143,6 +297,7 @@ ac_includes_default="\ # include #endif" + # Initialize some variables set by options. ac_init_help= ac_init_version=false @@ -181,13 +336,6 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - ac_prev= for ac_option do @@ -320,7 +468,7 @@ do with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -499,7 +647,7 @@ do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done @@ -511,18 +659,19 @@ do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. +# FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias -# FIXME: should be removed in autoconf 3.0. +# FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe @@ -538,13 +687,23 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -554,10 +713,10 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else - { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi @@ -609,7 +768,7 @@ ac_cv_env_CPP_value=$CPP if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. - cat <&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done @@ -795,31 +975,31 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then - cat <<\EOF + cat <<\_ACEOF -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -EOF +_ACEOF exit 0 fi exec 5>config.log -cat >&5 <&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52. Invocation command line was +generated by GNU Autoconf 2.53. Invocation command line was $ $0 $@ -EOF +_ACEOF { cat <<_ASUNAME -## ---------- ## -## Platform. ## -## ---------- ## +## --------- ## +## Platform. ## +## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` @@ -838,17 +1018,27 @@ hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -PATH = $PATH - _ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + } >&5 -cat >&5 <&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF -EOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. @@ -859,15 +1049,17 @@ for ac_arg do case $ac_arg in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; + | --no-cr | --no-c | -n ) continue ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - ac_sep=" " ;; - *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" - ac_sep=" " ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; esac # Get rid of the leading space. done @@ -875,14 +1067,19 @@ done # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. - echo >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, + { + echo + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in @@ -896,21 +1093,24 @@ trap 'exit_status=$? "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 - rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && +} + echo + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do @@ -923,6 +1123,33 @@ rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then @@ -934,9 +1161,9 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:937: loading site script $ac_site_file" >&5 + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done @@ -945,7 +1172,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:948: loading cache $cache_file" >&5 + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -953,7 +1180,7 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:956: creating cache $cache_file" >&5 + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -969,42 +1196,42 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:972: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:976: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:982: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:984: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:986: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac - # Pass precious variables to config.status. It doesn't matter if - # we pass some twice (in addition to the command line arguments). + # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" - ;; + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:1005: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:1007: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1015,33 +1242,34 @@ 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 -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac -echo "#! $SHELL" >conftest.sh -echo "exit 0" >>conftest.sh -chmod +x conftest.sh -if { (echo "$as_me:1027: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? - echo "$as_me:1030: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' -else - ac_path_separator=: -fi -PATH_SEPARATOR="$ac_path_separator" -rm -f conftest.sh + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers config.h" + VERSION="1.4.cvs" VER_STRING="cvs-snapshot" REL_STRING="" + + + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1059,7 +1287,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:1062: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -1069,11 +1297,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:1072: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:1076: checking build system type" >&5 +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 @@ -1082,23 +1310,24 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1085: error: cannot guess build type; you must specify one" >&5 + { { 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=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:1089: error: $ac_config_sub $ac_cv_build_alias failed." >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1094: result: $ac_cv_build" >&5 +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1101: checking host system type" >&5 + +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 echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1107,19 +1336,20 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:1110: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1115: result: $ac_cv_host" >&5 +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1122: checking target system type" >&5 + +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 echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1128,18 +1358,19 @@ else test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:1131: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1136: result: $ac_cv_target" >&5 +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && @@ -1154,14 +1385,14 @@ if test "$with_win32_vcpp"; then with_win32=yes fi -echo "$as_me:1157: checking if you are configuring for another platform" >&5 +echo "$as_me:$LINENO: checking if you are configuring for another platform" >&5 echo $ECHO_N "checking if you are configuring for another platform... $ECHO_C" >&6 if test "$target" = "$build"; then - echo "$as_me:1160: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 cross_configure=0 else - echo "$as_me:1164: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cross_configure=1 fi @@ -1206,9 +1437,9 @@ esac CFLAGS="$CFLAGS $ADD_FLAGS" CXXFLAGS="$CXXFLAGS $ADD_FLAGS" -echo "$as_me:1209: checking for standard CFLAGS on this platform" >&5 +echo "$as_me:$LINENO: checking for standard CFLAGS on this platform" >&5 echo $ECHO_N "checking for standard CFLAGS on this platform... $ECHO_C" >&6 -echo "$as_me:1211: result: $ADD_FLAGS" >&5 +echo "$as_me:$LINENO: result: $ADD_FLAGS" >&5 echo "${ECHO_T}$ADD_FLAGS" >&6 if (test "$with_sdl" != yes) && \ @@ -1236,7 +1467,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1239: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1244,25 +1475,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1254: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1262: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1265: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1271,7 +1505,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1274: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1279,25 +1513,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1289: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1297: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1300: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1310,7 +1547,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1313: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1318,25 +1555,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1328: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1336: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1339: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1345,7 +1585,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1348: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1353,25 +1593,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1363: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1371: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1374: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1384,7 +1627,7 @@ fi if test -z "$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:1387: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1393,19 +1636,22 @@ else ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue -fi -ac_cv_prog_CC="cc" -echo "$as_me:1407: found $ac_dir/$ac_word" >&5 -break +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 $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_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done if test $ac_prog_rejected = yes; then @@ -1417,7 +1663,7 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" ${1+"$@"} + set dummy "$as_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi @@ -1426,10 +1672,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1429: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1432: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1440,7 +1686,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1443: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1448,25 +1694,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1458: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1466: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1469: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1479,7 +1728,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1482: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1487,25 +1736,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1497: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1505: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1508: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1517,34 +1769,41 @@ fi fi -test -z "$CC" && { { echo "$as_me:1520: error: no acceptable cc found in \$PATH" >&5 -echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1525:" \ +echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1528: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1531: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1533: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1536: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1538: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1541: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1545 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1558,22 +1817,26 @@ ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1561: checking for C compiler default output" >&5 +echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1564: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1567: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. -for ac_file in `ls a.exe conftest.exe 2>/dev/null; + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; ls a.out conftest 2>/dev/null; ls a.* conftest.* 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; @@ -1587,34 +1850,34 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1590: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1596: result: $ac_file" >&5 +echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1601: checking whether the C compiler works" >&5 +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1607: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1610: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1617: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1622,24 +1885,24 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1625: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1632: checking whether we are cross compiling" >&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1634: result: $cross_compiling" >&5 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1637: checking for executable suffix" >&5 -echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1639: \"$ac_link\"") >&5 +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1642: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1655,27 +1918,33 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1658: error: cannot compute EXEEXT: cannot compile and link" >&5 -echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1664: result: $ac_cv_exeext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1670: checking for object suffix" >&5 -echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1676 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1685,10 +1954,10 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1688: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1691: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1700,26 +1969,32 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1703: error: cannot compute OBJEXT: cannot compile" >&5 -echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1710: result: $ac_cv_objext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1714: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1720 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1732,16 +2007,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1735: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1738: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1741: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1744: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1753,21 +2028,27 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1756: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1762: checking whether $CC accepts -g" >&5 +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1768 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1777,16 +2058,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1783: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1786: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1789: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1796,7 +2077,7 @@ ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1799: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1823,16 +2104,16 @@ cat >conftest.$ac_ext <<_ACEOF #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1829: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1832: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1835: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1844,10 +2125,16 @@ if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1847 "configure" +#line $LINENO "configure" #include "confdefs.h" #include $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1857,16 +2144,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1863: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1866: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1869: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1876,9 +2163,15 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1879 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1888,16 +2181,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1891: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1894: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1897: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1900: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1934,7 +2227,7 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1937: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1942,25 +2235,28 @@ else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" -echo "$as_me:1952: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:1960: result: $CXX" >&5 + echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:1963: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1973,7 +2269,7 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1976: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1981,25 +2277,28 @@ else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CXX="$ac_prog" -echo "$as_me:1991: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:1999: result: $ac_ct_CXX" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else - echo "$as_me:2002: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2010,35 +2309,42 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi + # Provide some information about the compiler. -echo "$as_me:2014:" \ +echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:2017: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:2020: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:2022: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:2025: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:2027: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:2030: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -echo "$as_me:2033: checking whether we are using the GNU C++ compiler" >&5 +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2039 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2051,16 +2357,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2054: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2057: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2060: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2063: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -2072,21 +2378,27 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:2075: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" -echo "$as_me:2081: checking whether $CXX accepts -g" >&5 +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2087 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2096,16 +2408,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2099: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2102: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2105: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2108: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else @@ -2115,7 +2427,7 @@ ac_cv_prog_cxx_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2118: result: $ac_cv_prog_cxx_g" >&5 +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 @@ -2142,10 +2454,16 @@ for ac_declaration in \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 2145 "configure" +#line $LINENO "configure" #include "confdefs.h" #include $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2155,16 +2473,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2158: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2161: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2164: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2167: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2174,9 +2492,15 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 2177 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2186,16 +2510,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2189: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2192: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2195: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2198: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -2217,16 +2541,16 @@ 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:2220: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.make <<\EOF + cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="${MAKE}"' -EOF +_ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then @@ -2237,11 +2561,11 @@ fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:2240: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:2244: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -2249,7 +2573,7 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:2252: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2257,25 +2581,28 @@ else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -echo "$as_me:2267: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:2275: result: $RANLIB" >&5 + echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else - echo "$as_me:2278: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2284,7 +2611,7 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:2287: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2292,15 +2619,18 @@ else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_RANLIB="ranlib" -echo "$as_me:2302: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" @@ -2308,10 +2638,10 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:2311: result: $ac_ct_RANLIB" >&5 + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - echo "$as_me:2314: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2320,12 +2650,14 @@ else RANLIB="$ac_cv_prog_RANLIB" 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 -echo "$as_me:2328: checking how to run the C preprocessor" >&5 +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 @@ -2346,18 +2678,18 @@ do # 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 -#line 2349 "configure" +#line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2354: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2360: \$? = $ac_status" >&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 @@ -2380,17 +2712,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2383 "configure" +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2387: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2393: \$? = $ac_status" >&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 @@ -2427,7 +2759,7 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:2430: result: $CPP" >&5 +echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -2437,18 +2769,18 @@ do # 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 -#line 2440 "configure" +#line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2445: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2451: \$? = $ac_status" >&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 @@ -2471,17 +2803,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2474 "configure" +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2478: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2484: \$? = $ac_status" >&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 @@ -2509,7 +2841,7 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:2512: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -2520,9 +2852,11 @@ 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:2523: checking for X" >&5 + +echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 + # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" @@ -2546,10 +2880,10 @@ rm -fr conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. - cat >Imakefile <<'EOF' + cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -EOF +_ACEOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` @@ -2617,17 +2951,17 @@ if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF -#line 2620 "configure" +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2624: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2630: \$? = $ac_status" >&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 @@ -2660,9 +2994,15 @@ if test "$ac_x_libraries" = no; then ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 2663 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2672,16 +3012,16 @@ XtMalloc (0) } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2675: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2678: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2681: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2684: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. @@ -2719,7 +3059,7 @@ fi fi # $with_x != no if test "$have_x" != yes; then - echo "$as_me:2722: result: $have_x" >&5 + echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else @@ -2729,16 +3069,16 @@ else # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$as_me:2732: result: libraries $x_libraries, headers $x_includes" >&5 + echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 -EOF +_ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -2753,13 +3093,19 @@ else # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - echo "$as_me:2756: checking whether -R must be followed by a space" >&5 + echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >conftest.$ac_ext <<_ACEOF -#line 2760 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2769,16 +3115,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2772: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2775: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2778: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2781: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_nospace=yes else @@ -2788,15 +3134,21 @@ ac_R_nospace=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test $ac_R_nospace = yes; then - echo "$as_me:2791: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF -#line 2797 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2806,16 +3158,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2809: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2812: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2815: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2818: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_space=yes else @@ -2825,11 +3177,11 @@ ac_R_space=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test $ac_R_space = yes; then - echo "$as_me:2828: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else - echo "$as_me:2832: result: neither works" >&5 + echo "$as_me:$LINENO: result: neither works" >&5 echo "${ECHO_T}neither works" >&6 fi fi @@ -2849,7 +3201,7 @@ echo "${ECHO_T}neither works" >&6 # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF -#line 2852 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -2859,6 +3211,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2868,22 +3226,22 @@ XOpenDisplay (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2871: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2874: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2877: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2880: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:2886: checking for dnet_ntoa in -ldnet" >&5 +echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2891,7 +3249,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 2894 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -2901,6 +3259,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2910,16 +3274,16 @@ dnet_ntoa (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2913: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2916: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2919: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2922: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else @@ -2930,14 +3294,14 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:2933: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo "$as_me:2940: checking for dnet_ntoa in -ldnet_stub" >&5 + echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2945,7 +3309,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 2948 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -2955,6 +3319,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2964,16 +3334,16 @@ dnet_ntoa (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2967: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2970: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2973: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2976: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else @@ -2984,7 +3354,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:2987: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" @@ -3003,13 +3373,13 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - echo "$as_me:3006: checking for gethostbyname" >&5 + echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3012 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. */ @@ -3023,6 +3393,12 @@ extern "C" char gethostbyname (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3040,16 +3416,16 @@ f = gethostbyname; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3043: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3046: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3049: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3052: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else @@ -3059,11 +3435,11 @@ ac_cv_func_gethostbyname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3062: result: $ac_cv_func_gethostbyname" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then - echo "$as_me:3066: checking for gethostbyname in -lnsl" >&5 + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3071,7 +3447,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3074 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3081,6 +3457,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3090,16 +3472,16 @@ gethostbyname (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3093: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3096: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3099: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3102: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else @@ -3110,14 +3492,14 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3113: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - echo "$as_me:3120: checking for gethostbyname in -lbsd" >&5 + echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3125,7 +3507,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3128 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3135,6 +3517,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3144,16 +3532,16 @@ gethostbyname (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3147: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3150: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3153: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3156: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bsd_gethostbyname=yes else @@ -3164,7 +3552,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3167: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" @@ -3180,13 +3568,13 @@ fi # variants that don't use the nameserver (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - echo "$as_me:3183: checking for connect" >&5 + echo "$as_me:$LINENO: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3189 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. */ @@ -3200,6 +3588,12 @@ extern "C" char connect (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3217,16 +3611,16 @@ f = connect; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3220: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3223: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3226: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3229: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_connect=yes else @@ -3236,11 +3630,11 @@ ac_cv_func_connect=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3239: result: $ac_cv_func_connect" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then - echo "$as_me:3243: checking for connect in -lsocket" >&5 + echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3248,7 +3642,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3251 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3258,6 +3652,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3267,16 +3667,16 @@ connect (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3270: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3273: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3276: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3279: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else @@ -3287,7 +3687,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3290: result: $ac_cv_lib_socket_connect" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" @@ -3296,13 +3696,13 @@ fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - echo "$as_me:3299: checking for remove" >&5 + echo "$as_me:$LINENO: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3305 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. */ @@ -3316,6 +3716,12 @@ extern "C" char remove (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3333,16 +3739,16 @@ f = remove; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3336: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3339: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3342: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3345: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_remove=yes else @@ -3352,11 +3758,11 @@ ac_cv_func_remove=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3355: result: $ac_cv_func_remove" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then - echo "$as_me:3359: checking for remove in -lposix" >&5 + echo "$as_me:$LINENO: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3364,7 +3770,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3367 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3374,6 +3780,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3383,16 +3795,16 @@ remove (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3386: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3389: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3392: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3395: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_posix_remove=yes else @@ -3403,7 +3815,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3406: result: $ac_cv_lib_posix_remove" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" @@ -3412,13 +3824,13 @@ fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo "$as_me:3415: checking for shmat" >&5 + echo "$as_me:$LINENO: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3421 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. */ @@ -3432,6 +3844,12 @@ extern "C" char shmat (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3449,16 +3867,16 @@ f = shmat; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3452: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3455: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3458: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3461: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shmat=yes else @@ -3468,11 +3886,11 @@ ac_cv_func_shmat=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3471: result: $ac_cv_func_shmat" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then - echo "$as_me:3475: checking for shmat in -lipc" >&5 + echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3480,7 +3898,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3483 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3490,6 +3908,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3499,16 +3923,16 @@ shmat (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3502: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3505: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3508: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3511: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ipc_shmat=yes else @@ -3519,7 +3943,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3522: result: $ac_cv_lib_ipc_shmat" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" @@ -3537,7 +3961,7 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - echo "$as_me:3540: checking for IceConnectionNumber in -lICE" >&5 + echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3545,7 +3969,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3548 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3555,6 +3979,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char IceConnectionNumber (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3564,16 +3994,16 @@ IceConnectionNumber (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3567: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3570: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3573: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3576: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else @@ -3584,7 +4014,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3587: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" @@ -3594,19 +4024,25 @@ fi fi -echo "$as_me:3597: checking whether byte ordering is bigendian" >&5 + +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 else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. + # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF -#line 3605 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3619,24 +4055,30 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3622: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3625: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3628: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3631: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF -#line 3635 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3649,16 +4091,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3652: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3655: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3658: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3661: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else @@ -3670,16 +4112,64 @@ rm -f conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianess by grep'ing values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if fgrep 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 +fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { { echo "$as_me:3677: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 3682 "configure" +#line $LINENO "configure" #include "confdefs.h" int main () @@ -3695,38 +4185,49 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3698: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3701: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3703: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3706: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3719: result: $ac_cv_c_bigendian" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -if test $ac_cv_c_bigendian = yes; then +case $ac_cv_c_bigendian in + yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 -EOF +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianess +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianess +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac -fi - -echo "$as_me:3729: checking for $CC option to accept ANSI C" >&5 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3734,7 +4235,7 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line 3737 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -3764,6 +4265,12 @@ struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3783,16 +4290,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:3786: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3789: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3792: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3795: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break @@ -3809,15 +4316,15 @@ fi case "x$ac_cv_prog_cc_stdc" in x|xno) - echo "$as_me:3812: result: none needed" >&5 + echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) - echo "$as_me:3815: result: $ac_cv_prog_cc_stdc" >&5 + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac -echo "$as_me:3820: checking for inline" >&5 +echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3825,7 +4332,7 @@ else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF -#line 3828 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifndef __cplusplus static $ac_kw int static_foo () {return 0; } @@ -3834,16 +4341,16 @@ $ac_kw int foo () {return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3837: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3840: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3843: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3846: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else @@ -3854,28 +4361,28 @@ rm -f conftest.$ac_objext conftest.$ac_ext done fi -echo "$as_me:3857: result: $ac_cv_c_inline" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; no) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define inline -EOF +_ACEOF ;; - *) cat >>confdefs.h <>confdefs.h <<_ACEOF #define inline $ac_cv_c_inline -EOF +_ACEOF ;; esac -echo "$as_me:3872: checking for ANSI C header files" >&5 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3878 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -3883,13 +4390,13 @@ else #include _ACEOF -if { (eval echo "$as_me:3886: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3892: \$? = $ac_status" >&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 @@ -3911,7 +4418,7 @@ rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line 3914 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -3929,7 +4436,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line 3932 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -3950,7 +4457,7 @@ if test $ac_cv_header_stdc = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line 3953 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #if ((' ' & 0x0FF) == 0x020) @@ -3976,65 +4483,75 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3979: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3982: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3984: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3987: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -echo "$as_me:4000: result: $ac_cv_header_stdc" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:4016: checking for $ac_header" >&5 +echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4022 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default + #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4028: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4031: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4034: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4037: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else @@ -4044,25 +4561,33 @@ eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4047: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -EOF +_ACEOF fi + done -echo "$as_me:4057: checking for unsigned char" >&5 + +echo "$as_me:$LINENO: checking for unsigned char" >&5 echo $ECHO_N "checking for unsigned char... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4063 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4075,16 +4600,16 @@ if (sizeof (unsigned char)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4078: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4081: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4084: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4087: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_char=yes else @@ -4094,188 +4619,306 @@ ac_cv_type_unsigned_char=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4097: result: $ac_cv_type_unsigned_char" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_char" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_char" >&6 -echo "$as_me:4100: checking size of unsigned char" >&5 +echo "$as_me:$LINENO: checking size of unsigned char" >&5 echo $ECHO_N "checking size of unsigned char... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_char" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line 4109 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned char)) >= 0)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) >= 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4121: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4124: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4127: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4130: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line 4135 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned char)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4147: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4150: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4153: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4156: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 4172 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned char)) >= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) < 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4184: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4187: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4190: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4193: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line 4209 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned char)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4221: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4224: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4227: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4230: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done -ac_cv_sizeof_unsigned_char=$ac_lo +case $ac_lo in +?*) ac_cv_sizeof_unsigned_char=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned char), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned char), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:4243: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 4248 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +long longval () { return (long) (sizeof (unsigned char)); } +unsigned long ulongval () { return (long) (sizeof (unsigned char)); } +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (unsigned char))); -fclose (f); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (unsigned char))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (unsigned char)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (unsigned char)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4264: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4267: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4269: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4272: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_char=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned char), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned char), 77" >&2;} + { (exit 1); exit 1; }; } fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4285,21 +4928,28 @@ else ac_cv_sizeof_unsigned_char=0 fi fi -echo "$as_me:4288: result: $ac_cv_sizeof_unsigned_char" >&5 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_char" >&6 -cat >>confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char -EOF +_ACEOF -echo "$as_me:4294: checking for unsigned short" >&5 + +echo "$as_me:$LINENO: checking for unsigned short" >&5 echo $ECHO_N "checking for unsigned short... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4300 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4312,16 +4962,16 @@ if (sizeof (unsigned short)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4315: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4318: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4321: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4324: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_short=yes else @@ -4331,188 +4981,306 @@ ac_cv_type_unsigned_short=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4334: result: $ac_cv_type_unsigned_short" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_short" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_short" >&6 -echo "$as_me:4337: checking size of unsigned short" >&5 +echo "$as_me:$LINENO: checking size of unsigned short" >&5 echo $ECHO_N "checking size of unsigned short... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_short" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line 4346 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned short)) >= 0)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned short))) >= 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4358: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4361: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4364: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4367: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line 4372 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned short)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned short))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4384: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4387: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4390: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4393: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 4409 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned short)) >= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned short))) < 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4421: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4424: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4427: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4430: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (unsigned short))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line 4446 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned short)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned short))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4458: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4461: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4464: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4467: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done -ac_cv_sizeof_unsigned_short=$ac_lo +case $ac_lo in +?*) ac_cv_sizeof_unsigned_short=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned short), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned short), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:4480: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 4485 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +long longval () { return (long) (sizeof (unsigned short)); } +unsigned long ulongval () { return (long) (sizeof (unsigned short)); } +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (unsigned short))); -fclose (f); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (unsigned short))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (unsigned short)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (unsigned short)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4501: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4504: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4506: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4509: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_short=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned short), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned short), 77" >&2;} + { (exit 1); exit 1; }; } fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4522,21 +5290,28 @@ else ac_cv_sizeof_unsigned_short=0 fi fi -echo "$as_me:4525: result: $ac_cv_sizeof_unsigned_short" >&5 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_short" >&6 -cat >>confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short -EOF +_ACEOF -echo "$as_me:4531: checking for unsigned int" >&5 + +echo "$as_me:$LINENO: checking for unsigned int" >&5 echo $ECHO_N "checking for unsigned int... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4537 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4549,16 +5324,16 @@ if (sizeof (unsigned int)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4552: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4555: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4558: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4561: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_int=yes else @@ -4568,188 +5343,306 @@ ac_cv_type_unsigned_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4571: result: $ac_cv_type_unsigned_int" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_int" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_int" >&6 -echo "$as_me:4574: checking size of unsigned int" >&5 +echo "$as_me:$LINENO: checking size of unsigned int" >&5 echo $ECHO_N "checking size of unsigned int... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_int" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line 4583 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned int)) >= 0)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) >= 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4595: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4598: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4601: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4604: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line 4609 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned int)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4621: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4624: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4627: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4630: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 4646 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned int)) >= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) < 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4661: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4664: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4667: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line 4683 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned int)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4695: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4698: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4701: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4704: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done -ac_cv_sizeof_unsigned_int=$ac_lo +case $ac_lo in +?*) ac_cv_sizeof_unsigned_int=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned int), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:4717: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 4722 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +long longval () { return (long) (sizeof (unsigned int)); } +unsigned long ulongval () { return (long) (sizeof (unsigned int)); } +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (unsigned int))); -fclose (f); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (unsigned int))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (unsigned int)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (unsigned int)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4738: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4741: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4743: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4746: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned int), 77" >&2;} + { (exit 1); exit 1; }; } fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4759,21 +5652,28 @@ else ac_cv_sizeof_unsigned_int=0 fi fi -echo "$as_me:4762: result: $ac_cv_sizeof_unsigned_int" >&5 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_int" >&6 -cat >>confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int -EOF +_ACEOF -echo "$as_me:4768: checking for unsigned long" >&5 + +echo "$as_me:$LINENO: checking for unsigned long" >&5 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4774 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4786,16 +5686,16 @@ if (sizeof (unsigned long)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4789: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4792: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4795: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4798: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_long=yes else @@ -4805,188 +5705,306 @@ ac_cv_type_unsigned_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4808: result: $ac_cv_type_unsigned_long" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6 -echo "$as_me:4811: checking size of unsigned long" >&5 +echo "$as_me:$LINENO: checking size of unsigned long" >&5 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line 4820 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned long)) >= 0)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4832: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4835: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4838: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4841: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line 4846 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned long)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4858: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4861: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4864: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4867: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 4883 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned long)) >= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4895: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4898: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4901: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4904: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line 4920 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned long)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4932: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4935: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4938: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4941: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done -ac_cv_sizeof_unsigned_long=$ac_lo +case $ac_lo in +?*) ac_cv_sizeof_unsigned_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned long), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:4954: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 4959 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +long longval () { return (long) (sizeof (unsigned long)); } +unsigned long ulongval () { return (long) (sizeof (unsigned long)); } +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (unsigned long))); -fclose (f); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (unsigned long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (unsigned long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (unsigned long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4975: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4978: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4980: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4983: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned long), 77" >&2;} + { (exit 1); exit 1; }; } fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4996,21 +6014,28 @@ else ac_cv_sizeof_unsigned_long=0 fi fi -echo "$as_me:4999: result: $ac_cv_sizeof_unsigned_long" >&5 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6 -cat >>confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long -EOF +_ACEOF -echo "$as_me:5005: checking for unsigned long long" >&5 + +echo "$as_me:$LINENO: checking for unsigned long long" >&5 echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5011 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5023,16 +6048,16 @@ if (sizeof (unsigned long long)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5026: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5029: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5032: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5035: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_long_long=yes else @@ -5042,188 +6067,306 @@ ac_cv_type_unsigned_long_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:5045: result: $ac_cv_type_unsigned_long_long" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 -echo "$as_me:5048: checking size of unsigned long long" >&5 +echo "$as_me:$LINENO: checking size of unsigned long long" >&5 echo $ECHO_N "checking size of unsigned long long... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_long_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line 5057 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned long long)) >= 0)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long))) >= 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5069: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5072: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5075: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5078: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line 5083 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned long long)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5095: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5098: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5101: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5104: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 5120 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned long long)) >= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long))) < 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5135: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5138: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5141: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line 5157 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (unsigned long long)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5169: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5172: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5175: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5178: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done -ac_cv_sizeof_unsigned_long_long=$ac_lo +case $ac_lo in +?*) ac_cv_sizeof_unsigned_long_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned long long), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:5191: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 5196 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +long longval () { return (long) (sizeof (unsigned long long)); } +unsigned long ulongval () { return (long) (sizeof (unsigned long long)); } +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (unsigned long long))); -fclose (f); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (unsigned long long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (unsigned long long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (unsigned long long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5212: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5215: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5217: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5220: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_long_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long), 77" >&5 +echo "$as_me: error: cannot compute sizeof (unsigned long long), 77" >&2;} + { (exit 1); exit 1; }; } fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -5233,21 +6376,28 @@ else ac_cv_sizeof_unsigned_long_long=0 fi fi -echo "$as_me:5236: result: $ac_cv_sizeof_unsigned_long_long" >&5 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long" >&6 -cat >>confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long -EOF +_ACEOF -echo "$as_me:5242: checking for int *" >&5 + +echo "$as_me:$LINENO: checking for int *" >&5 echo $ECHO_N "checking for int *... $ECHO_C" >&6 if test "${ac_cv_type_int_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5248 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5260,16 +6410,16 @@ if (sizeof (int *)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5263: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5266: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5269: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5272: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int_p=yes else @@ -5279,188 +6429,306 @@ ac_cv_type_int_p=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:5282: result: $ac_cv_type_int_p" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_int_p" >&5 echo "${ECHO_T}$ac_cv_type_int_p" >&6 -echo "$as_me:5285: checking size of int *" >&5 +echo "$as_me:$LINENO: checking size of int *" >&5 echo $ECHO_N "checking size of int *... $ECHO_C" >&6 if test "${ac_cv_sizeof_int_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int_p" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line 5294 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (int *)) >= 0)] +static int test_array [1 - 2 * !(((long) (sizeof (int *))) >= 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5306: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5309: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5312: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5315: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line 5320 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (int *)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (int *))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5332: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5335: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5338: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5341: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 5357 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (int *)) >= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (int *))) < 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5369: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5372: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5375: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5378: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int *))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line 5394 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -int _array_ [1 - 2 * !((sizeof (int *)) <= $ac_mid)] +static int test_array [1 - 2 * !(((long) (sizeof (int *))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5406: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5409: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5412: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5415: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done -ac_cv_sizeof_int_p=$ac_lo +case $ac_lo in +?*) ac_cv_sizeof_int_p=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int *), 77" >&5 +echo "$as_me: error: cannot compute sizeof (int *), 77" >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:5428: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 5433 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_includes_default +long longval () { return (long) (sizeof (int *)); } +unsigned long ulongval () { return (long) (sizeof (int *)); } +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (int *))); -fclose (f); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (int *))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (int *)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (int *)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5449: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5452: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5454: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5457: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int_p=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int *), 77" >&5 +echo "$as_me: error: cannot compute sizeof (int *), 77" >&2;} + { (exit 1); exit 1; }; } fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -5470,22 +6738,24 @@ else ac_cv_sizeof_int_p=0 fi fi -echo "$as_me:5473: result: $ac_cv_sizeof_int_p" >&5 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_int_p" >&5 echo "${ECHO_T}$ac_cv_sizeof_int_p" >&6 -cat >>confdefs.h <>confdefs.h <<_ACEOF #define SIZEOF_INT_P $ac_cv_sizeof_int_p -EOF +_ACEOF + + for ac_func in getenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5482: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5488 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5499,6 +6769,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5516,16 +6792,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5519: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5522: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5525: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5528: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5535,29 +6811,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5538: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_GETENV 1 -EOF +_ACEOF fi done + for ac_func in select do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5554: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5560 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5571,6 +6848,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5588,16 +6871,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5591: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5594: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5597: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5600: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5607,29 +6890,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5610: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_SELECT 1 -EOF +_ACEOF fi done + for ac_func in snprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5626: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5632 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5643,6 +6927,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5660,16 +6950,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5663: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5666: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5669: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5672: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5679,29 +6969,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5682: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_SNPRINTF 1 -EOF +_ACEOF fi done + for ac_func in strtoull do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5698: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5704 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5715,6 +7006,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5732,16 +7029,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5735: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5738: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5741: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5744: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5751,29 +7048,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5754: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_STRTOULL 1 -EOF +_ACEOF fi done + for ac_func in strtouq do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5770: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5776 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5787,6 +7085,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5804,16 +7108,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5807: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5810: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5813: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5816: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5823,29 +7127,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5826: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_STRTOUQ 1 -EOF +_ACEOF fi done + for ac_func in strdup do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5842: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5848 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5859,6 +7164,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5876,16 +7187,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5879: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5882: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5885: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5888: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5895,29 +7206,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5898: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_STRDUP 1 -EOF +_ACEOF fi done + for ac_func in sleep do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5914: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5920 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5931,6 +7243,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5948,16 +7266,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5951: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5954: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5957: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5960: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5967,29 +7285,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5970: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_SLEEP 1 -EOF +_ACEOF fi done + for ac_func in usleep do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5986: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5992 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -6003,6 +7322,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6020,16 +7345,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6023: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6026: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6029: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6032: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -6039,29 +7364,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6042: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_USLEEP 1 -EOF +_ACEOF fi done + for ac_func in nanosleep do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:6058: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6064 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -6075,6 +7401,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6092,16 +7424,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6095: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6098: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6101: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6104: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -6111,29 +7443,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6114: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_NANOSLEEP 1 -EOF +_ACEOF fi done + for ac_func in abort do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:6130: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6136 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -6147,6 +7480,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6164,16 +7503,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6167: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6170: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6173: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6176: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -6183,29 +7522,30 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6186: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_ABORT 1 -EOF +_ACEOF fi done + for ac_func in gettimeofday do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:6202: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6208 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -6219,6 +7559,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6236,16 +7582,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6239: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6242: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6245: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6248: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -6255,30 +7601,36 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6258: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_GETTIMEOFDAY 1 -EOF +_ACEOF fi done -echo "$as_me:6271: checking for socklen_t" >&5 +echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ac_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6277 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6291,16 +7643,16 @@ if (sizeof (socklen_t)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6294: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6297: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6300: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6303: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_socklen_t=yes else @@ -6310,21 +7662,28 @@ ac_cv_type_socklen_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6313: result: $ac_cv_type_socklen_t" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 if test $ac_cv_type_socklen_t = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_SOCKLEN_T 1 -EOF +_ACEOF fi -echo "$as_me:6322: checking for struct timeval" >&5 + +echo "$as_me:$LINENO: checking for struct timeval" >&5 echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 6325 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6334,38 +7693,45 @@ struct timeval x; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6337: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6340: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6343: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6346: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:6349: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_STRUCT_TIMEVAL 1 -EOF +_ACEOF + else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:6358: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:6363: checking if compiler allows empty structs" >&5 +echo "$as_me:$LINENO: checking if compiler allows empty structs" >&5 echo $ECHO_N "checking if compiler allows empty structs... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 6366 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6375,39 +7741,45 @@ typedef struct { } junk; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6378: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6381: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6384: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6387: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:6389: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NO_EMPTY_STRUCTS 1 -EOF +_ACEOF - echo "$as_me:6399: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:6405: checking if compiler allows __attribute__" >&5 +echo "$as_me:$LINENO: checking if compiler allows __attribute__" >&5 echo $ECHO_N "checking if compiler allows __attribute__... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 6408 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6417,45 +7789,54 @@ typedef struct { } __attribute__ ((packed)) junk; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6420: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6423: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6426: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6429: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:6431: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - echo "$as_me:6437: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NO_ATTRIBUTES 1 -EOF +_ACEOF + fi rm -f conftest.$ac_objext conftest.$ac_ext + + ac_ext=cc 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 -echo "$as_me:6452: checking for hash_map.h" >&5 +echo "$as_me:$LINENO: checking for hash_map.h" >&5 echo $ECHO_N "checking for hash_map.h... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 6456 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6465,28 +7846,29 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6468: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6471: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6474: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6477: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:6480: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_HASH_MAP 1 -EOF +_ACEOF + else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:6489: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -6496,291 +7878,307 @@ 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 + use_config_interface=1 -echo "$as_me:6500: checking for configuration interface" >&5 +echo "$as_me:$LINENO: checking for configuration interface" >&5 echo $ECHO_N "checking for configuration interface... $ECHO_C" >&6 # Check whether --enable-config-interface or --disable-config-interface was given. if test "${enable_config_interface+set}" = set; then enableval="$enable_config_interface" if test "$enableval" = yes; then - echo "$as_me:6506: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 use_config_interface=1 else - echo "$as_me:6510: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 use_config_interface=0 fi else - echo "$as_me:6516: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 use_config_interface=1 + fi; # continue to support --enable-control-panel and make it do the same # as before. -echo "$as_me:6524: checking for control panel" >&5 +echo "$as_me:$LINENO: checking for control panel" >&5 echo $ECHO_N "checking for control panel... $ECHO_C" >&6 # Check whether --enable-control-panel or --disable-control-panel was given. if test "${enable_control_panel+set}" = set; then enableval="$enable_control_panel" if test "$enableval" = yes; then - echo "$as_me:6530: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 use_config_interface=1 else - echo "$as_me:6534: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 use_config_interface=0 fi else - echo "$as_me:6540: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 use_config_interface=1 + fi; if test "$use_config_interface" = 1; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_CONFIG_INTERFACE 1 -EOF +_ACEOF else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_CONFIG_INTERFACE 0 -EOF +_ACEOF fi -echo "$as_me:6558: checking for new PIT model" >&5 +echo "$as_me:$LINENO: checking for new PIT model" >&5 echo $ECHO_N "checking for new PIT model... $ECHO_C" >&6 # Check whether --enable-new-pit or --disable-new-pit was given. if test "${enable_new_pit+set}" = set; then enableval="$enable_new_pit" if test "$enableval" = yes; then - echo "$as_me:6564: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_NEW_PIT 1 -EOF +_ACEOF else - echo "$as_me:6571: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_NEW_PIT 0 -EOF +_ACEOF fi else - echo "$as_me:6580: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_NEW_PIT 1 -EOF +_ACEOF + + fi; -echo "$as_me:6588: checking for realtime PIT" >&5 + +echo "$as_me:$LINENO: checking for realtime PIT" >&5 echo $ECHO_N "checking for realtime PIT... $ECHO_C" >&6 # Check whether --enable-realtime-pit or --disable-realtime-pit was given. if test "${enable_realtime_pit+set}" = set; then enableval="$enable_realtime_pit" if test "$enableval" = yes; then - echo "$as_me:6594: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_REALTIME_PIT 1 -EOF +_ACEOF else - echo "$as_me:6601: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_REALTIME_PIT 0 -EOF +_ACEOF fi else - echo "$as_me:6610: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_REALTIME_PIT 0 -EOF +_ACEOF + + fi; -echo "$as_me:6618: checking for slowdown timer" >&5 + +echo "$as_me:$LINENO: checking for slowdown timer" >&5 echo $ECHO_N "checking for slowdown timer... $ECHO_C" >&6 # Check whether --enable-slowdown or --disable-slowdown was given. if test "${enable_slowdown+set}" = set; then enableval="$enable_slowdown" if test "$enableval" = yes; then - echo "$as_me:6624: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_SLOWDOWN_TIMER 1 -EOF +_ACEOF SLOWDOWN_OBJS='$(SLOWDOWN_OBJS)' else - echo "$as_me:6632: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_SLOWDOWN_TIMER 0 -EOF +_ACEOF SLOWDOWN_OBJS='' fi else - echo "$as_me:6642: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_SLOWDOWN_TIMER 0 -EOF +_ACEOF SLOWDOWN_OBJS='' + fi; -echo "$as_me:6652: checking for idle hack" >&5 + + +echo "$as_me:$LINENO: checking for idle hack" >&5 echo $ECHO_N "checking for idle hack... $ECHO_C" >&6 # Check whether --enable-idle-hack or --disable-idle-hack was given. if test "${enable_idle_hack+set}" = set; then enableval="$enable_idle_hack" if test "$enableval" = yes; then - echo "$as_me:6658: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_IDLE_HACK 1 -EOF +_ACEOF else - echo "$as_me:6665: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_IDLE_HACK 0 -EOF +_ACEOF fi else - echo "$as_me:6674: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_IDLE_HACK 0 -EOF +_ACEOF + + fi; -echo "$as_me:6682: checking for number of processors" >&5 + + +echo "$as_me:$LINENO: checking for number of processors" >&5 echo $ECHO_N "checking for number of processors... $ECHO_C" >&6 # Check whether --enable-processors or --disable-processors was given. if test "${enable_processors+set}" = set; then enableval="$enable_processors" case "$enableval" in 1) - echo "$as_me:6689: result: 1" >&5 + echo "$as_me:$LINENO: result: 1" >&5 echo "${ECHO_T}1" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SMP_PROCESSORS 1 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_BOOTSTRAP_PROCESSOR 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IOAPIC_DEFAULT_ID 1 -EOF +_ACEOF ;; 2) - echo "$as_me:6705: result: 2" >&5 + echo "$as_me:$LINENO: result: 2" >&5 echo "${ECHO_T}2" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SMP_PROCESSORS 2 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_BOOTSTRAP_PROCESSOR 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IOAPIC_DEFAULT_ID 2 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_CPU_SMF 0 -EOF +_ACEOF ;; 4) - echo "$as_me:6725: result: 4" >&5 + echo "$as_me:$LINENO: result: 4" >&5 echo "${ECHO_T}4" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SMP_PROCESSORS 4 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_BOOTSTRAP_PROCESSOR 2 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IOAPIC_DEFAULT_ID 4 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_CPU_SMF 0 -EOF +_ACEOF ;; 8) - echo "$as_me:6745: result: 8" >&5 + echo "$as_me:$LINENO: result: 8" >&5 echo "${ECHO_T}8" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SMP_PROCESSORS 8 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_BOOTSTRAP_PROCESSOR 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IOAPIC_DEFAULT_ID 0x11 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_CPU_SMF 0 -EOF +_ACEOF ;; *) echo " " echo "WARNING: processors != 1,2,4,8 can work, but you need to modify rombios.c manually" - echo "$as_me:6767: result: $enable_val" >&5 + echo "$as_me:$LINENO: result: $enable_val" >&5 echo "${ECHO_T}$enable_val" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SMP_PROCESSORS $enable_val -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_BOOTSTRAP_PROCESSOR 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IOAPIC_DEFAULT_ID $enable_val -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_CPU_SMF 0 -EOF +_ACEOF ;; esac @@ -6788,30 +8186,37 @@ EOF else - echo "$as_me:6791: result: 1" >&5 + echo "$as_me:$LINENO: result: 1" >&5 echo "${ECHO_T}1" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SMP_PROCESSORS 1 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_BOOTSTRAP_PROCESSOR 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IOAPIC_DEFAULT_ID 1 -EOF +_ACEOF bx_procs=1 + fi; -echo "$as_me:6809: checking if compiler allows blank labels" >&5 +echo "$as_me:$LINENO: checking if compiler allows blank labels" >&5 echo $ECHO_N "checking if compiler allows blank labels... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 6812 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6821,38 +8226,45 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6824: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6827: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6830: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6833: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:6835: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - echo "$as_me:6841: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NO_BLANK_LABELS 1 -EOF +_ACEOF + fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:6850: checking if compiler allows LL for 64-bit constants" >&5 +echo "$as_me:$LINENO: checking if compiler allows LL for 64-bit constants" >&5 echo $ECHO_N "checking if compiler allows LL for 64-bit constants... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 6853 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -6862,120 +8274,124 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6865: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6868: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6871: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6874: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:6876: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - echo "$as_me:6882: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_64BIT_CONSTANTS_USE_LL 0 -EOF +_ACEOF + fi rm -f conftest.$ac_objext conftest.$ac_ext use_x86_64=0 -echo "$as_me:6892: checking for x86-64 support" >&5 +echo "$as_me:$LINENO: checking for x86-64 support" >&5 echo $ECHO_N "checking for x86-64 support... $ECHO_C" >&6 # Check whether --enable-x86-64 or --disable-x86-64 was given. if test "${enable_x86_64+set}" = set; then enableval="$enable_x86_64" if test "$enableval" = yes; then - echo "$as_me:6898: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 OBJS64='$(OBJS64)' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_X86_64 1 -EOF +_ACEOF use_x86_64=1 else - echo "$as_me:6907: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 OBJS64='' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_X86_64 0 -EOF +_ACEOF fi else - echo "$as_me:6918: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 OBJS64='' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_X86_64 0 -EOF +_ACEOF + + fi; -echo "$as_me:6927: checking for cpu level" >&5 + +echo "$as_me:$LINENO: checking for cpu level" >&5 echo $ECHO_N "checking for cpu level... $ECHO_C" >&6 # Check whether --enable-cpu-level or --disable-cpu-level was given. if test "${enable_cpu_level+set}" = set; then enableval="$enable_cpu_level" case "$enableval" in 3) - echo "$as_me:6934: result: 3" >&5 + echo "$as_me:$LINENO: result: 3" >&5 echo "${ECHO_T}3" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL 3 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL_HACKED 3 -EOF +_ACEOF ;; 4) - echo "$as_me:6946: result: 4" >&5 + echo "$as_me:$LINENO: result: 4" >&5 echo "${ECHO_T}4" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL 4 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL_HACKED 4 -EOF +_ACEOF ;; 5) - echo "$as_me:6958: result: 5" >&5 + echo "$as_me:$LINENO: result: 5" >&5 echo "${ECHO_T}5" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL 5 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL_HACKED 5 -EOF +_ACEOF ;; 6) - echo "$as_me:6970: result: 6" >&5 + echo "$as_me:$LINENO: result: 6" >&5 echo "${ECHO_T}6" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL 6 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL_HACKED 6 -EOF +_ACEOF ;; *) @@ -6994,58 +8410,60 @@ else # for multiprocessors, cpu level must be 6 if test "$bx_procs" -gt 1 -o "$use_x86_64" = 1; then - echo "$as_me:6997: result: 6" >&5 + echo "$as_me:$LINENO: result: 6" >&5 echo "${ECHO_T}6" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL 6 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL_HACKED 6 -EOF +_ACEOF bx_cpu_level=6 else - echo "$as_me:7009: result: 5" >&5 + echo "$as_me:$LINENO: result: 5" >&5 echo "${ECHO_T}5" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL 5 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_CPU_LEVEL_HACKED 5 -EOF +_ACEOF bx_cpu_level=5 fi + fi; -echo "$as_me:7024: checking for APIC support" >&5 + +echo "$as_me:$LINENO: checking for APIC support" >&5 echo $ECHO_N "checking for APIC support... $ECHO_C" >&6 # Check whether --enable-apic or --disable-apic was given. if test "${enable_apic+set}" = set; then enableval="$enable_apic" if test "$enableval" = yes; then - echo "$as_me:7030: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_APIC 1 -EOF +_ACEOF IOAPIC_OBJS='ioapic.o' APIC_OBJS='apic.o' else - echo "$as_me:7039: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if test "$bx_procs" -gt 1; then echo "Number of processors = $bx_procs" echo "ERROR: With processors > 1 you must use --enable-apic" exit 1 fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_APIC 0 -EOF +_ACEOF IOAPIC_OBJS='' APIC_OBJS='' @@ -7055,128 +8473,237 @@ else if test "$bx_procs" -gt 1 -o "$bx_cpu_level" -gt 5; then # enable APIC by default, if processors>1 or if cpulevel>5 - echo "$as_me:7058: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_APIC 1 -EOF +_ACEOF IOAPIC_OBJS='ioapic.o' APIC_OBJS='apic.o' else - echo "$as_me:7067: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_APIC 0 -EOF +_ACEOF IOAPIC_OBJS='' APIC_OBJS='' fi + fi; -echo "$as_me:7079: checking for split hard disk image support" >&5 + + +echo "$as_me:$LINENO: checking for split hard disk image support" >&5 echo $ECHO_N "checking for split hard disk image support... $ECHO_C" >&6 # Check whether --enable-split-hd or --disable-split-hd was given. if test "${enable_split_hd+set}" = set; then enableval="$enable_split_hd" if test "$enableval" = yes; then - echo "$as_me:7085: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SPLIT_HD_SUPPORT 1 -EOF +_ACEOF else - echo "$as_me:7092: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SPLIT_HD_SUPPORT 0 -EOF +_ACEOF fi else - echo "$as_me:7101: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SPLIT_HD_SUPPORT 1 -EOF +_ACEOF + + fi; -echo "$as_me:7109: checking for NE2000 support" >&5 + +echo "$as_me:$LINENO: checking for NE2000 support" >&5 echo $ECHO_N "checking for NE2000 support... $ECHO_C" >&6 # Check whether --enable-ne2000 or --disable-ne2000 was given. if test "${enable_ne2000+set}" = set; then enableval="$enable_ne2000" if test "$enableval" = yes; then - echo "$as_me:7115: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NE2K_SUPPORT 1 -EOF +_ACEOF NE2K_OBJS='ne2k.o eth.o eth_null.o' - echo "$as_me:7122: checking for net/bpf.h" >&5 + if test "${ac_cv_header_net_bpf_h+set}" = set; then + echo "$as_me:$LINENO: checking for net/bpf.h" >&5 +echo $ECHO_N "checking for net/bpf.h... $ECHO_C" >&6 +if test "${ac_cv_header_net_bpf_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_net_bpf_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_bpf_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking net/bpf.h usability" >&5 +echo $ECHO_N "checking net/bpf.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking net/bpf.h presence" >&5 +echo $ECHO_N "checking net/bpf.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -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 + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: net/bpf.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: net/bpf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: net/bpf.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: net/bpf.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: net/bpf.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: net/bpf.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: net/bpf.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: net/bpf.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: net/bpf.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: net/bpf.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for net/bpf.h" >&5 echo $ECHO_N "checking for net/bpf.h... $ECHO_C" >&6 if test "${ac_cv_header_net_bpf_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 7128 "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:7132: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:7138: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes + ac_cv_header_net_bpf_h=$ac_header_preproc fi -if test -z "$ac_cpp_err"; then - ac_cv_header_net_bpf_h=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_net_bpf_h=no -fi -rm -f conftest.err conftest.$ac_ext -fi -echo "$as_me:7157: result: $ac_cv_header_net_bpf_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_net_bpf_h" >&5 echo "${ECHO_T}$ac_cv_header_net_bpf_h" >&6 + +fi if test $ac_cv_header_net_bpf_h = yes; then NE2K_OBJS="$NE2K_OBJS eth_fbsd.o" fi - echo "$as_me:7163: checking for netpacket/packet.h" >&5 + + if test "${ac_cv_header_netpacket_packet_h+set}" = set; then + echo "$as_me:$LINENO: checking for netpacket/packet.h" >&5 echo $ECHO_N "checking for netpacket/packet.h... $ECHO_C" >&6 if test "${ac_cv_header_netpacket_packet_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_netpacket_packet_h" >&5 +echo "${ECHO_T}$ac_cv_header_netpacket_packet_h" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 7169 "configure" + # Is the header compilable? +echo "$as_me:$LINENO: checking netpacket/packet.h usability" >&5 +echo $ECHO_N "checking netpacket/packet.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking netpacket/packet.h presence" >&5 +echo $ECHO_N "checking netpacket/packet.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:7173: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:7179: \$? = $ac_status" >&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 @@ -7187,45 +8714,73 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_netpacket_packet_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_cv_header_netpacket_packet_h=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: netpacket/packet.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: netpacket/packet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: netpacket/packet.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: netpacket/packet.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: netpacket/packet.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: netpacket/packet.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: netpacket/packet.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: netpacket/packet.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: netpacket/packet.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: netpacket/packet.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for netpacket/packet.h" >&5 +echo $ECHO_N "checking for netpacket/packet.h... $ECHO_C" >&6 +if test "${ac_cv_header_netpacket_packet_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_netpacket_packet_h=$ac_header_preproc fi -echo "$as_me:7198: result: $ac_cv_header_netpacket_packet_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_netpacket_packet_h" >&5 echo "${ECHO_T}$ac_cv_header_netpacket_packet_h" >&6 + +fi if test $ac_cv_header_netpacket_packet_h = yes; then NE2K_OBJS="$NE2K_OBJS eth_linux.o" fi - echo "$as_me:7204: checking for linux/netlink.h" >&5 + + echo "$as_me:$LINENO: checking for linux/netlink.h" >&5 echo $ECHO_N "checking for linux/netlink.h... $ECHO_C" >&6 if test "${ac_cv_header_linux_netlink_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7210 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include + #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7219: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7222: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7225: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7228: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_linux_netlink_h=yes else @@ -7235,42 +8790,45 @@ ac_cv_header_linux_netlink_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7238: result: $ac_cv_header_linux_netlink_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_linux_netlink_h" >&5 echo "${ECHO_T}$ac_cv_header_linux_netlink_h" >&6 if test $ac_cv_header_linux_netlink_h = yes; then NE2K_OBJS="$NE2K_OBJS eth_tap.o" - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ETHERTAP 1 -EOF +_ACEOF + fi - echo "$as_me:7249: checking for linux/if_tun.h" >&5 + + echo "$as_me:$LINENO: checking for linux/if_tun.h" >&5 echo $ECHO_N "checking for linux/if_tun.h... $ECHO_C" >&6 if test "${ac_cv_header_linux_if_tun_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7255 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include + #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7264: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7267: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7270: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7273: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_linux_if_tun_h=yes else @@ -7280,17 +8838,19 @@ ac_cv_header_linux_if_tun_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7283: result: $ac_cv_header_linux_if_tun_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_tun_h" >&5 echo "${ECHO_T}$ac_cv_header_linux_if_tun_h" >&6 if test $ac_cv_header_linux_if_tun_h = yes; then NE2K_OBJS="$NE2K_OBJS eth_tuntap.o" - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TUNTAP 1 -EOF +_ACEOF + fi + case "$target" in *-pc-windows* | *-pc-winnt* | *-pc-cygwin* | *-pc-mingw32*) NE2K_OBJS="$NE2K_OBJS eth_win32.o" @@ -7298,429 +8858,421 @@ fi esac networking=yes else - echo "$as_me:7301: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NE2K_SUPPORT 0 -EOF +_ACEOF NE2K_OBJS='' networking=no fi else - echo "$as_me:7312: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NE2K_SUPPORT 0 -EOF +_ACEOF NE2K_OBJS='' networking=no + fi; -echo "$as_me:7323: checking for i440FX PCI support" >&5 + + +echo "$as_me:$LINENO: checking for i440FX PCI support" >&5 echo $ECHO_N "checking for i440FX PCI support... $ECHO_C" >&6 # Check whether --enable-pci or --disable-pci was given. if test "${enable_pci+set}" = set; then enableval="$enable_pci" if test "$enableval" = yes; then - echo "$as_me:7329: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PCI_SUPPORT 1 -EOF +_ACEOF PCI_OBJ='pci.o pci2isa.o' else - echo "$as_me:7337: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PCI_SUPPORT 0 -EOF +_ACEOF PCI_OBJ='' fi else - echo "$as_me:7347: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PCI_SUPPORT 0 -EOF +_ACEOF PCI_OBJ='' + fi; -echo "$as_me:7357: checking for Promise DC2300 VLB-IDE support" >&5 + +echo "$as_me:$LINENO: checking for Promise DC2300 VLB-IDE support" >&5 echo $ECHO_N "checking for Promise DC2300 VLB-IDE support... $ECHO_C" >&6 # Check whether --enable-dc2300-vlb-ide or --disable-dc2300-vlb-ide was given. if test "${enable_dc2300_vlb_ide+set}" = set; then enableval="$enable_dc2300_vlb_ide" if test "$enableval" = yes; then - echo "$as_me:7363: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PDC20230C_VLBIDE_SUPPORT 1 -EOF +_ACEOF else - echo "$as_me:7370: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PDC20230C_VLBIDE_SUPPORT 0 -EOF +_ACEOF fi else - echo "$as_me:7379: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PDC20230C_VLBIDE_SUPPORT 0 -EOF +_ACEOF + + fi; -echo "$as_me:7387: checking for 4Meg pages support" >&5 + +echo "$as_me:$LINENO: checking for 4Meg pages support" >&5 echo $ECHO_N "checking for 4Meg pages support... $ECHO_C" >&6 # Check whether --enable-4meg-pages or --disable-4meg-pages was given. if test "${enable_4meg_pages+set}" = set; then enableval="$enable_4meg_pages" if test "$enableval" = yes; then - echo "$as_me:7393: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_4MEG_PAGES 1 -EOF +_ACEOF else - echo "$as_me:7400: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_4MEG_PAGES 0 -EOF +_ACEOF fi else if test "$bx_cpu_level" -gt 5; then - echo "$as_me:7410: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_4MEG_PAGES 1 -EOF +_ACEOF else - echo "$as_me:7417: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_4MEG_PAGES 0 -EOF +_ACEOF fi + fi; -echo "$as_me:7427: checking for PAE support" >&5 + +echo "$as_me:$LINENO: checking for PAE support" >&5 echo $ECHO_N "checking for PAE support... $ECHO_C" >&6 # Check whether --enable-pae or --disable-pae was given. if test "${enable_pae+set}" = set; then enableval="$enable_pae" if test "$enableval" = yes; then - echo "$as_me:7433: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SupportPAE 1 -EOF +_ACEOF else - echo "$as_me:7440: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SupportPAE 0 -EOF +_ACEOF fi else if test "$bx_cpu_level" -gt 5; then - echo "$as_me:7450: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SupportPAE 1 -EOF +_ACEOF else - echo "$as_me:7457: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SupportPAE 0 -EOF +_ACEOF fi + fi; -echo "$as_me:7467: checking for guest to host TLB support" >&5 + +echo "$as_me:$LINENO: checking for guest to host TLB support" >&5 echo $ECHO_N "checking for guest to host TLB support... $ECHO_C" >&6 # Check whether --enable-guest2host-tlb or --disable-guest2host-tlb was given. if test "${enable_guest2host_tlb+set}" = set; then enableval="$enable_guest2host_tlb" if test "$enableval" = yes; then - echo "$as_me:7473: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportGuest2HostTLB 1 -EOF - + speedup_guest2host_tlb=1 else - echo "$as_me:7480: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportGuest2HostTLB 0 -EOF - + speedup_guest2host_tlb=0 fi else - echo "$as_me:7489: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportGuest2HostTLB 0 -EOF + speedup_guest2host_tlb=0 + fi; -echo "$as_me:7497: checking for repeated IO and mem copy speedups" >&5 +echo "$as_me:$LINENO: checking for repeated IO and mem copy speedups" >&5 echo $ECHO_N "checking for repeated IO and mem copy speedups... $ECHO_C" >&6 # Check whether --enable-repeat-speedups or --disable-repeat-speedups was given. if test "${enable_repeat_speedups+set}" = set; then enableval="$enable_repeat_speedups" if test "$enableval" = yes; then - echo "$as_me:7503: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportRepeatSpeedups 1 -EOF - + speedup_repeat=1 else - echo "$as_me:7510: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportRepeatSpeedups 0 -EOF - + speedup_repeat=0 fi else - echo "$as_me:7519: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportRepeatSpeedups 0 -EOF + speedup_repeat=0 + fi; -echo "$as_me:7527: checking for instruction cache support" >&5 +echo "$as_me:$LINENO: checking for instruction cache support" >&5 echo $ECHO_N "checking for instruction cache support... $ECHO_C" >&6 # Check whether --enable-icache or --disable-icache was given. if test "${enable_icache+set}" = set; then enableval="$enable_icache" if test "$enableval" = yes; then - echo "$as_me:7533: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportICache 1 -EOF - + speedup_iCache=1 else - echo "$as_me:7540: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportICache 0 -EOF - + speedup_iCache=0 fi else - echo "$as_me:7549: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportICache 0 -EOF + speedup_iCache=0 + fi; -echo "$as_me:7557: checking for global pages support" >&5 +echo "$as_me:$LINENO: checking for global pages support" >&5 echo $ECHO_N "checking for global pages support... $ECHO_C" >&6 # Check whether --enable-global-pages or --disable-global-pages was given. if test "${enable_global_pages+set}" = set; then enableval="$enable_global_pages" if test "$enableval" = yes; then - echo "$as_me:7563: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SupportGlobalPages 1 -EOF +_ACEOF else - echo "$as_me:7570: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SupportGlobalPages 0 -EOF +_ACEOF fi else if test "$bx_cpu_level" -gt 5; then # enable by default - echo "$as_me:7581: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SupportGlobalPages 1 -EOF +_ACEOF else - echo "$as_me:7588: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SupportGlobalPages 0 -EOF +_ACEOF fi + fi; -echo "$as_me:7598: checking for host specific inline assembly accelerations" >&5 +echo "$as_me:$LINENO: checking for host specific inline assembly accelerations" >&5 echo $ECHO_N "checking for host specific inline assembly accelerations... $ECHO_C" >&6 # Check whether --enable-host-specific-asms or --disable-host-specific-asms was given. if test "${enable_host_specific_asms+set}" = set; then enableval="$enable_host_specific_asms" if test "$enableval" = yes; then - echo "$as_me:7604: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportHostAsms 1 -EOF - + speedup_host_specific_asms=1 else - echo "$as_me:7611: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportHostAsms 0 -EOF - + speedup_host_specific_asms=0 fi else - echo "$as_me:7620: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF -#define BX_SupportHostAsms 1 -EOF + speedup_host_specific_asms=1 + fi; -echo "$as_me:7628: checking whether to ignore bad MSR references" >&5 +echo "$as_me:$LINENO: checking whether to ignore bad MSR references" >&5 echo $ECHO_N "checking whether to ignore bad MSR references... $ECHO_C" >&6 # Check whether --enable-ignore-bad-msr or --disable-ignore-bad-msr was given. if test "${enable_ignore_bad_msr+set}" = set; then enableval="$enable_ignore_bad_msr" if test "$enableval" = yes; then - echo "$as_me:7634: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IGNORE_BAD_MSR 1 -EOF +_ACEOF else - echo "$as_me:7641: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IGNORE_BAD_MSR 0 -EOF +_ACEOF fi else # default: normally disabled, but in x86-64 mode enable it. if test "$use_x86_64" = 1; then - echo "$as_me:7652: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IGNORE_BAD_MSR 1 -EOF +_ACEOF else - echo "$as_me:7659: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IGNORE_BAD_MSR 0 -EOF +_ACEOF fi + fi; -echo "$as_me:7669: checking for port e9 hack" >&5 +echo "$as_me:$LINENO: checking for port e9 hack" >&5 echo $ECHO_N "checking for port e9 hack... $ECHO_C" >&6 # Check whether --enable-port-e9-hack or --disable-port-e9-hack was given. if test "${enable_port_e9_hack+set}" = set; then enableval="$enable_port_e9_hack" if test "$enableval" = yes; then - echo "$as_me:7675: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PORT_E9_HACK 1 -EOF +_ACEOF else - echo "$as_me:7682: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PORT_E9_HACK 0 -EOF +_ACEOF fi else - echo "$as_me:7691: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_PORT_E9_HACK 1 -EOF +_ACEOF + + fi; -echo "$as_me:7699: checking for use of .cpp as suffix" >&5 + +echo "$as_me:$LINENO: checking for use of .cpp as suffix" >&5 echo $ECHO_N "checking for use of .cpp as suffix... $ECHO_C" >&6 # Check whether --enable-cpp or --disable-cpp was given. if test "${enable_cpp+set}" = set; then enableval="$enable_cpp" if test "$enableval" = yes; then - echo "$as_me:7705: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SUFFIX_LINE='.SUFFIXES: .cpp' CPP_SUFFIX='cpp' else - echo "$as_me:7710: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SUFFIX_LINE='.SUFFIXES: .cc' CPP_SUFFIX='cc' fi else - echo "$as_me:7717: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SUFFIX_LINE='.SUFFIXES: .cc' CPP_SUFFIX='cc' + fi; + + if test "$enable_cpp" = yes; then echo "moving .cc source files to .cpp" sourcefiles=`find . -name "*.cc" -print` @@ -7736,26 +9288,28 @@ if test "$enable_cpp" = yes; then fi fi -echo "$as_me:7739: checking for Bochs internal debugger support" >&5 + + +echo "$as_me:$LINENO: checking for Bochs internal debugger support" >&5 echo $ECHO_N "checking for Bochs internal debugger support... $ECHO_C" >&6 # Check whether --enable-debugger or --disable-debugger was given. if test "${enable_debugger+set}" = set; then enableval="$enable_debugger" if test "$enableval" = yes; then - echo "$as_me:7745: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_DEBUGGER 1 -EOF +_ACEOF DEBUGGER_VAR='$(DEBUGGER_LIB)' bx_debugger=1 else - echo "$as_me:7754: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_DEBUGGER 0 -EOF +_ACEOF DEBUGGER_VAR='' bx_debugger=0 @@ -7763,105 +9317,197 @@ EOF else - echo "$as_me:7766: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_DEBUGGER 0 -EOF +_ACEOF DEBUGGER_VAR='' bx_debugger=0 + fi; -echo "$as_me:7777: checking for external debugger" >&5 + +echo "$as_me:$LINENO: checking for external debugger" >&5 echo $ECHO_N "checking for external debugger... $ECHO_C" >&6 EXT_DEBUG_OBJS='' # Check whether --enable-external-debugger or --disable-external-debugger was given. if test "${enable_external_debugger+set}" = set; then enableval="$enable_external_debugger" if test "$enableval" = yes; then - echo "$as_me:7784: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_EXTERNAL_DEBUGGER 1 -EOF +_ACEOF EXT_DEBUG_OBJS=extdb.o else - echo "$as_me:7792: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else - echo "$as_me:7797: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; -echo "$as_me:7802: checking for disassembler support" >&5 + +echo "$as_me:$LINENO: checking for disassembler support" >&5 echo $ECHO_N "checking for disassembler support... $ECHO_C" >&6 # Check whether --enable-disasm or --disable-disasm was given. if test "${enable_disasm+set}" = set; then enableval="$enable_disasm" if test "$enableval" = yes; then - echo "$as_me:7808: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_DISASM 1 -EOF +_ACEOF DISASM_VAR='$(DISASM_LIB)' else - echo "$as_me:7816: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if test "$bx_debugger" = 1; then echo "ERROR: debugger is enabled, so --enable-disasm is required" exit 1 fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_DISASM 0 -EOF +_ACEOF DISASM_VAR='' fi else if test "$bx_debugger" = 1; then - echo "$as_me:7831: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_DISASM 1 -EOF +_ACEOF DISASM_VAR='$(DISASM_LIB)' else - echo "$as_me:7839: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_DISASM 0 -EOF +_ACEOF DISASM_VAR='' fi + fi; + +echo "$as_me:$LINENO: checking for ALL optimizations enabled" >&5 +echo $ECHO_N "checking for ALL optimizations enabled... $ECHO_C" >&6 +# Check whether --enable-all-optimizations or --disable-all-optimizations was given. +if test "${enable_all_optimizations+set}" = set; then + enableval="$enable_all_optimizations" + if test "$enableval" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + speedups_all=1 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + speedups_all=0 + fi + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + speedups_all=0 + + +fi; + +# +# Optimizations section. Decide what the status of various optimizations +# should be based on configure choices and other factors. +# + +if test "$speedups_all" = 1; then + # Configure requested to force all options enabled. + speedup_guest2host_tlb=1 + speedup_repeat=1 + speedup_iCache=1 + speedup_host_specific_asms=1 +fi + +if test "$speedup_guest2host_tlb" = 1; then + cat >>confdefs.h <<\_ACEOF +#define BX_SupportGuest2HostTLB 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define BX_SupportGuest2HostTLB 0 +_ACEOF + +fi + +if test "$speedup_repeat" = 1; then + cat >>confdefs.h <<\_ACEOF +#define BX_SupportRepeatSpeedups 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define BX_SupportRepeatSpeedups 0 +_ACEOF + +fi + +if test "$speedup_iCache" = 1; then + cat >>confdefs.h <<\_ACEOF +#define BX_SupportICache 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define BX_SupportICache 0 +_ACEOF + +fi + +if test "$speedup_host_specific_asms" = 1; then + cat >>confdefs.h <<\_ACEOF +#define BX_SupportHostAsms 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define BX_SupportHostAsms 0 +_ACEOF + +fi + + + READLINE_LIB="" rl_without_curses_ok=no rl_with_curses_ok=no -echo "$as_me:7854: checking if readline works without -lcurses" >&5 +echo "$as_me:$LINENO: checking if readline works without -lcurses" >&5 echo $ECHO_N "checking if readline works without -lcurses... $ECHO_C" >&6 OLD_LIBS=$LIBS LIBS="$LIBS -lreadline" if test "$cross_compiling" = yes; then - { { echo "$as_me:7859: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 7864 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -7870,39 +9516,40 @@ else _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:7873: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7876: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:7878: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7881: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:7883: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rl_without_curses_ok=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - echo "$as_me:7890: result: no" >&5 +( exit $ac_status ) + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7896: checking if readline works with -lcurses" >&5 +echo "$as_me:$LINENO: checking if readline works with -lcurses" >&5 echo $ECHO_N "checking if readline works with -lcurses... $ECHO_C" >&6 LIBS="$LIBS -lcurses" if test "$cross_compiling" = yes; then - { { echo "$as_me:7900: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 7905 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -7911,24 +9558,25 @@ else _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:7914: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7917: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:7919: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7922: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:7924: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rl_with_curses_ok=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - echo "$as_me:7931: result: no" >&5 +( exit $ac_status ) + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -7936,82 +9584,122 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi LIBS=$OLD_LIBS -echo "$as_me:7939: checking whether user wants readline" >&5 +echo "$as_me:$LINENO: checking whether user wants readline" >&5 echo $ECHO_N "checking whether user wants readline... $ECHO_C" >&6 # Check whether --enable-readline or --disable-readline was given. if test "${enable_readline+set}" = set; then enableval="$enable_readline" if test "$enableval" = yes; then - echo "$as_me:7945: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 want_readline=yes else - echo "$as_me:7949: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 want_readline=no fi else - echo "$as_me:7955: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 want_readline=yes + fi; use_readline=0 -echo "$as_me:7962: checking whether to use readline" >&5 +echo "$as_me:$LINENO: checking whether to use readline" >&5 echo $ECHO_N "checking whether to use readline... $ECHO_C" >&6 if test "$want_readline" = yes; then if test "$bx_debugger" = 1; then if test "$rl_without_curses_ok" = yes; then - echo "$as_me:7967: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 -EOF +_ACEOF READLINE_LIB="-lreadline" use_readline=1 elif test "$rl_with_curses_ok" = yes; then - echo "$as_me:7976: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 -EOF +_ACEOF READLINE_LIB="-lreadline -lcurses" use_readline=1 else - echo "$as_me:7985: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo WARNING: The readline library was disabled because it was not found. fi else - echo "$as_me:7990: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else - echo "$as_me:7994: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:7998: checking for readline/history.h" >&5 + +if test "${ac_cv_header_readline_history_h+set}" = set; then + echo "$as_me:$LINENO: checking for readline/history.h" >&5 echo $ECHO_N "checking for readline/history.h... $ECHO_C" >&6 if test "${ac_cv_header_readline_history_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 +echo "${ECHO_T}$ac_cv_header_readline_history_h" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 8004 "configure" + # Is the header compilable? +echo "$as_me:$LINENO: checking readline/history.h usability" >&5 +echo $ECHO_N "checking readline/history.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking readline/history.h presence" >&5 +echo $ECHO_N "checking readline/history.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:8008: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:8014: \$? = $ac_status" >&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 @@ -8022,92 +9710,126 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_readline_history_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_cv_header_readline_history_h=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: readline/history.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: readline/history.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: readline/history.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: readline/history.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: readline/history.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: readline/history.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for readline/history.h" >&5 +echo $ECHO_N "checking for readline/history.h... $ECHO_C" >&6 +if test "${ac_cv_header_readline_history_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_readline_history_h=$ac_header_preproc fi -echo "$as_me:8033: result: $ac_cv_header_readline_history_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 echo "${ECHO_T}$ac_cv_header_readline_history_h" >&6 -if test $ac_cv_header_readline_history_h = yes; then - cat >>confdefs.h <<\EOF -#define HAVE_READLINE_HISTORY_H 1 -EOF fi +if test $ac_cv_header_readline_history_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_READLINE_HISTORY_H 1 +_ACEOF + + +fi + + INSTRUMENT_DIR='instrument/stubs' -echo "$as_me:8044: checking for instrumentation support" >&5 +echo "$as_me:$LINENO: checking for instrumentation support" >&5 echo $ECHO_N "checking for instrumentation support... $ECHO_C" >&6 # Check whether --enable-instrumentation or --disable-instrumentation was given. if test "${enable_instrumentation+set}" = set; then enableval="$enable_instrumentation" if test "$enableval" = yes; then - echo "$as_me:8050: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_INSTRUMENTATION 1 -EOF +_ACEOF INSTRUMENT_VAR='$(INSTRUMENT_LIB)' elif test "$enableval" = no; then - echo "$as_me:8058: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_INSTRUMENTATION 0 -EOF +_ACEOF INSTRUMENT_VAR='' else - echo "$as_me:8066: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_INSTRUMENTATION 1 -EOF +_ACEOF INSTRUMENT_DIR=$enableval INSTRUMENT_VAR='$(INSTRUMENT_LIB)' fi else - echo "$as_me:8077: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_INSTRUMENTATION 0 -EOF +_ACEOF INSTRUMENT_VAR='' + fi; + + # Check whether --enable-simid or --disable-simid was given. if test "${enable_simid+set}" = set; then enableval="$enable_simid" if test "$enableval" = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SIM_ID 0 -EOF +_ACEOF elif test "$enableval" = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SIM_ID 0 -EOF +_ACEOF else - cat >>confdefs.h <>confdefs.h <<_ACEOF #define BX_SIM_ID $enableval -EOF +_ACEOF fi else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SIM_ID 0 -EOF +_ACEOF + + fi; @@ -8115,26 +9837,28 @@ fi; if test "${enable_num_sim+set}" = set; then enableval="$enable_num_sim" if test "$enableval" = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NUM_SIMULATORS 1 -EOF +_ACEOF elif test "$enableval" = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NUM_SIMULATORS 1 -EOF +_ACEOF else - cat >>confdefs.h <>confdefs.h <<_ACEOF #define BX_NUM_SIMULATORS $enableval -EOF +_ACEOF fi else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NUM_SIMULATORS 1 -EOF +_ACEOF + + fi; @@ -8142,125 +9866,135 @@ fi; if test "${enable_time0+set}" = set; then enableval="$enable_time0" if test "$enableval" = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_SPECIFIED_TIME0 917385580 -EOF +_ACEOF elif test "$enableval" = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_SPECIFIED_TIME0 0 -EOF +_ACEOF else - cat >>confdefs.h <>confdefs.h <<_ACEOF #define BX_USE_SPECIFIED_TIME0 $enableval -EOF +_ACEOF fi else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_USE_SPECIFIED_TIME0 0 -EOF +_ACEOF + + fi; -echo "$as_me:8168: checking for VGA emulation" >&5 + + +echo "$as_me:$LINENO: checking for VGA emulation" >&5 echo $ECHO_N "checking for VGA emulation... $ECHO_C" >&6 # Check whether --enable-vga or --disable-vga was given. if test "${enable_vga+set}" = set; then enableval="$enable_vga" if test "$enableval" = yes; then - echo "$as_me:8174: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_VGA 1 -EOF +_ACEOF VIDEO_OBJS='$(VIDEO_OBJS_VGA)' else - echo "$as_me:8182: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_VGA 0 -EOF +_ACEOF VIDEO_OBJS='$(VIDEO_OBJS_HGA)' fi else - echo "$as_me:8192: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_VGA 1 -EOF +_ACEOF VIDEO_OBJS='$(VIDEO_OBJS_VGA)' + fi; -echo "$as_me:8202: checking for VESA BIOS extensions" >&5 + +echo "$as_me:$LINENO: checking for VESA BIOS extensions" >&5 echo $ECHO_N "checking for VESA BIOS extensions... $ECHO_C" >&6 # Check whether --enable-vbe or --disable-vbe was given. if test "${enable_vbe+set}" = set; then enableval="$enable_vbe" if test "$enableval" = yes; then - echo "$as_me:8208: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_VBE 1 -EOF +_ACEOF else - echo "$as_me:8215: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_VBE 0 -EOF +_ACEOF fi else - echo "$as_me:8224: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_VBE 0 -EOF +_ACEOF + + fi; -echo "$as_me:8232: checking for MMX support" >&5 +echo "$as_me:$LINENO: checking for MMX support" >&5 echo $ECHO_N "checking for MMX support... $ECHO_C" >&6 # Check whether --enable-mmx or --disable-mmx was given. if test "${enable_mmx+set}" = set; then enableval="$enable_mmx" if test "$enableval" = yes; then - echo "$as_me:8238: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_MMX 1 -EOF +_ACEOF elif test "$enableval" = no; then - echo "$as_me:8245: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_MMX 0 -EOF +_ACEOF fi else - echo "$as_me:8255: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_MMX 1 -EOF +_ACEOF + + fi; -echo "$as_me:8263: checking for FPU emulation" >&5 +echo "$as_me:$LINENO: checking for FPU emulation" >&5 echo $ECHO_N "checking for FPU emulation... $ECHO_C" >&6 FPU_VAR='' FPU_GLUE_OBJ='' @@ -8268,20 +10002,20 @@ FPU_GLUE_OBJ='' if test "${enable_fpu+set}" = set; then enableval="$enable_fpu" if test "$enableval" = yes; then - echo "$as_me:8271: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_FPU 1 -EOF +_ACEOF FPU_VAR='$(FPU_LIB)' FPU_GLUE_OBJ='$(FPU_GLUE_OBJ)' elif test "$enableval" = no; then - echo "$as_me:8280: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_FPU 0 -EOF +_ACEOF else echo " " @@ -8291,71 +10025,116 @@ EOF else - echo "$as_me:8294: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_FPU 1 -EOF +_ACEOF FPU_VAR='$(FPU_LIB)' FPU_GLUE_OBJ='$(FPU_GLUE_OBJ)' + fi; -echo "$as_me:8305: checking for x86 debugger support" >&5 + + + + +echo "$as_me:$LINENO: checking for x86 debugger support" >&5 echo $ECHO_N "checking for x86 debugger support... $ECHO_C" >&6 # Check whether --enable-x86-debugger or --disable-x86-debugger was given. if test "${enable_x86_debugger+set}" = set; then enableval="$enable_x86_debugger" if test "$enableval" = yes; then - echo "$as_me:8311: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_X86_DEBUGGER 1 -EOF +_ACEOF elif test "$enableval" = no; then - echo "$as_me:8318: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_X86_DEBUGGER 0 -EOF +_ACEOF else - echo "$as_me:8325: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_X86_DEBUGGER 1 -EOF +_ACEOF fi else - echo "$as_me:8334: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_X86_DEBUGGER 0 -EOF +_ACEOF + + fi; -echo "$as_me:8342: checking for IOKit/storage/IOCDMedia.h" >&5 +if test "${ac_cv_header_IOKit_storage_IOCDMedia_h+set}" = set; then + echo "$as_me:$LINENO: checking for IOKit/storage/IOCDMedia.h" >&5 echo $ECHO_N "checking for IOKit/storage/IOCDMedia.h... $ECHO_C" >&6 if test "${ac_cv_header_IOKit_storage_IOCDMedia_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_IOKit_storage_IOCDMedia_h" >&5 +echo "${ECHO_T}$ac_cv_header_IOKit_storage_IOCDMedia_h" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 8348 "configure" + # Is the header compilable? +echo "$as_me:$LINENO: checking IOKit/storage/IOCDMedia.h usability" >&5 +echo $ECHO_N "checking IOKit/storage/IOCDMedia.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking IOKit/storage/IOCDMedia.h presence" >&5 +echo $ECHO_N "checking IOKit/storage/IOCDMedia.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:8352: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:8358: \$? = $ac_status" >&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 @@ -8366,36 +10145,64 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_IOKit_storage_IOCDMedia_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_cv_header_IOKit_storage_IOCDMedia_h=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: IOKit/storage/IOCDMedia.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: IOKit/storage/IOCDMedia.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: IOKit/storage/IOCDMedia.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: IOKit/storage/IOCDMedia.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: IOKit/storage/IOCDMedia.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: IOKit/storage/IOCDMedia.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: IOKit/storage/IOCDMedia.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: IOKit/storage/IOCDMedia.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: IOKit/storage/IOCDMedia.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: IOKit/storage/IOCDMedia.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for IOKit/storage/IOCDMedia.h" >&5 +echo $ECHO_N "checking for IOKit/storage/IOCDMedia.h... $ECHO_C" >&6 +if test "${ac_cv_header_IOKit_storage_IOCDMedia_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_IOKit_storage_IOCDMedia_h=$ac_header_preproc fi -echo "$as_me:8377: result: $ac_cv_header_IOKit_storage_IOCDMedia_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_IOKit_storage_IOCDMedia_h" >&5 echo "${ECHO_T}$ac_cv_header_IOKit_storage_IOCDMedia_h" >&6 + +fi if test $ac_cv_header_IOKit_storage_IOCDMedia_h = yes; then can_use_osx_cdrom=yes fi -echo "$as_me:8384: checking for CDROM support" >&5 + + +echo "$as_me:$LINENO: checking for CDROM support" >&5 echo $ECHO_N "checking for CDROM support... $ECHO_C" >&6 # Check whether --enable-cdrom or --disable-cdrom was given. if test "${enable_cdrom+set}" = set; then enableval="$enable_cdrom" if test "$enableval" = no; then - echo "$as_me:8390: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 CDROM_OBJS='' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_CDROM 0 -EOF +_ACEOF else - echo "$as_me:8398: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CDROM_OBJS='cdrom.o' if test "$with_amigaos" = yes; then @@ -8403,7 +10210,7 @@ echo "${ECHO_T}yes" >&6 CDROM_OBJS="cdrom_amigaos.o" elif test "$can_use_osx_cdrom" = yes; then # use cdrom_osx - echo "$as_me:8406: result: Using OSX IOKit CD Interface" >&5 + echo "$as_me:$LINENO: result: Using OSX IOKit CD Interface" >&5 echo "${ECHO_T}Using OSX IOKit CD Interface" >&6 CDROM_OBJS="cdrom_osx.o" EXTRA_LINK_OPTS="${EXTRA_LINK_OPTS} -framework IOKit -framework CoreFoundation" @@ -8411,14 +10218,14 @@ echo "${ECHO_T}Using OSX IOKit CD Interface" >&6 # use the beos cdrom file instead CDROM_OBJS="$CDROM_OBJS cdrom_beos.o" fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_CDROM 1 -EOF +_ACEOF fi else - echo "$as_me:8421: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CDROM_OBJS='cdrom.o' if test "$with_amigaos" = yes; then @@ -8426,7 +10233,7 @@ echo "${ECHO_T}yes" >&6 CDROM_OBJS="cdrom_amigaos.o" elif test "$can_use_osx_cdrom" = yes; then # use cdrom_osx - echo "$as_me:8429: result: Using OSX IOKit CD Interface" >&5 + echo "$as_me:$LINENO: result: Using OSX IOKit CD Interface" >&5 echo "${ECHO_T}Using OSX IOKit CD Interface" >&6 CDROM_OBJS="cdrom_osx.o" EXTRA_LINK_OPTS="${EXTRA_LINK_OPTS} -framework IOKit -framework CoreFoundation" @@ -8434,52 +10241,57 @@ echo "${ECHO_T}Using OSX IOKit CD Interface" >&6 # use the beos cdrom file instead CDROM_OBJS="$CDROM_OBJS cdrom_beos.o" fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_CDROM 1 -EOF +_ACEOF + + fi; -echo "$as_me:8443: checking for Sound Blaster 16 support" >&5 + + + +echo "$as_me:$LINENO: checking for Sound Blaster 16 support" >&5 echo $ECHO_N "checking for Sound Blaster 16 support... $ECHO_C" >&6 # Check whether --enable-sb16 or --disable-sb16 was given. if test "${enable_sb16+set}" = set; then enableval="$enable_sb16" if test "$enableval" = no; then - echo "$as_me:8449: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SB16_OBJS='' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_SB16 0 -EOF +_ACEOF else case "$enableval" in dummy) SB16_OBJS='$(SB16_DUMMY_OBJS)' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SOUND_OUTPUT_C bx_sound_output_c -EOF +_ACEOF - echo "$as_me:8464: result: dummy" >&5 + echo "$as_me:$LINENO: result: dummy" >&5 echo "${ECHO_T}dummy" >&6 ;; freebsd|linux) SB16_OBJS='$(SB16_LINUX_OBJS)' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SOUND_OUTPUT_C bx_sound_linux_c -EOF +_ACEOF - echo "$as_me:8473: result: linux" >&5 + echo "$as_me:$LINENO: result: linux" >&5 echo "${ECHO_T}linux" >&6 ;; win) SB16_OBJS='$(SB16_WIN_OBJS)' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SOUND_OUTPUT_C bx_sound_windows_c -EOF +_ACEOF - echo "$as_me:8482: result: win" >&5 + echo "$as_me:$LINENO: result: win" >&5 echo "${ECHO_T}win" >&6 ;; *) @@ -8488,51 +10300,55 @@ echo "${ECHO_T}win" >&6 echo "You must pass one of dummy, linux, win, freebsd to --enable-sb16" exit 1 ;; esac - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_SB16 1 -EOF +_ACEOF fi else - echo "$as_me:8498: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SB16_OBJS='' - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_SB16 0 -EOF +_ACEOF + + fi; + + # Check whether --enable-hga-dumps or --disable-hga-dumps was given. if test "${enable_hga_dumps+set}" = set; then enableval="$enable_hga_dumps" - cat >>confdefs.h <>confdefs.h <<_ACEOF #define BX_EMULATE_HGA_DUMPS $enableval -EOF +_ACEOF fi; -echo "$as_me:8516: checking for I/O Interface to the debugger" >&5 +echo "$as_me:$LINENO: checking for I/O Interface to the debugger" >&5 echo $ECHO_N "checking for I/O Interface to the debugger... $ECHO_C" >&6 IODEBUG_OBJS='' # Check whether --enable-iodebug or --disable-iodebug was given. if test "${enable_iodebug+set}" = set; then enableval="$enable_iodebug" if test "$enableval" = yes; then - echo "$as_me:8523: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IODEBUG_SUPPORT 1 -EOF +_ACEOF IODEBUG_OBJS='iodebug.o' else - echo "$as_me:8531: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IODEBUG_SUPPORT 0 -EOF +_ACEOF fi @@ -8540,99 +10356,122 @@ else if test "" = 1; then # enable by default if debugger is on - echo "$as_me:8543: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_IODEBUG_SUPPORT 1 -EOF +_ACEOF IODEBUG_OBJS='iodebug.o' else - echo "$as_me:8551: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi + fi; + + + PRIMARY_TARGET='bochs' -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define BX_PROVIDE_DEVICE_MODELS 1 -EOF +_ACEOF IODEV_LIB_VAR='iodev/libiodev.a' -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define BX_PROVIDE_CPU_MEMORY 1 -EOF +_ACEOF NONINLINE_VAR='$(NONINLINE_OBJS)' + + + + + + + + # Check whether --with-x11 or --without-x11 was given. if test "${with_x11+set}" = set; then withval="$with_x11" fi; + # Check whether --with-beos or --without-beos was given. if test "${with_beos+set}" = set; then withval="$with_beos" fi; + # Check whether --with-win32 or --without-win32 was given. if test "${with_win32+set}" = set; then withval="$with_win32" fi; + # Check whether --with-win32-vcpp or --without-win32-vcpp was given. if test "${with_win32_vcpp+set}" = set; then withval="$with_win32_vcpp" fi; + # Check whether --with-macos or --without-macos was given. if test "${with_macos+set}" = set; then withval="$with_macos" fi; + # Check whether --with-carbon or --without-carbon was given. if test "${with_carbon+set}" = set; then withval="$with_carbon" fi; + # Check whether --with-nogui or --without-nogui was given. if test "${with_nogui+set}" = set; then withval="$with_nogui" fi; + # Check whether --with-term or --without-term was given. if test "${with_term+set}" = set; then withval="$with_term" fi; + # Check whether --with-rfb or --without-rfb was given. if test "${with_rfb+set}" = set; then withval="$with_rfb" fi; + # Check whether --with-amigaos or --without-amigaos was given. if test "${with_amigaos+set}" = set; then withval="$with_amigaos" fi; + # Check whether --with-sdl or --without-sdl was given. if test "${with_sdl+set}" = set; then withval="$with_sdl" fi; + # Check whether --with-wx or --without-wx was given. if test "${with_wx+set}" = set; then withval="$with_wx" @@ -8659,7 +10498,7 @@ INSTALL_LIST_FOR_PLATFORM= # early so that it could affect which one gets chosen. # Extract the first word of " wx-config --version ", so it can be a program name with args. set dummy wx-config --version ; ac_word=$2 -echo "$as_me:8662: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_WX_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8667,15 +10506,18 @@ else if test -n "$WX_CONFIG"; then ac_cv_prog_WX_CONFIG="$WX_CONFIG" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_WX_CONFIG="wx-config" -echo "$as_me:8677: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_WX_CONFIG="wx-config" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done test -z "$ac_cv_prog_WX_CONFIG" && ac_cv_prog_WX_CONFIG="not_found" @@ -8683,15 +10525,15 @@ fi fi WX_CONFIG=$ac_cv_prog_WX_CONFIG if test -n "$WX_CONFIG"; then - echo "$as_me:8686: result: $WX_CONFIG" >&5 + echo "$as_me:$LINENO: result: $WX_CONFIG" >&5 echo "${ECHO_T}$WX_CONFIG" >&6 else - echo "$as_me:8689: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ok_wx_version=0 -echo "$as_me:8694: checking for wxWindows library version" >&5 +echo "$as_me:$LINENO: checking for wxWindows library version" >&5 echo $ECHO_N "checking for wxWindows library version... $ECHO_C" >&6 if test x$WX_CONFIG != xnot_found; then WX_VERSION=`$WX_CONFIG --version` @@ -8708,14 +10550,14 @@ if test x$WX_CONFIG != xnot_found; then esac fi -echo "$as_me:8711: result: $WX_VERSION" >&5 +echo "$as_me:$LINENO: result: $WX_VERSION" >&5 echo "${ECHO_T}$WX_VERSION" >&6 -echo "$as_me:8714: checking for default gui on this platform" >&5 +echo "$as_me:$LINENO: checking for default gui on this platform" >&5 echo $ECHO_N "checking for default gui on this platform... $ECHO_C" >&6 -echo "$as_me:8716: result: $DEFAULT_GUI" >&5 +echo "$as_me:$LINENO: result: $DEFAULT_GUI" >&5 echo "${ECHO_T}$DEFAULT_GUI" >&6 -echo "$as_me:8718: checking for gui library to use" >&5 +echo "$as_me:$LINENO: checking for gui library to use" >&5 echo $ECHO_N "checking for gui library to use... $ECHO_C" >&6 # the $with_* variable tells the gui library to use, but does NOT necessarily @@ -8723,62 +10565,62 @@ echo $ECHO_N "checking for gui library to use... $ECHO_C" >&6 # handled later. if test "$with_x11" = yes; then - echo "$as_me:8726: result: X windows" >&5 + echo "$as_me:$LINENO: result: X windows" >&5 echo "${ECHO_T}X windows" >&6 if test "$no_x" = yes; then echo ERROR: X windows gui was selected, but X windows libraries were not found. exit 1 fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_X11 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_X11) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_X)' INSTALL_LIST_FOR_PLATFORM='$(INSTALL_LIST_X11)' elif test "$with_beos" = yes; then - echo "$as_me:8740: result: beos" >&5 + echo "$as_me:$LINENO: result: beos" >&5 echo "${ECHO_T}beos" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_BEOS 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_BEOS) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_BEOS)' elif test "$with_sdl" = yes; then - echo "$as_me:8749: result: sdl" >&5 + echo "$as_me:$LINENO: result: sdl" >&5 echo "${ECHO_T}sdl" >&6 CFLAGS="$CFLAGS \`sdl-config --cflags\`" - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_SDL 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_SDL) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_SDL)' elif test "$with_rfb" = yes; then - echo "$as_me:8759: result: rfb" >&5 + echo "$as_me:$LINENO: result: rfb" >&5 echo "${ECHO_T}rfb" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_RFB 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_RFB) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_RFB)' elif test "$with_amigaos" = yes; then - echo "$as_me:8768: result: amigaos" >&5 + echo "$as_me:$LINENO: result: amigaos" >&5 echo "${ECHO_T}amigaos" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_AMIGAOS 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_AMIGAOS) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_AMIGAOS)' elif test "$with_win32" = yes; then - echo "$as_me:8777: result: win32" >&5 + echo "$as_me:$LINENO: result: win32" >&5 echo "${ECHO_T}win32" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_WIN32 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_WIN32) control.o' case $target in @@ -8792,36 +10634,36 @@ EOF ;; esac elif test "$with_macos" = yes; then - echo "$as_me:8795: result: macos" >&5 + echo "$as_me:$LINENO: result: macos" >&5 echo "${ECHO_T}macos" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_MACOS 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_MACOS) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_MACOS)' elif test "$with_carbon" = yes; then - echo "$as_me:8804: result: carbon" >&5 + echo "$as_me:$LINENO: result: carbon" >&5 echo "${ECHO_T}carbon" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_CARBON 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_CARBON) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_CARBON)' PRIMARY_TARGET=bochs.app/.build # only for carbon application elif test "$with_term" = yes; then - echo "$as_me:8814: result: term" >&5 + echo "$as_me:$LINENO: result: term" >&5 echo "${ECHO_T}term" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_TERM 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_TERM) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_TERM)' use_curses=yes elif test "$with_wx" = yes; then - echo "$as_me:8824: result: wxWindows" >&5 + echo "$as_me:$LINENO: result: wxWindows" >&5 echo "${ECHO_T}wxWindows" >&6 if test "$cross_configure" = 1; then true # do not insist, if configuring for another machine @@ -8832,9 +10674,9 @@ echo "${ECHO_T}wxWindows" >&6 exit 1 fi fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_WX 1 -EOF +_ACEOF WX_CFLAGS="\`$WX_CONFIG --cflags\`" WX_CXXFLAGS="\`$WX_CONFIG --cxxflags\`" @@ -8861,22 +10703,25 @@ EOF exit 1 fi else - echo "$as_me:8864: result: none" >&5 + echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_WITH_NOGUI 1 -EOF +_ACEOF GUI_OBJS='$(GUI_OBJS_NOGUI) control.o' GUI_LINK_OPTS='$(GUI_LINK_OPTS_NOGUI)' fi + + + # modify settings based on target platform case "$target" in *-macos*) - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_STRDUP 0 -EOF +_ACEOF ;; *-pc-windows*) @@ -8908,47 +10753,47 @@ EOF CD_UP_ONE="cd .." CD_UP_TWO="cd ..\.." have_gettimeofday=0 # even though it may exist in build environment - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_64BIT_CONSTANTS_USE_LL 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define inline __inline -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NO_EMPTY_STRUCTS 1 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_NO_ATTRIBUTES 1 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_HASH_MAP 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_STRTOULL 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_STRTOUQ 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 0 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_GETTIMEOFDAY 0 -EOF +_ACEOF ;; esac if test "$use_curses" = yes -a "$cross_configure" = 0; then - echo "$as_me:8951: checking for mvaddch in -lcurses" >&5 + echo "$as_me:$LINENO: checking for mvaddch in -lcurses" >&5 echo $ECHO_N "checking for mvaddch in -lcurses... $ECHO_C" >&6 if test "${ac_cv_lib_curses_mvaddch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8956,7 +10801,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 8959 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -8966,6 +10811,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mvaddch (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -8975,16 +10826,16 @@ mvaddch (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8978: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8981: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8984: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8987: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_curses_mvaddch=yes else @@ -8995,13 +10846,13 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8998: result: $ac_cv_lib_curses_mvaddch" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_curses_mvaddch" >&5 echo "${ECHO_T}$ac_cv_lib_curses_mvaddch" >&6 if test $ac_cv_lib_curses_mvaddch = yes; then GUI_LINK_OPTS_TERM='-lcurses' fi - echo "$as_me:9004: checking for mvaddch in -lncurses" >&5 + echo "$as_me:$LINENO: checking for mvaddch in -lncurses" >&5 echo $ECHO_N "checking for mvaddch in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_mvaddch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9009,7 +10860,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9012 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9019,6 +10870,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mvaddch (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9028,16 +10885,16 @@ mvaddch (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9031: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9034: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9037: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9040: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ncurses_mvaddch=yes else @@ -9048,13 +10905,13 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9051: result: $ac_cv_lib_ncurses_mvaddch" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_mvaddch" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_mvaddch" >&6 if test $ac_cv_lib_ncurses_mvaddch = yes; then GUI_LINK_OPTS_TERM='-lncurses' fi - echo "$as_me:9057: checking for mvaddch in -ltermlib" >&5 + echo "$as_me:$LINENO: checking for mvaddch in -ltermlib" >&5 echo $ECHO_N "checking for mvaddch in -ltermlib... $ECHO_C" >&6 if test "${ac_cv_lib_termlib_mvaddch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9062,7 +10919,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermlib $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9065 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9072,6 +10929,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mvaddch (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9081,16 +10944,16 @@ mvaddch (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9084: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9087: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9090: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9093: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_termlib_mvaddch=yes else @@ -9101,7 +10964,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9104: result: $ac_cv_lib_termlib_mvaddch" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_termlib_mvaddch" >&5 echo "${ECHO_T}$ac_cv_lib_termlib_mvaddch" >&6 if test $ac_cv_lib_termlib_mvaddch = yes; then GUI_LINK_OPTS_TERM='-ltermlib' @@ -9120,13 +10983,13 @@ if test "$with_term" = yes; then for ac_func in color_set do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:9123: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 9129 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -9140,6 +11003,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9157,16 +11026,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9160: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9163: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9166: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9169: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -9176,15 +11045,15 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9179: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_HAVE_COLOR_SET 1 -EOF +_ACEOF fi done @@ -9198,13 +11067,13 @@ if test "$with_rfb" = yes -a "$cross_configure" = 0; then for ac_func in socket do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:9201: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 9207 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -9218,6 +11087,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9235,16 +11110,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9238: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9241: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9244: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9247: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -9254,18 +11129,18 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9257: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF have_socket=yes fi done if test "$have_socket" != yes; then - echo "$as_me:9268: checking for socket in -lsocket" >&5 + echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9273,7 +11148,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9276 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9283,6 +11158,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9292,16 +11173,16 @@ socket (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9295: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9298: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9301: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9304: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else @@ -9312,7 +11193,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9315: result: $ac_cv_lib_socket_socket" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then RFB_LIBS="$RFB_LIBS -lsocket" @@ -9331,29 +11212,69 @@ fi # Alejandro Forero Cuervo # I found it in the ac-archive project on Source Forge. + pthread_ok=no + acx_pthread_ok=no # First, check if the POSIX threads header, pthread.h, is available. # If it isn't, don't bother looking for the threads libraries. -echo "$as_me:9340: checking for pthread.h" >&5 +if test "${ac_cv_header_pthread_h+set}" = set; then + echo "$as_me:$LINENO: checking for pthread.h" >&5 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 if test "${ac_cv_header_pthread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 9346 "configure" + # Is the header compilable? +echo "$as_me:$LINENO: checking pthread.h usability" >&5 +echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking pthread.h presence" >&5 +echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:9350: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:9356: \$? = $ac_status" >&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 @@ -9364,22 +11285,50 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_pthread_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_cv_header_pthread_h=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for pthread.h" >&5 +echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 +if test "${ac_cv_header_pthread_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pthread_h=$ac_header_preproc fi -echo "$as_me:9375: result: $ac_cv_header_pthread_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 + +fi if test $ac_cv_header_pthread_h = yes; then : else acx_pthread_ok=noheader fi + + # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the @@ -9394,10 +11343,10 @@ if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" - echo "$as_me:9397: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 + echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 9400 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9407,6 +11356,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pthread_join (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9416,16 +11371,16 @@ pthread_join (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9419: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9422: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9425: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9428: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_pthread_ok=yes else @@ -9433,7 +11388,7 @@ else cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - echo "$as_me:9436: result: $acx_pthread_ok" >&5 + echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6 if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" @@ -9487,18 +11442,18 @@ for flag in $acx_pthread_flags; do case $flag in none) - echo "$as_me:9490: checking whether pthreads work without any flags" >&5 + echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6 ;; -*) - echo "$as_me:9495: checking whether pthreads work with $flag" >&5 + echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6 PTHREAD_CFLAGS="$flag" ;; *) - echo "$as_me:9501: checking for the pthreads library -l$flag" >&5 + echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6 PTHREAD_LIBS="-l$flag" ;; @@ -9519,9 +11474,15 @@ echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6 # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat >conftest.$ac_ext <<_ACEOF -#line 9522 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9533,16 +11494,16 @@ pthread_t th; pthread_join(th, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9536: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9539: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9542: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9545: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_pthread_ok=yes else @@ -9554,7 +11515,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" - echo "$as_me:9557: result: $acx_pthread_ok" >&5 + echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6 if test "x$acx_pthread_ok" = xyes; then break; @@ -9574,12 +11535,18 @@ if test "x$acx_pthread_ok" = xyes; then # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). - echo "$as_me:9577: checking for joinable pthread attribute" >&5 + echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 9580 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9589,16 +11556,16 @@ int attr=PTHREAD_CREATE_JOINABLE; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9592: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9595: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9598: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9601: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ok=PTHREAD_CREATE_JOINABLE else @@ -9609,9 +11576,15 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test x"$ok" = xunknown; then cat >conftest.$ac_ext <<_ACEOF -#line 9612 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -9621,16 +11594,16 @@ int attr=PTHREAD_CREATE_UNDETACHED; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9624: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9627: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9630: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9633: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ok=PTHREAD_CREATE_UNDETACHED else @@ -9642,26 +11615,26 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define PTHREAD_CREATE_JOINABLE $ok -EOF +_ACEOF fi - echo "$as_me:9650: result: ${ok}" >&5 + echo "$as_me:$LINENO: result: ${ok}" >&5 echo "${ECHO_T}${ok}" >&6 if test x"$ok" = xunknown; then - { echo "$as_me:9653: WARNING: we do not know how to create joinable pthreads" >&5 + { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} fi - echo "$as_me:9657: checking if more special flags are required for pthreads" >&5 + echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6 flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris* | alpha*-osf*) flag="-D_REENTRANT";; esac - echo "$as_me:9664: result: ${flag}" >&5 + echo "$as_me:$LINENO: result: ${flag}" >&5 echo "${ECHO_T}${flag}" >&6 if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" @@ -9673,7 +11646,7 @@ echo "${ECHO_T}${flag}" >&6 # More AIX lossage: must compile with cc_r # Extract the first word of "cc_r", so it can be a program name with args. set dummy cc_r; ac_word=$2 -echo "$as_me:9676: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9681,15 +11654,18 @@ else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_PTHREAD_CC="cc_r" -echo "$as_me:9691: found $ac_dir/$ac_word" >&5 -break +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="cc_r" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" @@ -9697,10 +11673,10 @@ fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then - echo "$as_me:9700: result: $PTHREAD_CC" >&5 + echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 echo "${ECHO_T}$PTHREAD_CC" >&6 else - echo "$as_me:9703: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -9708,6 +11684,10 @@ else PTHREAD_CC="$CC" fi + + + + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then @@ -9722,6 +11702,9 @@ else fi + + + # since RFB (usually) needs pthread library, check that it was found. # But on win32 platforms, the pthread library is not needed. if test "$with_rfb" = yes -a "$cross_configure" = 0; then @@ -9766,9 +11749,34 @@ if test ! -d instrument; then mkdir instrument; fi if test ! -d build; then mkdir build; fi if test ! -d build/linux; then mkdir build/linux; fi + + + + + + + + + + + + + + + + + + + + + + + + + # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; ac_word=$2 -echo "$as_me:9771: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GZIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9778,16 +11786,18 @@ else ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. ;; *) - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_GZIP="$ac_dir/$ac_word" - echo "$as_me:9788: found $ac_dir/$ac_word" >&5 - break -fi + 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done ;; @@ -9796,16 +11806,16 @@ fi GZIP=$ac_cv_path_GZIP if test -n "$GZIP"; then - echo "$as_me:9799: result: $GZIP" >&5 + echo "$as_me:$LINENO: result: $GZIP" >&5 echo "${ECHO_T}$GZIP" >&6 else - echo "$as_me:9802: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "tar", so it can be a program name with args. set dummy tar; ac_word=$2 -echo "$as_me:9808: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_TAR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9815,16 +11825,18 @@ else ac_cv_path_TAR="$TAR" # Let the user override the test with a path. ;; *) - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_TAR="$ac_dir/$ac_word" - echo "$as_me:9825: found $ac_dir/$ac_word" >&5 - break -fi + 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done ;; @@ -9833,13 +11845,14 @@ fi TAR=$ac_cv_path_TAR if test -n "$TAR"; then - echo "$as_me:9836: result: $TAR" >&5 + echo "$as_me:$LINENO: result: $TAR" >&5 echo "${ECHO_T}$TAR" >&6 else - echo "$as_me:9839: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi + ac_config_files="$ac_config_files Makefile iodev/Makefile debug/Makefile bios/Makefile cpu/Makefile memory/Makefile gui/Makefile disasm/Makefile ${INSTRUMENT_DIR}/Makefile misc/Makefile fpu/Makefile install-x11-fonts build/linux/bochs-dlx build/linux/bochs-docs bxversion.h build/linux/DOC-linux.html build/macosx/Info.plist" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -9917,25 +11930,29 @@ fi DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:9923: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL -# Generated automatically by configure. +# Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" - _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh @@ -9944,8 +11961,167 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + # Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -9973,22 +12149,12 @@ rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. @@ -9997,10 +12163,34 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } exec 6>&1 +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.53. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF # Files that config.status was made for. @@ -10020,7 +12210,7 @@ if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the @@ -10044,12 +12234,12 @@ Configuration headers: $config_headers Report bugs to ." -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.52, +configured by $0, generated by GNU Autoconf 2.53, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -10057,9 +12247,9 @@ Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: @@ -10081,18 +12271,18 @@ do case $1 in # Handling of the options. -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:10095: error: ambiguous option: $1 + { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -10111,7 +12301,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:10114: error: unrecognized option: $1 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -10123,25 +12313,13 @@ Try \`$0 --help' for more information." >&2;} shift done -exec 5>>config.log -cat >&5 << _ACEOF - -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## - -This file was extended by $as_me 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` - _ACEOF -EOF -cat >>$CONFIG_STATUS <<\EOF + + + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in @@ -10164,7 +12342,7 @@ do "build/linux/DOC-linux.html" ) CONFIG_FILES="$CONFIG_FILES build/linux/DOC-linux.html" ;; "build/macosx/Info.plist" ) CONFIG_FILES="$CONFIG_FILES build/macosx/Info.plist" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - *) { { echo "$as_me:10167: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -10201,9 +12379,9 @@ $debug || { (exit 1); exit 1; } } -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. @@ -10216,6 +12394,12 @@ if test -n "\$CONFIG_FILES"; then sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t @@ -10231,19 +12415,13 @@ s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t @@ -10339,9 +12517,9 @@ s,@GZIP@,$GZIP,;t t s,@TAR@,$TAR,;t t CEOF -EOF +_ACEOF - cat >>$CONFIG_STATUS <<\EOF + cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 @@ -10380,8 +12558,8 @@ EOF fi fi # test -n "$CONFIG_FILES" -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in @@ -10395,7 +12573,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ @@ -10406,8 +12585,7 @@ echo X"$ac_file" | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in + { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac @@ -10418,43 +12596,64 @@ for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } ;; esac done; } - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` - else - ac_dir_suffix= ac_dots= - fi + ac_builddir=. - case $srcdir in - .) ac_srcdir=. - if test -z "$ac_dots"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - ac_srcdir=$ac_dots$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_dots$srcdir ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + if test x"$ac_file" != x-; then - { echo "$as_me:10449: creating $ac_file" >&5 + { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ - configure_input="Generated automatically from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -10464,7 +12663,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:10467: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -10477,23 +12676,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:10480: error: cannot find input file: $f" >&5 + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then @@ -10504,8 +12709,8 @@ s,@top_srcdir@,$ac_top_srcdir,;t t fi done -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. @@ -10537,7 +12742,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:10540: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -10548,7 +12753,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:10551: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -10561,7 +12766,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:10564: error: cannot find input file: $f" >&5 + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -10570,7 +12775,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -EOF +_ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into @@ -10586,16 +12791,16 @@ rm -f conftest.defines conftest.undefs # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\EOF +cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end -EOF +_ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. @@ -10606,9 +12811,9 @@ rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\EOF +cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -EOF +_ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). @@ -10665,23 +12870,24 @@ do done rm -f conftest.undefs -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ + # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h + echo "/* Generated by configure. */" >$tmp/config.h else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:10681: $ac_file is unchanged" >&5 + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ @@ -10692,8 +12898,7 @@ echo X"$ac_file" | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in + { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac @@ -10704,12 +12909,15 @@ for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } ;; esac done; } - fi rm -f $ac_file mv $tmp/config.h $ac_file fi @@ -10718,15 +12926,16 @@ done; } rm -f $tmp/config.h fi done -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } -EOF +_ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open diff --git a/bochs/configure.in b/bochs/configure.in index e8c414ed3..bc5b53183 100644 --- a/bochs/configure.in +++ b/bochs/configure.in @@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT(bochs.h) -AC_REVISION([[$Id: configure.in,v 1.135 2002-09-27 20:06:57 bdenney Exp $]]) +AC_REVISION([[$Id: configure.in,v 1.136 2002-09-30 02:02:05 kevinlawton Exp $]]) AC_CONFIG_HEADER(config.h) dnl // Put Bochs version information right here so that it gets substituted @@ -605,14 +605,14 @@ AC_ARG_ENABLE(guest2host-tlb, [ --enable-guest2host-tlb support guest to host addr TLB for speed], [if test "$enableval" = yes; then AC_MSG_RESULT(yes) - AC_DEFINE(BX_SupportGuest2HostTLB, 1) + speedup_guest2host_tlb=1 else AC_MSG_RESULT(no) - AC_DEFINE(BX_SupportGuest2HostTLB, 0) + speedup_guest2host_tlb=0 fi], [ AC_MSG_RESULT(no) - AC_DEFINE(BX_SupportGuest2HostTLB, 0) + speedup_guest2host_tlb=0 ] ) @@ -621,14 +621,14 @@ AC_ARG_ENABLE(repeat-speedups, [ --enable-repeat-speedups support repeated IO and mem copy speedups], [if test "$enableval" = yes; then AC_MSG_RESULT(yes) - AC_DEFINE(BX_SupportRepeatSpeedups, 1) + speedup_repeat=1 else AC_MSG_RESULT(no) - AC_DEFINE(BX_SupportRepeatSpeedups, 0) + speedup_repeat=0 fi], [ AC_MSG_RESULT(no) - AC_DEFINE(BX_SupportRepeatSpeedups, 0) + speedup_repeat=0 ] ) @@ -637,14 +637,14 @@ AC_ARG_ENABLE(icache, [ --enable-icache support instruction cache (runs faster)], [if test "$enableval" = yes; then AC_MSG_RESULT(yes) - AC_DEFINE(BX_SupportICache, 1) + speedup_iCache=1 else AC_MSG_RESULT(no) - AC_DEFINE(BX_SupportICache, 0) + speedup_iCache=0 fi], [ AC_MSG_RESULT(no) - AC_DEFINE(BX_SupportICache, 0) + speedup_iCache=0 ] ) @@ -675,14 +675,14 @@ AC_ARG_ENABLE(host-specific-asms, [ --enable-host-specific-asms support for host specific inline assembly], [if test "$enableval" = yes; then AC_MSG_RESULT(yes) - AC_DEFINE(BX_SupportHostAsms, 1) + speedup_host_specific_asms=1 else AC_MSG_RESULT(no) - AC_DEFINE(BX_SupportHostAsms, 0) + speedup_host_specific_asms=0 fi], [ AC_MSG_RESULT(yes) - AC_DEFINE(BX_SupportHostAsms, 1) + speedup_host_specific_asms=1 ] ) @@ -833,6 +833,62 @@ AC_ARG_ENABLE(disasm, ) AC_SUBST(DISASM_VAR) +AC_MSG_CHECKING(for ALL optimizations enabled) +AC_ARG_ENABLE(all-optimizations, + [ --enable-all-optimizations compile in all possible optimizations], + [if test "$enableval" = yes; then + AC_MSG_RESULT(yes) + speedups_all=1 + else + AC_MSG_RESULT(no) + speedups_all=0 + fi + ], + [ + AC_MSG_RESULT(no) + speedups_all=0 + ] + ) + +# +# Optimizations section. Decide what the status of various optimizations +# should be based on configure choices and other factors. +# + +if test "$speedups_all" = 1; then + # Configure requested to force all options enabled. + speedup_guest2host_tlb=1 + speedup_repeat=1 + speedup_iCache=1 + speedup_host_specific_asms=1 +fi + +if test "$speedup_guest2host_tlb" = 1; then + AC_DEFINE(BX_SupportGuest2HostTLB, 1) +else + AC_DEFINE(BX_SupportGuest2HostTLB, 0) +fi + +if test "$speedup_repeat" = 1; then + AC_DEFINE(BX_SupportRepeatSpeedups, 1) +else + AC_DEFINE(BX_SupportRepeatSpeedups, 0) +fi + +if test "$speedup_iCache" = 1; then + AC_DEFINE(BX_SupportICache, 1) +else + AC_DEFINE(BX_SupportICache, 0) +fi + +if test "$speedup_host_specific_asms" = 1; then + AC_DEFINE(BX_SupportHostAsms, 1) +else + AC_DEFINE(BX_SupportHostAsms, 0) +fi + + + READLINE_LIB="" rl_without_curses_ok=no rl_with_curses_ok=no diff --git a/bochs/cpu/arith16.cc b/bochs/cpu/arith16.cc index eee5ae1ed..ad965e363 100644 --- a/bochs/cpu/arith16.cc +++ b/bochs/cpu/arith16.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: arith16.cc,v 1.21 2002-09-29 19:21:36 kevinlawton Exp $ +// $Id: arith16.cc,v 1.22 2002-09-30 02:02:06 kevinlawton Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -86,32 +86,22 @@ BX_CPU_C::DEC_RX(bxInstruction_c *i) void BX_CPU_C::ADD_EwGw(bxInstruction_c *i) { - Bit16u op2_16, op1_16, sum_16; + Bit16u op2_16, op1_16, sum_16; + op2_16 = BX_READ_16BIT_REG(i->nnn()); - /* op2_16 is a register, RMAddr(i) is an index of a register */ - op2_16 = BX_READ_16BIT_REG(i->nnn()); - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_virtual_word(i->seg(), RMAddr(i), &op1_16); - } - + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); sum_16 = op1_16 + op2_16; + BX_WRITE_16BIT_REG(i->rm(), sum_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + sum_16 = op1_16 + op2_16; + Write_RMW_virtual_word(sum_16); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), sum_16); - } - else { - write_virtual_word(i->seg(), RMAddr(i), &sum_16); - } - - SET_FLAGS_OSZAPC_16(op1_16, op2_16, sum_16, BX_INSTR_ADD16); + SET_FLAGS_OSZAPC_16(op1_16, op2_16, sum_16, BX_INSTR_ADD16); } @@ -154,7 +144,6 @@ BX_CPU_C::ADD_GwEGw(bxInstruction_c *i) Bit16u op1_16, op2_16, sum_16; op1_16 = BX_READ_16BIT_REG(i->nnn()); - op2_16 = BX_READ_16BIT_REG(i->rm()); #if (defined(__i386__) && defined(__GNUC__) && BX_SupportHostAsms) @@ -185,18 +174,16 @@ BX_CPU_C::ADD_GwEGw(bxInstruction_c *i) void BX_CPU_C::ADD_AXIw(bxInstruction_c *i) { - Bit16u op1_16, op2_16, sum_16; + Bit16u op1_16, op2_16, sum_16; - op1_16 = AX; + op1_16 = AX; + op2_16 = i->Iw(); - op2_16 = i->Iw(); + sum_16 = op1_16 + op2_16; - sum_16 = op1_16 + op2_16; + AX = sum_16; - /* now write sum back to destination */ - AX = sum_16; - - SET_FLAGS_OSZAPC_16(op1_16, op2_16, sum_16, BX_INSTR_ADD16); + SET_FLAGS_OSZAPC_16(op1_16, op2_16, sum_16, BX_INSTR_ADD16); } void @@ -207,33 +194,21 @@ BX_CPU_C::ADC_EwGw(bxInstruction_c *i) temp_CF = getB_CF(); + op2_16 = BX_READ_16BIT_REG(i->nnn()); - - - /* op2_16 is a register, RMAddr(i) is an index of a register */ - op2_16 = BX_READ_16BIT_REG(i->nnn()); - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } - + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); sum_16 = op1_16 + op2_16 + temp_CF; + BX_WRITE_16BIT_REG(i->rm(), sum_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + sum_16 = op1_16 + op2_16 + temp_CF; + Write_RMW_virtual_word(sum_16); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), sum_16); - } - else { - Write_RMW_virtual_word(sum_16); - } - - SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, sum_16, BX_INSTR_ADC16, - temp_CF); + SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, sum_16, BX_INSTR_ADC16, + temp_CF); } @@ -246,25 +221,21 @@ BX_CPU_C::ADC_GwEw(bxInstruction_c *i) temp_CF = getB_CF(); - /* op1_16 is a register, RMAddr(i) is an index of a register */ - op1_16 = BX_READ_16BIT_REG(i->nnn()); + op1_16 = BX_READ_16BIT_REG(i->nnn()); - /* op2_16 is a register or memory reference */ - if (i->modC0()) { - op2_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_virtual_word(i->seg(), RMAddr(i), &op2_16); - } + if (i->modC0()) { + op2_16 = BX_READ_16BIT_REG(i->rm()); + } + else { + read_virtual_word(i->seg(), RMAddr(i), &op2_16); + } - sum_16 = op1_16 + op2_16 + temp_CF; + sum_16 = op1_16 + op2_16 + temp_CF; - /* now write sum back to destination */ - BX_WRITE_16BIT_REG(i->nnn(), sum_16); + BX_WRITE_16BIT_REG(i->nnn(), sum_16); - SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, sum_16, BX_INSTR_ADC16, - temp_CF); + SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, sum_16, BX_INSTR_ADC16, + temp_CF); } @@ -276,17 +247,15 @@ BX_CPU_C::ADC_AXIw(bxInstruction_c *i) temp_CF = getB_CF(); - op1_16 = AX; + op1_16 = AX; + op2_16 = i->Iw(); - op2_16 = i->Iw(); + sum_16 = op1_16 + op2_16 + temp_CF; - sum_16 = op1_16 + op2_16 + temp_CF; + AX = sum_16; - /* now write sum back to destination */ - AX = sum_16; - - SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, sum_16, BX_INSTR_ADC16, - temp_CF); + SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, sum_16, BX_INSTR_ADC16, + temp_CF); } @@ -298,34 +267,23 @@ BX_CPU_C::SBB_EwGw(bxInstruction_c *i) Boolean temp_CF; Bit16u op2_16, op1_16, diff_16; - temp_CF = getB_CF(); + op2_16 = BX_READ_16BIT_REG(i->nnn()); - /* op2_16 is a register, RMAddr(i) is an index of a register */ - op2_16 = BX_READ_16BIT_REG(i->nnn()); - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } - + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); diff_16 = op1_16 - (op2_16 + temp_CF); + BX_WRITE_16BIT_REG(i->rm(), diff_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + diff_16 = op1_16 - (op2_16 + temp_CF); + Write_RMW_virtual_word(diff_16); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), diff_16); - } - else { - Write_RMW_virtual_word(diff_16); - } - - SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, diff_16, BX_INSTR_SBB16, - temp_CF); + SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, diff_16, BX_INSTR_SBB16, + temp_CF); } @@ -336,29 +294,23 @@ BX_CPU_C::SBB_GwEw(bxInstruction_c *i) temp_CF = getB_CF(); + Bit16u op1_16, op2_16, diff_16; - Bit16u op1_16, op2_16, diff_16; + op1_16 = BX_READ_16BIT_REG(i->nnn()); + if (i->modC0()) { + op2_16 = BX_READ_16BIT_REG(i->rm()); + } + else { + read_virtual_word(i->seg(), RMAddr(i), &op2_16); + } - /* op1_16 is a register, RMAddr(i) is an index of a register */ - op1_16 = BX_READ_16BIT_REG(i->nnn()); + diff_16 = op1_16 - (op2_16 + temp_CF); - /* op2_16 is a register or memory reference */ - if (i->modC0()) { - op2_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_virtual_word(i->seg(), RMAddr(i), &op2_16); - } + BX_WRITE_16BIT_REG(i->nnn(), diff_16); - diff_16 = op1_16 - (op2_16 + temp_CF); - - /* now write diff back to destination */ - BX_WRITE_16BIT_REG(i->nnn(), diff_16); - - SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, diff_16, BX_INSTR_SBB16, - temp_CF); + SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, diff_16, BX_INSTR_SBB16, + temp_CF); } @@ -370,18 +322,15 @@ BX_CPU_C::SBB_AXIw(bxInstruction_c *i) temp_CF = getB_CF(); + op1_16 = AX; + op2_16 = i->Iw(); - op1_16 = AX; + diff_16 = op1_16 - (op2_16 + temp_CF); - op2_16 = i->Iw(); + AX = diff_16; - diff_16 = op1_16 - (op2_16 + temp_CF); - - /* now write diff back to destination */ - AX = diff_16; - - SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, diff_16, BX_INSTR_SBB16, - temp_CF); + SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, diff_16, BX_INSTR_SBB16, + temp_CF); } @@ -394,109 +343,80 @@ BX_CPU_C::SBB_EwIw(bxInstruction_c *i) temp_CF = getB_CF(); + op2_16 = i->Iw(); - - - op2_16 = i->Iw(); - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } - + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); diff_16 = op1_16 - (op2_16 + temp_CF); + BX_WRITE_16BIT_REG(i->rm(), diff_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + diff_16 = op1_16 - (op2_16 + temp_CF); + Write_RMW_virtual_word(diff_16); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), diff_16); - } - else { - Write_RMW_virtual_word(diff_16); - } - - SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, diff_16, BX_INSTR_SBB16, - temp_CF); + SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, diff_16, BX_INSTR_SBB16, + temp_CF); } void BX_CPU_C::SUB_EwGw(bxInstruction_c *i) { - Bit16u op2_16, op1_16, diff_16; + Bit16u op2_16, op1_16, diff_16; + op2_16 = BX_READ_16BIT_REG(i->nnn()); - /* op2_16 is a register, RMAddr(i) is an index of a register */ - op2_16 = BX_READ_16BIT_REG(i->nnn()); - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } - + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); diff_16 = op1_16 - op2_16; + BX_WRITE_16BIT_REG(i->rm(), diff_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + diff_16 = op1_16 - op2_16; + Write_RMW_virtual_word(diff_16); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), diff_16); - } - else { - Write_RMW_virtual_word(diff_16); - } - - SET_FLAGS_OSZAPC_16(op1_16, op2_16, diff_16, BX_INSTR_SUB16); + SET_FLAGS_OSZAPC_16(op1_16, op2_16, diff_16, BX_INSTR_SUB16); } void BX_CPU_C::SUB_GwEw(bxInstruction_c *i) { - Bit16u op1_16, op2_16, diff_16; + Bit16u op1_16, op2_16, diff_16; + op1_16 = BX_READ_16BIT_REG(i->nnn()); - /* op1_16 is a register, RMAddr(i) is an index of a register */ - op1_16 = BX_READ_16BIT_REG(i->nnn()); + if (i->modC0()) { + op2_16 = BX_READ_16BIT_REG(i->rm()); + } + else { + read_virtual_word(i->seg(), RMAddr(i), &op2_16); + } - /* op2_16 is a register or memory reference */ - if (i->modC0()) { - op2_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_virtual_word(i->seg(), RMAddr(i), &op2_16); - } + diff_16 = op1_16 - op2_16; - diff_16 = op1_16 - op2_16; + BX_WRITE_16BIT_REG(i->nnn(), diff_16); - /* now write diff back to destination */ - BX_WRITE_16BIT_REG(i->nnn(), diff_16); - - SET_FLAGS_OSZAPC_16(op1_16, op2_16, diff_16, BX_INSTR_SUB16); + SET_FLAGS_OSZAPC_16(op1_16, op2_16, diff_16, BX_INSTR_SUB16); } void BX_CPU_C::SUB_AXIw(bxInstruction_c *i) { - Bit16u op1_16, op2_16, diff_16; + Bit16u op1_16, op2_16, diff_16; - op1_16 = AX; + op1_16 = AX; + op2_16 = i->Iw(); - op2_16 = i->Iw(); + diff_16 = op1_16 - op2_16; - diff_16 = op1_16 - op2_16; + AX = diff_16; - - /* now write diff back to destination */ - AX = diff_16; - - SET_FLAGS_OSZAPC_16(op1_16, op2_16, diff_16, BX_INSTR_SUB16); + SET_FLAGS_OSZAPC_16(op1_16, op2_16, diff_16, BX_INSTR_SUB16); } @@ -578,7 +498,6 @@ BX_CPU_C::CMP_AXIw(bxInstruction_c *i) Bit16u op1_16, op2_16; op1_16 = AX; - op2_16 = i->Iw(); #if (defined(__i386__) && defined(__GNUC__) && BX_SupportHostAsms) @@ -616,12 +535,12 @@ BX_CPU_C::CWD(bxInstruction_c *i) { /* CWD: no flags are affected */ - if (AX & 0x8000) { - DX = 0xFFFF; - } - else { - DX = 0x0000; - } + if (AX & 0x8000) { + DX = 0xFFFF; + } + else { + DX = 0x0000; + } } @@ -630,45 +549,35 @@ BX_CPU_C::XADD_EwGw(bxInstruction_c *i) { #if (BX_CPU_LEVEL >= 4) || (BX_CPU_LEVEL_HACKED >= 4) - Bit16u op2_16, op1_16, sum_16; + Bit16u op2_16, op1_16, sum_16; - /* XADD dst(r/m), src(r) - * temp <-- src + dst | sum = op2 + op1 - * src <-- dst | op2 = op1 - * dst <-- tmp | op1 = sum - */ + /* XADD dst(r/m), src(r) + * temp <-- src + dst | sum = op2 + op1 + * src <-- dst | op2 = op1 + * dst <-- tmp | op1 = sum + */ - /* op2 is a register, RMAddr(i) is an index of a register */ - op2_16 = BX_READ_16BIT_REG(i->nnn()); - - /* op1 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } + op2_16 = BX_READ_16BIT_REG(i->nnn()); + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); sum_16 = op1_16 + op2_16; + // and write destination into source + // Note: if both op1 & op2 are registers, the last one written + // should be the sum, as op1 & op2 may be the same register. + // For example: XADD AL, AL + BX_WRITE_16BIT_REG(i->nnn(), op1_16); + BX_WRITE_16BIT_REG(i->rm(), sum_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + sum_16 = op1_16 + op2_16; + Write_RMW_virtual_word(sum_16); + /* and write destination into source */ + BX_WRITE_16BIT_REG(i->nnn(), op1_16); + } - /* now write sum back to destination */ - if (i->modC0()) { - // and write destination into source - // Note: if both op1 & op2 are registers, the last one written - // should be the sum, as op1 & op2 may be the same register. - // For example: XADD AL, AL - BX_WRITE_16BIT_REG(i->nnn(), op1_16); - BX_WRITE_16BIT_REG(i->rm(), sum_16); - } - else { - Write_RMW_virtual_word(sum_16); - /* and write destination into source */ - BX_WRITE_16BIT_REG(i->nnn(), op1_16); - } - - - SET_FLAGS_OSZAPC_16(op1_16, op2_16, sum_16, BX_INSTR_XADD16); + SET_FLAGS_OSZAPC_16(op1_16, op2_16, sum_16, BX_INSTR_XADD16); #else BX_PANIC(("XADD_EvGv: not supported on < 80486")); #endif @@ -750,61 +659,44 @@ BX_CPU_C::ADC_EwIw(bxInstruction_c *i) temp_CF = getB_CF(); + op2_16 = i->Iw(); - op2_16 = i->Iw(); - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } - + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); sum_16 = op1_16 + op2_16 + temp_CF; + BX_WRITE_16BIT_REG(i->rm(), sum_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + sum_16 = op1_16 + op2_16 + temp_CF; + Write_RMW_virtual_word(sum_16); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), sum_16); - } - else { - Write_RMW_virtual_word(sum_16); - } - - SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, sum_16, BX_INSTR_ADC16, - temp_CF); + SET_FLAGS_OSZAPC_16_CF(op1_16, op2_16, sum_16, BX_INSTR_ADC16, + temp_CF); } void BX_CPU_C::SUB_EwIw(bxInstruction_c *i) { - Bit16u op2_16, op1_16, diff_16; + Bit16u op2_16, op1_16, diff_16; - op2_16 = i->Iw(); - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } + op2_16 = i->Iw(); + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); diff_16 = op1_16 - op2_16; + BX_WRITE_16BIT_REG(i->rm(), diff_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + diff_16 = op1_16 - op2_16; + Write_RMW_virtual_word(diff_16); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), diff_16); - } - else { - Write_RMW_virtual_word(diff_16); - } - - SET_FLAGS_OSZAPC_16(op1_16, op2_16, diff_16, BX_INSTR_SUB16); + SET_FLAGS_OSZAPC_16(op1_16, op2_16, diff_16, BX_INSTR_SUB16); } void @@ -847,85 +739,61 @@ BX_CPU_C::CMP_EwIw(bxInstruction_c *i) void BX_CPU_C::NEG_Ew(bxInstruction_c *i) { - Bit16u op1_16, diff_16; + Bit16u op1_16, diff_16; - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } - + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); diff_16 = 0 - op1_16; + BX_WRITE_16BIT_REG(i->rm(), diff_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + diff_16 = 0 - op1_16; + Write_RMW_virtual_word(diff_16); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), diff_16); - } - else { - Write_RMW_virtual_word(diff_16); - } - - SET_FLAGS_OSZAPC_16(op1_16, 0, diff_16, BX_INSTR_NEG16); + SET_FLAGS_OSZAPC_16(op1_16, 0, diff_16, BX_INSTR_NEG16); } void BX_CPU_C::INC_Ew(bxInstruction_c *i) { - Bit16u op1_16; - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } + Bit16u op1_16; + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); op1_16++; + BX_WRITE_16BIT_REG(i->rm(), op1_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + op1_16++; + Write_RMW_virtual_word(op1_16); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), op1_16); - } - else { - Write_RMW_virtual_word(op1_16); - } - - SET_FLAGS_OSZAP_16(0, 0, op1_16, BX_INSTR_INC16); + SET_FLAGS_OSZAP_16(0, 0, op1_16, BX_INSTR_INC16); } void BX_CPU_C::DEC_Ew(bxInstruction_c *i) { - Bit16u op1_16; - - /* op1_16 is a register or memory reference */ - if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } + Bit16u op1_16; + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); op1_16--; + BX_WRITE_16BIT_REG(i->rm(), op1_16); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + op1_16--; + Write_RMW_virtual_word(op1_16); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), op1_16); - } - else { - Write_RMW_virtual_word(op1_16); - } - - SET_FLAGS_OSZAP_16(0, 0, op1_16, BX_INSTR_DEC16); + SET_FLAGS_OSZAP_16(0, 0, op1_16, BX_INSTR_DEC16); } @@ -934,40 +802,38 @@ BX_CPU_C::CMPXCHG_EwGw(bxInstruction_c *i) { #if (BX_CPU_LEVEL >= 4) || (BX_CPU_LEVEL_HACKED >= 4) - Bit16u op2_16, op1_16, diff_16; + Bit16u op2_16, op1_16, diff_16; + + if (i->modC0()) { + op1_16 = BX_READ_16BIT_REG(i->rm()); + } + else { + read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); + } + + diff_16 = AX - op1_16; + + SET_FLAGS_OSZAPC_16(AX, op1_16, diff_16, BX_INSTR_CMP16); + + if (diff_16 == 0) { // if accumulator == dest + // ZF = 1 + set_ZF(1); + // dest <-- src + op2_16 = BX_READ_16BIT_REG(i->nnn()); - /* op1_16 is a register or memory reference */ if (i->modC0()) { - op1_16 = BX_READ_16BIT_REG(i->rm()); + BX_WRITE_16BIT_REG(i->rm(), op2_16); } else { - /* pointer, segment address pair */ - read_RMW_virtual_word(i->seg(), RMAddr(i), &op1_16); - } - - diff_16 = AX - op1_16; - - SET_FLAGS_OSZAPC_16(AX, op1_16, diff_16, BX_INSTR_CMP16); - - if (diff_16 == 0) { // if accumulator == dest - // ZF = 1 - set_ZF(1); - // dest <-- src - op2_16 = BX_READ_16BIT_REG(i->nnn()); - - if (i->modC0()) { - BX_WRITE_16BIT_REG(i->rm(), op2_16); - } - else { - Write_RMW_virtual_word(op2_16); - } - } - else { - // ZF = 0 - set_ZF(0); - // accumulator <-- dest - AX = op1_16; + Write_RMW_virtual_word(op2_16); } + } + else { + // ZF = 0 + set_ZF(0); + // accumulator <-- dest + AX = op1_16; + } #else BX_PANIC(("CMPXCHG_EwGw:")); diff --git a/bochs/cpu/arith32.cc b/bochs/cpu/arith32.cc index dfcfcc9dc..43cf95652 100644 --- a/bochs/cpu/arith32.cc +++ b/bochs/cpu/arith32.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: arith32.cc,v 1.23 2002-09-29 19:21:36 kevinlawton Exp $ +// $Id: arith32.cc,v 1.24 2002-09-30 02:02:06 kevinlawton Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -108,32 +108,22 @@ BX_CPU_C::DEC_ERX(bxInstruction_c *i) void BX_CPU_C::ADD_EdGd(bxInstruction_c *i) { - /* for 32 bit operand size mode */ - Bit32u op2_32, op1_32, sum_32; + Bit32u op2_32, op1_32, sum_32; - /* op2_32 is a register, RMAddr(i) is an index of a register */ - op2_32 = BX_READ_32BIT_REG(i->nnn()); - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + op2_32 = BX_READ_32BIT_REG(i->nnn()); + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); sum_32 = op1_32 + op2_32; + BX_WRITE_32BIT_REGZ(i->rm(), sum_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + sum_32 = op1_32 + op2_32; + Write_RMW_virtual_dword(sum_32); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), sum_32); - } - else { - Write_RMW_virtual_dword(sum_32); - } - - SET_FLAGS_OSZAPC_32(op1_32, op2_32, sum_32, BX_INSTR_ADD32); + SET_FLAGS_OSZAPC_32(op1_32, op2_32, sum_32, BX_INSTR_ADD32); } @@ -163,7 +153,6 @@ BX_CPU_C::ADD_GdEEd(bxInstruction_c *i) sum_32 = op1_32 + op2_32; #endif - /* now write sum back to destination */ BX_WRITE_32BIT_REGZ(i->nnn(), sum_32); #if !(defined(__i386__) && defined(__GNUC__) && BX_SupportHostAsms) @@ -177,7 +166,6 @@ BX_CPU_C::ADD_GdEGd(bxInstruction_c *i) Bit32u op1_32, op2_32, sum_32; op1_32 = BX_READ_32BIT_REG(i->nnn()); - op2_32 = BX_READ_32BIT_REG(i->rm()); #if (defined(__i386__) && defined(__GNUC__) && BX_SupportHostAsms) @@ -197,7 +185,6 @@ BX_CPU_C::ADD_GdEGd(bxInstruction_c *i) sum_32 = op1_32 + op2_32; #endif - /* now write sum back to destination */ BX_WRITE_32BIT_REGZ(i->nnn(), sum_32); #if !(defined(__i386__) && defined(__GNUC__) && BX_SupportHostAsms) @@ -209,19 +196,16 @@ BX_CPU_C::ADD_GdEGd(bxInstruction_c *i) void BX_CPU_C::ADD_EAXId(bxInstruction_c *i) { - /* for 32 bit operand size mode */ - Bit32u op1_32, op2_32, sum_32; + Bit32u op1_32, op2_32, sum_32; - op1_32 = EAX; + op1_32 = EAX; + op2_32 = i->Id(); - op2_32 = i->Id(); + sum_32 = op1_32 + op2_32; - sum_32 = op1_32 + op2_32; + RAX = sum_32; - /* now write sum back to destination */ - RAX = sum_32; - - SET_FLAGS_OSZAPC_32(op1_32, op2_32, sum_32, BX_INSTR_ADD32); + SET_FLAGS_OSZAPC_32(op1_32, op2_32, sum_32, BX_INSTR_ADD32); } void @@ -231,34 +215,23 @@ BX_CPU_C::ADC_EdGd(bxInstruction_c *i) temp_CF = getB_CF(); + Bit32u op2_32, op1_32, sum_32; - /* for 32 bit operand size mode */ - Bit32u op2_32, op1_32, sum_32; - - /* op2_32 is a register, RMAddr(i) is an index of a register */ - op2_32 = BX_READ_32BIT_REG(i->nnn()); - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + op2_32 = BX_READ_32BIT_REG(i->nnn()); + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); sum_32 = op1_32 + op2_32 + temp_CF; + BX_WRITE_32BIT_REGZ(i->rm(), sum_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + sum_32 = op1_32 + op2_32 + temp_CF; + Write_RMW_virtual_dword(sum_32); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), sum_32); - } - else { - Write_RMW_virtual_dword(sum_32); - } - - SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, sum_32, BX_INSTR_ADC32, - temp_CF); + SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, sum_32, BX_INSTR_ADC32, + temp_CF); } @@ -269,29 +242,23 @@ BX_CPU_C::ADC_GdEd(bxInstruction_c *i) temp_CF = getB_CF(); + Bit32u op1_32, op2_32, sum_32; - /* for 32 bit operand size mode */ - Bit32u op1_32, op2_32, sum_32; + op1_32 = BX_READ_32BIT_REG(i->nnn()); - /* op1_32 is a register, RMAddr(i) is an index of a register */ - op1_32 = BX_READ_32BIT_REG(i->nnn()); + if (i->modC0()) { + op2_32 = BX_READ_32BIT_REG(i->rm()); + } + else { + read_virtual_dword(i->seg(), RMAddr(i), &op2_32); + } - /* op2_32 is a register or memory reference */ - if (i->modC0()) { - op2_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_virtual_dword(i->seg(), RMAddr(i), &op2_32); - } + sum_32 = op1_32 + op2_32 + temp_CF; - sum_32 = op1_32 + op2_32 + temp_CF; + BX_WRITE_32BIT_REGZ(i->nnn(), sum_32); - /* now write sum back to destination */ - BX_WRITE_32BIT_REGZ(i->nnn(), sum_32); - - SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, sum_32, BX_INSTR_ADC32, - temp_CF); + SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, sum_32, BX_INSTR_ADC32, + temp_CF); } @@ -302,20 +269,17 @@ BX_CPU_C::ADC_EAXId(bxInstruction_c *i) temp_CF = getB_CF(); - /* for 32 bit operand size mode */ - Bit32u op1_32, op2_32, sum_32; + Bit32u op1_32, op2_32, sum_32; - op1_32 = EAX; + op1_32 = EAX; + op2_32 = i->Id(); - op2_32 = i->Id(); + sum_32 = op1_32 + op2_32 + temp_CF; - sum_32 = op1_32 + op2_32 + temp_CF; + RAX = sum_32; - /* now write sum back to destination */ - RAX = sum_32; - - SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, sum_32, BX_INSTR_ADC32, - temp_CF); + SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, sum_32, BX_INSTR_ADC32, + temp_CF); } @@ -328,34 +292,23 @@ BX_CPU_C::SBB_EdGd(bxInstruction_c *i) temp_CF = getB_CF(); + Bit32u op2_32, op1_32, diff_32; - /* for 32 bit operand size mode */ - Bit32u op2_32, op1_32, diff_32; - - /* op2_32 is a register, RMAddr(i) is an index of a register */ - op2_32 = BX_READ_32BIT_REG(i->nnn()); - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + op2_32 = BX_READ_32BIT_REG(i->nnn()); + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); diff_32 = op1_32 - (op2_32 + temp_CF); + BX_WRITE_32BIT_REGZ(i->rm(), diff_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + diff_32 = op1_32 - (op2_32 + temp_CF); + Write_RMW_virtual_dword(diff_32); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), diff_32); - } - else { - Write_RMW_virtual_dword(diff_32); - } - - SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, diff_32, BX_INSTR_SBB32, - temp_CF); + SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, diff_32, BX_INSTR_SBB32, + temp_CF); } @@ -366,29 +319,23 @@ BX_CPU_C::SBB_GdEd(bxInstruction_c *i) temp_CF = getB_CF(); + Bit32u op1_32, op2_32, diff_32; - /* for 32 bit operand size mode */ - Bit32u op1_32, op2_32, diff_32; + op1_32 = BX_READ_32BIT_REG(i->nnn()); - /* op1_32 is a register, RMAddr(i) is an index of a register */ - op1_32 = BX_READ_32BIT_REG(i->nnn()); + if (i->modC0()) { + op2_32 = BX_READ_32BIT_REG(i->rm()); + } + else { + read_virtual_dword(i->seg(), RMAddr(i), &op2_32); + } - /* op2_32 is a register or memory reference */ - if (i->modC0()) { - op2_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_virtual_dword(i->seg(), RMAddr(i), &op2_32); - } + diff_32 = op1_32 - (op2_32 + temp_CF); - diff_32 = op1_32 - (op2_32 + temp_CF); + BX_WRITE_32BIT_REGZ(i->nnn(), diff_32); - /* now write diff back to destination */ - BX_WRITE_32BIT_REGZ(i->nnn(), diff_32); - - SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, diff_32, BX_INSTR_SBB32, - temp_CF); + SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, diff_32, BX_INSTR_SBB32, + temp_CF); } @@ -399,20 +346,17 @@ BX_CPU_C::SBB_EAXId(bxInstruction_c *i) temp_CF = getB_CF(); - /* for 32 bit operand size mode */ - Bit32u op1_32, op2_32, diff_32; + Bit32u op1_32, op2_32, diff_32; - op1_32 = EAX; + op1_32 = EAX; + op2_32 = i->Id(); - op2_32 = i->Id(); + diff_32 = op1_32 - (op2_32 + temp_CF); - diff_32 = op1_32 - (op2_32 + temp_CF); + RAX = diff_32; - /* now write diff back to destination */ - RAX = diff_32; - - SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, diff_32, BX_INSTR_SBB32, - temp_CF); + SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, diff_32, BX_INSTR_SBB32, + temp_CF); } @@ -424,110 +368,82 @@ BX_CPU_C::SBB_EdId(bxInstruction_c *i) temp_CF = getB_CF(); + Bit32u op2_32, op1_32, diff_32; - /* for 32 bit operand size mode */ - Bit32u op2_32, op1_32, diff_32; - - op2_32 = i->Id(); - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + op2_32 = i->Id(); + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); diff_32 = op1_32 - (op2_32 + temp_CF); + BX_WRITE_32BIT_REGZ(i->rm(), diff_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + diff_32 = op1_32 - (op2_32 + temp_CF); + Write_RMW_virtual_dword(diff_32); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), diff_32); - } - else { - Write_RMW_virtual_dword(diff_32); - } - - SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, diff_32, BX_INSTR_SBB32, - temp_CF); + SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, diff_32, BX_INSTR_SBB32, + temp_CF); } void BX_CPU_C::SUB_EdGd(bxInstruction_c *i) { - /* for 32 bit operand size mode */ - Bit32u op2_32, op1_32, diff_32; + Bit32u op2_32, op1_32, diff_32; - /* op2_32 is a register, RMAddr(i) is an index of a register */ - op2_32 = BX_READ_32BIT_REG(i->nnn()); - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + op2_32 = BX_READ_32BIT_REG(i->nnn()); + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); diff_32 = op1_32 - op2_32; + BX_WRITE_32BIT_REGZ(i->rm(), diff_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + diff_32 = op1_32 - op2_32; + Write_RMW_virtual_dword(diff_32); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), diff_32); - } - else { - Write_RMW_virtual_dword(diff_32); - } - - SET_FLAGS_OSZAPC_32(op1_32, op2_32, diff_32, BX_INSTR_SUB32); + SET_FLAGS_OSZAPC_32(op1_32, op2_32, diff_32, BX_INSTR_SUB32); } void BX_CPU_C::SUB_GdEd(bxInstruction_c *i) { - /* for 32 bit operand size mode */ - Bit32u op1_32, op2_32, diff_32; + Bit32u op1_32, op2_32, diff_32; - /* op1_32 is a register, RMAddr(i) is an index of a register */ - op1_32 = BX_READ_32BIT_REG(i->nnn()); + op1_32 = BX_READ_32BIT_REG(i->nnn()); - /* op2_32 is a register or memory reference */ - if (i->modC0()) { - op2_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_virtual_dword(i->seg(), RMAddr(i), &op2_32); - } + if (i->modC0()) { + op2_32 = BX_READ_32BIT_REG(i->rm()); + } + else { + read_virtual_dword(i->seg(), RMAddr(i), &op2_32); + } - diff_32 = op1_32 - op2_32; + diff_32 = op1_32 - op2_32; - /* now write diff back to destination */ - BX_WRITE_32BIT_REGZ(i->nnn(), diff_32); + BX_WRITE_32BIT_REGZ(i->nnn(), diff_32); - SET_FLAGS_OSZAPC_32(op1_32, op2_32, diff_32, BX_INSTR_SUB32); + SET_FLAGS_OSZAPC_32(op1_32, op2_32, diff_32, BX_INSTR_SUB32); } void BX_CPU_C::SUB_EAXId(bxInstruction_c *i) { - /* for 32 bit operand size mode */ - Bit32u op1_32, op2_32, diff_32; + Bit32u op1_32, op2_32, diff_32; - op1_32 = EAX; + op1_32 = EAX; + op2_32 = i->Id(); - op2_32 = i->Id(); + diff_32 = op1_32 - op2_32; - diff_32 = op1_32 - op2_32; + RAX = diff_32; - /* now write diff back to destination */ - RAX = diff_32; - - SET_FLAGS_OSZAPC_32(op1_32, op2_32, diff_32, BX_INSTR_SUB32); + SET_FLAGS_OSZAPC_32(op1_32, op2_32, diff_32, BX_INSTR_SUB32); } @@ -609,7 +525,6 @@ BX_CPU_C::CMP_EAXId(bxInstruction_c *i) Bit32u op1_32, op2_32; op1_32 = EAX; - op2_32 = i->Id(); #if (defined(__i386__) && defined(__GNUC__) && BX_SupportHostAsms) @@ -638,10 +553,10 @@ BX_CPU_C::CMP_EAXId(bxInstruction_c *i) BX_CPU_C::CWDE(bxInstruction_c *i) { /* CBW: no flags are effected */ - Bit32u temp; + Bit32u temp; - temp = (Bit16s) AX; - RAX = temp; + temp = (Bit16s) AX; + RAX = temp; } void @@ -649,12 +564,12 @@ BX_CPU_C::CDQ(bxInstruction_c *i) { /* CDQ: no flags are affected */ - if (EAX & 0x80000000) { - RDX = 0xFFFFFFFF; - } - else { - RDX = 0x00000000; - } + if (EAX & 0x80000000) { + RDX = 0xFFFFFFFF; + } + else { + RDX = 0x00000000; + } } // Some info on the opcodes at {0F,A6} and {0F,A7} @@ -690,47 +605,37 @@ BX_CPU_C::XADD_EdGd(bxInstruction_c *i) { #if (BX_CPU_LEVEL >= 4) || (BX_CPU_LEVEL_HACKED >= 4) - Bit32u op2_32, op1_32, sum_32; + Bit32u op2_32, op1_32, sum_32; - /* XADD dst(r/m), src(r) - * temp <-- src + dst | sum = op2 + op1 - * src <-- dst | op2 = op1 - * dst <-- tmp | op1 = sum - */ + /* XADD dst(r/m), src(r) + * temp <-- src + dst | sum = op2 + op1 + * src <-- dst | op2 = op1 + * dst <-- tmp | op1 = sum + */ - /* op2 is a register, RMAddr(i) is an index of a register */ - op2_32 = BX_READ_32BIT_REG(i->nnn()); - - /* op1 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + op2_32 = BX_READ_32BIT_REG(i->nnn()); + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); sum_32 = op1_32 + op2_32; + // and write destination into source + // Note: if both op1 & op2 are registers, the last one written + // should be the sum, as op1 & op2 may be the same register. + // For example: XADD AL, AL + BX_WRITE_32BIT_REGZ(i->nnn(), op1_32); + BX_WRITE_32BIT_REGZ(i->rm(), sum_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + sum_32 = op1_32 + op2_32; + Write_RMW_virtual_dword(sum_32); + /* and write destination into source */ + BX_WRITE_32BIT_REGZ(i->nnn(), op1_32); + } - /* now write sum back to destination */ - if (i->modC0()) { - // and write destination into source - // Note: if both op1 & op2 are registers, the last one written - // should be the sum, as op1 & op2 may be the same register. - // For example: XADD AL, AL - BX_WRITE_32BIT_REGZ(i->nnn(), op1_32); - BX_WRITE_32BIT_REGZ(i->rm(), sum_32); - } - else { - Write_RMW_virtual_dword(sum_32); - /* and write destination into source */ - BX_WRITE_32BIT_REGZ(i->nnn(), op1_32); - } - - - SET_FLAGS_OSZAPC_32(op1_32, op2_32, sum_32, BX_INSTR_XADD32); + SET_FLAGS_OSZAPC_32(op1_32, op2_32, sum_32, BX_INSTR_XADD32); #else - +#panic "XADD_EdGd" #endif } @@ -776,7 +681,6 @@ BX_CPU_C::ADD_EGdId(bxInstruction_c *i) Bit32u op2_32, op1_32, sum_32; op2_32 = i->Id(); - op1_32 = BX_READ_32BIT_REG(i->rm()); #if (defined(__i386__) && defined(__GNUC__) && BX_SupportHostAsms) @@ -811,63 +715,45 @@ BX_CPU_C::ADC_EdId(bxInstruction_c *i) temp_CF = getB_CF(); - /* for 32 bit operand size mode */ - Bit32u op2_32, op1_32, sum_32; + Bit32u op2_32, op1_32, sum_32; - op2_32 = i->Id(); - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + op2_32 = i->Id(); + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); sum_32 = op1_32 + op2_32 + temp_CF; + BX_WRITE_32BIT_REGZ(i->rm(), sum_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + sum_32 = op1_32 + op2_32 + temp_CF; + Write_RMW_virtual_dword(sum_32); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), sum_32); - } - else { - Write_RMW_virtual_dword(sum_32); - } - - SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, sum_32, BX_INSTR_ADC32, - temp_CF); + SET_FLAGS_OSZAPC_32_CF(op1_32, op2_32, sum_32, BX_INSTR_ADC32, + temp_CF); } void BX_CPU_C::SUB_EdId(bxInstruction_c *i) { - /* for 32 bit operand size mode */ - Bit32u op2_32, op1_32, diff_32; + Bit32u op2_32, op1_32, diff_32; - op2_32 = i->Id(); - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + op2_32 = i->Id(); + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); diff_32 = op1_32 - op2_32; + BX_WRITE_32BIT_REGZ(i->rm(), diff_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + diff_32 = op1_32 - op2_32; + Write_RMW_virtual_dword(diff_32); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), diff_32); - } - else { - Write_RMW_virtual_dword(diff_32); - } - - SET_FLAGS_OSZAPC_32(op1_32, op2_32, diff_32, BX_INSTR_SUB32); + SET_FLAGS_OSZAPC_32(op1_32, op2_32, diff_32, BX_INSTR_SUB32); } void @@ -911,85 +797,60 @@ BX_CPU_C::CMP_EdId(bxInstruction_c *i) void BX_CPU_C::NEG_Ed(bxInstruction_c *i) { - /* for 32 bit operand size mode */ - Bit32u op1_32, diff_32; - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + Bit32u op1_32, diff_32; + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); diff_32 = 0 - op1_32; + BX_WRITE_32BIT_REGZ(i->rm(), diff_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + diff_32 = 0 - op1_32; + Write_RMW_virtual_dword(diff_32); + } - /* now write diff back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), diff_32); - } - else { - Write_RMW_virtual_dword(diff_32); - } - - SET_FLAGS_OSZAPC_32(op1_32, 0, diff_32, BX_INSTR_NEG32); + SET_FLAGS_OSZAPC_32(op1_32, 0, diff_32, BX_INSTR_NEG32); } void BX_CPU_C::INC_Ed(bxInstruction_c *i) { - Bit32u op1_32; - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + Bit32u op1_32; + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); op1_32++; + BX_WRITE_32BIT_REGZ(i->rm(), op1_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + op1_32++; + Write_RMW_virtual_dword(op1_32); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), op1_32); - } - else { - Write_RMW_virtual_dword(op1_32); - } - - SET_FLAGS_OSZAP_32(0, 0, op1_32, BX_INSTR_INC32); + SET_FLAGS_OSZAP_32(0, 0, op1_32, BX_INSTR_INC32); } void BX_CPU_C::DEC_Ed(bxInstruction_c *i) { - Bit32u op1_32; - - /* op1_32 is a register or memory reference */ - if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } + Bit32u op1_32; + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); op1_32--; + BX_WRITE_32BIT_REGZ(i->rm(), op1_32); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + op1_32--; + Write_RMW_virtual_dword(op1_32); + } - /* now write sum back to destination */ - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), op1_32); - } - else { - Write_RMW_virtual_dword(op1_32); - } - - SET_FLAGS_OSZAP_32(0, 0, op1_32, BX_INSTR_DEC32); + SET_FLAGS_OSZAP_32(0, 0, op1_32, BX_INSTR_DEC32); } @@ -998,40 +859,38 @@ BX_CPU_C::CMPXCHG_EdGd(bxInstruction_c *i) { #if (BX_CPU_LEVEL >= 4) || (BX_CPU_LEVEL_HACKED >= 4) - Bit32u op2_32, op1_32, diff_32; + Bit32u op2_32, op1_32, diff_32; + + if (i->modC0()) { + op1_32 = BX_READ_32BIT_REG(i->rm()); + } + else { + read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); + } + + diff_32 = EAX - op1_32; + + SET_FLAGS_OSZAPC_32(EAX, op1_32, diff_32, BX_INSTR_CMP32); + + if (diff_32 == 0) { // if accumulator == dest + // ZF = 1 + set_ZF(1); + // dest <-- src + op2_32 = BX_READ_32BIT_REG(i->nnn()); - /* op1_32 is a register or memory reference */ if (i->modC0()) { - op1_32 = BX_READ_32BIT_REG(i->rm()); + BX_WRITE_32BIT_REGZ(i->rm(), op2_32); } else { - /* pointer, segment address pair */ - read_RMW_virtual_dword(i->seg(), RMAddr(i), &op1_32); - } - - diff_32 = EAX - op1_32; - - SET_FLAGS_OSZAPC_32(EAX, op1_32, diff_32, BX_INSTR_CMP32); - - if (diff_32 == 0) { // if accumulator == dest - // ZF = 1 - set_ZF(1); - // dest <-- src - op2_32 = BX_READ_32BIT_REG(i->nnn()); - - if (i->modC0()) { - BX_WRITE_32BIT_REGZ(i->rm(), op2_32); - } - else { - Write_RMW_virtual_dword(op2_32); - } - } - else { - // ZF = 0 - set_ZF(0); - // accumulator <-- dest - RAX = op1_32; + Write_RMW_virtual_dword(op2_32); } + } + else { + // ZF = 0 + set_ZF(0); + // accumulator <-- dest + RAX = op1_32; + } #else BX_PANIC(("CMPXCHG_EdGd:")); #endif @@ -1042,36 +901,35 @@ BX_CPU_C::CMPXCHG8B(bxInstruction_c *i) { #if (BX_CPU_LEVEL >= 5) || (BX_CPU_LEVEL_HACKED >= 5) - Bit32u op1_64_lo, op1_64_hi, diff; + Bit32u op1_64_lo, op1_64_hi, diff; - if (i->modC0()) { - BX_INFO(("CMPXCHG8B: dest is reg: #UD")); - UndefinedOpcode(i); - } + if (i->modC0()) { + BX_INFO(("CMPXCHG8B: dest is reg: #UD")); + UndefinedOpcode(i); + } - /* pointer, segment address pair */ - read_virtual_dword(i->seg(), RMAddr(i), &op1_64_lo); - read_RMW_virtual_dword(i->seg(), RMAddr(i) + 4, &op1_64_hi); + read_virtual_dword(i->seg(), RMAddr(i), &op1_64_lo); + read_RMW_virtual_dword(i->seg(), RMAddr(i) + 4, &op1_64_hi); - diff = EAX - op1_64_lo; - diff |= EDX - op1_64_hi; + diff = EAX - op1_64_lo; + diff |= EDX - op1_64_hi; // SET_FLAGS_OSZAPC_32(EAX, op1_32, diff_32, BX_INSTR_CMP32); - if (diff == 0) { // if accumulator == dest - // ZF = 1 - set_ZF(1); - // dest <-- src - Write_RMW_virtual_dword(ECX); - write_virtual_dword(i->seg(), RMAddr(i), &EBX); - } - else { - // ZF = 0 - set_ZF(0); - // accumulator <-- dest - RAX = op1_64_lo; - RDX = op1_64_hi; - } + if (diff == 0) { // if accumulator == dest + // ZF = 1 + set_ZF(1); + // dest <-- src + Write_RMW_virtual_dword(ECX); + write_virtual_dword(i->seg(), RMAddr(i), &EBX); + } + else { + // ZF = 0 + set_ZF(0); + // accumulator <-- dest + RAX = op1_64_lo; + RDX = op1_64_hi; + } #else BX_INFO(("CMPXCHG8B: not implemented yet")); diff --git a/bochs/cpu/arith8.cc b/bochs/cpu/arith8.cc index d171133e9..37be8ad6e 100644 --- a/bochs/cpu/arith8.cc +++ b/bochs/cpu/arith8.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: arith8.cc,v 1.18 2002-09-28 01:16:09 kevinlawton Exp $ +// $Id: arith8.cc,v 1.19 2002-09-30 02:02:06 kevinlawton Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -41,24 +41,16 @@ BX_CPU_C::ADD_EbGb(bxInstruction_c *i) { Bit8u op2, op1, sum; - /* op2 is a register, RMAddr(i) is an index of a register */ op2 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op1 is a register or memory reference */ if (i->modC0()) { op1 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); - } - - sum = op1 + op2; - - /* now write sum back to destination */ - if (i->modC0()) { + sum = op1 + op2; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), sum); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); + sum = op1 + op2; Write_RMW_virtual_byte(sum); } @@ -72,22 +64,17 @@ BX_CPU_C::ADD_GbEb(bxInstruction_c *i) { Bit8u op1, op2, sum; - - /* op1 is a register, RMAddr(i) is an index of a register */ op1 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op2 is a register or memory reference */ if (i->modC0()) { op2 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); + sum = op1 + op2; } else { - /* pointer, segment address pair */ read_virtual_byte(i->seg(), RMAddr(i), &op2); + sum = op1 + op2; } - sum = op1 + op2; - - /* now write sum back to destination, which is a register */ BX_WRITE_8BIT_REGx(i->nnn(), i->extend8bitL(), sum); SET_FLAGS_OSZAPC_8(op1, op2, sum, BX_INSTR_ADD8); @@ -101,12 +88,10 @@ BX_CPU_C::ADD_ALIb(bxInstruction_c *i) op1 = AL; - op2 = i->Ib(); sum = op1 + op2; - /* now write sum back to destination, which is a register */ AL = sum; SET_FLAGS_OSZAPC_8(op1, op2, sum, BX_INSTR_ADD8); @@ -121,27 +106,16 @@ BX_CPU_C::ADC_EbGb(bxInstruction_c *i) temp_CF = getB_CF(); - - /* op2 is a register, RMAddr(i) is an index of a register */ op2 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op1 is a register or memory reference */ if (i->modC0()) { op1 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); - } - - sum = op1 + op2 + temp_CF; - - - /* now write sum back to destination */ - if (i->modC0()) { + sum = op1 + op2 + temp_CF; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), sum); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); + sum = op1 + op2 + temp_CF; Write_RMW_virtual_byte(sum); } @@ -157,16 +131,12 @@ BX_CPU_C::ADC_GbEb(bxInstruction_c *i) temp_CF = getB_CF(); - - /* op1 is a register, RMAddr(i) is an index of a register */ op1 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op2 is a register or memory reference */ if (i->modC0()) { op2 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); } else { - /* pointer, segment address pair */ read_virtual_byte(i->seg(), RMAddr(i), &op2); } @@ -175,7 +145,6 @@ BX_CPU_C::ADC_GbEb(bxInstruction_c *i) SET_FLAGS_OSZAPC_8_CF(op1, op2, sum, BX_INSTR_ADC8, temp_CF); - /* now write sum back to destination, which is a register */ BX_WRITE_8BIT_REGx(i->nnn(), i->extend8bitL(), sum); } @@ -190,12 +159,10 @@ BX_CPU_C::ADC_ALIb(bxInstruction_c *i) op1 = AL; - op2 = i->Ib(); sum = op1 + op2 + temp_CF; - /* now write sum back to destination, which is a register */ AL = sum; SET_FLAGS_OSZAPC_8_CF(op1, op2, sum, BX_INSTR_ADC8, @@ -212,25 +179,16 @@ BX_CPU_C::SBB_EbGb(bxInstruction_c *i) temp_CF = getB_CF(); - /* op2 is a register, RMAddr(i) is an index of a register */ op2_8 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op1_8 is a register or memory reference */ if (i->modC0()) { op1_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); - } - - diff_8 = op1_8 - (op2_8 + temp_CF); - - /* now write diff back to destination */ - if (i->modC0()) { + diff_8 = op1_8 - (op2_8 + temp_CF); BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), diff_8); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); + diff_8 = op1_8 - (op2_8 + temp_CF); Write_RMW_virtual_byte(diff_8); } @@ -247,22 +205,17 @@ BX_CPU_C::SBB_GbEb(bxInstruction_c *i) temp_CF = getB_CF(); - - /* op1 is a register, RMAddr(i) is an index of a register */ op1_8 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op2 is a register or memory reference */ if (i->modC0()) { op2_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); } else { - /* pointer, segment address pair */ read_virtual_byte(i->seg(), RMAddr(i), &op2_8); } diff_8 = op1_8 - (op2_8 + temp_CF); - /* now write diff back to destination, which is a register */ BX_WRITE_8BIT_REGx(i->nnn(), i->extend8bitL(), diff_8); SET_FLAGS_OSZAPC_8_CF(op1_8, op2_8, diff_8, BX_INSTR_SBB8, @@ -278,14 +231,11 @@ BX_CPU_C::SBB_ALIb(bxInstruction_c *i) temp_CF = getB_CF(); - op1_8 = AL; - op2_8 = i->Ib(); diff_8 = op1_8 - (op2_8 + temp_CF); - /* now write diff back to destination, which is a register */ AL = diff_8; SET_FLAGS_OSZAPC_8_CF(op1_8, op2_8, diff_8, BX_INSTR_SBB8, @@ -303,22 +253,14 @@ BX_CPU_C::SBB_EbIb(bxInstruction_c *i) op2_8 = i->Ib(); - /* op1_8 is a register or memory reference */ if (i->modC0()) { op1_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); - } - - diff_8 = op1_8 - (op2_8 + temp_CF); - - /* now write diff back to destination */ - if (i->modC0()) { + diff_8 = op1_8 - (op2_8 + temp_CF); BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), diff_8); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); + diff_8 = op1_8 - (op2_8 + temp_CF); Write_RMW_virtual_byte(diff_8); } @@ -333,26 +275,16 @@ BX_CPU_C::SUB_EbGb(bxInstruction_c *i) { Bit8u op2_8, op1_8, diff_8; - - /* op2 is a register, RMAddr(i) is an index of a register */ op2_8 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op1_8 is a register or memory reference */ if (i->modC0()) { op1_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); - } - - diff_8 = op1_8 - op2_8; - - /* now write diff back to destination */ - if (i->modC0()) { + diff_8 = op1_8 - op2_8; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), diff_8); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); + diff_8 = op1_8 - op2_8; Write_RMW_virtual_byte(diff_8); } @@ -365,22 +297,17 @@ BX_CPU_C::SUB_GbEb(bxInstruction_c *i) { Bit8u op1_8, op2_8, diff_8; - - /* op1 is a register, RMAddr(i) is an index of a register */ op1_8 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op2 is a register or memory reference */ if (i->modC0()) { op2_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); } else { - /* pointer, segment address pair */ read_virtual_byte(i->seg(), RMAddr(i), &op2_8); } diff_8 = op1_8 - op2_8; - /* now write diff back to destination, which is a register */ BX_WRITE_8BIT_REGx(i->nnn(), i->extend8bitL(), diff_8); SET_FLAGS_OSZAPC_8(op1_8, op2_8, diff_8, BX_INSTR_SUB8); @@ -393,12 +320,10 @@ BX_CPU_C::SUB_ALIb(bxInstruction_c *i) Bit8u op1_8, op2_8, diff_8; op1_8 = AL; - op2_8 = i->Ib(); diff_8 = op1_8 - op2_8; - /* now write diff back to destination, which is a register */ AL = diff_8; SET_FLAGS_OSZAPC_8(op1_8, op2_8, diff_8, BX_INSTR_SUB8); @@ -523,22 +448,11 @@ BX_CPU_C::XADD_EbGb(bxInstruction_c *i) * dst <-- tmp | op1 = sum */ - /* op2 is a register, RMAddr(i) is an index of a register */ op2 = BX_READ_8BIT_REGx(i->nnn(),i->extend8bitL()); - /* op1 is a register or memory reference */ if (i->modC0()) { op1 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); - } - - sum = op1 + op2; - - /* now write sum back to destination */ - if (i->modC0()) { + sum = op1 + op2; // and write destination into source // Note: if both op1 & op2 are registers, the last one written // should be the sum, as op1 & op2 may be the same register. @@ -547,12 +461,13 @@ BX_CPU_C::XADD_EbGb(bxInstruction_c *i) BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), sum); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); + sum = op1 + op2; Write_RMW_virtual_byte(sum); /* and write destination into source */ BX_WRITE_8BIT_REGx(i->nnn(), i->extend8bitL(), op1); } - SET_FLAGS_OSZAPC_8(op1, op2, sum, BX_INSTR_XADD8); #else BX_PANIC(("XADD_EbGb: not supported on < 80486")); @@ -565,25 +480,16 @@ BX_CPU_C::ADD_EbIb(bxInstruction_c *i) { Bit8u op2, op1, sum; - op2 = i->Ib(); - /* op1 is a register or memory reference */ if (i->modC0()) { op1 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); - } - - sum = op1 + op2; - - /* now write sum back to destination */ - if (i->modC0()) { + sum = op1 + op2; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), sum); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); + sum = op1 + op2; Write_RMW_virtual_byte(sum); } @@ -600,22 +506,14 @@ BX_CPU_C::ADC_EbIb(bxInstruction_c *i) op2 = i->Ib(); - /* op1 is a register or memory reference */ if (i->modC0()) { op1 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); - } - - sum = op1 + op2 + temp_CF; - - /* now write sum back to destination */ - if (i->modC0()) { + sum = op1 + op2 + temp_CF; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), sum); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); + sum = op1 + op2 + temp_CF; Write_RMW_virtual_byte(sum); } @@ -629,25 +527,16 @@ BX_CPU_C::SUB_EbIb(bxInstruction_c *i) { Bit8u op2_8, op1_8, diff_8; - op2_8 = i->Ib(); - /* op1_8 is a register or memory reference */ if (i->modC0()) { op1_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); - } - - diff_8 = op1_8 - op2_8; - - /* now write diff back to destination */ - if (i->modC0()) { + diff_8 = op1_8 - op2_8; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), diff_8); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); + diff_8 = op1_8 - op2_8; Write_RMW_virtual_byte(diff_8); } @@ -695,22 +584,14 @@ BX_CPU_C::NEG_Eb(bxInstruction_c *i) { Bit8u op1_8, diff_8; - /* op1_8 is a register or memory reference */ if (i->modC0()) { op1_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); - } - - diff_8 = 0 - op1_8; - - /* now write diff back to destination */ - if (i->modC0()) { + diff_8 = 0 - op1_8; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), diff_8); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); + diff_8 = 0 - op1_8; Write_RMW_virtual_byte(diff_8); } @@ -723,23 +604,14 @@ BX_CPU_C::INC_Eb(bxInstruction_c *i) { Bit8u op1; - /* op1 is a register or memory reference */ if (i->modC0()) { op1 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); - } - - - op1++; - - /* now write sum back to destination */ - if (i->modC0()) { + op1++; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), op1); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1); + op1++; Write_RMW_virtual_byte(op1); } @@ -752,22 +624,14 @@ BX_CPU_C::DEC_Eb(bxInstruction_c *i) { Bit8u op1_8; - /* op1_8 is a register or memory reference */ if (i->modC0()) { op1_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); - } - else { - /* pointer, segment address pair */ - read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); - } - - op1_8--; - - /* now write sum back to destination */ - if (i->modC0()) { + op1_8--; BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), op1_8); } else { + read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); + op1_8--; Write_RMW_virtual_byte(op1_8); } @@ -782,12 +646,10 @@ BX_CPU_C::CMPXCHG_EbGb(bxInstruction_c *i) Bit8u op2_8, op1_8, diff_8; - /* op1_8 is a register or memory reference */ if (i->modC0()) { op1_8 = BX_READ_8BIT_REGx(i->rm(),i->extend8bitL()); } else { - /* pointer, segment address pair */ read_RMW_virtual_byte(i->seg(), RMAddr(i), &op1_8); }