head	1.13;
access;
symbols
	perseant-exfatfs-base-20250801:1.13
	perseant-exfatfs-base-20240630:1.13
	cjep_sun2x:1.13.0.44
	cjep_sun2x-base:1.13
	cjep_staticlib_x-base1:1.13
	cjep_staticlib_x:1.13.0.42
	cjep_staticlib_x-base:1.13
	phil-wifi-20200421:1.13
	phil-wifi-20200411:1.13
	phil-wifi-20200406:1.13
	pgoyette-compat-merge-20190127:1.13
	pgoyette-compat-20190127:1.13
	pgoyette-compat-20190118:1.13
	pgoyette-compat-1226:1.13
	pgoyette-compat-1126:1.13
	pgoyette-compat-1020:1.13
	pgoyette-compat-0930:1.13
	pgoyette-compat-0906:1.13
	pgoyette-compat-0728:1.13
	pgoyette-compat-0625:1.13
	pgoyette-compat-0521:1.13
	pgoyette-compat-0502:1.13
	pgoyette-compat-0422:1.13
	pgoyette-compat-0415:1.13
	pgoyette-compat-0407:1.13
	pgoyette-compat-0330:1.13
	pgoyette-compat-0322:1.13
	pgoyette-compat-0315:1.13
	pgoyette-compat:1.13.0.40
	pgoyette-compat-base:1.13
	perseant-stdc-iso10646:1.13.0.38
	perseant-stdc-iso10646-base:1.13
	prg-localcount2-base3:1.13
	prg-localcount2-base2:1.13
	prg-localcount2-base1:1.13
	prg-localcount2:1.13.0.36
	prg-localcount2-base:1.13
	pgoyette-localcount-20170426:1.13
	bouyer-socketcan-base1:1.13
	pgoyette-localcount-20170320:1.13
	bouyer-socketcan:1.13.0.34
	bouyer-socketcan-base:1.13
	pgoyette-localcount-20170107:1.13
	pgoyette-localcount-20161104:1.13
	localcount-20160914:1.13
	pgoyette-localcount-20160806:1.13
	pgoyette-localcount-20160726:1.13
	pgoyette-localcount:1.13.0.32
	pgoyette-localcount-base:1.13
	netbsd-5-2-3-RELEASE:1.13
	netbsd-5-1-5-RELEASE:1.13
	yamt-pagecache-base9:1.13
	yamt-pagecache-tag8:1.13
	tls-earlyentropy:1.13.0.28
	tls-earlyentropy-base:1.13
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.13
	riastradh-drm2-base3:1.13
	netbsd-5-2-2-RELEASE:1.13
	netbsd-5-1-4-RELEASE:1.13
	netbsd-5-2-1-RELEASE:1.13
	netbsd-5-1-3-RELEASE:1.13
	agc-symver:1.13.0.30
	agc-symver-base:1.13
	tls-maxphys-base:1.13
	yamt-pagecache-base8:1.13
	netbsd-5-2:1.13.0.26
	yamt-pagecache-base7:1.13
	netbsd-5-2-RELEASE:1.13
	netbsd-5-2-RC1:1.13
	yamt-pagecache-base6:1.13
	yamt-pagecache-base5:1.13
	yamt-pagecache-base4:1.13
	netbsd-5-1-2-RELEASE:1.13
	netbsd-5-1-1-RELEASE:1.13
	yamt-pagecache-base3:1.13
	yamt-pagecache-base2:1.13
	yamt-pagecache:1.13.0.24
	yamt-pagecache-base:1.13
	bouyer-quota2-nbase:1.13
	bouyer-quota2:1.13.0.22
	bouyer-quota2-base:1.13
	matt-nb5-pq3:1.13.0.20
	matt-nb5-pq3-base:1.13
	netbsd-5-1:1.13.0.18
	netbsd-5-1-RELEASE:1.13
	netbsd-5-1-RC4:1.13
	netbsd-5-1-RC3:1.13
	netbsd-5-1-RC2:1.13
	netbsd-5-1-RC1:1.13
	netbsd-5-0-2-RELEASE:1.13
	netbsd-5-0-1-RELEASE:1.13
	jym-xensuspend-nbase:1.13
	netbsd-5-0:1.13.0.16
	netbsd-5-0-RELEASE:1.13
	netbsd-5-0-RC4:1.13
	netbsd-5-0-RC3:1.13
	netbsd-5-0-RC2:1.13
	jym-xensuspend:1.13.0.14
	jym-xensuspend-base:1.13
	netbsd-5-0-RC1:1.13
	netbsd-5:1.13.0.12
	netbsd-5-base:1.13
	mjf-devfs2:1.13.0.10
	mjf-devfs2-base:1.13
	netbsd-4-0-1-RELEASE:1.12
	wrstuden-fixsa-newbase:1.12
	yamt-pf42-base4:1.13
	yamt-pf42-base3:1.13
	hpcarm-cleanup-nbase:1.13
	yamt-pf42-base2:1.13
	yamt-pf42:1.13.0.8
	yamt-pf42-base:1.13
	keiichi-mipv6:1.13.0.6
	keiichi-mipv6-base:1.13
	wrstuden-fixsa-base-1:1.12
	netbsd-4-0:1.12.0.20
	netbsd-4-0-RELEASE:1.12
	cube-autoconf:1.13.0.4
	cube-autoconf-base:1.13
	netbsd-4-0-RC5:1.12
	netbsd-4-0-RC4:1.12
	netbsd-4-0-RC3:1.12
	netbsd-4-0-RC2:1.12
	netbsd-4-0-RC1:1.12
	hpcarm-cleanup:1.13.0.2
	hpcarm-cleanup-base:1.13
	netbsd-3-1-1-RELEASE:1.12
	netbsd-3-0-3-RELEASE:1.12
	wrstuden-fixsa:1.12.0.18
	wrstuden-fixsa-base:1.12
	abandoned-netbsd-4-base:1.12
	abandoned-netbsd-4:1.12.0.12
	netbsd-3-1:1.12.0.14
	netbsd-3-1-RELEASE:1.12
	netbsd-3-0-2-RELEASE:1.12
	netbsd-3-1-RC4:1.12
	netbsd-3-1-RC3:1.12
	netbsd-3-1-RC2:1.12
	netbsd-3-1-RC1:1.12
	netbsd-4:1.12.0.16
	netbsd-4-base:1.12
	netbsd-3-0-1-RELEASE:1.12
	netbsd-3-0:1.12.0.10
	netbsd-3-0-RELEASE:1.12
	netbsd-3-0-RC6:1.12
	netbsd-3-0-RC5:1.12
	netbsd-3-0-RC4:1.12
	netbsd-3-0-RC3:1.12
	netbsd-3-0-RC2:1.12
	netbsd-3-0-RC1:1.12
	netbsd-2-0-3-RELEASE:1.12
	netbsd-2-1:1.12.0.8
	netbsd-2-1-RELEASE:1.12
	netbsd-2-1-RC6:1.12
	netbsd-2-1-RC5:1.12
	netbsd-2-1-RC4:1.12
	netbsd-2-1-RC3:1.12
	netbsd-2-1-RC2:1.12
	netbsd-2-1-RC1:1.12
	netbsd-2-0-2-RELEASE:1.12
	netbsd-3:1.12.0.6
	netbsd-3-base:1.12
	netbsd-2-0-1-RELEASE:1.12
	netbsd-2:1.12.0.4
	netbsd-2-base:1.12
	netbsd-2-0-RELEASE:1.12
	netbsd-2-0-RC5:1.12
	netbsd-2-0-RC4:1.12
	netbsd-2-0-RC3:1.12
	netbsd-2-0-RC2:1.12
	netbsd-2-0-RC1:1.12
	netbsd-2-0:1.12.0.2
	netbsd-2-0-base:1.12
	netbsd-1-6-PATCH002-RELEASE:1.10
	netbsd-1-6-PATCH002:1.10
	netbsd-1-6-PATCH002-RC4:1.10
	netbsd-1-6-PATCH002-RC3:1.10
	netbsd-1-6-PATCH002-RC2:1.10
	netbsd-1-6-PATCH002-RC1:1.10
	gdb-5-3:1.1.1.3
	netbsd-1-6-PATCH001:1.10
	netbsd-1-6-PATCH001-RELEASE:1.10
	netbsd-1-6-PATCH001-RC3:1.10
	netbsd-1-6-PATCH001-RC2:1.10
	netbsd-1-6-PATCH001-RC1:1.10
	netbsd-1-6-RELEASE:1.10
	netbsd-1-6-RC3:1.10
	netbsd-1-6-RC2:1.10
	netbsd-1-6-RC1:1.10
	netbsd-1-6:1.10.0.10
	netbsd-1-6-base:1.10
	netbsd-1-5-PATCH003:1.10
	netbsd-1-5-PATCH002:1.10
	netbsd-1-5-PATCH001:1.10
	netbsd-1-5-RELEASE:1.10
	netbsd-1-5-BETA2:1.10
	netbsd-1-5-BETA:1.10
	netbsd-1-4-PATCH003:1.10
	netbsd-1-5-ALPHA2:1.10
	netbsd-1-5:1.10.0.8
	netbsd-1-5-base:1.10
	netbsd-1-4-PATCH002:1.10
	wrstuden-devbsize-19991221:1.10
	wrstuden-devbsize:1.10.0.6
	wrstuden-devbsize-base:1.10
	comdex-fall-1999:1.10.0.4
	comdex-fall-1999-base:1.10
	netbsd-1-4-PATCH001:1.10
	netbsd-1-4-RELEASE:1.10
	netbsd-1-4:1.10.0.2
	netbsd-1-4-base:1.10
	gdb-4-17:1.1.1.2
	netbsd-1-3-PATCH003:1.2.2.1
	netbsd-1-3-PATCH003-CANDIDATE2:1.2.2.1
	netbsd-1-3-PATCH003-CANDIDATE1:1.2.2.1
	netbsd-1-3-PATCH003-CANDIDATE0:1.2.2.1
	netbsd-1-3-PATCH002:1.2.2.1
	netbsd-1-3-PATCH001:1.2.2.1
	netbsd-1-3-RELEASE:1.2
	netbsd-1-3-BETA:1.2
	netbsd-1-3:1.2.0.2
	netbsd-1-3-base:1.2
	gdb-4-16:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.13
date	2007.06.21.12.51.13;	author skrll;	state dead;
branches;
next	1.12;

1.12
date	2003.08.11.20.58.36;	author christos;	state Exp;
branches
	1.12.16.1
	1.12.18.1;
next	1.11;

1.11
date	2002.09.16.17.23.57;	author thorpej;	state dead;
branches;
next	1.10;

1.10
date	99.02.10.22.17.42;	author tv;	state Exp;
branches;
next	1.9;

1.9
date	98.07.27.01.44.11;	author tv;	state Exp;
branches;
next	1.8;

1.8
date	98.05.22.17.18.00;	author tv;	state Exp;
branches;
next	1.7;

1.7
date	98.05.06.11.22.07;	author mycroft;	state Exp;
branches;
next	1.6;

1.6
date	98.01.30.19.53.20;	author thorpej;	state Exp;
branches;
next	1.5;

1.5
date	98.01.30.19.50.48;	author thorpej;	state Exp;
branches;
next	1.4;

1.4
date	98.01.22.01.32.01;	author gwr;	state Exp;
branches;
next	1.3;

1.3
date	97.12.17.02.44.14;	author thorpej;	state Exp;
branches;
next	1.2;

1.2
date	97.10.20.20.39.46;	author gwr;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	97.09.24.16.57.21;	author gwr;	state Exp;
branches
	1.1.1.1;
next	;

1.12.16.1
date	2008.09.16.18.48.23;	author bouyer;	state dead;
branches;
next	;

1.12.18.1
date	2008.02.14.13.29.33;	author skrll;	state dead;
branches;
next	;

1.2.2.1
date	98.02.07.06.53.09;	author mellon;	state Exp;
branches;
next	;

1.1.1.1
date	97.09.24.16.57.21;	author gwr;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	99.02.10.22.06.23;	author tv;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2003.08.11.20.21.34;	author christos;	state Exp;
branches;
next	;


desc
@@


1.13
log
@Remove gdb 5.3 as nothing uses it now.
@
text
@#!/bin/sh

### WARNING: this file contains embedded tabs.  Do not run untabify on this file.

# Configuration script
# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001,
# 2002 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# This file was originally written by K. Richard Pixley.

#
# Shell script to create proper links to machine-dependent files in
# preparation for compilation.
#
# If configure succeeds, it leaves its status in config.status.
# If configure fails after disturbing the status quo, 
#       config.status is removed.
#

export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)

remove=rm
hard_link=ln
symbolic_link='ln -s'

#for Test
#remove="echo rm"
#hard_link="echo ln"
#symbolic_link="echo ln -s"

# clear some things potentially inherited from environment.

Makefile=Makefile
Makefile_in=Makefile.in
arguments=
build_alias=
cache_file=config.cache
cache_file_option=
configdirs=
extraconfigdirs=
diroptions=
enable_threads=no
enable_shared=no
enable_libstdcxx_v3=yes
exec_prefix=
exec_prefixoption=
fatal=
floating_point=default
gas=default
gcc_version=
gcc_version_trigger=
host_alias=NOHOST
host_makefile_frag=
moveifchange=
norecursion=
other_options=
package_makefile_frag=
package_makefile_rules_frag=
prefix=/usr/local
progname=
program_prefix=
program_prefixoption=
program_suffix=
program_suffixoption=
program_transform_name=
program_transform_nameoption=
redirect=
removing=
site=
site_makefile_frag=
site_option=
srcdir=
srctrigger=
subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
version="$Revision: 1.12 $"
x11=default
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

### we might need to use some other shell than /bin/sh for running subshells

### If we are on Windows, search for the shell.  This will permit people
### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
### without also having to set CONFIG_SHELL.  This code will work when
### using bash, which sets OSTYPE.
case "${OSTYPE}" in
*win32*)
  if [ x${CONFIG_SHELL} = x ]; then
    if [ ! -f /bin/sh ]; then
      if [ x${SHELL} != x ] && [ -f ${SHELL} ]; then
	CONFIG_SHELL=${SHELL}
	export CONFIG_SHELL
      else
	for prog in sh sh.exe bash bash.exe; do
	  IFS="${IFS=	}"; save_ifs="$IFS"; IFS="${IFS}:"
	  for dir in $PATH; do
	    test -z "$dir" && dir=.
	    if test -f $dir/$prog; then
	      CONFIG_SHELL=$dir/$prog
	      export CONFIG_SHELL
	      break
	    fi
	  done
	  IFS="$save_ifs"
	  test -n "${CONFIG_SHELL}" && break
	done
      fi
    fi
  fi
  ;;
esac

config_shell=${CONFIG_SHELL-/bin/sh}

NO_EDIT="This file was generated automatically by configure.  Do not edit."

## this is a little touchy and won't always work, but...
##
## if the argv[0] starts with a slash then it is an absolute name that can (and
## must) be used as is.
##
## otherwise, if argv[0] has no slash in it, we can assume that it is on the
## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
##

progname=$0
# if PWD already has a value, it is probably wrong.
if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi

case "${progname}" in
/* | [A-Za-z]:[\\/]* ) ;;
*/*) ;;
*)
        PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH
        ;;
esac

# Export original configure arguments for use by sub-configures.
TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@@"
export TOPLEVEL_CONFIGURE_ARGUMENTS

# Loop over all args

while :
do

# Break out if there are no more args
	case $# in
	0)
		break
		;;
	esac

# Get the first arg, and shuffle
	option=$1
	shift

# Make all options have two hyphens
	orig_option=$option	# Save original for error messages
	case $option in
	--*) ;;
	-*) option=-$option ;;
	esac
		
# Split out the argument for options that take them
	case $option in
	--*=*)
		optarg=`echo $option | sed -e 's/^[^=]*=//'`
		arguments="$arguments $option"
		;;
# These options have mandatory values.  Since we didn't find an = sign,
# the value must be in the next argument
	--bu* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-* | --bi* | --sb* | --li* | --da* | --sy* | --sh* | --lo* | --in* | --ol* | --ma*)
		optarg=$1
		shift
		arguments="$arguments $option=$optarg"
		;;
	--v)
		arguments="$arguments -v"
		;;
	--*)
		arguments="$arguments $option"
		;;
	esac

# Now, process the options
	case $option in

	--bi*)
		bindir=$optarg
		diroptions="$diroptions --bindir=$optarg"
		;;
	--build* | --bu*)
		case "$build_alias" in
		"") build_alias=$optarg ;;
		*) echo '***' Can only configure for one build machine at a time.  1>&2
		   fatal=yes
		   ;;
		esac
		;;
	--cache*)
		cache_file=$optarg
		;;
	--da*)
		datadir=$optarg
		diroptions="$diroptions --datadir=$optarg"
		;;
	--disable-*)
		enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
		eval $enableopt=no
		disableoptions="$disableoptions $option"
		;;
	--enable-*)
		case "$option" in
		*=*)	;;
		*)	optarg=yes ;;
		esac

		enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
		eval "$enableopt=\$optarg"
		enableoptions="$enableoptions '$option'"
		;;
	--exec-prefix* | --ex*)
		exec_prefix=$optarg
		exec_prefixoption="--exec-prefix=$optarg"
		;;
	--gas | --g*)
		gas=yes
		;;
	--help | --he*)
		fatal=yes
		;;
	--host* | --ho*)
		case $host_alias in
		NOHOST) host_alias=$optarg ;;
		*) echo '***' Can only configure for one host at a time.  1>&2
		   fatal=yes
		   ;;
		esac
		;;
	--inc*)
		includedir=$optarg
		diroptions="$diroptions --includedir=$optarg"
		;;
	--inf*)
		infodir=$optarg
		diroptions="$diroptions --infodir=$optarg"
		;;
	--libd*)
		libdir=$optarg
		diroptions="$diroptions --libdir=$optarg"
		;;
	--libe*)
		libexecdir=$optarg
		diroptions="$diroptions --libexecdir=$optarg"
		;;
	--lo*)
		localstatedir=$optarg
		diroptions="$diroptions --localstatedir=$optarg"
		;;
	--ma*)
		mandir=$optarg
		diroptions="$diroptions --mandir=$optarg"
		;;
	--nfp | --nf*)
		floating_point=no
		floating_pointoption="--nfp"
		;;
	--norecursion | --no*)
		norecursion=yes
		;;
	--ol*)
		oldincludedir=$optarg
		diroptions="$diroptions --oldincludedir=$optarg"
		;;
	--prefix* | --pre*)
		prefix=$optarg
		prefixoption="--prefix=$optarg"
		;;
	--program-prefix* | --program-p*)
		program_prefix=$optarg
		program_prefixoption="--program-prefix=$optarg"
		;;
	--program-suffix* | --program-s*)
		program_suffix=$optarg
		program_suffixoption="--program-suffix=$optarg"
		;;
	--program-transform-name* | --program-t*)
		# Double any backslashes or dollar signs in the argument
		program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
		program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
		;;
	--rm)
		removing=--rm
		;;
	--sb*)
		sbindir=$optarg
		diroptions="$diroptions --sbindir=$optarg"
		;;
	--sh*)
		sharedstatedir=$optarg
		diroptions="$diroptions --sharedstatedir=$optarg"
		;;
	--silent | --sil* | --quiet | --q*)
		redirect=">/dev/null"
		verbose=--silent
		;;
	--site* | --sit*)
		site=$optarg
		site_option="--site=$optarg"
		;;
	--srcdir*/ | --sr*/)
                # Remove trailing slashes.  Otherwise, when the file name gets
                # bolted into an object file as debug info, it has two slashes
                # in it.  Ordinarily this is ok, but emacs takes double slash
                # to mean "forget the first part".
		srcdir=`echo $optarg | sed -e 's:/$::'`
		;;
	--srcdir* | --sr*)
		srcdir=$optarg
		;;
	--sy*)
		sysconfdir=$optarg
		diroptions="$diroptions --sysconfdir=$optarg"
		;;
	--target* | --ta*)
		case $target_alias in
		NOTARGET) target_alias=$optarg ;;
		*) echo '***' Can only configure for one target at a time.  1>&2
		   fatal=yes
		   ;;
		esac
		;;
	--tmpdir* | --tm*)
		TMPDIR=$optarg
		tmpdiroption="--tmpdir=$optarg"
		;;
	--verbose | --v | --verb*)
		redirect=
		verbose=--verbose
		;;
	--version | --V | --vers*)
		echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
		exit 0
		;;
	--with-*)
		case "$option" in
		*=*)	;;
		*)	optarg=yes ;;
		esac

		withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
		eval $withopt="\$optarg"
		withoptions="$withoptions $option"
		;;
	--without-*)
		withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
		eval $withopt=no
		withoutoptions="$withoutoptions $option"
		;;
	--x)	with_x=yes
		withoptions="$withoptions --with-x"
		;;
	--x-i* | --x-l*) other_options="$other_options $orig_option"
		;;
	--*)
		echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
		exit 1
		;;
	*)
		case $undefs in
		NOUNDEFS) undefs=$option ;;
		*) echo '***' Can only configure for one host and one target at a time.  1>&2
		   fatal=yes
		   ;;
		esac
		;;
	esac
done

# process host and target

# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET UNDEFS
#
# The rules are:
# 1. You aren't allowed to specify --host, --target, and undefs at the
#    same time.
# 2. Host defaults to undefs.
# 3. If undefs is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target defaults to undefs.
# 5. If undefs is not specified, then target defaults to host.

case "${fatal}" in
"")
	# Make sure that host, target & undefs aren't all specified at the
	# same time.
	case $host_alias---$target_alias---$undefs in
	NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
		;;
	*) echo '***' Can only configure for one host and one target at a time.  1>&2
	   fatal=yes
	   break 2
		;;
	esac

	# Now, do defaulting for host.
	case $host_alias in
	NOHOST)
		case $undefs in
		NOUNDEFS)
			# Neither --host option nor undefs were present.
			# Call config.guess.
			guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
			if host_alias=`${config_shell} ${guesssys}`
			then
				# If the string we are going to use for
				# the target is a prefix of the string
				# we just guessed for the host, then
				# assume we are running native, and force
				# the same string for both target and host.
				case $target_alias in
				NOTARGET) ;;
				*)
					if expr $host_alias : $target_alias >/dev/null
					then
						host_alias=$target_alias
					fi
					;;
				esac
				echo "Configuring for a ${host_alias} host."
				arguments="--host=$host_alias $arguments"
			else
				echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
				fatal=yes
			fi
			;;
		*)
			host_alias=$undefs
			arguments="--host=$host_alias $arguments"
			undefs=NOUNDEFS
			;;
		esac
	esac

	# Do defaulting for target.  If --target option isn't present, default
	# to undefs.  If undefs isn't present, default to host.
	case $target_alias in
	NOTARGET)
		case $undefs in
		NOUNDEFS)
			target_alias=$host_alias
			;;
		*)
			target_alias=$undefs
			arguments="--target=$target_alias $arguments"
			;;
		esac
	esac
	;;
*) ;;
esac

if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
	exec 1>&2
	echo Usage: configure [OPTIONS] [HOST]
	echo
	echo Options: [defaults in brackets]
	echo ' --prefix=MYDIR		 install into MYDIR [/usr/local]'
	echo ' --exec-prefix=MYDIR	 install host-dependent files into MYDIR [/usr/local]'
	echo ' --help			 print this message [normal config]'
	echo ' --build=BUILD		 configure for building on BUILD [BUILD=HOST]'
	echo ' --host=HOST		 configure for HOST [determined via config.guess]'
	echo ' --norecursion		 configure this directory only [recurse]'
	echo ' --program-prefix=FOO	 prepend FOO to installed program names [""]'
	echo ' --program-suffix=FOO	 append FOO to installed program names [""]'
	echo ' --program-transform-name=P transform installed names by sed pattern P [""]'
	echo ' --site=SITE		 configure with site-specific makefile for SITE'
	echo ' --srcdir=DIR		 find the sources in DIR [. or ..]'
	echo ' --target=TARGET	 configure for TARGET [TARGET=HOST]'
	echo ' --tmpdir=TMPDIR	 create temporary files in TMPDIR [/tmp]'
	echo ' --nfp			 configure for software floating point [hard float]'
	echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
	echo ' --without-FOO		 package FOO is NOT available'
	echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
	echo ' --disable-FOO		 do not include feature FOO'
	echo
	echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
	echo
	if [ -r config.status ] ; then
		cat config.status
	fi

	exit 1
fi

configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
## the sed command below emulates the dirname command
topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}`


# this is a hack.  sun4 must always be a valid host alias or this will fail.
if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
        true
else
        echo '***' cannot find config.sub.  1>&2
        exit 1
fi

touch config.junk
if ${config_shell} ${moveifchange} config.junk config.trash ; then
        true
else
        echo '***' cannot find move-if-change.  1>&2
        exit 1
fi
rm -f config.junk config.trash

case "${srcdir}" in
"")
        if [ -r configure.in ] ; then
                srcdir=.
        else
                if [ -r ${progname}.in ] ; then
                        srcdir=`echo ${progname} | sed 's:/configure$::'`
                else
                        echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
                        exit 1
                fi
        fi
        ;;
*)
	# Set srcdir to "." if that's what it is.
	# This is important for multilib support.
	if [ ! -d ${srcdir} ] ; then
		echo "Invalid source directory ${srcdir}" >&2
		exit 1
	fi
	pwd=`${PWDCMD-pwd}`
	srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
	if [ "${pwd}" = "${srcpwd}" ] ; then
		srcdir=.
	fi
esac

### warn about some conflicting configurations.

case "${srcdir}" in
".") ;;
*)
        if [ -f ${srcdir}/config.status ] ; then
                echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2
                exit 1
        fi
esac

# default exec_prefix
case "${exec_prefixoption}" in
"") exec_prefix="\$(prefix)" ;;
*) ;;
esac

# Define the trigger file to make sure configure will re-run whenever
# the gcc version number changes.
if [ "${with_gcc_version_trigger+set}" = set ]; then
    gcc_version_trigger="$with_gcc_version_trigger"
    gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
else
    # If gcc's sources are available, define the trigger file.
    if [ -f ${topsrcdir}/gcc/version.c ] ; then
	gcc_version_trigger=${topsrcdir}/gcc/version.c
	gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
	case "$arguments" in
	  *--with-gcc-version-trigger=$gcc_version_trigger* )
	    ;;
	  * )
	    # Make sure configure.in knows about this.
	    arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
	    ;;
	esac
	withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
    fi
fi

### break up ${srcdir}/configure.in.
case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
"")
        echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
	# Check for a directory that's been converted to use autoconf since
	# it was last configured.
	if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then
	  echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2
	  if [ -r ${srcdir}/configure ] ; then
	    echo '***' Running the local configure script. 1>&2
	    case "${cache_file}" in
	    "") cache_file_option= ;;
	    *)  cache_file_option="--cache-file=${cache_file}" ;;
	    esac
	    srcdiroption="--srcdir=${srcdir}"
	    case "${build_alias}" in
	    "") buildopt= ;;
	    *)  buildopt="--build=${build_alias}" ;;
	    esac
	    eval exec ${config_shell} ${srcdir}/configure ${verbose} \
		${buildopt} --host=${host_alias} --target=${target_alias} \
		${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
		${srcdiroption} ${diroptions} \
		${program_prefixoption} ${program_suffixoption} \
		${program_transform_nameoption} ${site_option} \
		${withoptions} ${withoutoptions} \
		${enableoptions} ${disableoptions} ${floating_pointoption} \
		${cache_file_option} ${removing} ${other_options} ${redirect}
	  else
	    echo '***' There is no configure script present though. 1>&2
	  fi
	fi
        exit 1
        ;;
*) ;;
esac

case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
"")
        echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
        exit 1
        ;;
*) ;;
esac

case "${TMPDIR}" in
"") TMPDIR=/tmp ; export TMPDIR ;;
*) ;;
esac

# keep this filename short for &%*%$*# 14 char file names and 8+3 file names
tmpdir=${TMPDIR}/cNf$$
mkdir ${tmpdir} || exit 1
tmpfile=${tmpdir}/cNf$$
# Note that under many versions of sh a trap handler for 0 will *override* any
# exit status you explicitly specify!  At this point, the only non-error exit
# is at the end of the script; these actions are duplicated there, minus
# the "exit 1".  Don't use "exit 0" anywhere after this without resetting the
# trap handler, or you'll lose.
trap "rm -rf Makefile.tem ${tmpdir}; exit 1" 0 1 2 15

# split ${srcdir}/configure.in into common, per-host, per-target,
# and post-target parts.  Post-target is optional.
sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst
if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then
  sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
  sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
else
  sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
  echo >${tmpfile}.pos
fi

### do common part of configure.in

# If the language specific compiler does not exist, but the "gcc" directory does,
# we will skip this directory; in this case the sub-directory's common part
# of configure.in will create a small shell script "skip-this-dir" containing
# commands to completely clean up any temporary or created files.

. ${tmpfile}.com

if test -f skip-this-dir; then
	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
	# and reset the trap handler.
	trap 0
	rm -rf Makefile* ${tmpdir}
	# Execute the final clean-up actions
	${config_shell} skip-this-dir
	# and stop configuring this directory.
	exit 0
fi

# some sanity checks on configure.in
case "${srctrigger}" in
"")
        echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in.  1>&2
        exit 1
        ;;
*) ;;
esac

case "${build_alias}" in
"")
	if result=`${config_shell} ${configsub} ${host_alias}` ; then
	    build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
	    build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
	    build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
	    build=${build_cpu}-${build_vendor}-${build_os}
	    build_alias=${host_alias}
	fi
	;;
*)
	if result=`${config_shell} ${configsub} ${build_alias}` ; then
	    buildopt="--build=${build_alias}"
	    build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
	    build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
	    build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
	    build=${build_cpu}-${build_vendor}-${build_os}
	else
	    echo "Unrecognized build system name ${build_alias}." 1>&2
	    exit 1
	fi
	;;
esac

if result=`${config_shell} ${configsub} ${host_alias}` ; then
    true
else
    echo "Unrecognized host system name ${host_alias}." 1>&2
    exit 1
fi
host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
host=${host_cpu}-${host_vendor}-${host_os}

. ${tmpfile}.hst

if result=`${config_shell} ${configsub} ${target_alias}` ; then
    true
else
    echo "Unrecognized target system name ${target_alias}." 1>&2
    exit 1
fi
target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
target=${target_cpu}-${target_vendor}-${target_os}

. ${tmpfile}.tgt

# Find the source files, if location was not specified.
case "${srcdir}" in
"")
        srcdirdefaulted=1
        srcdir=.
        if [ ! -r ${srctrigger} ] ; then
                srcdir=..
        fi
        ;;
*) ;;
esac

if [ ! -r ${srcdir}/${srctrigger} ] ; then
        case "${srcdirdefaulted}" in
        "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/${srcdir}" 1>&2 ;;
        *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;;
        esac

        echo '***' \(At least ${srctrigger} is missing.\) 1>&2
        exit 1
fi

# Some systems (e.g., one of the i386-aix systems the gas testers are
# using) don't handle "\$" correctly, so don't use it here.
tooldir='$(exec_prefix)'/${target_alias}

if [ "${host_alias}" != "${target_alias}" ] ; then
    if [ "${program_prefixoption}" = "" ] ; then
        if [ "${program_suffixoption}" = "" ] ; then 
            if [ "${program_transform_nameoption}" = "" ] ; then
                program_prefix=${target_alias}- ;
            fi
        fi
    fi
fi

# Merge program_prefix and program_suffix onto program_transform_name.
# (program_suffix used to use $, but it's hard to preserve $ through both
# make and sh.)
if [ "${program_suffix}" != "" ] ; then
    program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
fi

if [ "${program_prefix}" != "" ] ; then
    program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
fi

# If CC and CXX are not set in the environment, and the Makefile
# exists, try to extract them from it.  This is to handle running
# ./config.status by hand.
if [ -z "${CC}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CC[ 	]*=/ s/CC[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CC=`tail -1 Makefile.cc`
  rm -f Makefile.cc
fi

if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CFLAGS[ 	]*=/ s/CFLAGS[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CFLAGS=`tail -1 Makefile.cc`
  rm -f Makefile.cc
fi

if [ -z "${CXX}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CXX[ 	]*=/ s/CXX[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CXX=`tail -1 Makefile.cc`
  rm -f Makefile.cc
fi

if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CXXFLAGS[ 	]*=/ s/CXXFLAGS[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CXXFLAGS=`tail -1 Makefile.cc`
  rm -f Makefile.cc
fi

# Generate a default definition for YACC.  This is used if the makefile can't
# locate bison or byacc in objdir.

for prog in 'bison -y' byacc yacc
do
  set dummy $prog; tmp=$2
  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
      DEFAULT_YACC="$prog"
      break
    fi
  done
  IFS="$save_ifs"

  test -n "$DEFAULT_YACC" && break
done

# Generate a default definition for M4.  This is used if the makefile can't
# locate m4 in objdir.

for prog in gm4 gnum4 m4
do
  set dummy $prog; tmp=$2
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
      DEFAULT_M4="$prog"
      break
    fi
  done
  IFS="$save_ifs"

  test -n "$DEFAULT_M4" && break
done

# Generate a default definition for LEX.  This is used if the makefile can't
# locate flex in objdir.

for prog in flex lex
do
  set dummy $prog; tmp=$2
  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
      DEFAULT_LEX="$prog"
      break
    fi
  done
  IFS="$save_ifs"

  test -n "$DEFAULT_LEX" && break
done

if [ "${build}" != "${host}" ]; then
  # If we are doing a Canadian Cross, in which the host and build systems
  # are not the same, we set reasonable default values for the tools.

  tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
  tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET"
  tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
  tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
  tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
  tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
  tools="${tools} OBJCOPY OBJDUMP"

  for var in ${tools}; do
    if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
      sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^'"${var}"'[ 	]*=/ s/'"${var}"'[ 	]*=[ 	]*\(.*\)/\1/p' \
	< Makefile > Makefile.v
      t=`tail -1 Makefile.v`
      if [ -n "${t}" ]; then
	eval "${var}=\${t}"
      fi
      rm -f Makefile.v
    fi
  done

  AR=${AR-${host_alias}-ar}
  AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
  AS=${AS-${host_alias}-as}
  AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
  BISON=${BISON-bison}
  CC=${CC-${host_alias}-gcc}
  CFLAGS=${CFLAGS-"-g -O2"}
  CXX=${CXX-${host_alias}-c++}
  CXXFLAGS=${CXXFLAGS-"-g -O2"}
  CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
  CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
  CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
  GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
  DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
  DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
  GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
  BUILD_PREFIX=${build_alias}-
  BUILD_PREFIX_1=${build_alias}-
  LD=${LD-${host_alias}-ld}
  LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
  MAKEINFO=${MAKEINFO-makeinfo}
  NM=${NM-${host_alias}-nm}
  NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
  RANLIB=${RANLIB-${host_alias}-ranlib}
  RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
  WINDRES=${WINDRES-${host_alias}-windres}
  WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
  OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
  OBJDUMP=${OBJDUMP-${host_alias}-objdump}

  if [ -z "${YACC}" ]; then
    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
      test -z "$dir" && dir=.
      if test -f $dir/bison; then
	YACC="bison -y"
	break
      fi
      if test -f $dir/byacc; then
	YACC=byacc
	break
      fi
      if test -f $dir/yacc; then
	YACC=yacc
	break
      fi
    done
    IFS="$save_ifs"
    if [ -z "${YACC}" ]; then
      YACC="bison -y"
    fi
  fi

  if [ -z "${LEX}" ]; then
    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
      test -z "$dir" && dir=.
      if test -f $dir/flex; then
	LEX=flex
	break
      fi
      if test -f $dir/lex; then
	LEX=lex
	break
      fi
    done
    IFS="$save_ifs"
    LEX=${LEX-flex}
  fi

  # Export variables which autoconf might try to set.
  export AS
  export AR
  export CC_FOR_BUILD
  export DLLTOOL
  export LD
  export NM
  export RANLIB
  export WINDRES
  export OBJCOPY
  export OBJDUMP
else
  # If CC is still not set, try to get gcc.
  if [ -z "${CC}" ]; then
    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
      test -z "$dir" && dir=.
      if test -f $dir/gcc; then
	CC="gcc"
	echo 'void f(){}' > conftest.c
	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
	  CFLAGS=${CFLAGS-"-g -O2"}
	  CXXFLAGS=${CXXFLAGS-"-g -O2"}
	else
	  CFLAGS=${CFLAGS-"-O2"}
	  CXXFLAGS=${CXXFLAGS-"-O2"}
	fi
	rm -f conftest*
	break
      fi
    done
    IFS="$save_ifs"
    CC=${CC-cc}
  else
    if test -z "${CFLAGS}"; then
      # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
      # is set to a version of gcc.
      case "${CC}" in
      *gcc)
	echo 'void f(){}' > conftest.c
	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
	  CFLAGS=${CFLAGS-"-g -O2"}
	  CXXFLAGS=${CXXFLAGS-"-g -O2"}
	else
	  CFLAGS=${CFLAGS-"-O2"}
	  CXXFLAGS=${CXXFLAGS-"-O2"}
	fi
	rm -f conftest*
	;;
      esac
    fi
  fi

  CXX=${CXX-"c++"}
  CFLAGS=${CFLAGS-"-g"}
  CXXFLAGS=${CXXFLAGS-"-g -O2"}
fi

export CC
export CXX
export CFLAGS
export CXXFLAGS

all_build_modules=
if test x"${build_alias}" != x"${host_alias}"
then
  all_build_modules='$(ALL_BUILD_MODULES_LIST)'
fi

for subdir in . ${subdirs} ; do

    # ${subdir} is relative path from . to the directory we're currently
    # configuring.
    # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
    invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`

    ### figure out what to do with srcdir
    case "${srcdir}" in
        ".")  # no -srcdir option.  We're building in place.
                makesrcdir=. ;;
        /* | [A-Za-z]:[\\/]* ) # absolute path
                makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
                ;;
        *) # otherwise relative
                case "${subdir}" in
                .) makesrcdir=${srcdir} ;;
                *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;;
                esac
                ;;
    esac

    if [ "${subdir}/" != "./" ] ; then
        Makefile=${subdir}/Makefile
    fi

    if [ ! -d ${subdir} ] ; then
        if mkdir ${subdir} ; then
                true
        else
                echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${subdir}" 1>&2
                exit 1
        fi
    fi

    case "${removing}" in
    "")
        case "${subdir}" in
        .) ;;
        *) eval echo Building in ${subdir} ${redirect} ;;
        esac

        # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
        # Set up the list of links to be made.
        # ${links} is the list of link names, and ${files} is the list of names to link to.

        # Make the links.
        configlinks="${links}"
        if [ -r ${subdir}/config.status ] ; then
                mv -f ${subdir}/config.status ${subdir}/config.back
        fi
        while [ -n "${files}" ] ; do
                # set file to car of files, files to cdr of files
                set ${files}; file=$1; shift; files=$*
                set ${links}; link=$1; shift; links=$*

                if [ ! -r ${srcdir}/${file} ] ; then
                  if [ ! -r ${file} ] ; then
		    
                        echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
                        echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
                        exit 1
		  else
			srcfile=${file}
		  fi
		else
			srcfile=${srcdir}/${file}
                fi

                ${remove} -f ${link}
		# Make a symlink if possible, otherwise try a hard link
		if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
			true
		else
			# We need to re-remove the file because Lynx leaves a 
			# very strange directory there when it fails an NFS symlink.
			${remove} -r -f ${link}
			${hard_link} ${srcfile} ${link}
		fi
                if [ ! -r ${link} ] ; then
                        echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
                        exit 1
                fi

                echo "Linked \"${link}\" to \"${srcfile}\"."
        done

        # Create a .gdbinit file which runs the one in srcdir
        # and tells GDB to look there for source files.

        if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
                case ${srcdir} in
                .) ;;
                *) cat > ${subdir}/.gdbinit <<EOF
# ${NO_EDIT}
dir ${makesrcdir}
dir .
source ${makesrcdir}/.gdbinit
EOF
                        ;;
                esac
        fi

        # Install a makefile, and make it set VPATH
        # if necessary so that the sources are found.
        # Also change its value of srcdir.
        # NOTE: Makefile generation constitutes the majority of the time in configure.  Hence, this section has
        # been somewhat optimized and is perhaps a bit twisty.

        # code is order so as to try to sed the smallest input files we know.
        # so do these separately because I don't trust the order of sed -e expressions.

        # the five makefile fragments MUST end up in the resulting Makefile in this order: 
        # package macros, target, host, site, and package rules.

        if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then

            # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem.
            rm -f ${subdir}/${Makefile}.tem
            case "${package_makefile_rules_frag}" in
              "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
              *)
                      if [ ! -f ${package_makefile_rules_frag} ] ; then
                              package_makefile_rules_frag=${srcdir}/${package_makefile_rules_frag}
                      fi
                      if [ -f ${package_makefile_rules_frag} ] ; then
                              sed -e "/^####/  r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem
                      else
                              echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
                      fi
            esac
            # working copy now in ${Makefile}.tem

            # Conditionalize for this site.
            rm -f ${Makefile}
              case "${site}" in
              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
              *)
                      site_makefile_frag=${srcdir}/config/ms-${site}

                      if [ -f ${site_makefile_frag} ] ; then
                              sed -e "/^####/  r ${site_makefile_frag}" ${subdir}/Makefile.tem \
                                      > ${Makefile}
                      else
                              mv ${subdir}/Makefile.tem ${Makefile}
                              site_makefile_frag=
                      fi
                      ;;
            esac
            # working copy now in ${Makefile}

            # Conditionalize the makefile for this host.
            rm -f ${subdir}/Makefile.tem
            case "${host_makefile_frag}" in
              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
              *)
                      if [ ! -f ${host_makefile_frag} ] ; then
                              host_makefile_frag=${srcdir}/${host_makefile_frag}
                      fi
                      if [ -f ${host_makefile_frag} ] ; then
                              sed -e "/^####/  r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                      else
                              echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              mv ${Makefile} ${subdir}/Makefile.tem
                      fi
            esac
            # working copy now in ${subdir)/Makefile.tem

            # Conditionalize the makefile for this target.
            rm -f ${Makefile}
            case "${target_makefile_frag}" in
              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
              *)
                      if [ ! -f ${target_makefile_frag} ] ; then
                              target_makefile_frag=${srcdir}/${target_makefile_frag}
                      fi
                      if [ -f ${target_makefile_frag} ] ; then
                              sed -e "/^####/  r ${target_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
                      else
                              mv ${subdir}/Makefile.tem ${Makefile}
                              target_makefile_frag=
                      fi
                      ;;
            esac
            # working copy now in ${Makefile}

            # Emit the default values of this package's macros.
            rm -f ${subdir}/Makefile.tem
            case "${package_makefile_frag}" in
              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
              *)
                      if [ ! -f ${package_makefile_frag} ] ; then
                              package_makefile_frag=${srcdir}/${package_makefile_frag}
                      fi
                      if [ -f ${package_makefile_frag} ] ; then
                              sed -e "/^####/  r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                      else
                              echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              mv ${Makefile} ${subdir}/Makefile.tem
                      fi
            esac
            # real copy now in ${subdir}/Makefile.tem

            # prepend warning about editing, and a bunch of variables.
            rm -f ${Makefile}
            cat > ${Makefile} <<EOF
# ${NO_EDIT}
VPATH = ${makesrcdir}
links = ${configlinks}
host_alias = ${host_alias}
host_cpu = ${host_cpu}
host_vendor = ${host_vendor}
host_os = ${host_os}
host_canonical = ${host_cpu}-${host_vendor}-${host_os}
target_alias = ${target_alias}
target_cpu = ${target_cpu}
target_vendor = ${target_vendor}
target_os = ${target_os}
target_canonical = ${target_cpu}-${target_vendor}-${target_os}
EOF
	    case "${build}" in
	      "") ;;
	      *)  cat >> ${Makefile} << EOF
build_alias = ${build_alias}
build_cpu = ${build_cpu}
build_vendor = ${build_vendor}
build_os = ${build_os}
build_canonical = ${build_cpu}-${build_vendor}-${build_os}
EOF
	    esac

            case "${package_makefile_frag}" in
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
              *)  echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
            esac

            case "${target_makefile_frag}" in
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
              *)  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
            esac

            case "${host_makefile_frag}" in
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
              *)  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
            esac

            if [ "${site_makefile_frag}" != "" ] ; then
                echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
            fi 

	    echo enable_shared = ${enable_shared} >> ${Makefile}
	    echo enable_threads = ${enable_threads} >> ${Makefile}
	    # record if we want to rumtime library stuff installed in libsubdir.
	    if test -z "${enable_version_specific_runtime_libs}"; then
	        echo enable_version_specific_runtime_libs = no >> ${Makefile}
	    else
	        echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
	    fi

	    # Emit a macro which describes the file containing gcc's
	    # version number.
	    echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
	    # And emit a macro defining gcc's version number.
	    echo gcc_version = ${gcc_version} >> ${Makefile}

            # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
            # remove any form feeds.
            if [ -z "${subdirs}" ]; then
                rm -f ${subdir}/Makefile.tm2
                sedtemp=sed.$$
                cat >$sedtemp <<EOF
s:^SUBDIRS[ 	]*=.*$:SUBDIRS = ${configdirs}:
s:^NONSUBDIRS[ 	]*=.*$:NONSUBDIRS = ${noconfigdirs}:
EOF
                sed -f $sedtemp \
                    ${subdir}/Makefile.tem > ${subdir}/Makefile.tm2
                rm -f $sedtemp
                rm -f ${subdir}/Makefile.tem
                mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem
	    fi
	    sed     -e "s|^prefix[ 	]*=.*$|prefix = ${prefix}|" \
                    -e "s|^exec_prefix[ 	]*=.*$|exec_prefix = ${exec_prefix}|" \
                    -e "s|^bindir[ 	]*=.*$|bindir = ${bindir}|" \
                    -e "s|^sbindir[ 	]*=.*$|sbindir = ${sbindir}|" \
                    -e "s|^libexecdir[ 	]*=.*$|libexecdir = ${libexecdir}|" \
                    -e "s|^datadir[ 	]*=.*$|datadir = ${datadir}|" \
                    -e "s|^sysconfdir[ 	]*=.*$|sysconfdir = ${sysconfdir}|" \
                    -e "s|^sharedstatedir[ 	]*=.*$|sharedstatedir = ${sharedstatedir}|" \
                    -e "s|^localstatedir[ 	]*=.*$|localstatedir = ${localstatedir}|" \
                    -e "s|^libdir[ 	]*=.*$|libdir = ${libdir}|" \
                    -e "s|^includedir[ 	]*=.*$|includedir = ${includedir}|" \
                    -e "s|^oldincludedir[ 	]*=.*$|oldincludedir = ${oldincludedir}|" \
                    -e "s|^infodir[ 	]*=.*$|infodir = ${infodir}|" \
                    -e "s|^mandir[ 	]*=.*$|mandir = ${mandir}|" \
		    -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \
		    -e "/^CC[ 	]*=/{
			:loop1
			/\\\\$/ N
			s/\\\\\\n//g
			t loop1
			s%^CC[ 	]*=.*$%CC = ${CC}%
			}" \
		    -e "/^CXX[ 	]*=/{
			:loop2
			/\\\\$/ N
			s/\\\\\\n//g
			t loop2
			s%^CXX[ 	]*=.*$%CXX = ${CXX}%
			}" \
		    -e "/^CFLAGS[ 	]*=/{
			:loop3
			/\\\\$/ N
			s/\\\\\\n//g
			t loop3
			s%^CFLAGS[ 	]*=.*$%CFLAGS = ${CFLAGS}%
			}" \
		    -e "/^CXXFLAGS[ 	]*=/{
			:loop4
			/\\\\$/ N
			s/\\\\\\n//g
			t loop4
			s%^CXXFLAGS[ 	]*=.*$%CXXFLAGS = ${CXXFLAGS}%
			}" \
		    -e "s|^SHELL[	 ]*=.*$|SHELL = ${config_shell}|" \
                    -e "s|^srcdir[ 	]*=.*$|srcdir = ${makesrcdir}|" \
                    -e "s///" \
                    -e "s:^program_prefix[ 	]*=.*$:program_prefix = ${program_prefix}:" \
                    -e "s:^program_suffix[ 	]*=.*$:program_suffix = ${program_suffix}:" \
                    -e "s:^program_transform_name[ 	]*=.*$:program_transform_name = ${program_transform_name}:" \
                    -e "s|^tooldir[ 	]*=.*$|tooldir = ${tooldir}|" \
                    -e "s|^build_tooldir[ 	]*=.*$|build_tooldir = ${tooldir}|" \
		    -e "s:^DEFAULT_YACC[	 ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
		    -e "s:^DEFAULT_LEX[	 ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
		    -e "s:^DEFAULT_M4[  ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
                    ${subdir}/Makefile.tem >> ${Makefile}
  
	    sed -e "s:^GDB_TK[	 ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
	    mv -f ${Makefile}.tem ${Makefile}

	    # If this is a Canadian Cross, preset the values of many more
	    # tools.
	    if [ "${build}" != "${host}" ]; then
		for var in ${tools}; do
		    eval val=\$${var}
		    sed -e "/^${var}[ 	]*=/{
			   :loop1
			   /\\\\$/ N
			   /\\\\$/ b loop1
			   s/\\\\\\n//g
			   s%^${var}[ 	]*=.*$%${var} = ${val}%
			   }" ${Makefile} > ${Makefile}.tem
		    mv -f ${Makefile}.tem ${Makefile}
		done
	    fi

            # final copy now in ${Makefile}

        else
           echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
        fi

        rm -f ${subdir}/Makefile.tem

        case "${host_makefile_frag}" in
        "") using= ;;
        *) using="and \"${host_makefile_frag}\"" ;;
        esac

        case "${target_makefile_frag}" in
        "") ;;
        *) using="${using} and \"${target_makefile_frag}\"" ;;
        esac

        case "${site_makefile_frag}" in
        "") ;;
        *) using="${using} and \"${site_makefile_frag}\"" ;;
        esac

        newusing=`echo "${using}" | sed 's/and/using/'`
        using=${newusing}
        echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using}

        . ${tmpfile}.pos

        # describe the chosen configuration in config.status.
        # Make that file a shellscript which will reestablish
        # the same configuration.  Used in Makefiles to rebuild
        # Makefiles.

        case "${norecursion}" in
        "") arguments="${arguments} --norecursion" ;;
        *) ;;
        esac

        if [ ${subdir} = . ] ; then
            echo "#!/bin/sh
# ${NO_EDIT}
# This directory was configured as follows:
${progname}" ${arguments}  "
# ${using}" > ${subdir}/config.new
        else
            echo "#!/bin/sh
# ${NO_EDIT}
# This directory was configured as follows:
cd ${invsubdir}
${progname}" ${arguments}  "
# ${using}" > ${subdir}/config.new
        fi
        chmod a+x ${subdir}/config.new
        if [ -r ${subdir}/config.back ] ; then
                mv -f ${subdir}/config.back ${subdir}/config.status
        fi
	${config_shell} ${moveifchange} ${subdir}/config.new ${subdir}/config.status
        ;;

    *)  rm -f ${Makefile} ${subdir}/config.status ${links} ;;
    esac
done

# If there are subdirectories, then recur.
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then 
        for configdir in ${configdirs} ${extraconfigdirs} ; do

		# If configdir contains ',' it is
		# srcdir,builddir,target_alias
		# These come from extraconfigdirs.
		case ${configdir} in
		*,*)
		    eval `echo ${configdir} | sed -e 's/\([^,]*\),\([^,]*\),\(.*\)/cfg_dir=\1 bld_dir=\2 tgt_alias=\3/'`
		    ;;
		*)
		    cfg_dir=${configdir}
		    bld_dir=${configdir}
		    tgt_alias=${target_alias}
		    ;;
		esac

                if [ -d ${srcdir}/${cfg_dir} ] ; then
                        eval echo Configuring ${configdir}... ${redirect}
                        case "${srcdir}" in
                        ".") ;;
                        *)
                                if [ ! -d ./${bld_dir} ] ; then
                                        if mkdir ./${bld_dir} ; then
                                                true
                                        else
                                                echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${bld_dir}" 1>&2
                                                exit 1
                                        fi
                                fi
                                ;;
                        esac

                        POPDIR=${PWD=`${PWDCMD-pwd}`}
                        cd ${bld_dir} 

### figure out what to do with srcdir
                        case "${srcdir}" in
                        ".") newsrcdir=${srcdir} ;; # no -srcdir option.  We're building in place.
                        /* | [A-Za-z]:[\\/]* ) # absolute path
                                newsrcdir=${srcdir}/${cfg_dir}
                                srcdiroption="--srcdir=${newsrcdir}"
                                ;;
                        *) # otherwise relative
                                newsrcdir=../${srcdir}/${cfg_dir}
                                srcdiroption="--srcdir=${newsrcdir}"
                                ;;
                        esac

			# Handle --cache-file=../XXX
			case "${cache_file}" in
			"") # empty
				;;
			/* | [A-Za-z]:[\\/]* ) # absolute path
				cache_file_option="--cache-file=${cache_file}"
				;;
			*) # relative path
				cache_file_option="--cache-file=../${cache_file}"
				;;
			esac

### check for guested configure, otherwise fix possibly relative progname
                        if [ -f ${newsrcdir}/configure ] ; then
                                recprog=${newsrcdir}/configure
                        elif [ -f ${newsrcdir}/configure.in ] ; then
                                case "${progname}" in
                                /* | [A-Za-z]:[\\/]* )  recprog=${progname} ;;
                                *)                      recprog=../${progname} ;;
                                esac
			else
				eval echo No configuration information in ${cfg_dir} ${redirect}
				recprog=
                        fi

### The recursion line is here.
			if [ ! -z "${recprog}" ] ; then
	                        if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${tgt_alias} \
        	                        ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
                	                ${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
	                                true
        	                else
					echo Configure in `${PWDCMD-pwd}` failed, exiting. 1>&2
                	                exit 1
                        	fi
			fi

                        cd ${POPDIR}
                fi
        done
fi

# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
# and reset the trap handler.
rm -rf ${tmpdir}
trap 0

exit 0

#
# Local Variables:
# fill-column: 131
# End:
#

# end of configure
@


1.12
log
@Re-add dead files.
@
text
@d92 1
a92 1
version="$Revision: 1.17 $"
@


1.12.16.1
log
@Sync with the following revisions (requested by skrll in ticket #1196):
	gnu/dist/gdb						removed
	gnu/usr.bin/gdb53					removed
	distrib/cats/instkernel/Makefile			1.14.6.1
	gnu/dist/gdb6/bfd/config.bfd				1.3.6.1
	gnu/dist/gdb6/bfd/elfxx-sparc.c				1.1.1.2.6.1
	gnu/dist/gdb6/bfd/elfxx-sparc.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/Makefile.in				1.2.2.1.2.2
	gnu/dist/gdb6/gdb/alpha-tdep.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alpha-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphabsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/alphabsd-nat.h			1.1.2.1
	gnu/dist/gdb6/gdb/alphabsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphabsd-tdep.h			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphanbsd-nat.c			1.1.2.1
	gnu/dist/gdb6/gdb/alphanbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64bsd-nat.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64nbsd-nat.c			1.1.1.2.6.3
	gnu/dist/gdb6/gdb/amd64nbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/arm-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/armbsd-tdep.c				1.1.2.1
	gnu/dist/gdb6/gdb/armnbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/armnbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/configure				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/configure.ac				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/i386bsd-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/i386nbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/m68kbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/mipsnbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/nbsd-thread.c				1.1.2.3
	gnu/dist/gdb6/gdb/ppcnbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/ppcnbsd-tdep.c			1.3.6.1
	gnu/dist/gdb6/gdb/sh-tdep.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/shnbsd-nat.c				1.1.1.2.6.3
	gnu/dist/gdb6/gdb/shnbsd-tdep.c				1.1.1.2.6.4
	gnu/dist/gdb6/gdb/shnbsd-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/sparc-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/sparc64nbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/sparcnbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/tramp-frame.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/vaxbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/config/alpha/nbsd.mh			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/config/arm/nbsd.mt			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/arm/nbsdelf.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/i386/nbsd64.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/m68k/nbsdelf.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/mips/nbsd.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/powerpc/nbsd.mh		1.1.1.2.6.1
	gnu/dist/gdb6/gdb/config/sh/nbsd.mh			1.1.1.1.6.2
	gnu/dist/gdb6/gdb/config/sh/tm-nbsd.h			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/sparc/nbsd64.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/sparc/nbsdelf.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/vax/nbsdelf.mh			1.1.1.1.6.1
	gnu/dist/gdb6/opcodes/configure				1.1.1.2.6.1
	gnu/dist/gdb6/opcodes/configure.in			1.1.1.2.6.1
	gnu/usr.bin/Makefile					1.126.4.1
	gnu/usr.bin/gdb6/arch/alpha/config.h			1.3.4.1
	gnu/usr.bin/gdb6/arch/alpha/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/alpha/init.c			1.2.6.1
	gnu/usr.bin/gdb6/arch/alpha/nm.h			1.2.6.1
	gnu/usr.bin/gdb6/arch/arm/defs.mk			1.2.6.2
	gnu/usr.bin/gdb6/arch/arm/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/armeb/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/defs.mk			1.1.6.3
	gnu/usr.bin/gdb6/arch/armeb/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/tm.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/i386/defs.mk			1.4.4.1
	gnu/usr.bin/gdb6/arch/i386/init.c			1.3.6.1
	gnu/usr.bin/gdb6/arch/m68000/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/tm.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68k/defs.mk			1.1.4.1
	gnu/usr.bin/gdb6/arch/m68k/init.c			1.1.4.1
	gnu/usr.bin/gdb6/arch/mipseb/config.h			1.3.4.1
	gnu/usr.bin/gdb6/arch/mipseb/defs.mk			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipseb/init.c			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipsel/config.h			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/defs.mk			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/init.c			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/tm.h			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipsel/version.c			1.2.6.2
	gnu/usr.bin/gdb6/arch/powerpc/defs.mk			1.3.6.1
	gnu/usr.bin/gdb6/arch/powerpc/init.c			1.3.6.1
	gnu/usr.bin/gdb6/arch/sh3eb/config.h			1.2.2.2
	gnu/usr.bin/gdb6/arch/sh3eb/defs.mk			1.2.8.3
	gnu/usr.bin/gdb6/arch/sh3eb/init.c			1.1.8.3
	gnu/usr.bin/gdb6/arch/sh3eb/nm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3eb/tm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3eb/version.c			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/config.h			1.2.2.2
	gnu/usr.bin/gdb6/arch/sh3el/defs.mk			1.2.8.3
	gnu/usr.bin/gdb6/arch/sh3el/init.c			1.1.8.3
	gnu/usr.bin/gdb6/arch/sh3el/nm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/tm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/version.c			1.1.8.2
	gnu/usr.bin/gdb6/arch/sparc/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/sparc/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/sparc64/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/sparc64/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/vax/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/tm.h				1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/x86_64/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/x86_64/init.c			1.1.6.1
	gnu/usr.bin/gdb6/bfd/arch/armeb/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/bfd.h			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/bfdver.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/defs.mk			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3el/bfd.h			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3el/bfdver.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3el/defs.mk			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/vax/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/bfdver.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/config.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/gdb/Makefile				1.5.2.1.2.2
	gnu/usr.bin/gdb6/gdbtui/Makefile			1.2.6.1
	gnu/usr.bin/gdb6/libiberty/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3eb/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3el/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3eb/defs.mk		1.1.8.3
	gnu/usr.bin/gdb6/opcodes/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3el/defs.mk		1.1.8.3
	gnu/usr.bin/gdb6/opcodes/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3eb/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3el/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/sim/arch/mipseb/cconfig.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipseb/config.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipseb/defs.mk		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/cconfig.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/config.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/defs.mk		1.1.2.1
	lib/libkvm/kvm_sparc64.c				1.10.18.2
	lib/libpthread/pthread.c				1.48.6.4
	lib/libpthread/pthread_barrier.c			1.6.18.1
	lib/libpthread/pthread_cond.c				1.18.12.2
	lib/libpthread/pthread_debug.h				1.8.18.1
	lib/libpthread/pthread_int.h				1.34.4.5
	lib/libpthread/pthread_lock.c				1.14.6.1
	lib/libpthread/pthread_mutex.c				1.22.4.2
	lib/libpthread/pthread_run.c				1.18.12.4
	lib/libpthread/pthread_rwlock.c				1.13.6.2
	lib/libpthread/pthread_sa.c				1.37.6.5
	lib/libpthread/pthread_sig.c				1.47.4.8
	lib/libpthread/pthread_sleep.c				1.7.6.2
	lib/libpthread/sem.c					1.9.6.2
	lib/libpthread/arch/sh3/pthread_md.h			1.3.6.1
	regress/lib/libpthread/resolv/Makefile			1.1.12.1
	regress/lib/libpthread/sigrunning/Makefile		1.1.2.1
	regress/lib/libpthread/sigrunning/sigrunning.c		1.1.2.1
	share/mk/bsd.own.mk					1.489.4.3
	sys/arch/amd64/amd64/locore.S				1.18.14.1
	sys/arch/amd64/amd64/machdep.c				1.44.2.3.2.1
	sys/arch/amd64/conf/kern.ldscript			1.1.70.1
	sys/arch/cats/conf/Makefile.cats.inc			1.17.30.1
	sys/arch/shark/conf/Makefile.shark.inc			1.6.30.1
	sys/arch/sparc64/conf/kern.ldscript			1.7.26.2
	sys/arch/sparc64/conf/kern32.ldscript			1.6.26.2
	sys/arch/sparc64/include/kcore.h			1.4.92.2
	sys/arch/sparc64/sparc64/locore.s			1.232.4.4
	sys/arch/sparc64/sparc64/machdep.c			1.193.4.3
	sys/arch/sparc64/sparc64/pmap.c				1.184.2.1.2.4
	sys/conf/newvers.sh					1.42.26.2
	sys/kern/kern_sa.c					1.87.4.11
	sys/kern/kern_synch.c					1.173.4.2
	sys/sys/savar.h						1.20.10.2
	tools/gdb/Makefile					1.9.4.1
	tools/gdb/mknative-gdb					1.1.6.1

pullup the wrstuden-fixsa CVS branch to netbsd-4:
toolchain/35540 - GDB 6 support for pthreads.
port-sparc64/37534 - ktrace firefox gives
    kernel trap 30: data access expection
GDB changes:
- delete gdb53
- enable gdb6 on all architectures
- add support for amd64 crash dumps
- add support for sparc64 crash dumps
- add support for /proc pid to executable filename for all archs
- enable thread support for all architectures
- add a note section to kernels to all platforms
- support detection/unwinding of signals for most architectures.
- Fix PTHREAD_UCONTEXT_TO_REG / PTHREAD_REG_TO_UCONTEXT on sh3.
- Apply fix from binutils-current so that sparc gdb can be cross built
  on a 64bit host.
SA/pthread changes:
Pre-allocate memory needed for event delivery. Eliminates dropped
interrupts under load.
Deliver intra-process signals to running threads
Eliminate some deadlock scenarios
Fix intra-process signal delivery when delivering to a thread waiting
for signals. Makes afs work again!
@
text
@d92 1
a92 1
version="$Revision: 1.12 $"
@


1.12.18.1
log
@GDB 5.3 is dead on this branch.
@
text
@d92 1
a92 1
version="$Revision: 1.12 $"
@


1.11
log
@Remove gdb-4.17.
@
text
@d1 1
a1 1
#! /bin/sh
d3 1
a3 2292
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12.1 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --enable-netrom "
ac_help="$ac_help
  --with-mmalloc             use memory mapped malloc package"
ac_help="$ac_help
  --enable-shared         use shared libraries"

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he)
    # 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 << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.12.1"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
    ;;

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=main.c

# 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=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi




# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:534: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:563: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  ac_prog_rejected=no
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@@"
    shift
    ac_cv_prog_CC="$@@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:611: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext <<EOF
#line 621 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:645: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:650: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:674: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS="$ac_save_CFLAGS"
  elif test $ac_cv_prog_cc_g = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-O2"
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:702: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 717 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 734 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

echo $ac_n "checking for AIX""... $ac_c" 1>&6
echo "configure:763: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
#line 765 "configure"
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*


ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
echo "configure:788: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 793 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MINIX=yes
else
  echo "$ac_t""no" 1>&6
MINIX=
fi

if test "$MINIX" = yes; then
  cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

  cat >> confdefs.h <<\EOF
#define _POSIX_1_SOURCE 2
EOF

  cat >> confdefs.h <<\EOF
#define _MINIX 1
EOF

fi

echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
echo "configure:836: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  echo "$ac_t""yes" 1>&6
  ISC=yes # If later tests want to check for ISC.
  cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

  if test "$GCC" = yes; then
    CC="$CC -posix"
  else
    CC="$CC -Xp"
  fi
else
  echo "$ac_t""no" 1>&6
  ISC=
fi


DLLTOOL=${DLLTOOL-dlltool}


ac_aux_dir=
for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.


# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac


# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:907: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:928: checking target system type" >&5

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:946: checking build system type" >&5

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-



CONFIG_OBS=
CONFIG_DEPS=
CONFIG_SRCS=

configdirs="doc testsuite"


. ${srcdir}/configure.host

. ${srcdir}/configure.tgt


# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:994: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi

# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1053: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AR="${ac_tool_prefix}ar"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
  echo "$ac_t""$AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi



# 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1084: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test -z "$ac_cv_prog_RANLIB"; then
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1115: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

else
  RANLIB=":"
fi
fi

for ac_prog in 'bison -y' byacc
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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1151: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_YACC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
YACC="$ac_cv_prog_YACC"
if test -n "$YACC"; then
  echo "$ac_t""$YACC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"

for ac_prog in mawk gawk nawk awk
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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1185: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AWK="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
  echo "$ac_t""$AWK" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AWK" && break
done


if test "$program_transform_name" = s,x,x,; then
  program_transform_name=
else
  # Double any \ or $.  echo might interpret backslashes.
  cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  rm -f conftestsed
fi
test "$program_prefix" != NONE &&
  program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"

# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"


echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:1235: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1240 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:1257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_signal=void
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF



echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1277: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1282 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1307 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

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 <<EOF
#line 1325 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 1346 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h objlist.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1384: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1389 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
echo "configure:1421: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1426 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>

#if defined(S_ISBLK) && defined(S_IFDIR)
# if S_ISBLK (S_IFDIR)
You lose.
# endif
#endif

#if defined(S_ISBLK) && defined(S_IFCHR)
# if S_ISBLK (S_IFCHR)
You lose.
# endif
#endif

#if defined(S_ISLNK) && defined(S_IFREG)
# if S_ISLNK (S_IFREG)
You lose.
# endif
#endif

#if defined(S_ISSOCK) && defined(S_IFREG)
# if S_ISSOCK (S_IFREG)
You lose.
# endif
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "You lose" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_header_stat_broken=yes
else
  rm -rf conftest*
  ac_cv_header_stat_broken=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
if test $ac_cv_header_stat_broken = yes; then
  cat >> confdefs.h <<\EOF
#define STAT_MACROS_BROKEN 1
EOF

fi


echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1478: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1483 "configure"
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
if { (eval echo configure:1532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi


for ac_func in setpgid sbrk select poll sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1556: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1561 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


# If we are configured native on GNU/Linux, work around problems with sys/procfs.h
if test "${target}" = "${host}"; then
  case "${host}" in
  i[3456]86-*-linux*)
	cat >> confdefs.h <<\EOF
#define START_INFERIOR_TRAPS_EXPECTED 2
EOF

	cat >> confdefs.h <<\EOF
#define sys_quotactl 1
EOF

	;;
  esac
fi

echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
echo "configure:1626: checking for gregset_t type" >&5
if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1631 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
gregset_t *gregsetp = 0
; return 0; }
EOF
if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  gdb_cv_have_gregset_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gdb_cv_have_gregset_t=no
fi
rm -f conftest*
fi

echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
if test $gdb_cv_have_gregset_t = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_GREGSET_T 1
EOF

fi

echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
echo "configure:1659: checking for fpregset_t type" >&5
if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1664 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
fpregset_t *fpregsetp = 0
; return 0; }
EOF
if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  gdb_cv_have_fpregset_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gdb_cv_have_fpregset_t=no
fi
rm -f conftest*
fi

echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
if test $gdb_cv_have_fpregset_t = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_FPREGSET_T 1
EOF

fi

echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
echo "configure:1692: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1700 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi



echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
echo "configure:1737: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1742 "configure"
#include "confdefs.h"

int main() {

  extern long long foo;
  switch (foo & 2) { case 0: return 1; }

; return 0; }
EOF
if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  gdb_cv_c_long_long=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gdb_cv_c_long_long=no
fi
rm -f conftest*
fi

echo "$ac_t""$gdb_cv_c_long_long" 1>&6
if test $gdb_cv_c_long_long = yes; then
  cat >> confdefs.h <<\EOF
#define CC_HAS_LONG_LONG 1
EOF

fi


echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
echo "configure:1774: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  gdb_cv_printf_has_long_long=no
else
  cat > conftest.$ac_ext <<EOF
#line 1782 "configure"
#include "confdefs.h"

int main () {
  char buf[32];
  long long l = 0;
  l = (l << 16) + 0x0123;
  l = (l << 16) + 0x4567;
  l = (l << 16) + 0x89ab;
  l = (l << 16) + 0xcdef;
  sprintf (buf, "0x%016llx", l);
  return (strcmp ("0x0123456789abcdef", buf));
}
EOF
if { (eval echo configure:1796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  gdb_cv_printf_has_long_long=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  gdb_cv_printf_has_long_long=no
fi
rm -fr conftest*
fi

fi

if test $gdb_cv_printf_has_long_long = yes; then
  cat >> confdefs.h <<\EOF
#define PRINTF_HAS_LONG_LONG 1
EOF

fi
echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6


echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
echo "configure:1820: checking for long double support in compiler" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1825 "configure"
#include "confdefs.h"

int main() {
long double foo;
; return 0; }
EOF
if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_long_double=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_long_double=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_long_double" 1>&6
if test $ac_cv_c_long_double = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_LONG_DOUBLE 1
EOF

fi


echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
echo "configure:1854: checking for long double support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  gdb_cv_printf_has_long_double=no
else
  cat > conftest.$ac_ext <<EOF
#line 1862 "configure"
#include "confdefs.h"

int main () {
  char buf[16];
  long double f = 3.141592653;
  sprintf (buf, "%Lg", f);
  return (strncmp ("3.14159", buf, 7));
}
EOF
if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  gdb_cv_printf_has_long_double=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  gdb_cv_printf_has_long_double=no
fi
rm -fr conftest*
fi

fi

if test $gdb_cv_printf_has_long_double = yes; then
  cat >> confdefs.h <<\EOF
#define PRINTF_HAS_LONG_DOUBLE 1
EOF

fi
echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6


echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
echo "configure:1896: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  gdb_cv_scanf_has_long_double=no
else
  cat > conftest.$ac_ext <<EOF
#line 1904 "configure"
#include "confdefs.h"

int main () {
  char *buf = "3.141592653";
  long double f = 0;
  sscanf (buf, "%Lg", &f);
  return !(f > 3.14159 && f < 3.14160);
}
EOF
if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  gdb_cv_scanf_has_long_double=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  gdb_cv_scanf_has_long_double=no
fi
rm -fr conftest*
fi

fi

if test $gdb_cv_scanf_has_long_double = yes; then
  cat >> confdefs.h <<\EOF
#define SCANF_HAS_LONG_DOUBLE 1
EOF

fi
echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6

for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1940: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1945 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1979: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1984 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:2032: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat > conftest.$ac_ext <<EOF
#line 2040 "configure"
#include "confdefs.h"

/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the filesystem buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif

/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

int
main()
{
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
	data = malloc(pagesize);
	if (!data)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		*(data + i) = rand();
	umask(0);
	fd = creat("conftestmmap", 0600);
	if (fd < 0)
		exit(1);
	if (write(fd, data, pagesize) != pagesize)
		exit(1);
	close(fd);

	/*
	 * Next, try to mmap the file at a fixed address which
	 * already has something else allocated at it.  If we can,
	 * also make sure that we see the same garbage.
	 */
	fd = open("conftestmmap", O_RDWR);
	if (fd < 0)
		exit(1);
	data2 = malloc(2 * pagesize);
	if (!data2)
		exit(1);
	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data2 + i))
			exit(1);

	/*
	 * Finally, make sure that changes to the mapped area
	 * do not percolate back to the file as seen by read().
	 * (This is a bug on some variants of i386 svr4.0.)
	 */
	for (i = 0; i < pagesize; ++i)
		*(data2 + i) = *(data2 + i) + 1;
	data3 = malloc(pagesize);
	if (!data3)
		exit(1);
	if (read(fd, data3, pagesize) != pagesize)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data3 + i))
			exit(1);
	close(fd);
	unlink("conftestmmap");
	exit(0);
}

EOF
if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_MMAP 1
EOF

fi


echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
echo "configure:2204: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2209 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
if { (eval echo configure:2230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  bfd_cv_decl_needed_malloc=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  bfd_cv_decl_needed_malloc=yes
fi
rm -f conftest*
fi

echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
if test $bfd_cv_decl_needed_malloc = yes; then
  bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $bfd_tr_decl 1
EOF

fi

echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
echo "configure:2252: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2257 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
if { (eval echo configure:2278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  bfd_cv_decl_needed_realloc=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  bfd_cv_decl_needed_realloc=yes
fi
rm -f conftest*
fi

echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
if test $bfd_cv_decl_needed_realloc = yes; then
  bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $bfd_tr_decl 1
EOF
d5 17
a21 1
fi
d23 1
a23 38
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
echo "configure:2300: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2305 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
if { (eval echo configure:2326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  bfd_cv_decl_needed_free=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  bfd_cv_decl_needed_free=yes
fi
rm -f conftest*
fi
d25 8
a32 6
echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
if test $bfd_cv_decl_needed_free = yes; then
  bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $bfd_tr_decl 1
EOF
d34 1
a34 1
fi
d36 70
d107 1
a107 38
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
echo "configure:2349: checking whether strerror must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2354 "configure"
#include "confdefs.h"

#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
if { (eval echo configure:2375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  bfd_cv_decl_needed_strerror=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  bfd_cv_decl_needed_strerror=yes
fi
rm -f conftest*
fi
d109 30
a138 6
echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
if test $bfd_cv_decl_needed_strerror = yes; then
  bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $bfd_tr_decl 1
EOF
d140 1
a140 1
fi
d142 1
d144 20
d165 3
d169 1
a169 11
if test ${build} = ${host} -a ${host} = ${target} ; then
   case ${host_os} in
   hpux*)
      echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
echo "configure:2403: checking for HPUX/OSF thread support" >&5
      if test -f /usr/include/dce/cma_config.h ; then
         if test "$GCC" = "yes" ; then
            echo "$ac_t""yes" 1>&6
            cat >> confdefs.h <<\EOF
#define HAVE_HPUX_THREAD_SUPPORT 1
EOF
d171 2
a172 17
            CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
            CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
         else
            echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
         fi
      else
         echo "$ac_t""no" 1>&6
      fi
      ;;
   solaris*)
      echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
echo "configure:2422: checking for Solaris thread debugging library" >&5
      if test -f /usr/lib/libthread_db.so.1 ; then
         echo "$ac_t""yes" 1>&6
         cat >> confdefs.h <<\EOF
#define HAVE_THREAD_DB_LIB 1
EOF
d174 233
a406 33
         CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
         CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
         echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:2432: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2440 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
d408 1
a408 8
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
d410 12
a421 1
  LIBS="-ldl $LIBS"
d423 68
a490 52
else
  echo "$ac_t""no" 1>&6
fi

         if test "$GCC" = "yes" ; then
            # The GNU linker requires the -export-dynamic option to make
            # all symbols visible in the dynamic symbol table.
            hold_ldflags=$LDFLAGS
            echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
echo "configure:2483: checking for the ld -export-dynamic flag" >&5
            LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
            cat > conftest.$ac_ext <<EOF
#line 2486 "configure"
#include "confdefs.h"

int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  found=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  found=no
fi
rm -f conftest*
            LDFLAGS=$hold_ldflags
            echo "$ac_t""$found" 1>&6
            if test $found = yes; then
               CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
            fi
         fi
      else
         echo "$ac_t""no" 1>&6
      fi
      ;;
   esac
   
fi

ENABLE_CFLAGS=

# Check whether --enable-netrom or --disable-netrom was given.
if test "${enable_netrom+set}" = set; then
  enableval="$enable_netrom"
  case "${enableval}" in
yes)	enable_netrom=yes ;;
no)	enable_netrom=no ;;
*)	{ echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
a491 1
fi
d493 29
d523 1
a523 3
if test "${enable_netrom}" = "yes"; then
	CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" 
        CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
d526 49
a574 2
MMALLOC_CFLAGS=
MMALLOC=
d576 1
d578 8
d587 4
a590 7
# Check whether --with-mmalloc or --without-mmalloc was given.
if test "${with_mmalloc+set}" = set; then
  withval="$with_mmalloc"
  case "${withval}" in
  yes)  want_mmalloc=true ;;
  no)   want_mmalloc=false;;
  *)    { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
a591 3
else
  want_mmalloc=false
fi
d593 20
a612 11
if test x$want_mmalloc = xtrue; then
   cat >> confdefs.h <<\EOF
#define USE_MMALLOC 1
EOF

   cat >> confdefs.h <<\EOF
#define MMCHECK_FORCE 1
EOF

   MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
   MMALLOC='../mmalloc/libmmalloc.a'
d615 36
d652 7
d660 4
d665 50
a714 12




# Begin stuff to support --enable-shared
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  case "${enableval}" in
  yes) shared=true ;;
  no)  shared=false ;;
  *) shared=true ;;
a715 1
fi
d717 22
a738 47
HLDFLAGS=
HLDENV=
# If we have shared libraries, try to set rpath reasonably.
if test "${shared}" = "true"; then
  case "${host}" in
  *-*-hpux*)
    HLDFLAGS='-Wl,+s,+b,$(libdir)'
    ;;
  *-*-irix5* | *-*-irix6*)
    HLDFLAGS='-Wl,-rpath,$(libdir)'
    ;;
  *-*-linux*aout*)
    ;;
  *-*-linux* | *-pc-linux-gnu)
    HLDFLAGS='-Wl,-rpath,$(libdir)'
    ;;
  *-*-solaris*)
    HLDFLAGS='-R $(libdir)'
    ;;
  *-*-sysv4*)
    HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
    ;;
  esac
fi

# On SunOS, if the linker supports the -rpath option, use it to
# prevent ../bfd and ../opcodes from being included in the run time
# search path.
case "${host}" in
  *-*-sunos*)
    echo 'main () { }' > conftest.c
    ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
    if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
      :
    elif grep 'No such file' conftest.t >/dev/null 2>&1; then
      :
    elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
      :
    elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
      :
    elif test "${shared}" = "true"; then
      HLDFLAGS='-Wl,-rpath=$(libdir)'
    else
      HLDFLAGS='-Wl,-rpath='
    fi
    rm -f conftest.t conftest.c conftest
    ;;
d741 2
a742 12

# End stuff to support --enable-shared

mmalloc_dir=../mmalloc
mmalloc_yn=MMALLOC_YES
# Check whether --with-mmalloc or --without-mmalloc was given.
if test "${with_mmalloc+set}" = set; then
  withval="$with_mmalloc"
  case "${withval}" in
  no)	mmalloc_yn=MMALLOC_NO ;;
  *)	mmalloc_dir="${withval}";;
  esac
d744 2
a745 4
  if test ! -d "${mmalloc_dir}"; then
    echo "configure: warning: mmalloc not found - building without it" 1>&2;
    mmalloc_yn=MMALLOC_NO
  fi
d747 4
d752 1
d754 5
a758 6


# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
if test "${host}" != "${target}"; then
    target_subdir="${target_alias}/"
d760 4
d765 1
d767 11
a777 14
frags=
host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
if test ! -f ${host_makefile_frag}; then
{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
fi
frags="$frags $host_makefile_frag"

target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
if test ! -f ${target_makefile_frag}; then
{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
fi
frags="$frags $target_makefile_frag"


d779 5
d785 2
a786 19

hostfile=`sed -n '
s/XM_FILE[ 	]*=[ 	]*\([^ 	]*\)/\1/p
' ${host_makefile_frag}`

targetfile=`sed -n '
s/TM_FILE[ 	]*=[ 	]*\([^ 	]*\)/\1/p
' ${target_makefile_frag}`

# these really aren't orthogonal true/false values of the same condition,
# but shells are slow enough that I like to reuse the test conditions
# whenever possible
if test "${target}" = "${host}"; then
nativefile=`sed -n '
s/NAT_FILE[ 	]*=[ 	]*\([^ 	]*\)/\1/p
' ${host_makefile_frag}`
# else
# GDBserver is only useful in a "native" enviroment
# configdirs=`echo $configdirs | sed 's/gdbserver//'`
d789 12
a800 27

# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
# corresponding links.  But we have to remove the xm.h files and tm.h
# files anyway, e.g. when switching from "configure host" to
# "configure none".

files=
links=
rm -f xm.h
if test "${hostfile}" != ""; then
files="${files} config/${gdb_host_cpu}/${hostfile}"
links="${links} xm.h"
fi
rm -f tm.h
if test "${targetfile}" != ""; then
files="${files} config/${gdb_target_cpu}/${targetfile}"
links="${links} tm.h"
fi
rm -f nm.h
if test "${nativefile}" != ""; then
files="${files} config/${gdb_host_cpu}/${nativefile}"
links="${links} nm.h"
else
# A cross-only configuration.
files="${files} config/nm-empty.h"
links="${links} nm.h"
d803 5
a807 26


echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
echo "configure:2711: checking for Cygwin32 environment" >&5
if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2716 "configure"
#include "confdefs.h"

int main() {
return __CYGWIN32__;
; return 0; }
EOF
if { (eval echo configure:2723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  am_cv_cygwin32=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_cygwin32=no
fi
rm -f conftest*
rm -f conftest*
d810 2
a811 24
echo "$ac_t""$am_cv_cygwin32" 1>&6
CYGWIN32=
test "$am_cv_cygwin32" = yes && CYGWIN32=yes
echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
echo "configure:2740: checking for Mingw32 environment" >&5
if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2745 "configure"
#include "confdefs.h"

int main() {
return __MINGW32__;
; return 0; }
EOF
if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  am_cv_mingw32=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_mingw32=no
a812 7
rm -f conftest*
rm -f conftest*
fi

echo "$ac_t""$am_cv_mingw32" 1>&6
MINGW32=
test "$am_cv_mingw32" = yes && MINGW32=yes
d814 11
a824 18

echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:2771: checking for executable suffix" >&5
if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$CYGWIN32" = yes -o "$MINGW32" = yes; then
am_cv_exeext=.exe
else
cat > am_c_test.c << 'EOF'
int main() {
/* Nothing needed here */
}
EOF
${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
rm -f am_c_test*
d827 8
a834 1
test x"${am_cv_exeext}" = x && am_cv_exeext=no
a835 4
EXEEXT=""
test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
echo "$ac_t""${am_cv_exeext}" 1>&6

d837 8
a844 47
subdirs="$configdirs"

trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set) 2>&1 | grep ac_space` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
a845 1
rm -f confcache
d847 8
a854 11
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
d857 2
a858 1
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
d860 12
a871 1
DEFS=-DHAVE_CONFIG_H
d873 2
a874 2
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
d876 2
a877 13
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
d879 1
a879 2
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
d881 12
a892 11
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
d895 2
a896 2
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
d898 9
a906 100
trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@@/@@@@/; s/@@%/@@@@/; s/%g\$/@@g/; /@@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@@@/%@@/; s/@@@@/@@%/; s/@@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@@SHELL@@%$SHELL%g
s%@@CFLAGS@@%$CFLAGS%g
s%@@CPPFLAGS@@%$CPPFLAGS%g
s%@@CXXFLAGS@@%$CXXFLAGS%g
s%@@DEFS@@%$DEFS%g
s%@@LDFLAGS@@%$LDFLAGS%g
s%@@LIBS@@%$LIBS%g
s%@@exec_prefix@@%$exec_prefix%g
s%@@prefix@@%$prefix%g
s%@@program_transform_name@@%$program_transform_name%g
s%@@bindir@@%$bindir%g
s%@@sbindir@@%$sbindir%g
s%@@libexecdir@@%$libexecdir%g
s%@@datadir@@%$datadir%g
s%@@sysconfdir@@%$sysconfdir%g
s%@@sharedstatedir@@%$sharedstatedir%g
s%@@localstatedir@@%$localstatedir%g
s%@@libdir@@%$libdir%g
s%@@includedir@@%$includedir%g
s%@@oldincludedir@@%$oldincludedir%g
s%@@infodir@@%$infodir%g
s%@@mandir@@%$mandir%g
s%@@CC@@%$CC%g
s%@@CPP@@%$CPP%g
s%@@DLLTOOL@@%$DLLTOOL%g
s%@@host@@%$host%g
s%@@host_alias@@%$host_alias%g
s%@@host_cpu@@%$host_cpu%g
s%@@host_vendor@@%$host_vendor%g
s%@@host_os@@%$host_os%g
s%@@target@@%$target%g
s%@@target_alias@@%$target_alias%g
s%@@target_cpu@@%$target_cpu%g
s%@@target_vendor@@%$target_vendor%g
s%@@target_os@@%$target_os%g
s%@@build@@%$build%g
s%@@build_alias@@%$build_alias%g
s%@@build_cpu@@%$build_cpu%g
s%@@build_vendor@@%$build_vendor%g
s%@@build_os@@%$build_os%g
s%@@INSTALL_PROGRAM@@%$INSTALL_PROGRAM%g
s%@@INSTALL_DATA@@%$INSTALL_DATA%g
s%@@AR@@%$AR%g
s%@@RANLIB@@%$RANLIB%g
s%@@YACC@@%$YACC%g
s%@@AWK@@%$AWK%g
s%@@CONFIG_LDFLAGS@@%$CONFIG_LDFLAGS%g
s%@@MMALLOC_CFLAGS@@%$MMALLOC_CFLAGS%g
s%@@MMALLOC@@%$MMALLOC%g
s%@@ENABLE_CFLAGS@@%$ENABLE_CFLAGS%g
s%@@CONFIG_OBS@@%$CONFIG_OBS%g
s%@@CONFIG_DEPS@@%$CONFIG_DEPS%g
s%@@CONFIG_SRCS@@%$CONFIG_SRCS%g
s%@@HLDFLAGS@@%$HLDFLAGS%g
s%@@HLDENV@@%$HLDENV%g
s%@@target_subdir@@%$target_subdir%g
/@@host_makefile_frag@@/r $host_makefile_frag
s%@@host_makefile_frag@@%%g
/@@target_makefile_frag@@/r $target_makefile_frag
s%@@target_makefile_frag@@%%g
s%@@frags@@%$frags%g
s%@@EXEEXT@@%$EXEEXT%g
s%@@subdirs@@%$subdirs%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# 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_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
d908 2
a909 127
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    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

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@@configure_input@@%$configure_input%g
s%@@srcdir@@%$srcdir%g
s%@@top_srcdir@@%$top_srcdir%g
s%@@INSTALL@@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="config.h:config.in"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

EOF

# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
d911 1
a911 27
# 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.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.

rm -f conftest.tail
while :
do
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  echo 'CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
a912 1
rm -f conftest.vals
d914 25
a938 14
cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
d940 1
a940 4
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done
d942 51
a992 17
EOF

cat >> $CONFIG_STATUS <<EOF
ac_sources="$files"
ac_dests="$links"
EOF

cat >> $CONFIG_STATUS <<\EOF
srcdir=$ac_given_srcdir
while test -n "$ac_sources"; do
  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
  set $ac_sources; ac_source=$1; shift; ac_sources=$*

  echo "linking $srcdir/$ac_source to $ac_dest"

  if test ! -r $srcdir/$ac_source; then
    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
a993 1
  rm -f $ac_dest
d995 50
a1044 9
  # Make relative symlinks.
  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
    # The dest file is in a subdirectory.
    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dest_dir_suffix.
    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
d1046 17
a1062 1
    ac_dest_dir_suffix= ac_dots=
d1065 4
a1068 14
  case "$srcdir" in
  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  esac

  # Make a symlink if possible; otherwise try a hard link.
  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
    ln $srcdir/$ac_source $ac_dest; then :
  else
    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
  fi
done
EOF
cat >> $CONFIG_STATUS <<EOF
d1070 4
a1073 3
gdb_host_cpu=$gdb_host_cpu
gdb_target_cpu=$gdb_target_cpu
nativefile=$nativefile
d1075 4
a1078 7
EOF
cat >> $CONFIG_STATUS <<\EOF

if test "${nativefile}" = ""; then
sed -e '/^NATDEPFILES[ 	]*=[ 	]*/s//# NATDEPFILES=/' \
	< Makefile > Makefile.tem
mv -f Makefile.tem Makefile
d1081 1
a1081 9
sed -e '/^TM_FILE[ 	]*=/s,^TM_FILE[ 	]*=[ 	]*,&config/'"${gdb_target_cpu}"'/,
/^XM_FILE[ 	]*=/s,^XM_FILE[ 	]*=[ 	]*,&config/'"${gdb_host_cpu}"'/,
/^NAT_FILE[ 	]*=/s,^NAT_FILE[ 	]*=[ 	]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
mv -f Makefile.tmp Makefile

case x$CONFIG_HEADERS in
xconfig.h:config.in)
echo > stamp-h ;;
esac
d1083 18
a1100 28
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -cache-file | --cache-file | --cache-fil | --cache-fi \
    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
      ac_prev=cache_file ;;
    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
a1101 1
  done
d1103 2
a1104 6
  for ac_config_dir in $configdirs; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
d1107 15
a1121 1
    echo configuring in $ac_config_dir
d1123 303
a1425 9
    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac
d1427 28
a1454 2
    ac_popdir=`pwd`
    cd $ac_config_dir
d1456 4
a1459 2
      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
d1461 4
a1464 18
    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi
d1466 14
a1479 12
    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
d1482 20
a1501 8
      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi
d1503 3
a1505 3
    cd $ac_popdir
  done
fi
d1507 96
d1606 7
@


1.10
log
@Conflict resolution, and update NetBSD changes to 4.17.
@
text
@@


1.9
log
@Allow mips{eb,el}-*-netbsd* in configuration, setting default accordingly,
and make mips-dec-netbsd* an alias for mipsel-*-netbsd*.
@
text
@d4 2
a5 2
# Generated automatically using autoconf version 2.8 
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
d17 1
a17 1
  --enable-gm "
d19 1
a19 16
  --enable-sim-powerpc "
ac_help="$ac_help
  --with-mmalloc=MMALLOC_DIR
  use the GNU mapped-malloc package in MMALLOC_DIR "
ac_help="$ac_help
  --enable-gdbtk "
ac_help="$ac_help
  --with-x                use the X Window System"
ac_help="$ac_help
  --with-tclinclude       directory where tcl private headers are"
ac_help="$ac_help
  --with-tcllib           directory where the tcl library is"
ac_help="$ac_help
  --with-tkinclude        directory where the tk private headers are"
ac_help="$ac_help
  --with-tklib            directory where the tk library is"
d58 3
d342 1
a342 1
    echo "configure generated by autoconf version 2.8"
d444 5
a448 3
# Only set LANG and LC_ALL to C if already set.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
d450 2
a451 1
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
d513 1
d533 1
d562 1
d609 39
d649 1
d658 1
a658 1
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
d666 1
d669 6
a674 3
  if test "${CFLAGS+set}" != set; then
    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
d679 1
a679 1
  ac_cv_prog_gcc_g=yes
d681 1
a681 1
  ac_cv_prog_gcc_g=no
d687 7
a693 6
echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
    if test $ac_cv_prog_gcc_g = yes; then
      CFLAGS="-g -O"
    else
      CFLAGS="-O"
    fi
d701 1
d716 1
a716 1
#line 674 "configure"
d722 1
a722 1
{ (eval echo configure:680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
d728 2
d733 1
a733 1
#line 689 "configure"
d739 1
a739 1
{ (eval echo configure:695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
d745 2
d762 1
d764 1
a764 1
#line 717 "configure"
d785 1
a785 1
ac_safe=`echo "minix/config.h" | tr './\055' '___'`
d787 1
d792 1
a792 1
#line 744 "configure"
d797 1
a797 1
{ (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
d804 2
d835 1
d856 3
d860 1
a860 1
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
d872 1
a872 1
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
d878 103
d988 1
d993 1
d998 1
a998 1
    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d1005 3
a1007 1
      for ac_prog in ginstall installbsd scoinst install; do
a1011 1
	    # OSF/1 installbsd also uses dspmsg, but is usable.
d1022 1
a1022 1
  IFS="$ac_save_ifs"
a1042 43

# Make sure we can run config.sub.
if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`$ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`$ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

d1052 1
d1083 1
d1114 1
d1150 1
d1184 1
a1212 105
ac_aux_dir=
for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.


# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac


# Make sure we can run config.sub.
if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`$ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking target system type""... $ac_c" 1>&6

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`$ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`$ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

d1233 3
a1235 3
# If we cannot run a trivial program, we must be cross compiling.
echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
d1238 2
a1239 5
  if test "$cross_compiling" = yes; then
  ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
#line 1225 "configure"
d1241 14
a1254 1
main(){return(0);}
d1256 3
a1258 3
{ (eval echo configure:1229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  ac_cv_c_cross=no
d1260 4
a1263 1
  ac_cv_c_cross=yes
d1265 1
a1265 2
fi
rm -fr conftest*
d1268 6
a1273 2
echo "$ac_t""$ac_cv_c_cross" 1>&6
cross_compiling=$ac_cv_c_cross
d1276 1
d1281 1
a1281 1
#line 1247 "configure"
d1289 1
a1289 1
{ (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
d1296 2
d1306 1
a1306 1
#line 1270 "configure"
d1324 1
a1324 1
#line 1288 "configure"
d1344 2
a1345 2
cat > conftest.$ac_ext <<EOF
#line 1309 "configure"
d1356 2
a1357 2
{ (eval echo configure:1320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
d1360 3
d1365 1
d1367 1
a1367 1
rm -fr conftest*
d1379 1
a1379 1
for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h link.h endian.h
d1381 1
a1381 1
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
d1383 1
d1388 1
a1388 1
#line 1347 "configure"
d1393 1
a1393 1
{ (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
d1400 2
d1409 1
a1409 1
    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
d1420 1
d1425 1
a1425 1
#line 1381 "configure"
d1476 77
a1552 1
for ac_func in setpgid sbrk
d1555 1
d1560 1
a1560 1
#line 1439 "configure"
d1566 2
d1570 1
a1570 2
int main() { return 0; }
int t() {
d1583 1
a1583 1
if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
d1587 2
d1593 1
a1594 1
fi
d1608 16
d1625 1
d1630 1
a1630 1
#line 1489 "configure"
d1633 1
a1633 2
int main() { return 0; }
int t() {
d1637 1
a1637 1
if { (eval echo configure:1497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
d1641 2
a1646 1

d1658 1
d1663 1
a1663 1
#line 1521 "configure"
d1666 1
a1666 2
int main() { return 0; }
int t() {
d1670 1
a1670 1
if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
d1674 2
a1679 1

d1690 127
d1819 1
d1824 1
a1824 1
#line 1554 "configure"
d1827 1
a1827 2
int main() { return 0; }
int t() {
d1831 1
a1831 1
if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d1835 2
a1840 1

d1853 1
d1860 2
a1861 2
cat > conftest.$ac_ext <<EOF
#line 1590 "configure"
d1871 2
a1872 2
{ (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
d1875 3
d1880 1
d1882 1
a1882 1
rm -fr conftest*
d1893 83
a1975 1
for ac_func in valloc getpagesize
d1978 1
d1983 1
a1983 1
#line 1625 "configure"
d1989 2
d1993 1
a1993 2
int main() { return 0; }
int t() {
d2006 1
a2006 1
if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
d2010 2
d2016 1
a2017 1
fi
d2031 2
a2032 1
if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
d2036 1
a2036 1
  ac_cv_func_mmap=no
d2038 2
a2039 2
cat > conftest.$ac_ext <<EOF
#line 1677 "configure"
d2042 21
a2062 1
/* Thanks to Mike Haertel and Jim Avera for this test. */
d2067 1
d2069 7
a2075 16
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
#  define getpagesize() EXEC_PAGESIZE
# else
#  ifdef NBPG
#   define getpagesize() NBPG * CLSIZE
#   ifndef CLSIZE
#    define CLSIZE 1
#   endif
#  else
#   ifdef NBPC
#    define getpagesize() NBPC
#   else
#    define getpagesize() PAGESIZE /* SVR4 */
#   endif
#  endif
a2076 1
#endif
d2078 29
a2106 3
#ifndef HAVE_VALLOC
# define valloc malloc
#endif
d2109 1
a2109 1
extern "C" { void *valloc(unsigned), *malloc(unsigned); }
d2111 1
a2111 1
char *valloc(), *malloc();
d2117 59
a2175 25
  char *buf1, *buf2, *buf3;
  int i = getpagesize(), j;
  int i2 = i * 2;
  int fd;

  buf1 = (char *)valloc(i2);
  buf2 = (char *)valloc(i);
  buf3 = (char *)malloc(i2);
  for (j = 0; j < i2; ++j)
    *(buf1 + j) = rand();
  fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
  write(fd, buf1, i2);
  mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
  for (j = 0; j < i; ++j)
    if (*(buf1 + j) != *(buf2 + j))
      exit(1);
  lseek(fd, (long)i, 0);
  read(fd, buf2, i); /* read into mapped memory -- file should not change */
  /* (it does in i386 SVR4.0 - Jim Avera, jima@@netcom.com) */
  lseek(fd, (long)0, 0);
  read(fd, buf3, i2);
  for (j = 0; j < i2; ++j)
    if (*(buf1 + j) != *(buf3 + j))
      exit(1);
  exit(0);
d2179 3
a2181 3
{ (eval echo configure:1746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_mmap=yes
d2183 4
a2186 1
  ac_cv_func_mmap=no
d2188 1
d2190 1
a2190 1
rm -fr conftest*
d2193 2
a2194 2
echo "$ac_t""$ac_cv_func_mmap" 1>&6
if test $ac_cv_func_mmap = yes; then
d2202 8
a2209 3
ENABLE_CFLAGS=
ENABLE_CLIBS=
ENABLE_OBS=
d2211 28
a2238 8
# Check whether --enable-netrom or --disable-netrom was given.
if test "${enable_netrom+set}" = set; then
  enableval="$enable_netrom"
  case "${enableval}" in
yes)	enable_netrom=yes ;;
no)	enable_netrom=no ;;
*)	{ echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
esac
d2241 6
a2247 2
if test "${enable_netrom}" = "yes"; then
	ENABLE_OBS="${ENABLE_OBS} remote-nrom.o" 
d2250 8
d2259 21
a2279 8
# Check whether --enable-sim-powerpc or --disable-sim-powerpc was given.
if test "${enable_sim_powerpc+set}" = set; then
  enableval="$enable_sim_powerpc"
  case "${enableval}" in
yes)	powerpc_sim=yes ; SIM=../sim/ppc/libsim.a ; SIM_OBS=remote-sim.o ;;
no)	powerpc_sim=no ;;
*)	{ echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;;
esac
d2281 15
a2295 1
  if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi
d2298 8
d2307 29
d2337 6
d2344 1
d2347 8
d2356 21
a2376 9
mmalloc_dir=../mmalloc
mmalloc_yn=MMALLOC_YES
# Check whether --with-mmalloc or --without-mmalloc was given.
if test "${with_mmalloc+set}" = set; then
  withval="$with_mmalloc"
  case "${withval}" in
  no)	mmalloc_yn=MMALLOC_NO ;;
  *)	mmalloc_dir="${withval}";;
  esac
d2378 15
a2392 4
  if test ! -d "${mmalloc_dir}"; then
    echo "configure: warning: mmalloc not found - building without it" 1>&2;
    mmalloc_yn=MMALLOC_NO
  fi
d2398 60
a2457 4
# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
if test "${host}" != "${target}"; then
    target_subdir="${target_alias}/"
d2459 2
d2462 8
d2471 1
a2471 1
configdirs="doc testsuite"
d2473 3
d2477 10
a2486 2
# Map host cpu into the config cpu subdirectory name.
# The default is $host_cpu.
d2488 27
a2514 1
case "${host_cpu}" in
d2516 1
a2516 10
c[12])			gdb_host_cpu=convex ;;
hppa*)			gdb_host_cpu=pa ;;
i[3456]86)		gdb_host_cpu=i386 ;;
m68*)			gdb_host_cpu=m68k ;;
m88*)			gdb_host_cpu=m88k ;;
np1)			gdb_host_cpu=gould ;;
pyramid)		gdb_host_cpu=pyr ;;
powerpc*)		gdb_host_cpu=powerpc ;;
sparc64)		gdb_host_cpu=sparc ;;
*)			gdb_host_cpu=$host_cpu ;;
d2518 7
d2526 1
a2527 1
# map host info into gdb names.
d2529 4
a2532 1
case "${host}" in
d2534 2
a2535 1
a29k-*-*)		gdb_host=ultra3 ;;
a2536 119
alpha-*-netbsd*)	gdb_host=nbsd ;;
alpha-*-osf1*)		gdb_host=alpha-osf1 ;;
alpha-*-osf2*)		gdb_host=alpha-osf2 ;;
alpha-*-osf[3456789]*)	gdb_host=alpha-osf3 ;;

arm-*-netbsd*)		gdb_host=nbsd ;;
arm-*-*)		gdb_host=arm ;;

c[12]-*-*)		gdb_host=convex ;;

hppa*-*-bsd*)		gdb_host=hppabsd ;;
hppa*-*-hiux*)		gdb_host=hppahpux ;;
hppa*-*-hpux*)		gdb_host=hppahpux ;;
hppa*-*-osf*)		gdb_host=hppaosf ;;

i[3456]86-ncr-*)	gdb_host=ncr3000 ;;
i[3456]86-sequent-bsd*)	gdb_host=symmetry ;;  # dynix
i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
i[3456]86-sequent-sysv*) gdb_host=ptx ;;
i[3456]86-*-aix*)	gdb_host=i386aix ;;
i[3456]86-*-bsd*)	gdb_host=i386bsd ;;
i[3456]86-*-dgux*)	gdb_host=i386dgux ;;
i[3456]86-*-freebsd*)	gdb_host=fbsd ;;
i[3456]86-*-netbsd*)	gdb_host=nbsd ;;
i[3456]86-*-go32*)	gdb_host=go32 ;;
i[3456]86-*-linux*)	gdb_host=linux ;;
i[3456]86-*-lynxos*)	gdb_host=i386lynx ;;
i[3456]86-*-mach3*)	gdb_host=i386m3 ;;
i[3456]86-*-mach*)	gdb_host=i386mach ;;
i[3456]86-*-gnu*)	gdb_host=i386gnu ;;
i[3456]86-*-osf1mk*)	gdb_host=osf1mk ;;
i[3456]86-*-sco3.2v5*)	gdb_host=i386sco5 ;;
i[3456]86-*-sco3.2v4*)	gdb_host=i386sco4 ;;
i[3456]86-*-sco*)	gdb_host=i386sco ;;
i[3456]86-*-solaris*)	gdb_host=i386sol2 ;;
i[3456]86-*-sunos*)	gdb_host=sun386 ;;
i[3456]86-*-sysv3.2*)	gdb_host=i386v32 ;;
i[3456]86-*-sysv32*)	gdb_host=i386v32 ;;
i[3456]86-*-sysv4*)	gdb_host=i386v4 ;;
i[3456]86-*-unixware)	gdb_host=i386v4 ;;
i[3456]86-*-sysv*)	gdb_host=i386v ;;
i[3456]86-*-isc*)	gdb_host=i386v32 ;;
i[3456]86-*-os9k)	gdb_host=i386os9k ;;
i[3456]86-*-cygwin32)	gdb_host=cygwin32 ;;
m680[01]0-sun-sunos3*)	gdb_host=sun2os3 ;;
m680[01]0-sun-sunos4*)	gdb_host=sun2os4 ;;
m68030-sony-*)		gdb_host=news1000 ;;

m68*-altos-*)		gdb_host=altos ;;
m68*-apollo*-sysv*)	gdb_host=apollo68v ;;
m68*-apollo*-bsd*)	gdb_host=apollo68b ;;
m68*-att-*)		gdb_host=3b1 ;;
m68*-bull*-sysv*)	gdb_host=dpx2 ;;
m68*-hp-bsd*)		gdb_host=hp300bsd ;;
m68*-hp-hpux*)		gdb_host=hp300hpux ;;
m68*-isi-*)		gdb_host=isi ;;
m68*-*-lynxos*)		gdb_host=m68klynx ;;
m68*-*-netbsd*)		gdb_host=nbsd ;;
m68*-*-sysv4*)		gdb_host=m68kv4 ;;
m68*-motorola-*)	gdb_host=delta68 ;;
m68*-sony-*)		gdb_host=news ;;
m68*-sun-sunos3*)	gdb_host=sun3os3 ;;
m68*-sun-sunos4*)	gdb_host=sun3os4 ;;
m68*-sun-*)		gdb_host=sun3os4 ;;

m88*-harris-cxux*)	gdb_host=cxux ;;
m88*-motorola-sysv4*)	gdb_host=delta88v4 ;;
m88*-motorola-sysv*)	gdb_host=delta88 ;;
m88*-*-mach3*)		gdb_host=mach3 ;;
m88*-*-*)		gdb_host=m88k ;;

mips-dec-mach3*)	gdb_host=mach3 ;;
mips-dec-*)		gdb_host=decstation ;;
mips-little-*)		gdb_host=littlemips ;;
mips-sgi-irix3*)	gdb_host=irix3 ;;
mips-sgi-irix4*)	gdb_host=irix4 ;;
mips-sgi-irix5*)	gdb_host=irix5 ;;
mips-sony-*)		gdb_host=news-mips ;;
mips-*-mach3*)		gdb_host=mach3 ;;
mips*-*-netbsd*)	gdb_host=nbsd ;;
mips-*-sysv4*)		gdb_host=mipsv4 ;;
mips-*-sysv*)		gdb_host=riscos ;;
mips-*-riscos*)		gdb_host=riscos ;;

none-*-*)		gdb_host=none ;;

np1-*-*)		gdb_host=np1 ;;

ns32k-*-mach3*)		gdb_host=mach3 ;;
ns32k-*-netbsd*)	gdb_host=nbsd ;;
ns32k-umax-*)		gdb_host=umax ;;
ns32k-utek-sysv*)	gdb_host=merlin ;;

powerpc-*-aix*)		gdb_host=aix ;;
powerpc-*-netbsd*)	gdb_host=nbsd ;;
powerpcle-*-cygwin32)	gdb_host=cygwin32 ;;
pn-*-*)			gdb_host=pn ;;

pyramid-*-*)		gdb_host=pyramid ;;

romp-*-*)		gdb_host=rtbsd ;;

rs6000-*-lynxos*)	gdb_host=rs6000lynx ;;
rs6000-*-aix4*)		gdb_host=aix4 ;;
rs6000-*-*)		gdb_host=rs6000 ;;

sparc-*-lynxos*)	gdb_host=sparclynx ;;
sparc-*-netbsd*)	gdb_host=nbsd ;;
sparc-*-solaris2*)	gdb_host=sun4sol2 ;;
sparc-*-sunos4*)	gdb_host=sun4os4 ;;
sparc-*-sunos5*)	gdb_host=sun4sol2 ;;
sparc-*-*)		gdb_host=sun4os4 ;;
sparc64-*-*)		gdb_host=sun4sol2 ;;

tahoe-*-*)		gdb_host=tahoe ;;

vax-*-bsd*)		gdb_host=vaxbsd ;;
vax-*-ultrix2*)		gdb_host=vaxult2 ;;
vax-*-ultrix*)		gdb_host=vaxult ;;
a2537 1
w65-*-*)		gdb_host=w65 ;;
d2539 7
d2547 19
a2567 2
# Map target cpu into the config cpu subdirectory name.
# The default is $target_cpu.
a2568 1
case "${target_cpu}" in
a2569 13
alpha)			gdb_target_cpu=alpha ;;
c[12])			gdb_target_cpu=convex ;;
hppa*)			gdb_target_cpu=pa ;;
i[3456]86)		gdb_target_cpu=i386 ;;
m68*)			gdb_target_cpu=m68k ;;
m88*)			gdb_target_cpu=m88k ;;
mips*)			gdb_target_cpu=mips ;;
np1)			gdb_target_cpu=gould ;;
powerpc*)		gdb_target_cpu=powerpc ;;
pn)			gdb_target_cpu=gould ;;
pyramid)		gdb_target_cpu=pyr ;;
sparc*)			gdb_target_cpu=sparc ;;
*)			gdb_target_cpu=$target_cpu ;;
d2571 8
d2580 26
d2607 23
a2629 1
# map target info into gdb names.
a2630 1
case "${target}" in
d2632 1
a2632 178
a29k-*-aout*)		gdb_target=a29k ;;
a29k-*-coff*)		gdb_target=a29k ;;
a29k-*-elf*)		gdb_target=a29k ;;
a29k-*-ebmon*)		gdb_target=a29k ;;
a29k-*-kern*)		gdb_target=a29k-kern ;;
a29k-*-none*)		gdb_target=a29k ;;
a29k-*-sym1*)		gdb_target=ultra3 ;;
a29k-*-udi*)		gdb_target=a29k-udi ;;
a29k-*-vxworks*)        gdb_target=vx29k ;;

alpha-*-netbsd*)	gdb_target=nbsd ;;
alpha-*-osf*)		gdb_target=alpha-osf1 ;;


arm-*-netbsd*)		gdb_target=nbsd ;;
arm-*-netbsdkgdb*)	gdb_target=nbsdkgdb ;;
arm-*-*)		gdb_target=arm ;;

c1-*-*)			gdb_target=convex ;;
c2-*-*)			gdb_target=convex ;;

h8300-*-*)		gdb_target=h8300 ;;
h8500-*-*)		gdb_target=h8500 ;;

sh-*-*)			gdb_target=sh ;;


hppa*-*-bsd*)		gdb_target=hppabsd ;;
hppa*-*-pro*)		gdb_target=hppapro ;;
hppa*-*-hpux*)		gdb_target=hppahpux ;;
hppa*-*-hiux*)		gdb_target=hppahpux ;;
hppa*-*-osf*)		gdb_target=hppaosf ;;

i[3456]86-sequent-bsd*)	gdb_target=symmetry ;;
i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
i[3456]86-sequent-sysv*) gdb_target=ptx ;;
i[3456]86-ncr-*)	gdb_target=ncr3000 ;;
i[3456]86-*-aout*)	gdb_target=i386aout ;;
i[3456]86-*-coff*)	gdb_target=i386v ;;
i[3456]86-*-elf*)	gdb_target=i386v ;;
i[3456]86-*-aix*)	gdb_target=i386aix ;;
i[3456]86-*-bsd*)	gdb_target=i386bsd ;;
i[3456]86-*-freebsd*)	gdb_target=fbsd ;;
i[3456]86-*-netbsd*)	gdb_target=nbsd ;;
i[3456]86-*-os9k)	gdb_target=i386os9k ;;
i[3456]86-*-go32*)	gdb_target=i386aout ;;
i[3456]86-*-lynxos*)	gdb_target=i386lynx
		configdirs="${configdirs} gdbserver" ;;
i[3456]86-*-solaris*)	gdb_target=i386sol2 ;;
i[3456]86-*-sunos*)	gdb_target=sun386 ;;
i[3456]86-*-sysv4*)	gdb_target=i386v4 ;;
i[3456]86-*-sco*)	gdb_target=i386v ;;
i[3456]86-*-sysv*)	gdb_target=i386v ;;
i[3456]86-*-linux*)	gdb_target=linux
		configdirs="${configdirs} gdbserver" ;;
i[3456]86-*-isc*)	gdb_target=i386v ;;
i[3456]86-*-mach3*)	gdb_target=i386m3 ;;
i[3456]86-*-mach*)	gdb_target=i386mach ;;
i[3456]86-*-gnu*)	gdb_target=i386gnu ;;
i[3456]86-*-netware*)	gdb_target=i386nw
		configdirs="${configdirs} nlm" ;;
i[3456]86-*-osf1mk*)	gdb_target=i386mk ;;
i[3456]86-*-cygwin32)	gdb_target=cygwin32  ;;
i960-*-bout*)		gdb_target=vxworks960 ;;
i960-nindy-coff*)	gdb_target=nindy960 ;;
i960-*-coff*)		gdb_target=mon960 ;;
i960-nindy-elf*)	gdb_target=nindy960 ;;
i960-*-elf*)		gdb_target=mon960 ;;

i960-*-nindy*)		gdb_target=nindy960 ;;
i960-*-vxworks*)	gdb_target=vxworks960 ;;

m68000-*-sunos3*)	gdb_target=sun2os3 ;;
m68000-*-sunos4*)	gdb_target=sun2os4 ;;

m68*-apollo*-bsd*)	gdb_target=apollo68b ;;
m68*-bull-sysv*)	gdb_target=dpx2 ;;
m68*-hp-bsd*)		gdb_target=hp300bsd ;;
m68*-hp-hpux*)		gdb_target=hp300hpux ;;
m68*-altos-*)		gdb_target=altos ;;
m68*-att-*)		gdb_target=3b1 ;;
m68*-cisco*-*)		gdb_target=cisco ;;
m68*-ericsson-*)	gdb_target=es1800 ;;
m68*-isi-*)		gdb_target=isi ;;
m68*-motorola-*)	gdb_target=delta68 ;;
m68*-netx-*)		gdb_target=vxworks68 ;;
m68*-sony-*)		gdb_target=news ;;
m68*-tandem-*)		gdb_target=st2000 ;;
m68*-rom68k-*)          gdb_target=monitor ;;
m68*-*bug-*)            gdb_target=monitor ;;
m68*-monitor-*)         gdb_target=monitor ;;
m68*-est-*)		gdb_target=monitor ;;
m68*-*-aout*)		gdb_target=monitor ;;
m68*-*-coff*)		gdb_target=monitor ;;
m68*-*-elf*)		gdb_target=monitor ;;
m68*-*-lynxos*)		gdb_target=m68klynx
		configdirs="${configdirs} gdbserver" ;;
m68*-*-netbsd*)		gdb_target=nbsd ;;
m68*-*-os68k*)		gdb_target=os68k ;;
m68*-*-sunos3*)		gdb_target=sun3os3 ;;
m68*-*-sunos4*)		gdb_target=sun3os4 ;;
m68*-*-sysv4*)		gdb_target=m68kv4 ;;
m68*-*-vxworks*)	gdb_target=vxworks68 ;;

m88*-harris-cxux*)	gdb_target=cxux ;;
m88*-motorola-sysv4*)	gdb_target=delta88v4 ;;
m88*-*-mach3*)		gdb_target=mach3 ;;
m88*-motorola-*)	gdb_target=delta88 ;;
m88*-*-*)		gdb_target=m88k ;;

mips64*-big-*)		gdb_target=bigmips64 ;;
mips*-big-*)		gdb_target=bigmips ;;
mips*-dec-mach3*)	gdb_target=mach3 ;;
mips*-dec-*)		gdb_target=decstation ;;
mips64*el-*-ecoff*)	gdb_target=embedl64 ;;
mips64*-*-ecoff*)	gdb_target=embed64 ;;
mips64*vr4300*el-*-elf*)	gdb_target=vr4300el ;;
mips64*vr4300*-*-elf*)	gdb_target=vr4300 ;;
mips64*el-*-elf*)	gdb_target=embedl64 ;;
mips64*-*-elf*)		gdb_target=embed64 ;;
mips*el-*-ecoff*)	gdb_target=embedl ;;
mips*-*-ecoff*)		gdb_target=embed ;;
mips*el-*-elf*)		gdb_target=embedl ;;
mips*-*-elf*)		gdb_target=embed ;;
mips*-little-*)		gdb_target=littlemips ;;
mips*-sgi-irix5*)	gdb_target=irix5 ;;
mips*-sgi-*)		gdb_target=irix3 ;;
mips*-sony-*)		gdb_target=bigmips ;;
mips*-*-mach3*)		gdb_target=mach3 ;;
mips*-*-netbsd*)	gdb_target=nbsd ;;
mips*-*-sysv4*)		gdb_target=mipsv4 ;;
mips*-*-sysv*)		gdb_target=bigmips ;;
mips*-*-riscos*)	gdb_target=bigmips ;;
mips*-*-vxworks*)       gdb_target=vxmips ;;

none-*-*)		gdb_target=none ;;

np1-*-*)		gdb_target=np1 ;;

ns32k-*-mach3*)		gdb_target=mach3 ;;
ns32k-*-netbsd*)	gdb_target=nbsd ;;
ns32k-utek-sysv*)	gdb_target=merlin ;;
ns32k-utek-*)		gdb_target=umax ;;

pn-*-*)			gdb_target=pn ;;
powerpc-*-macos*)	gdb_target=macos ;;
powerpc-*-netware*)	gdb_target=ppc-nw
			configdirs="${configdirs} nlm" ;;

powerpc-*-aix4*)	gdb_target=aix4 ;;
powerpc-*-aix*)		gdb_target=aix ;;
powerpc-*-netbsd*)	gdb_target=nbsd ;;
powerpcle-*-cygwin32)	gdb_target=cygwin32 ;;
powerpc-*-eabi*)	gdb_target=ppc-eabi ;;
powerpcle-*-eabi*)	gdb_target=ppcle-eabi ;;

pyramid-*-*)		gdb_target=pyramid ;;

rs6000-*-lynxos*)	gdb_target=rs6000lynx ;;
rs6000-*-aix4*)		gdb_target=aix4 ;;
rs6000-*-*)		gdb_target=rs6000 ;;

sparc-*-aout*)		gdb_target=sparc-em ;;
sparc-*-coff*)		gdb_target=sparc-em ;;
sparc-*-elf*)		gdb_target=sparc-em ;;
sparc-*-lynxos*)	gdb_target=sparclynx
		configdirs="${configdirs} gdbserver" ;;
sparc-*-netbsd*)	gdb_target=nbsd ;;
sparc-*-solaris2*)	gdb_target=sun4sol2 ;;
sparc-*-sunos4*)	gdb_target=sun4os4 ;;
sparc-*-sunos5*)	gdb_target=sun4sol2 ;;
sparc-*-vxworks*)	gdb_target=vxsparc ;;
sparc-*-*)		gdb_target=sun4os4 ;;
# Use sparc-em for sparclet for now.
sparclet-*-*)		gdb_target=sparc-em ;;
sparclite*-*-*)		gdb_target=sparclite ;;
sparc64-*-solaris2*)	gdb_target=sp64sol2 ;;
sparc64-*-*)		gdb_target=sp64 ;;
d2634 15
a2648 1
tahoe-*-*)		gdb_target=tahoe ;;
a2649 1
vax-*-*)		gdb_target=vax ;;
a2650 1
w65-*-*)		gdb_target=w65 ;;
a2651 1
z8k-*-coff*)		gdb_target=z8k ;;
d2653 5
a2657 1
esac
d2692 1
a2692 1
else
d2694 1
a2694 1
configdirs=`echo $configdirs | sed 's/gdbserver//'`
d2728 86
d2833 3
d2839 13
a2851 2
  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  >> confcache
d2906 1
a2906 1
    echo "$CONFIG_STATUS generated by autoconf version 2.8"
d2917 1
a2917 1
trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
d2926 1
d2950 1
a2950 2
s%@@INSTALL_PROGRAM@@%$INSTALL_PROGRAM%g
s%@@INSTALL_DATA@@%$INSTALL_DATA%g
d2956 5
d2966 2
d2972 3
a2974 17
s%@@target@@%$target%g
s%@@target_alias@@%$target_alias%g
s%@@target_cpu@@%$target_cpu%g
s%@@target_vendor@@%$target_vendor%g
s%@@target_os@@%$target_os%g
s%@@X_CFLAGS@@%$X_CFLAGS%g
s%@@X_PRE_LIBS@@%$X_PRE_LIBS%g
s%@@X_LIBS@@%$X_LIBS%g
s%@@X_EXTRA_LIBS@@%$X_EXTRA_LIBS%g
s%@@TCLHDIR@@%$TCLHDIR%g
s%@@TCLLIB@@%$TCLLIB%g
s%@@TKHDIR@@%$TKHDIR%g
s%@@TKLIB@@%$TKLIB%g
s%@@ENABLE_GDBTK@@%$ENABLE_GDBTK%g
s%@@X_LDFLAGS@@%$X_LDFLAGS%g
s%@@SIM@@%$SIM%g
s%@@SIM_OBS@@%$SIM_OBS%g
d2976 5
a2980 4
s%@@ENABLE_CLIBS@@%$ENABLE_CLIBS%g
s%@@ENABLE_OBS@@%$ENABLE_OBS%g
s%@@mmalloc_dir@@%$mmalloc_dir%g
s%@@mmalloc_yn@@%$mmalloc_yn%g
d2987 1
d2992 36
d3030 1
a3030 1
CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
d3034 1
a3034 1
  # Support "outfile[:infile]", defaulting infile="outfile.in".
d3036 1
a3036 1
  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
d3041 1
a3041 1
  # Adjust relative srcdir, etc. for subdirectories.
d3069 1
d3078 2
d3085 1
a3085 1
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
d3087 1
a3087 1
rm -f conftest.subs
d3108 7
a3114 1
CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
d3116 1
a3116 1
  # Support "outfile[:infile]", defaulting infile="outfile.in".
d3118 1
a3118 1
  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
d3126 2
a3127 1
  cp $ac_given_srcdir/$ac_file_in conftest.in
d3139 1
a3139 1
s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
a3154 2
# Maximum number of lines to put in a single here document.
ac_max_here_lines=12
d3185 6
d3252 1
a3252 1
sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
a3261 8
case ${srcdir} in
.)
;;
*)
grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
echo "source ${srcdir}/.gdbinit" >> .gdbinit
esac

d3321 3
d3330 1
a3330 1
      ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
a3346 2
      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
@


1.8
log
@Integrate NetBSD arm32 diffs for gdb.  Now compiles and works `out of the
box'.  Use new GNU_ARCH remapper.
@
text
@d1937 1
a1937 1
mips-*-netbsd*)		gdb_host=nbsd ;;
d2137 1
a2137 1
mips*-*-netbsd)		gdb_target=nbsd ;;
@


1.7
log
@Fix a syntax error.
@
text
@d1863 1
d2022 2
@


1.6
log
@Add powerpc-*-netbsd* host and target.
@
text
@d1791 1
a1791 1
yes)	powerpc_sim=yes ;; SIM=../sim/ppc/libsim.a ; SIM_OBS=remote-sim.o ;;
@


1.5
log
@Clean up the configure code that enables the PowerPC simulator PSIM.  Instead
of overriding the target to ppc-sim if the simulator is enabled, allow
the simulator to co-exist by AC_SUBST'ing in the SIM and SIM_OBS variables.
@
text
@d1951 1
d2156 1
@


1.4
log
@Add support for the option:  --with-mmalloc=somewhere
which defaults to using ../mmalloc if that exists, or
else it sets MMALLOC_CFLAGS = -DNO_MMALLOC
(so build without ../mmalloc "just works":)
@
text
@d1791 1
a1791 1
yes)	powerpc_sim=yes ;;
d2156 2
a2157 10
powerpc-*-eabi*)	if test x"$powerpc_sim" = x"yes"; then
			  gdb_target=ppc-sim
			else
			  gdb_target=ppc-eabi
			fi ;;
powerpcle-*-eabi*)	if test x"$powerpc_sim" = x"yes"; then
			  gdb_target=ppcle-sim
			else
			  gdb_target=ppcle-eabi
			fi ;;
d2413 2
@


1.3
log
@Add configuration information for NetBSD/alpha.
@
text
@d21 3
d1805 19
d2424 2
@


1.2
log
@Add mips*-*-netbsd
@
text
@d1836 1
d1994 1
@


1.2.2.1
log
@Pull up 1.2-1.6 (gwr)
@
text
@a20 3
  --with-mmalloc=MMALLOC_DIR
  use the GNU mapped-malloc package in MMALLOC_DIR "
ac_help="$ac_help
d1788 1
a1788 1
yes)	powerpc_sim=yes ;; SIM=../sim/ppc/libsim.a ; SIM_OBS=remote-sim.o ;;
a1801 19
mmalloc_dir=../mmalloc
mmalloc_yn=MMALLOC_YES
# Check whether --with-mmalloc or --without-mmalloc was given.
if test "${with_mmalloc+set}" = set; then
  withval="$with_mmalloc"
  case "${withval}" in
  no)	mmalloc_yn=MMALLOC_NO ;;
  *)	mmalloc_dir="${withval}";;
  esac
else
  if test ! -d "${mmalloc_dir}"; then
    echo "configure: warning: mmalloc not found - building without it" 1>&2;
    mmalloc_yn=MMALLOC_NO
  fi
fi




a1835 1
alpha-*-netbsd*)	gdb_host=nbsd ;;
a1927 1
powerpc-*-netbsd*)	gdb_host=nbsd ;;
a1992 1
alpha-*-netbsd*)	gdb_target=nbsd ;;
a2130 1
powerpc-*-netbsd*)	gdb_target=nbsd ;;
d2132 10
a2141 2
powerpc-*-eabi*)	gdb_target=ppc-eabi ;;
powerpcle-*-eabi*)	gdb_target=ppcle-eabi ;;
a2396 2
s%@@SIM@@%$SIM%g
s%@@SIM_OBS@@%$SIM_OBS%g
a2399 2
s%@@mmalloc_dir@@%$mmalloc_dir%g
s%@@mmalloc_yn@@%$mmalloc_yn%g
@


1.1
log
@Initial revision
@
text
@d1913 1
d2109 1
@


1.1.1.1
log
@stock gdb-4.16
@
text
@@


1.1.1.2
log
@Import gdb 4.17.
@
text
@d4 2
a5 2
# Generated automatically using autoconf version 2.12.1 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
d17 1
a17 1
  --with-mmalloc             use memory mapped malloc package"
d19 13
a31 1
  --enable-shared         use shared libraries"
a69 3
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
d351 1
a351 1
    echo "configure generated by autoconf version 2.12.1"
d453 4
a456 4
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
a457 3
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
a518 1
cross_compiling=$ac_cv_prog_cc_cross
a537 1
echo "configure:534: checking for $ac_word" >&5
a565 1
echo "configure:563: checking for $ac_word" >&5
a611 39
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:611: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext <<EOF
#line 621 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:645: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

a612 1
echo "configure:650: checking whether we are using GNU C" >&5
d621 1
a621 1
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
a628 1

d631 3
a633 6
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:674: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
d638 1
a638 1
  ac_cv_prog_cc_g=yes
d640 1
a640 1
  ac_cv_prog_cc_g=no
d646 6
a651 7
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS="$ac_save_CFLAGS"
  elif test $ac_cv_prog_cc_g = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-O2"
a658 1
echo "configure:702: checking how to run the C preprocessor" >&5
d673 1
a673 1
#line 717 "configure"
d679 1
a679 1
{ (eval echo configure:723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a684 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
d688 1
a688 1
#line 734 "configure"
d694 1
a694 1
{ (eval echo configure:740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a699 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
a714 1
echo "configure:763: checking for AIX" >&5
d716 1
a716 1
#line 765 "configure"
d737 1
a737 1
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
a738 1
echo "configure:788: checking for minix/config.h" >&5
d743 1
a743 1
#line 793 "configure"
d748 1
a748 1
{ (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a754 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
a783 1
echo "configure:836: checking for POSIXized ISC" >&5
a803 3
DLLTOOL=${DLLTOOL-dlltool}


d805 1
a805 1
for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
d817 1
a817 1
  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
a822 103

# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac


# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:907: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:928: checking target system type" >&5

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:946: checking build system type" >&5

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-



CONFIG_OBS=
CONFIG_DEPS=
CONFIG_SRCS=

configdirs="doc testsuite"


. ${srcdir}/configure.host

. ${srcdir}/configure.tgt


a829 1
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
a833 1
echo "configure:994: checking for a BSD compatible install" >&5
d838 1
a838 1
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
d845 1
a845 3
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
d850 1
d861 1
a861 1
  IFS="$ac_save_IFS"
d882 43
a933 1
echo "configure:1053: checking for $ac_word" >&5
a963 1
echo "configure:1084: checking for $ac_word" >&5
a993 1
echo "configure:1115: checking for $ac_word" >&5
a1028 1
echo "configure:1151: checking for $ac_word" >&5
a1061 1
echo "configure:1185: checking for $ac_word" >&5
d1090 105
d1215 3
a1217 3
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:1235: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
d1220 5
a1224 2
  cat > conftest.$ac_ext <<EOF
#line 1240 "configure"
d1226 1
a1226 14
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int main() {
int i;
; return 0; }
d1228 3
a1230 3
if { (eval echo configure:1257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_signal=void
d1232 2
a1233 4
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
d1235 1
a1235 1
rm -f conftest*
d1238 2
a1239 6
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF


a1241 1
echo "configure:1277: checking for ANSI C header files" >&5
d1246 1
a1246 1
#line 1282 "configure"
d1254 1
a1254 1
{ (eval echo configure:1290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a1260 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
d1269 1
a1269 1
#line 1307 "configure"
d1287 1
a1287 1
#line 1325 "configure"
d1307 2
a1308 2
  cat > conftest.$ac_ext <<EOF
#line 1346 "configure"
d1319 2
a1320 2
if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
a1322 3
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
d1325 1
a1327 2

fi
d1338 1
a1338 1
for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h objlist.h
d1340 1
a1340 1
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
a1341 1
echo "configure:1384: checking for $ac_hdr" >&5
d1346 1
a1346 1
#line 1389 "configure"
d1351 1
a1351 1
{ (eval echo configure:1394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a1357 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
d1365 1
a1365 1
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
a1375 1
echo "configure:1421: checking whether stat file-mode macros are broken" >&5
d1380 1
a1380 1
#line 1426 "configure"
d1431 1
a1431 77
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1478: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1483 "configure"
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
if { (eval echo configure:1532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi


for ac_func in setpgid sbrk select poll sigaction
a1433 1
echo "configure:1556: checking for $ac_func" >&5
d1438 1
a1438 1
#line 1561 "configure"
a1443 2
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
d1446 2
a1447 1
int main() {
d1460 1
a1460 1
if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
a1463 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
d1468 1
a1469 1

a1482 16
# If we are configured native on GNU/Linux, work around problems with sys/procfs.h
if test "${target}" = "${host}"; then
  case "${host}" in
  i[3456]86-*-linux*)
	cat >> confdefs.h <<\EOF
#define START_INFERIOR_TRAPS_EXPECTED 2
EOF

	cat >> confdefs.h <<\EOF
#define sys_quotactl 1
EOF

	;;
  esac
fi

a1483 1
echo "configure:1626: checking for gregset_t type" >&5
d1488 1
a1488 1
#line 1631 "configure"
d1491 2
a1492 1
int main() {
d1496 1
a1496 1
if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
a1499 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
d1504 1
a1515 1
echo "configure:1659: checking for fpregset_t type" >&5
d1520 1
a1520 1
#line 1664 "configure"
d1523 2
a1524 1
int main() {
d1528 1
a1528 1
if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
a1531 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
d1536 1
a1546 127
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
echo "configure:1692: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1700 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi



echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
echo "configure:1737: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1742 "configure"
#include "confdefs.h"

int main() {

  extern long long foo;
  switch (foo & 2) { case 0: return 1; }

; return 0; }
EOF
if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  gdb_cv_c_long_long=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gdb_cv_c_long_long=no
fi
rm -f conftest*
fi

echo "$ac_t""$gdb_cv_c_long_long" 1>&6
if test $gdb_cv_c_long_long = yes; then
  cat >> confdefs.h <<\EOF
#define CC_HAS_LONG_LONG 1
EOF

fi


echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
echo "configure:1774: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  gdb_cv_printf_has_long_long=no
else
  cat > conftest.$ac_ext <<EOF
#line 1782 "configure"
#include "confdefs.h"

int main () {
  char buf[32];
  long long l = 0;
  l = (l << 16) + 0x0123;
  l = (l << 16) + 0x4567;
  l = (l << 16) + 0x89ab;
  l = (l << 16) + 0xcdef;
  sprintf (buf, "0x%016llx", l);
  return (strcmp ("0x0123456789abcdef", buf));
}
EOF
if { (eval echo configure:1796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  gdb_cv_printf_has_long_long=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  gdb_cv_printf_has_long_long=no
fi
rm -fr conftest*
fi

fi

if test $gdb_cv_printf_has_long_long = yes; then
  cat >> confdefs.h <<\EOF
#define PRINTF_HAS_LONG_LONG 1
EOF

fi
echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6

a1548 1
echo "configure:1820: checking for long double support in compiler" >&5
d1553 1
a1553 1
#line 1825 "configure"
d1556 2
a1557 1
int main() {
d1561 1
a1561 1
if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a1564 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
d1569 1
a1581 1
echo "configure:1854: checking for long double support in printf" >&5
d1588 2
a1589 2
  cat > conftest.$ac_ext <<EOF
#line 1862 "configure"
d1599 2
a1600 2
if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
a1602 3
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
d1605 1
a1608 2
fi

d1617 1
a1617 83

echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
echo "configure:1896: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  gdb_cv_scanf_has_long_double=no
else
  cat > conftest.$ac_ext <<EOF
#line 1904 "configure"
#include "confdefs.h"

int main () {
  char *buf = "3.141592653";
  long double f = 0;
  sscanf (buf, "%Lg", &f);
  return !(f > 3.14159 && f < 3.14160);
}
EOF
if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  gdb_cv_scanf_has_long_double=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  gdb_cv_scanf_has_long_double=no
fi
rm -fr conftest*
fi

fi

if test $gdb_cv_scanf_has_long_double = yes; then
  cat >> confdefs.h <<\EOF
#define SCANF_HAS_LONG_DOUBLE 1
EOF

fi
echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6

for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1940: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1945 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in getpagesize
a1619 1
echo "configure:1979: checking for $ac_func" >&5
d1624 1
a1624 1
#line 1984 "configure"
a1629 2
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
d1632 2
a1633 1
int main() {
d1646 1
a1646 1
if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
a1649 2
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
d1654 1
a1655 1

d1669 1
a1669 2
echo "configure:2032: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
d1673 1
a1673 1
  ac_cv_func_mmap_fixed_mapped=no
d1675 2
a1676 2
  cat > conftest.$ac_ext <<EOF
#line 2040 "configure"
d1679 1
a1679 21
/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the filesystem buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
a1683 1
/* This mess was copied from the GNU getpagesize.h.  */
d1685 16
a1700 2
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
d1702 1
d1704 3
a1706 34
/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */
d1709 1
a1709 1
extern "C" { void *malloc(unsigned); }
d1711 1
a1711 1
char *malloc();
d1717 25
a1741 59
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
	data = malloc(pagesize);
	if (!data)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		*(data + i) = rand();
	umask(0);
	fd = creat("conftestmmap", 0600);
	if (fd < 0)
		exit(1);
	if (write(fd, data, pagesize) != pagesize)
		exit(1);
	close(fd);

	/*
	 * Next, try to mmap the file at a fixed address which
	 * already has something else allocated at it.  If we can,
	 * also make sure that we see the same garbage.
	 */
	fd = open("conftestmmap", O_RDWR);
	if (fd < 0)
		exit(1);
	data2 = malloc(2 * pagesize);
	if (!data2)
		exit(1);
	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data2 + i))
			exit(1);

	/*
	 * Finally, make sure that changes to the mapped area
	 * do not percolate back to the file as seen by read().
	 * (This is a bug on some variants of i386 svr4.0.)
	 */
	for (i = 0; i < pagesize; ++i)
		*(data2 + i) = *(data2 + i) + 1;
	data3 = malloc(pagesize);
	if (!data3)
		exit(1);
	if (read(fd, data3, pagesize) != pagesize)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data3 + i))
			exit(1);
	close(fd);
	unlink("conftestmmap");
	exit(0);
d1745 3
a1747 3
if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_mmap_fixed_mapped=yes
d1749 2
a1750 4
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
d1755 2
a1756 4
fi

echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
d1764 3
a1766 8
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
echo "configure:2204: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2209 "configure"
#include "confdefs.h"
d1768 8
a1775 28
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
if { (eval echo configure:2230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  bfd_cv_decl_needed_malloc=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  bfd_cv_decl_needed_malloc=yes
fi
rm -f conftest*
a1777 6
echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
if test $bfd_cv_decl_needed_malloc = yes; then
  bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $bfd_tr_decl 1
EOF
d1779 2
a1782 8
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
echo "configure:2252: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2257 "configure"
#include "confdefs.h"
d1784 8
a1791 21
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
if { (eval echo configure:2278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  bfd_cv_decl_needed_realloc=no
d1793 1
a1793 15
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  bfd_cv_decl_needed_realloc=yes
fi
rm -f conftest*
fi

echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
if test $bfd_cv_decl_needed_realloc = yes; then
  bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $bfd_tr_decl 1
EOF

a1795 8
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
echo "configure:2300: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2305 "configure"
#include "confdefs.h"
a1796 29
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
if { (eval echo configure:2326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  bfd_cv_decl_needed_free=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  bfd_cv_decl_needed_free=yes
fi
rm -f conftest*
fi
a1797 6
echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
if test $bfd_cv_decl_needed_free = yes; then
  bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $bfd_tr_decl 1
EOF
a1798 1
fi
a1800 8
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
echo "configure:2349: checking whether strerror must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2354 "configure"
#include "confdefs.h"
d1802 4
a1805 28
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
if { (eval echo configure:2375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  bfd_cv_decl_needed_strerror=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  bfd_cv_decl_needed_strerror=yes
fi
rm -f conftest*
a1807 6
echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
if test $bfd_cv_decl_needed_strerror = yes; then
  bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $bfd_tr_decl 1
EOF
d1809 1
a1809 1
fi
d1812 2
d1815 1
d1817 10
a1826 11
if test ${build} = ${host} -a ${host} = ${target} ; then
   case ${host_os} in
   hpux*)
      echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
echo "configure:2403: checking for HPUX/OSF thread support" >&5
      if test -f /usr/include/dce/cma_config.h ; then
         if test "$GCC" = "yes" ; then
            echo "$ac_t""yes" 1>&6
            cat >> confdefs.h <<\EOF
#define HAVE_HPUX_THREAD_SUPPORT 1
EOF
d1828 1
a1828 35
            CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
            CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
         else
            echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
         fi
      else
         echo "$ac_t""no" 1>&6
      fi
      ;;
   solaris*)
      echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
echo "configure:2422: checking for Solaris thread debugging library" >&5
      if test -f /usr/lib/libthread_db.so.1 ; then
         echo "$ac_t""yes" 1>&6
         cat >> confdefs.h <<\EOF
#define HAVE_THREAD_DB_LIB 1
EOF

         CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
         CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
         echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:2432: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2440 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dlopen();
d1830 1
a1830 15
int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
d1832 1
a1832 8
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
d1834 1
a1834 1
  LIBS="-ldl $LIBS"
d1836 115
a1950 3
else
  echo "$ac_t""no" 1>&6
fi
d1952 1
a1952 10
         if test "$GCC" = "yes" ; then
            # The GNU linker requires the -export-dynamic option to make
            # all symbols visible in the dynamic symbol table.
            hold_ldflags=$LDFLAGS
            echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
echo "configure:2483: checking for the ld -export-dynamic flag" >&5
            LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
            cat > conftest.$ac_ext <<EOF
#line 2486 "configure"
#include "confdefs.h"
a1953 37
int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  found=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  found=no
fi
rm -f conftest*
            LDFLAGS=$hold_ldflags
            echo "$ac_t""$found" 1>&6
            if test $found = yes; then
               CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
            fi
         fi
      else
         echo "$ac_t""no" 1>&6
      fi
      ;;
   esac
   
fi

ENABLE_CFLAGS=

# Check whether --enable-netrom or --disable-netrom was given.
if test "${enable_netrom+set}" = set; then
  enableval="$enable_netrom"
  case "${enableval}" in
yes)	enable_netrom=yes ;;
no)	enable_netrom=no ;;
*)	{ echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
a1954 1
fi
d1957 2
a1958 4
if test "${enable_netrom}" = "yes"; then
	CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" 
        CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
fi
d1960 1
a1960 2
MMALLOC_CFLAGS=
MMALLOC=
d1962 13
a1975 8

# Check whether --with-mmalloc or --without-mmalloc was given.
if test "${with_mmalloc+set}" = set; then
  withval="$with_mmalloc"
  case "${withval}" in
  yes)  want_mmalloc=true ;;
  no)   want_mmalloc=false;;
  *)    { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
a1976 16
else
  want_mmalloc=false
fi

if test x$want_mmalloc = xtrue; then
   cat >> confdefs.h <<\EOF
#define USE_MMALLOC 1
EOF

   cat >> confdefs.h <<\EOF
#define MMCHECK_FORCE 1
EOF

   MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
   MMALLOC='../mmalloc/libmmalloc.a'
fi
d1978 1
d1980 1
d1982 181
d2164 1
d2166 1
d2168 1
d2170 1
a2171 58
# Begin stuff to support --enable-shared
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  case "${enableval}" in
  yes) shared=true ;;
  no)  shared=false ;;
  *) shared=true ;;
esac
fi

HLDFLAGS=
HLDENV=
# If we have shared libraries, try to set rpath reasonably.
if test "${shared}" = "true"; then
  case "${host}" in
  *-*-hpux*)
    HLDFLAGS='-Wl,+s,+b,$(libdir)'
    ;;
  *-*-irix5* | *-*-irix6*)
    HLDFLAGS='-Wl,-rpath,$(libdir)'
    ;;
  *-*-linux*aout*)
    ;;
  *-*-linux* | *-pc-linux-gnu)
    HLDFLAGS='-Wl,-rpath,$(libdir)'
    ;;
  *-*-solaris*)
    HLDFLAGS='-R $(libdir)'
    ;;
  *-*-sysv4*)
    HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
    ;;
  esac
fi

# On SunOS, if the linker supports the -rpath option, use it to
# prevent ../bfd and ../opcodes from being included in the run time
# search path.
case "${host}" in
  *-*-sunos*)
    echo 'main () { }' > conftest.c
    ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
    if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
      :
    elif grep 'No such file' conftest.t >/dev/null 2>&1; then
      :
    elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
      :
    elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
      :
    elif test "${shared}" = "true"; then
      HLDFLAGS='-Wl,-rpath=$(libdir)'
    else
      HLDFLAGS='-Wl,-rpath='
    fi
    rm -f conftest.t conftest.c conftest
    ;;
a2174 9
# End stuff to support --enable-shared

# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
if test "${host}" != "${target}"; then
    target_subdir="${target_alias}/"
fi


d2207 1
a2207 1
# else
d2209 1
a2209 1
# configdirs=`echo $configdirs | sed 's/gdbserver//'`
a2242 86
echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
echo "configure:2711: checking for Cygwin32 environment" >&5
if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2716 "configure"
#include "confdefs.h"

int main() {
return __CYGWIN32__;
; return 0; }
EOF
if { (eval echo configure:2723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  am_cv_cygwin32=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_cygwin32=no
fi
rm -f conftest*
rm -f conftest*
fi

echo "$ac_t""$am_cv_cygwin32" 1>&6
CYGWIN32=
test "$am_cv_cygwin32" = yes && CYGWIN32=yes
echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
echo "configure:2740: checking for Mingw32 environment" >&5
if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2745 "configure"
#include "confdefs.h"

int main() {
return __MINGW32__;
; return 0; }
EOF
if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  am_cv_mingw32=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi

echo "$ac_t""$am_cv_mingw32" 1>&6
MINGW32=
test "$am_cv_mingw32" = yes && MINGW32=yes


echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:2771: checking for executable suffix" >&5
if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$CYGWIN32" = yes -o "$MINGW32" = yes; then
am_cv_exeext=.exe
else
cat > am_c_test.c << 'EOF'
int main() {
/* Nothing needed here */
}
EOF
${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
rm -f am_c_test*
fi

test x"${am_cv_exeext}" = x && am_cv_exeext=no
fi
EXEEXT=""
test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
echo "$ac_t""${am_cv_exeext}" 1>&6


a2261 3
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
d2265 2
a2266 13
  case `(ac_space=' '; set) 2>&1 | grep ac_space` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
d2321 1
a2321 1
    echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
d2332 1
a2332 1
trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
a2340 1
s%@@SHELL@@%$SHELL%g
d2364 2
a2365 1
s%@@DLLTOOL@@%$DLLTOOL%g
a2370 5
s%@@target@@%$target%g
s%@@target_alias@@%$target_alias%g
s%@@target_cpu@@%$target_cpu%g
s%@@target_vendor@@%$target_vendor%g
s%@@target_os@@%$target_os%g
a2375 2
s%@@INSTALL_PROGRAM@@%$INSTALL_PROGRAM%g
s%@@INSTALL_DATA@@%$INSTALL_DATA%g
d2380 15
a2394 3
s%@@CONFIG_LDFLAGS@@%$CONFIG_LDFLAGS%g
s%@@MMALLOC_CFLAGS@@%$MMALLOC_CFLAGS%g
s%@@MMALLOC@@%$MMALLOC%g
d2396 2
a2397 5
s%@@CONFIG_OBS@@%$CONFIG_OBS%g
s%@@CONFIG_DEPS@@%$CONFIG_DEPS%g
s%@@CONFIG_SRCS@@%$CONFIG_SRCS%g
s%@@HLDFLAGS@@%$HLDFLAGS%g
s%@@HLDENV@@%$HLDENV%g
a2403 1
s%@@EXEEXT@@%$EXEEXT%g
a2407 36

cat >> $CONFIG_STATUS <<\EOF

# 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_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

d2410 1
a2410 1
CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
d2414 1
a2414 1
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
d2416 1
a2416 1
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
d2421 1
a2421 1
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
a2448 1

a2456 2

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
d2462 1
a2462 1
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
d2464 1
a2464 1
rm -f conftest.s*
d2485 1
a2485 7
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="config.h:config.in"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
d2487 1
a2487 1
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
d2489 1
a2489 1
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
d2497 1
a2497 2
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in
d2509 1
a2509 1
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
d2525 2
a2556 6
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
d2618 1
a2618 1
sed -e '/^NATDEPFILES[ 	]*=[ 	]*/s//# NATDEPFILES=/' \
d2628 8
a2694 3
      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

d2701 1
a2701 1
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
d2718 2
@


1.1.1.3
log
@Import gdb-5.3
@
text
@d1 1
a1 1
#!/bin/sh
d3 2382
a2384 1
### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
d2386 6
a2391 17
# Configuration script
# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001,
# 2002 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
d2393 1
a2393 1
# This file was originally written by K. Richard Pixley.
a2394 8
#
# Shell script to create proper links to machine-dependent files in
# preparation for compilation.
#
# If configure succeeds, it leaves its status in config.status.
# If configure fails after disturbing the status quo, 
#       config.status is removed.
#
a2395 1
export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
a2396 70
remove=rm
hard_link=ln
symbolic_link='ln -s'

#for Test
#remove="echo rm"
#hard_link="echo ln"
#symbolic_link="echo ln -s"

# clear some things potentially inherited from environment.

Makefile=Makefile
Makefile_in=Makefile.in
arguments=
build_alias=
cache_file=config.cache
cache_file_option=
configdirs=
extraconfigdirs=
diroptions=
enable_threads=no
enable_shared=no
enable_libstdcxx_v3=yes
exec_prefix=
exec_prefixoption=
fatal=
floating_point=default
gas=default
gcc_version=
gcc_version_trigger=
host_alias=NOHOST
host_makefile_frag=
moveifchange=
norecursion=
other_options=
package_makefile_frag=
package_makefile_rules_frag=
prefix=/usr/local
progname=
program_prefix=
program_prefixoption=
program_suffix=
program_suffixoption=
program_transform_name=
program_transform_nameoption=
redirect=
removing=
site=
site_makefile_frag=
site_option=
srcdir=
srctrigger=
subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
version="$Revision: 1.17 $"
x11=default
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
d2398 11
a2408 1
### we might need to use some other shell than /bin/sh for running subshells
d2410 5
a2414 11
### If we are on Windows, search for the shell.  This will permit people
### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
### without also having to set CONFIG_SHELL.  This code will work when
### using bash, which sets OSTYPE.
case "${OSTYPE}" in
*win32*)
  if [ x${CONFIG_SHELL} = x ]; then
    if [ ! -f /bin/sh ]; then
      if [ x${SHELL} != x ] && [ -f ${SHELL} ]; then
	CONFIG_SHELL=${SHELL}
	export CONFIG_SHELL
d2416 1
a2416 13
	for prog in sh sh.exe bash bash.exe; do
	  IFS="${IFS=	}"; save_ifs="$IFS"; IFS="${IFS}:"
	  for dir in $PATH; do
	    test -z "$dir" && dir=.
	    if test -f $dir/$prog; then
	      CONFIG_SHELL=$dir/$prog
	      export CONFIG_SHELL
	      break
	    fi
	  done
	  IFS="$save_ifs"
	  test -n "${CONFIG_SHELL}" && break
	done
d2418 58
a2475 4
    fi
  fi
  ;;
esac
d2477 38
a2514 1
config_shell=${CONFIG_SHELL-/bin/sh}
d2516 1
a2516 1
NO_EDIT="This file was generated automatically by configure.  Do not edit."
d2518 7
a2524 19
## this is a little touchy and won't always work, but...
##
## if the argv[0] starts with a slash then it is an absolute name that can (and
## must) be used as is.
##
## otherwise, if argv[0] has no slash in it, we can assume that it is on the
## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
##

progname=$0
# if PWD already has a value, it is probably wrong.
if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi

case "${progname}" in
/* | [A-Za-z]:[\\/]* ) ;;
*/*) ;;
*)
        PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH
        ;;
d2526 1
a2527 3
# Export original configure arguments for use by sub-configures.
TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@@"
export TOPLEVEL_CONFIGURE_ARGUMENTS
d2529 4
a2532 1
# Loop over all args
d2534 2
a2535 2
while :
do
a2536 233
# Break out if there are no more args
	case $# in
	0)
		break
		;;
	esac

# Get the first arg, and shuffle
	option=$1
	shift

# Make all options have two hyphens
	orig_option=$option	# Save original for error messages
	case $option in
	--*) ;;
	-*) option=-$option ;;
	esac
		
# Split out the argument for options that take them
	case $option in
	--*=*)
		optarg=`echo $option | sed -e 's/^[^=]*=//'`
		arguments="$arguments $option"
		;;
# These options have mandatory values.  Since we didn't find an = sign,
# the value must be in the next argument
	--bu* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-* | --bi* | --sb* | --li* | --da* | --sy* | --sh* | --lo* | --in* | --ol* | --ma*)
		optarg=$1
		shift
		arguments="$arguments $option=$optarg"
		;;
	--v)
		arguments="$arguments -v"
		;;
	--*)
		arguments="$arguments $option"
		;;
	esac

# Now, process the options
	case $option in

	--bi*)
		bindir=$optarg
		diroptions="$diroptions --bindir=$optarg"
		;;
	--build* | --bu*)
		case "$build_alias" in
		"") build_alias=$optarg ;;
		*) echo '***' Can only configure for one build machine at a time.  1>&2
		   fatal=yes
		   ;;
		esac
		;;
	--cache*)
		cache_file=$optarg
		;;
	--da*)
		datadir=$optarg
		diroptions="$diroptions --datadir=$optarg"
		;;
	--disable-*)
		enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
		eval $enableopt=no
		disableoptions="$disableoptions $option"
		;;
	--enable-*)
		case "$option" in
		*=*)	;;
		*)	optarg=yes ;;
		esac

		enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
		eval "$enableopt=\$optarg"
		enableoptions="$enableoptions '$option'"
		;;
	--exec-prefix* | --ex*)
		exec_prefix=$optarg
		exec_prefixoption="--exec-prefix=$optarg"
		;;
	--gas | --g*)
		gas=yes
		;;
	--help | --he*)
		fatal=yes
		;;
	--host* | --ho*)
		case $host_alias in
		NOHOST) host_alias=$optarg ;;
		*) echo '***' Can only configure for one host at a time.  1>&2
		   fatal=yes
		   ;;
		esac
		;;
	--inc*)
		includedir=$optarg
		diroptions="$diroptions --includedir=$optarg"
		;;
	--inf*)
		infodir=$optarg
		diroptions="$diroptions --infodir=$optarg"
		;;
	--libd*)
		libdir=$optarg
		diroptions="$diroptions --libdir=$optarg"
		;;
	--libe*)
		libexecdir=$optarg
		diroptions="$diroptions --libexecdir=$optarg"
		;;
	--lo*)
		localstatedir=$optarg
		diroptions="$diroptions --localstatedir=$optarg"
		;;
	--ma*)
		mandir=$optarg
		diroptions="$diroptions --mandir=$optarg"
		;;
	--nfp | --nf*)
		floating_point=no
		floating_pointoption="--nfp"
		;;
	--norecursion | --no*)
		norecursion=yes
		;;
	--ol*)
		oldincludedir=$optarg
		diroptions="$diroptions --oldincludedir=$optarg"
		;;
	--prefix* | --pre*)
		prefix=$optarg
		prefixoption="--prefix=$optarg"
		;;
	--program-prefix* | --program-p*)
		program_prefix=$optarg
		program_prefixoption="--program-prefix=$optarg"
		;;
	--program-suffix* | --program-s*)
		program_suffix=$optarg
		program_suffixoption="--program-suffix=$optarg"
		;;
	--program-transform-name* | --program-t*)
		# Double any backslashes or dollar signs in the argument
		program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
		program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
		;;
	--rm)
		removing=--rm
		;;
	--sb*)
		sbindir=$optarg
		diroptions="$diroptions --sbindir=$optarg"
		;;
	--sh*)
		sharedstatedir=$optarg
		diroptions="$diroptions --sharedstatedir=$optarg"
		;;
	--silent | --sil* | --quiet | --q*)
		redirect=">/dev/null"
		verbose=--silent
		;;
	--site* | --sit*)
		site=$optarg
		site_option="--site=$optarg"
		;;
	--srcdir*/ | --sr*/)
                # Remove trailing slashes.  Otherwise, when the file name gets
                # bolted into an object file as debug info, it has two slashes
                # in it.  Ordinarily this is ok, but emacs takes double slash
                # to mean "forget the first part".
		srcdir=`echo $optarg | sed -e 's:/$::'`
		;;
	--srcdir* | --sr*)
		srcdir=$optarg
		;;
	--sy*)
		sysconfdir=$optarg
		diroptions="$diroptions --sysconfdir=$optarg"
		;;
	--target* | --ta*)
		case $target_alias in
		NOTARGET) target_alias=$optarg ;;
		*) echo '***' Can only configure for one target at a time.  1>&2
		   fatal=yes
		   ;;
		esac
		;;
	--tmpdir* | --tm*)
		TMPDIR=$optarg
		tmpdiroption="--tmpdir=$optarg"
		;;
	--verbose | --v | --verb*)
		redirect=
		verbose=--verbose
		;;
	--version | --V | --vers*)
		echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
		exit 0
		;;
	--with-*)
		case "$option" in
		*=*)	;;
		*)	optarg=yes ;;
		esac

		withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
		eval $withopt="\$optarg"
		withoptions="$withoptions $option"
		;;
	--without-*)
		withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
		eval $withopt=no
		withoutoptions="$withoutoptions $option"
		;;
	--x)	with_x=yes
		withoptions="$withoptions --with-x"
		;;
	--x-i* | --x-l*) other_options="$other_options $orig_option"
		;;
	--*)
		echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
		exit 1
		;;
	*)
		case $undefs in
		NOUNDEFS) undefs=$option ;;
		*) echo '***' Can only configure for one host and one target at a time.  1>&2
		   fatal=yes
		   ;;
		esac
		;;
	esac
done
a2537 1
# process host and target
d2539 11
a2549 12
# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET UNDEFS
#
# The rules are:
# 1. You aren't allowed to specify --host, --target, and undefs at the
#    same time.
# 2. Host defaults to undefs.
# 3. If undefs is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target defaults to undefs.
# 5. If undefs is not specified, then target defaults to host.
d2551 4
a2554 69
case "${fatal}" in
"")
	# Make sure that host, target & undefs aren't all specified at the
	# same time.
	case $host_alias---$target_alias---$undefs in
	NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
		;;
	*) echo '***' Can only configure for one host and one target at a time.  1>&2
	   fatal=yes
	   break 2
		;;
	esac

	# Now, do defaulting for host.
	case $host_alias in
	NOHOST)
		case $undefs in
		NOUNDEFS)
			# Neither --host option nor undefs were present.
			# Call config.guess.
			guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
			if host_alias=`${config_shell} ${guesssys}`
			then
				# If the string we are going to use for
				# the target is a prefix of the string
				# we just guessed for the host, then
				# assume we are running native, and force
				# the same string for both target and host.
				case $target_alias in
				NOTARGET) ;;
				*)
					if expr $host_alias : $target_alias >/dev/null
					then
						host_alias=$target_alias
					fi
					;;
				esac
				echo "Configuring for a ${host_alias} host."
				arguments="--host=$host_alias $arguments"
			else
				echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
				fatal=yes
			fi
			;;
		*)
			host_alias=$undefs
			arguments="--host=$host_alias $arguments"
			undefs=NOUNDEFS
			;;
		esac
	esac

	# Do defaulting for target.  If --target option isn't present, default
	# to undefs.  If undefs isn't present, default to host.
	case $target_alias in
	NOTARGET)
		case $undefs in
		NOUNDEFS)
			target_alias=$host_alias
			;;
		*)
			target_alias=$undefs
			arguments="--target=$target_alias $arguments"
			;;
		esac
	esac
	;;
*) ;;
esac
d2556 3
a2558 29
if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
	exec 1>&2
	echo Usage: configure [OPTIONS] [HOST]
	echo
	echo Options: [defaults in brackets]
	echo ' --prefix=MYDIR		 install into MYDIR [/usr/local]'
	echo ' --exec-prefix=MYDIR	 install host-dependent files into MYDIR [/usr/local]'
	echo ' --help			 print this message [normal config]'
	echo ' --build=BUILD		 configure for building on BUILD [BUILD=HOST]'
	echo ' --host=HOST		 configure for HOST [determined via config.guess]'
	echo ' --norecursion		 configure this directory only [recurse]'
	echo ' --program-prefix=FOO	 prepend FOO to installed program names [""]'
	echo ' --program-suffix=FOO	 append FOO to installed program names [""]'
	echo ' --program-transform-name=P transform installed names by sed pattern P [""]'
	echo ' --site=SITE		 configure with site-specific makefile for SITE'
	echo ' --srcdir=DIR		 find the sources in DIR [. or ..]'
	echo ' --target=TARGET	 configure for TARGET [TARGET=HOST]'
	echo ' --tmpdir=TMPDIR	 create temporary files in TMPDIR [/tmp]'
	echo ' --nfp			 configure for software floating point [hard float]'
	echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
	echo ' --without-FOO		 package FOO is NOT available'
	echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
	echo ' --disable-FOO		 do not include feature FOO'
	echo
	echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
	echo
	if [ -r config.status ] ; then
		cat config.status
	fi
d2560 2
a2561 1
	exit 1
a2563 49
configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
## the sed command below emulates the dirname command
topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}`


# this is a hack.  sun4 must always be a valid host alias or this will fail.
if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
        true
else
        echo '***' cannot find config.sub.  1>&2
        exit 1
fi

touch config.junk
if ${config_shell} ${moveifchange} config.junk config.trash ; then
        true
else
        echo '***' cannot find move-if-change.  1>&2
        exit 1
fi
rm -f config.junk config.trash

case "${srcdir}" in
"")
        if [ -r configure.in ] ; then
                srcdir=.
        else
                if [ -r ${progname}.in ] ; then
                        srcdir=`echo ${progname} | sed 's:/configure$::'`
                else
                        echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
                        exit 1
                fi
        fi
        ;;
*)
	# Set srcdir to "." if that's what it is.
	# This is important for multilib support.
	if [ ! -d ${srcdir} ] ; then
		echo "Invalid source directory ${srcdir}" >&2
		exit 1
	fi
	pwd=`${PWDCMD-pwd}`
	srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
	if [ "${pwd}" = "${srcpwd}" ] ; then
		srcdir=.
	fi
esac
a2564 1
### warn about some conflicting configurations.
a2565 8
case "${srcdir}" in
".") ;;
*)
        if [ -f ${srcdir}/config.status ] ; then
                echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2
                exit 1
        fi
esac
d2567 12
a2578 4
# default exec_prefix
case "${exec_prefixoption}" in
"") exec_prefix="\$(prefix)" ;;
*) ;;
d2580 1
d2582 23
a2604 20
# Define the trigger file to make sure configure will re-run whenever
# the gcc version number changes.
if [ "${with_gcc_version_trigger+set}" = set ]; then
    gcc_version_trigger="$with_gcc_version_trigger"
    gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
else
    # If gcc's sources are available, define the trigger file.
    if [ -f ${topsrcdir}/gcc/version.c ] ; then
	gcc_version_trigger=${topsrcdir}/gcc/version.c
	gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
	case "$arguments" in
	  *--with-gcc-version-trigger=$gcc_version_trigger* )
	    ;;
	  * )
	    # Make sure configure.in knows about this.
	    arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
	    ;;
	esac
	withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
    fi
d2607 22
a2628 35
### break up ${srcdir}/configure.in.
case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
"")
        echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
	# Check for a directory that's been converted to use autoconf since
	# it was last configured.
	if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then
	  echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2
	  if [ -r ${srcdir}/configure ] ; then
	    echo '***' Running the local configure script. 1>&2
	    case "${cache_file}" in
	    "") cache_file_option= ;;
	    *)  cache_file_option="--cache-file=${cache_file}" ;;
	    esac
	    srcdiroption="--srcdir=${srcdir}"
	    case "${build_alias}" in
	    "") buildopt= ;;
	    *)  buildopt="--build=${build_alias}" ;;
	    esac
	    eval exec ${config_shell} ${srcdir}/configure ${verbose} \
		${buildopt} --host=${host_alias} --target=${target_alias} \
		${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
		${srcdiroption} ${diroptions} \
		${program_prefixoption} ${program_suffixoption} \
		${program_transform_nameoption} ${site_option} \
		${withoptions} ${withoutoptions} \
		${enableoptions} ${disableoptions} ${floating_pointoption} \
		${cache_file_option} ${removing} ${other_options} ${redirect}
	  else
	    echo '***' There is no configure script present though. 1>&2
	  fi
	fi
        exit 1
        ;;
*) ;;
a2630 7
case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
"")
        echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
        exit 1
        ;;
*) ;;
esac
d2632 7
a2638 4
case "${TMPDIR}" in
"") TMPDIR=/tmp ; export TMPDIR ;;
*) ;;
esac
a2639 51
# keep this filename short for &%*%$*# 14 char file names and 8+3 file names
tmpdir=${TMPDIR}/cNf$$
mkdir ${tmpdir} || exit 1
tmpfile=${tmpdir}/cNf$$
# Note that under many versions of sh a trap handler for 0 will *override* any
# exit status you explicitly specify!  At this point, the only non-error exit
# is at the end of the script; these actions are duplicated there, minus
# the "exit 1".  Don't use "exit 0" anywhere after this without resetting the
# trap handler, or you'll lose.
trap "rm -rf Makefile.tem ${tmpdir}; exit 1" 0 1 2 15

# split ${srcdir}/configure.in into common, per-host, per-target,
# and post-target parts.  Post-target is optional.
sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst
if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then
  sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
  sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
else
  sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
  echo >${tmpfile}.pos
fi

### do common part of configure.in

# If the language specific compiler does not exist, but the "gcc" directory does,
# we will skip this directory; in this case the sub-directory's common part
# of configure.in will create a small shell script "skip-this-dir" containing
# commands to completely clean up any temporary or created files.

. ${tmpfile}.com

if test -f skip-this-dir; then
	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
	# and reset the trap handler.
	trap 0
	rm -rf Makefile* ${tmpdir}
	# Execute the final clean-up actions
	${config_shell} skip-this-dir
	# and stop configuring this directory.
	exit 0
fi

# some sanity checks on configure.in
case "${srctrigger}" in
"")
        echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in.  1>&2
        exit 1
        ;;
*) ;;
esac
d2641 6
a2646 23
case "${build_alias}" in
"")
	if result=`${config_shell} ${configsub} ${host_alias}` ; then
	    build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
	    build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
	    build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
	    build=${build_cpu}-${build_vendor}-${build_os}
	    build_alias=${host_alias}
	fi
	;;
*)
	if result=`${config_shell} ${configsub} ${build_alias}` ; then
	    buildopt="--build=${build_alias}"
	    build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
	    build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
	    build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
	    build=${build_cpu}-${build_vendor}-${build_os}
	else
	    echo "Unrecognized build system name ${build_alias}." 1>&2
	    exit 1
	fi
	;;
esac
d2648 3
a2650 5
if result=`${config_shell} ${configsub} ${host_alias}` ; then
    true
else
    echo "Unrecognized host system name ${host_alias}." 1>&2
    exit 1
d2652 2
a2653 4
host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
host=${host_cpu}-${host_vendor}-${host_os}
a2654 1
. ${tmpfile}.hst
a2655 10
if result=`${config_shell} ${configsub} ${target_alias}` ; then
    true
else
    echo "Unrecognized target system name ${target_alias}." 1>&2
    exit 1
fi
target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
target=${target_cpu}-${target_vendor}-${target_os}
a2656 1
. ${tmpfile}.tgt
d2658 3
a2660 11
# Find the source files, if location was not specified.
case "${srcdir}" in
"")
        srcdirdefaulted=1
        srcdir=.
        if [ ! -r ${srctrigger} ] ; then
                srcdir=..
        fi
        ;;
*) ;;
esac
d2662 3
a2664 5
if [ ! -r ${srcdir}/${srctrigger} ] ; then
        case "${srcdirdefaulted}" in
        "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/${srcdir}" 1>&2 ;;
        *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;;
        esac
d2666 10
a2675 2
        echo '***' \(At least ${srctrigger} is missing.\) 1>&2
        exit 1
d2678 27
a2704 12
# Some systems (e.g., one of the i386-aix systems the gas testers are
# using) don't handle "\$" correctly, so don't use it here.
tooldir='$(exec_prefix)'/${target_alias}

if [ "${host_alias}" != "${target_alias}" ] ; then
    if [ "${program_prefixoption}" = "" ] ; then
        if [ "${program_suffixoption}" = "" ] ; then 
            if [ "${program_transform_nameoption}" = "" ] ; then
                program_prefix=${target_alias}- ;
            fi
        fi
    fi
d2707 26
a2732 5
# Merge program_prefix and program_suffix onto program_transform_name.
# (program_suffix used to use $, but it's hard to preserve $ through both
# make and sh.)
if [ "${program_suffix}" != "" ] ; then
    program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
d2735 24
a2758 2
if [ "${program_prefix}" != "" ] ; then
    program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
d2760 7
d2768 18
a2785 11
# If CC and CXX are not set in the environment, and the Makefile
# exists, try to extract them from it.  This is to handle running
# ./config.status by hand.
if [ -z "${CC}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CC[ 	]*=/ s/CC[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CC=`tail -1 Makefile.cc`
  rm -f Makefile.cc
d2788 1
a2788 8
if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CFLAGS[ 	]*=/ s/CFLAGS[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CFLAGS=`tail -1 Makefile.cc`
  rm -f Makefile.cc
d2790 4
d2795 47
a2841 8
if [ -z "${CXX}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CXX[ 	]*=/ s/CXX[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CXX=`tail -1 Makefile.cc`
  rm -f Makefile.cc
d2843 1
d2845 11
a2855 8
if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CXXFLAGS[ 	]*=/ s/CXXFLAGS[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CXXFLAGS=`tail -1 Makefile.cc`
  rm -f Makefile.cc
d2858 3
a2860 2
# Generate a default definition for YACC.  This is used if the makefile can't
# locate bison or byacc in objdir.
d2862 19
a2880 1
for prog in 'bison -y' byacc yacc
d2882 116
a2997 7
  set dummy $prog; tmp=$2
  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
      DEFAULT_YACC="$prog"
      break
d2999 89
a3087 2
  done
  IFS="$save_ifs"
d3089 20
a3108 2
  test -n "$DEFAULT_YACC" && break
done
d3110 1
a3110 2
# Generate a default definition for M4.  This is used if the makefile can't
# locate m4 in objdir.
d3112 14
a3125 12
for prog in gm4 gnum4 m4
do
  set dummy $prog; tmp=$2
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
      DEFAULT_M4="$prog"
      break
    fi
  done
  IFS="$save_ifs"
d3127 6
a3132 2
  test -n "$DEFAULT_M4" && break
done
d3134 2
a3135 2
# Generate a default definition for LEX.  This is used if the makefile can't
# locate flex in objdir.
d3137 2
a3138 1
for prog in flex lex
d3140 31
a3170 7
  set dummy $prog; tmp=$2
  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
      DEFAULT_LEX="$prog"
      break
d3172 11
a3182 2
  done
  IFS="$save_ifs"
d3184 5
a3188 2
  test -n "$DEFAULT_LEX" && break
done
d3190 1
a3190 27
if [ "${build}" != "${host}" ]; then
  # If we are doing a Canadian Cross, in which the host and build systems
  # are not the same, we set reasonable default values for the tools.

  tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
  tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET"
  tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
  tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
  tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
  tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
  tools="${tools} OBJCOPY OBJDUMP"

  for var in ${tools}; do
    if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
      sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^'"${var}"'[ 	]*=/ s/'"${var}"'[ 	]*=[ 	]*\(.*\)/\1/p' \
	< Makefile > Makefile.v
      t=`tail -1 Makefile.v`
      if [ -n "${t}" ]; then
	eval "${var}=\${t}"
      fi
      rm -f Makefile.v
    fi
  done
d3192 2
a3193 51
  AR=${AR-${host_alias}-ar}
  AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
  AS=${AS-${host_alias}-as}
  AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
  BISON=${BISON-bison}
  CC=${CC-${host_alias}-gcc}
  CFLAGS=${CFLAGS-"-g -O2"}
  CXX=${CXX-${host_alias}-c++}
  CXXFLAGS=${CXXFLAGS-"-g -O2"}
  CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
  CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
  CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
  GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
  DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
  DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
  GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
  BUILD_PREFIX=${build_alias}-
  BUILD_PREFIX_1=${build_alias}-
  LD=${LD-${host_alias}-ld}
  LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
  MAKEINFO=${MAKEINFO-makeinfo}
  NM=${NM-${host_alias}-nm}
  NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
  RANLIB=${RANLIB-${host_alias}-ranlib}
  RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
  WINDRES=${WINDRES-${host_alias}-windres}
  WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
  OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
  OBJDUMP=${OBJDUMP-${host_alias}-objdump}

  if [ -z "${YACC}" ]; then
    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
      test -z "$dir" && dir=.
      if test -f $dir/bison; then
	YACC="bison -y"
	break
      fi
      if test -f $dir/byacc; then
	YACC=byacc
	break
      fi
      if test -f $dir/yacc; then
	YACC=yacc
	break
      fi
    done
    IFS="$save_ifs"
    if [ -z "${YACC}" ]; then
      YACC="bison -y"
    fi
d3195 1
d3197 11
a3207 15
  if [ -z "${LEX}" ]; then
    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
      test -z "$dir" && dir=.
      if test -f $dir/flex; then
	LEX=flex
	break
      fi
      if test -f $dir/lex; then
	LEX=lex
	break
      fi
    done
    IFS="$save_ifs"
    LEX=${LEX-flex}
d3210 8
a3217 33
  # Export variables which autoconf might try to set.
  export AS
  export AR
  export CC_FOR_BUILD
  export DLLTOOL
  export LD
  export NM
  export RANLIB
  export WINDRES
  export OBJCOPY
  export OBJDUMP
else
  # If CC is still not set, try to get gcc.
  if [ -z "${CC}" ]; then
    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
      test -z "$dir" && dir=.
      if test -f $dir/gcc; then
	CC="gcc"
	echo 'void f(){}' > conftest.c
	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
	  CFLAGS=${CFLAGS-"-g -O2"}
	  CXXFLAGS=${CXXFLAGS-"-g -O2"}
	else
	  CFLAGS=${CFLAGS-"-O2"}
	  CXXFLAGS=${CXXFLAGS-"-O2"}
	fi
	rm -f conftest*
	break
      fi
    done
    IFS="$save_ifs"
    CC=${CC-cc}
d3219 1
a3219 17
    if test -z "${CFLAGS}"; then
      # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
      # is set to a version of gcc.
      case "${CC}" in
      *gcc)
	echo 'void f(){}' > conftest.c
	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
	  CFLAGS=${CFLAGS-"-g -O2"}
	  CXXFLAGS=${CXXFLAGS-"-g -O2"}
	else
	  CFLAGS=${CFLAGS-"-O2"}
	  CXXFLAGS=${CXXFLAGS-"-O2"}
	fi
	rm -f conftest*
	;;
      esac
    fi
d3221 3
d3225 3
a3227 4
  CXX=${CXX-"c++"}
  CFLAGS=${CFLAGS-"-g"}
  CXXFLAGS=${CXXFLAGS-"-g -O2"}
fi
d3229 2
a3230 4
export CC
export CXX
export CFLAGS
export CXXFLAGS
d3232 4
a3235 4
all_build_modules=
if test x"${build_alias}" != x"${host_alias}"
then
  all_build_modules='$(ALL_BUILD_MODULES_LIST)'
d3238 9
a3246 1
for subdir in . ${subdirs} ; do
d3248 28
a3275 18
    # ${subdir} is relative path from . to the directory we're currently
    # configuring.
    # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
    invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`

    ### figure out what to do with srcdir
    case "${srcdir}" in
        ".")  # no -srcdir option.  We're building in place.
                makesrcdir=. ;;
        /* | [A-Za-z]:[\\/]* ) # absolute path
                makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
                ;;
        *) # otherwise relative
                case "${subdir}" in
                .) makesrcdir=${srcdir} ;;
                *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;;
                esac
                ;;
d3277 1
d3279 6
a3284 2
    if [ "${subdir}/" != "./" ] ; then
        Makefile=${subdir}/Makefile
d3287 14
a3300 15
    if [ ! -d ${subdir} ] ; then
        if mkdir ${subdir} ; then
                true
        else
                echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${subdir}" 1>&2
                exit 1
        fi
    fi

    case "${removing}" in
    "")
        case "${subdir}" in
        .) ;;
        *) eval echo Building in ${subdir} ${redirect} ;;
        esac
d3302 2
a3303 303
        # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
        # Set up the list of links to be made.
        # ${links} is the list of link names, and ${files} is the list of names to link to.

        # Make the links.
        configlinks="${links}"
        if [ -r ${subdir}/config.status ] ; then
                mv -f ${subdir}/config.status ${subdir}/config.back
        fi
        while [ -n "${files}" ] ; do
                # set file to car of files, files to cdr of files
                set ${files}; file=$1; shift; files=$*
                set ${links}; link=$1; shift; links=$*

                if [ ! -r ${srcdir}/${file} ] ; then
                  if [ ! -r ${file} ] ; then
		    
                        echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
                        echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
                        exit 1
		  else
			srcfile=${file}
		  fi
		else
			srcfile=${srcdir}/${file}
                fi

                ${remove} -f ${link}
		# Make a symlink if possible, otherwise try a hard link
		if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
			true
		else
			# We need to re-remove the file because Lynx leaves a 
			# very strange directory there when it fails an NFS symlink.
			${remove} -r -f ${link}
			${hard_link} ${srcfile} ${link}
		fi
                if [ ! -r ${link} ] ; then
                        echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
                        exit 1
                fi

                echo "Linked \"${link}\" to \"${srcfile}\"."
        done

        # Create a .gdbinit file which runs the one in srcdir
        # and tells GDB to look there for source files.

        if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
                case ${srcdir} in
                .) ;;
                *) cat > ${subdir}/.gdbinit <<EOF
# ${NO_EDIT}
dir ${makesrcdir}
dir .
source ${makesrcdir}/.gdbinit
EOF
                        ;;
                esac
        fi

        # Install a makefile, and make it set VPATH
        # if necessary so that the sources are found.
        # Also change its value of srcdir.
        # NOTE: Makefile generation constitutes the majority of the time in configure.  Hence, this section has
        # been somewhat optimized and is perhaps a bit twisty.

        # code is order so as to try to sed the smallest input files we know.
        # so do these separately because I don't trust the order of sed -e expressions.

        # the five makefile fragments MUST end up in the resulting Makefile in this order: 
        # package macros, target, host, site, and package rules.

        if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then

            # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem.
            rm -f ${subdir}/${Makefile}.tem
            case "${package_makefile_rules_frag}" in
              "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
              *)
                      if [ ! -f ${package_makefile_rules_frag} ] ; then
                              package_makefile_rules_frag=${srcdir}/${package_makefile_rules_frag}
                      fi
                      if [ -f ${package_makefile_rules_frag} ] ; then
                              sed -e "/^####/  r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem
                      else
                              echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
                      fi
            esac
            # working copy now in ${Makefile}.tem

            # Conditionalize for this site.
            rm -f ${Makefile}
              case "${site}" in
              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
              *)
                      site_makefile_frag=${srcdir}/config/ms-${site}

                      if [ -f ${site_makefile_frag} ] ; then
                              sed -e "/^####/  r ${site_makefile_frag}" ${subdir}/Makefile.tem \
                                      > ${Makefile}
                      else
                              mv ${subdir}/Makefile.tem ${Makefile}
                              site_makefile_frag=
                      fi
                      ;;
            esac
            # working copy now in ${Makefile}

            # Conditionalize the makefile for this host.
            rm -f ${subdir}/Makefile.tem
            case "${host_makefile_frag}" in
              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
              *)
                      if [ ! -f ${host_makefile_frag} ] ; then
                              host_makefile_frag=${srcdir}/${host_makefile_frag}
                      fi
                      if [ -f ${host_makefile_frag} ] ; then
                              sed -e "/^####/  r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                      else
                              echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              mv ${Makefile} ${subdir}/Makefile.tem
                      fi
            esac
            # working copy now in ${subdir)/Makefile.tem

            # Conditionalize the makefile for this target.
            rm -f ${Makefile}
            case "${target_makefile_frag}" in
              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
              *)
                      if [ ! -f ${target_makefile_frag} ] ; then
                              target_makefile_frag=${srcdir}/${target_makefile_frag}
                      fi
                      if [ -f ${target_makefile_frag} ] ; then
                              sed -e "/^####/  r ${target_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
                      else
                              mv ${subdir}/Makefile.tem ${Makefile}
                              target_makefile_frag=
                      fi
                      ;;
            esac
            # working copy now in ${Makefile}

            # Emit the default values of this package's macros.
            rm -f ${subdir}/Makefile.tem
            case "${package_makefile_frag}" in
              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
              *)
                      if [ ! -f ${package_makefile_frag} ] ; then
                              package_makefile_frag=${srcdir}/${package_makefile_frag}
                      fi
                      if [ -f ${package_makefile_frag} ] ; then
                              sed -e "/^####/  r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                      else
                              echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              mv ${Makefile} ${subdir}/Makefile.tem
                      fi
            esac
            # real copy now in ${subdir}/Makefile.tem

            # prepend warning about editing, and a bunch of variables.
            rm -f ${Makefile}
            cat > ${Makefile} <<EOF
# ${NO_EDIT}
VPATH = ${makesrcdir}
links = ${configlinks}
host_alias = ${host_alias}
host_cpu = ${host_cpu}
host_vendor = ${host_vendor}
host_os = ${host_os}
host_canonical = ${host_cpu}-${host_vendor}-${host_os}
target_alias = ${target_alias}
target_cpu = ${target_cpu}
target_vendor = ${target_vendor}
target_os = ${target_os}
target_canonical = ${target_cpu}-${target_vendor}-${target_os}
EOF
	    case "${build}" in
	      "") ;;
	      *)  cat >> ${Makefile} << EOF
build_alias = ${build_alias}
build_cpu = ${build_cpu}
build_vendor = ${build_vendor}
build_os = ${build_os}
build_canonical = ${build_cpu}-${build_vendor}-${build_os}
EOF
	    esac

            case "${package_makefile_frag}" in
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
              *)  echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
            esac

            case "${target_makefile_frag}" in
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
              *)  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
            esac

            case "${host_makefile_frag}" in
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
              *)  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
            esac

            if [ "${site_makefile_frag}" != "" ] ; then
                echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
            fi 

	    echo enable_shared = ${enable_shared} >> ${Makefile}
	    echo enable_threads = ${enable_threads} >> ${Makefile}
	    # record if we want to rumtime library stuff installed in libsubdir.
	    if test -z "${enable_version_specific_runtime_libs}"; then
	        echo enable_version_specific_runtime_libs = no >> ${Makefile}
	    else
	        echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
	    fi

	    # Emit a macro which describes the file containing gcc's
	    # version number.
	    echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
	    # And emit a macro defining gcc's version number.
	    echo gcc_version = ${gcc_version} >> ${Makefile}

            # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
            # remove any form feeds.
            if [ -z "${subdirs}" ]; then
                rm -f ${subdir}/Makefile.tm2
                sedtemp=sed.$$
                cat >$sedtemp <<EOF
s:^SUBDIRS[ 	]*=.*$:SUBDIRS = ${configdirs}:
s:^NONSUBDIRS[ 	]*=.*$:NONSUBDIRS = ${noconfigdirs}:
EOF
                sed -f $sedtemp \
                    ${subdir}/Makefile.tem > ${subdir}/Makefile.tm2
                rm -f $sedtemp
                rm -f ${subdir}/Makefile.tem
                mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem
	    fi
	    sed     -e "s|^prefix[ 	]*=.*$|prefix = ${prefix}|" \
                    -e "s|^exec_prefix[ 	]*=.*$|exec_prefix = ${exec_prefix}|" \
                    -e "s|^bindir[ 	]*=.*$|bindir = ${bindir}|" \
                    -e "s|^sbindir[ 	]*=.*$|sbindir = ${sbindir}|" \
                    -e "s|^libexecdir[ 	]*=.*$|libexecdir = ${libexecdir}|" \
                    -e "s|^datadir[ 	]*=.*$|datadir = ${datadir}|" \
                    -e "s|^sysconfdir[ 	]*=.*$|sysconfdir = ${sysconfdir}|" \
                    -e "s|^sharedstatedir[ 	]*=.*$|sharedstatedir = ${sharedstatedir}|" \
                    -e "s|^localstatedir[ 	]*=.*$|localstatedir = ${localstatedir}|" \
                    -e "s|^libdir[ 	]*=.*$|libdir = ${libdir}|" \
                    -e "s|^includedir[ 	]*=.*$|includedir = ${includedir}|" \
                    -e "s|^oldincludedir[ 	]*=.*$|oldincludedir = ${oldincludedir}|" \
                    -e "s|^infodir[ 	]*=.*$|infodir = ${infodir}|" \
                    -e "s|^mandir[ 	]*=.*$|mandir = ${mandir}|" \
		    -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \
		    -e "/^CC[ 	]*=/{
			:loop1
			/\\\\$/ N
			s/\\\\\\n//g
			t loop1
			s%^CC[ 	]*=.*$%CC = ${CC}%
			}" \
		    -e "/^CXX[ 	]*=/{
			:loop2
			/\\\\$/ N
			s/\\\\\\n//g
			t loop2
			s%^CXX[ 	]*=.*$%CXX = ${CXX}%
			}" \
		    -e "/^CFLAGS[ 	]*=/{
			:loop3
			/\\\\$/ N
			s/\\\\\\n//g
			t loop3
			s%^CFLAGS[ 	]*=.*$%CFLAGS = ${CFLAGS}%
			}" \
		    -e "/^CXXFLAGS[ 	]*=/{
			:loop4
			/\\\\$/ N
			s/\\\\\\n//g
			t loop4
			s%^CXXFLAGS[ 	]*=.*$%CXXFLAGS = ${CXXFLAGS}%
			}" \
		    -e "s|^SHELL[	 ]*=.*$|SHELL = ${config_shell}|" \
                    -e "s|^srcdir[ 	]*=.*$|srcdir = ${makesrcdir}|" \
                    -e "s///" \
                    -e "s:^program_prefix[ 	]*=.*$:program_prefix = ${program_prefix}:" \
                    -e "s:^program_suffix[ 	]*=.*$:program_suffix = ${program_suffix}:" \
                    -e "s:^program_transform_name[ 	]*=.*$:program_transform_name = ${program_transform_name}:" \
                    -e "s|^tooldir[ 	]*=.*$|tooldir = ${tooldir}|" \
                    -e "s|^build_tooldir[ 	]*=.*$|build_tooldir = ${tooldir}|" \
		    -e "s:^DEFAULT_YACC[	 ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
		    -e "s:^DEFAULT_LEX[	 ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
		    -e "s:^DEFAULT_M4[  ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
                    ${subdir}/Makefile.tem >> ${Makefile}
  
	    sed -e "s:^GDB_TK[	 ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
	    mv -f ${Makefile}.tem ${Makefile}
d3305 8
a3312 28
	    # If this is a Canadian Cross, preset the values of many more
	    # tools.
	    if [ "${build}" != "${host}" ]; then
		for var in ${tools}; do
		    eval val=\$${var}
		    sed -e "/^${var}[ 	]*=/{
			   :loop1
			   /\\\\$/ N
			   /\\\\$/ b loop1
			   s/\\\\\\n//g
			   s%^${var}[ 	]*=.*$%${var} = ${val}%
			   }" ${Makefile} > ${Makefile}.tem
		    mv -f ${Makefile}.tem ${Makefile}
		done
	    fi

            # final copy now in ${Makefile}

        else
           echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
        fi

        rm -f ${subdir}/Makefile.tem

        case "${host_makefile_frag}" in
        "") using= ;;
        *) using="and \"${host_makefile_frag}\"" ;;
        esac
d3314 9
a3322 4
        case "${target_makefile_frag}" in
        "") ;;
        *) using="${using} and \"${target_makefile_frag}\"" ;;
        esac
d3324 2
a3325 4
        case "${site_makefile_frag}" in
        "") ;;
        *) using="${using} and \"${site_makefile_frag}\"" ;;
        esac
d3327 9
a3335 14
        newusing=`echo "${using}" | sed 's/and/using/'`
        using=${newusing}
        echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using}

        . ${tmpfile}.pos

        # describe the chosen configuration in config.status.
        # Make that file a shellscript which will reestablish
        # the same configuration.  Used in Makefiles to rebuild
        # Makefiles.

        case "${norecursion}" in
        "") arguments="${arguments} --norecursion" ;;
        *) ;;
d3338 8
a3345 20
        if [ ${subdir} = . ] ; then
            echo "#!/bin/sh
# ${NO_EDIT}
# This directory was configured as follows:
${progname}" ${arguments}  "
# ${using}" > ${subdir}/config.new
        else
            echo "#!/bin/sh
# ${NO_EDIT}
# This directory was configured as follows:
cd ${invsubdir}
${progname}" ${arguments}  "
# ${using}" > ${subdir}/config.new
        fi
        chmod a+x ${subdir}/config.new
        if [ -r ${subdir}/config.back ] ; then
                mv -f ${subdir}/config.back ${subdir}/config.status
        fi
	${config_shell} ${moveifchange} ${subdir}/config.new ${subdir}/config.status
        ;;
d3347 3
a3349 3
    *)  rm -f ${Makefile} ${subdir}/config.status ${links} ;;
    esac
done
a3350 96
# If there are subdirectories, then recur.
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then 
        for configdir in ${configdirs} ${extraconfigdirs} ; do

		# If configdir contains ',' it is
		# srcdir,builddir,target_alias
		# These come from extraconfigdirs.
		case ${configdir} in
		*,*)
		    eval `echo ${configdir} | sed -e 's/\([^,]*\),\([^,]*\),\(.*\)/cfg_dir=\1 bld_dir=\2 tgt_alias=\3/'`
		    ;;
		*)
		    cfg_dir=${configdir}
		    bld_dir=${configdir}
		    tgt_alias=${target_alias}
		    ;;
		esac

                if [ -d ${srcdir}/${cfg_dir} ] ; then
                        eval echo Configuring ${configdir}... ${redirect}
                        case "${srcdir}" in
                        ".") ;;
                        *)
                                if [ ! -d ./${bld_dir} ] ; then
                                        if mkdir ./${bld_dir} ; then
                                                true
                                        else
                                                echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${bld_dir}" 1>&2
                                                exit 1
                                        fi
                                fi
                                ;;
                        esac

                        POPDIR=${PWD=`${PWDCMD-pwd}`}
                        cd ${bld_dir} 

### figure out what to do with srcdir
                        case "${srcdir}" in
                        ".") newsrcdir=${srcdir} ;; # no -srcdir option.  We're building in place.
                        /* | [A-Za-z]:[\\/]* ) # absolute path
                                newsrcdir=${srcdir}/${cfg_dir}
                                srcdiroption="--srcdir=${newsrcdir}"
                                ;;
                        *) # otherwise relative
                                newsrcdir=../${srcdir}/${cfg_dir}
                                srcdiroption="--srcdir=${newsrcdir}"
                                ;;
                        esac

			# Handle --cache-file=../XXX
			case "${cache_file}" in
			"") # empty
				;;
			/* | [A-Za-z]:[\\/]* ) # absolute path
				cache_file_option="--cache-file=${cache_file}"
				;;
			*) # relative path
				cache_file_option="--cache-file=../${cache_file}"
				;;
			esac

### check for guested configure, otherwise fix possibly relative progname
                        if [ -f ${newsrcdir}/configure ] ; then
                                recprog=${newsrcdir}/configure
                        elif [ -f ${newsrcdir}/configure.in ] ; then
                                case "${progname}" in
                                /* | [A-Za-z]:[\\/]* )  recprog=${progname} ;;
                                *)                      recprog=../${progname} ;;
                                esac
			else
				eval echo No configuration information in ${cfg_dir} ${redirect}
				recprog=
                        fi

### The recursion line is here.
			if [ ! -z "${recprog}" ] ; then
	                        if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${tgt_alias} \
        	                        ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
                	                ${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
	                                true
        	                else
					echo Configure in `${PWDCMD-pwd}` failed, exiting. 1>&2
                	                exit 1
                        	fi
			fi

                        cd ${POPDIR}
                fi
        done
fi

# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
# and reset the trap handler.
rm -rf ${tmpdir}
trap 0
a3353 7
#
# Local Variables:
# fill-column: 131
# End:
#

# end of configure
@


