OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [configure] - Diff between revs 1183 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 1183 Rev 1765
#!/bin/sh
#!/bin/sh
### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
# Configuration script
# Configuration script
# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001,
# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001,
# 2002 Free Software Foundation, Inc.
# 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# 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
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# This file was originally written by K. Richard Pixley.
# This file was originally written by K. Richard Pixley.
#
#
# Shell script to create proper links to machine-dependent files in
# Shell script to create proper links to machine-dependent files in
# preparation for compilation.
# preparation for compilation.
#
#
# If configure succeeds, it leaves its status in config.status.
# If configure succeeds, it leaves its status in config.status.
# If configure fails after disturbing the status quo,
# If configure fails after disturbing the status quo,
#       config.status is removed.
#       config.status is removed.
#
#
export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
remove=rm
remove=rm
hard_link=ln
hard_link=ln
symbolic_link='ln -s'
symbolic_link='ln -s'
#for Test
#for Test
#remove="echo rm"
#remove="echo rm"
#hard_link="echo ln"
#hard_link="echo ln"
#symbolic_link="echo ln -s"
#symbolic_link="echo ln -s"
# clear some things potentially inherited from environment.
# clear some things potentially inherited from environment.
Makefile=Makefile
Makefile=Makefile
Makefile_in=Makefile.in
Makefile_in=Makefile.in
arguments=
arguments=
build_alias=
build_alias=
cache_file=config.cache
cache_file=config.cache
cache_file_option=
cache_file_option=
configdirs=
configdirs=
extraconfigdirs=
extraconfigdirs=
diroptions=
diroptions=
enable_threads=no
enable_threads=no
enable_shared=no
enable_shared=no
enable_libstdcxx_v3=yes
enable_libstdcxx_v3=yes
exec_prefix=
exec_prefix=
exec_prefixoption=
exec_prefixoption=
fatal=
fatal=
floating_point=default
floating_point=default
gas=default
gas=default
gcc_version=
gcc_version=
gcc_version_trigger=
gcc_version_trigger=
host_alias=NOHOST
host_alias=NOHOST
host_makefile_frag=
host_makefile_frag=
moveifchange=
moveifchange=
norecursion=
norecursion=
other_options=
other_options=
package_makefile_frag=
package_makefile_frag=
package_makefile_rules_frag=
package_makefile_rules_frag=
prefix=/usr/local
prefix=/usr/local
progname=
progname=
program_prefix=
program_prefix=
program_prefixoption=
program_prefixoption=
program_suffix=
program_suffix=
program_suffixoption=
program_suffixoption=
program_transform_name=
program_transform_name=
program_transform_nameoption=
program_transform_nameoption=
redirect=
redirect=
removing=
removing=
site=
site=
site_makefile_frag=
site_makefile_frag=
site_option=
site_option=
srcdir=
srcdir=
srctrigger=
srctrigger=
subdirs=
subdirs=
target_alias=NOTARGET
target_alias=NOTARGET
target_makefile_frag=
target_makefile_frag=
undefs=NOUNDEFS
undefs=NOUNDEFS
version="$Revision: 1.2 $"
version="$Revision: 1.2 $"
x11=default
x11=default
bindir='${exec_prefix}/bin'
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
includedir='${prefix}/include'
oldincludedir='/usr/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
infodir='${prefix}/info'
mandir='${prefix}/man'
mandir='${prefix}/man'
### we might need to use some other shell than /bin/sh for running subshells
### 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
### 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
### 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
### without also having to set CONFIG_SHELL.  This code will work when
### using bash, which sets OSTYPE.
### using bash, which sets OSTYPE.
case "${OSTYPE}" in
case "${OSTYPE}" in
*win32*)
*win32*)
  if [ x${CONFIG_SHELL} = x ]; then
  if [ x${CONFIG_SHELL} = x ]; then
    if [ ! -f /bin/sh ]; then
    if [ ! -f /bin/sh ]; then
      if [ x${SHELL} != x ] && [ -f ${SHELL} ]; then
      if [ x${SHELL} != x ] && [ -f ${SHELL} ]; then
        CONFIG_SHELL=${SHELL}
        CONFIG_SHELL=${SHELL}
        export CONFIG_SHELL
        export CONFIG_SHELL
      else
      else
        for prog in sh sh.exe bash bash.exe; do
        for prog in sh sh.exe bash bash.exe; do
          IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
          IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
          for dir in $PATH; do
          for dir in $PATH; do
            test -z "$dir" && dir=.
            test -z "$dir" && dir=.
            if test -f $dir/$prog; then
            if test -f $dir/$prog; then
              CONFIG_SHELL=$dir/$prog
              CONFIG_SHELL=$dir/$prog
              export CONFIG_SHELL
              export CONFIG_SHELL
              break
              break
            fi
            fi
          done
          done
          IFS="$save_ifs"
          IFS="$save_ifs"
          test -n "${CONFIG_SHELL}" && break
          test -n "${CONFIG_SHELL}" && break
        done
        done
      fi
      fi
    fi
    fi
  fi
  fi
  ;;
  ;;
esac
esac
config_shell=${CONFIG_SHELL-/bin/sh}
config_shell=${CONFIG_SHELL-/bin/sh}
NO_EDIT="This file was generated automatically by configure.  Do not edit."
NO_EDIT="This file was generated automatically by configure.  Do not edit."
## this is a little touchy and won't always work, but...
## 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
## if the argv[0] starts with a slash then it is an absolute name that can (and
## must) be used as is.
## must) be used as is.
##
##
## otherwise, if argv[0] has no slash in it, we can assume that it is on the
## 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.
## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
##
##
progname=$0
progname=$0
# if PWD already has a value, it is probably wrong.
# if PWD already has a value, it is probably wrong.
if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi
if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi
case "${progname}" in
case "${progname}" in
/* | [A-Za-z]:[\\/]* ) ;;
/* | [A-Za-z]:[\\/]* ) ;;
*/*) ;;
*/*) ;;
*)
*)
        PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH
        PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH
        ;;
        ;;
esac
esac
# Export original configure arguments for use by sub-configures.
# Export original configure arguments for use by sub-configures.
TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
export TOPLEVEL_CONFIGURE_ARGUMENTS
export TOPLEVEL_CONFIGURE_ARGUMENTS
# Loop over all args
# Loop over all args
while :
while :
do
do
# Break out if there are no more args
# Break out if there are no more args
        case $# in
        case $# in
        0)
        0)
                break
                break
                ;;
                ;;
        esac
        esac
# Get the first arg, and shuffle
# Get the first arg, and shuffle
        option=$1
        option=$1
        shift
        shift
# Make all options have two hyphens
# Make all options have two hyphens
        orig_option=$option     # Save original for error messages
        orig_option=$option     # Save original for error messages
        case $option in
        case $option in
        --*) ;;
        --*) ;;
        -*) option=-$option ;;
        -*) option=-$option ;;
        esac
        esac
# Split out the argument for options that take them
# Split out the argument for options that take them
        case $option in
        case $option in
        --*=*)
        --*=*)
                optarg=`echo $option | sed -e 's/^[^=]*=//'`
                optarg=`echo $option | sed -e 's/^[^=]*=//'`
                arguments="$arguments $option"
                arguments="$arguments $option"
                ;;
                ;;
# These options have mandatory values.  Since we didn't find an = sign,
# These options have mandatory values.  Since we didn't find an = sign,
# the value must be in the next argument
# 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*)
        --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
                optarg=$1
                shift
                shift
                arguments="$arguments $option=$optarg"
                arguments="$arguments $option=$optarg"
                ;;
                ;;
        --v)
        --v)
                arguments="$arguments -v"
                arguments="$arguments -v"
                ;;
                ;;
        --*)
        --*)
                arguments="$arguments $option"
                arguments="$arguments $option"
                ;;
                ;;
        esac
        esac
# Now, process the options
# Now, process the options
        case $option in
        case $option in
        --bi*)
        --bi*)
                bindir=$optarg
                bindir=$optarg
                diroptions="$diroptions --bindir=$optarg"
                diroptions="$diroptions --bindir=$optarg"
                ;;
                ;;
        --build* | --bu*)
        --build* | --bu*)
                case "$build_alias" in
                case "$build_alias" in
                "") build_alias=$optarg ;;
                "") build_alias=$optarg ;;
                *) echo '***' Can only configure for one build machine at a time.  1>&2
                *) echo '***' Can only configure for one build machine at a time.  1>&2
                   fatal=yes
                   fatal=yes
                   ;;
                   ;;
                esac
                esac
                ;;
                ;;
        --cache*)
        --cache*)
                cache_file=$optarg
                cache_file=$optarg
                ;;
                ;;
        --da*)
        --da*)
                datadir=$optarg
                datadir=$optarg
                diroptions="$diroptions --datadir=$optarg"
                diroptions="$diroptions --datadir=$optarg"
                ;;
                ;;
        --disable-*)
        --disable-*)
                enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
                enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
                eval $enableopt=no
                eval $enableopt=no
                disableoptions="$disableoptions $option"
                disableoptions="$disableoptions $option"
                ;;
                ;;
        --enable-*)
        --enable-*)
                case "$option" in
                case "$option" in
                *=*)    ;;
                *=*)    ;;
                *)      optarg=yes ;;
                *)      optarg=yes ;;
                esac
                esac
                enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
                enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
                eval "$enableopt=\$optarg"
                eval "$enableopt=\$optarg"
                enableoptions="$enableoptions '$option'"
                enableoptions="$enableoptions '$option'"
                ;;
                ;;
        --exec-prefix* | --ex*)
        --exec-prefix* | --ex*)
                exec_prefix=$optarg
                exec_prefix=$optarg
                exec_prefixoption="--exec-prefix=$optarg"
                exec_prefixoption="--exec-prefix=$optarg"
                ;;
                ;;
        --gas | --g*)
        --gas | --g*)
                gas=yes
                gas=yes
                ;;
                ;;
        --help | --he*)
        --help | --he*)
                fatal=yes
                fatal=yes
                ;;
                ;;
        --host* | --ho*)
        --host* | --ho*)
                case $host_alias in
                case $host_alias in
                NOHOST) host_alias=$optarg ;;
                NOHOST) host_alias=$optarg ;;
                *) echo '***' Can only configure for one host at a time.  1>&2
                *) echo '***' Can only configure for one host at a time.  1>&2
                   fatal=yes
                   fatal=yes
                   ;;
                   ;;
                esac
                esac
                ;;
                ;;
        --inc*)
        --inc*)
                includedir=$optarg
                includedir=$optarg
                diroptions="$diroptions --includedir=$optarg"
                diroptions="$diroptions --includedir=$optarg"
                ;;
                ;;
        --inf*)
        --inf*)
                infodir=$optarg
                infodir=$optarg
                diroptions="$diroptions --infodir=$optarg"
                diroptions="$diroptions --infodir=$optarg"
                ;;
                ;;
        --libd*)
        --libd*)
                libdir=$optarg
                libdir=$optarg
                diroptions="$diroptions --libdir=$optarg"
                diroptions="$diroptions --libdir=$optarg"
                ;;
                ;;
        --libe*)
        --libe*)
                libexecdir=$optarg
                libexecdir=$optarg
                diroptions="$diroptions --libexecdir=$optarg"
                diroptions="$diroptions --libexecdir=$optarg"
                ;;
                ;;
        --lo*)
        --lo*)
                localstatedir=$optarg
                localstatedir=$optarg
                diroptions="$diroptions --localstatedir=$optarg"
                diroptions="$diroptions --localstatedir=$optarg"
                ;;
                ;;
        --ma*)
        --ma*)
                mandir=$optarg
                mandir=$optarg
                diroptions="$diroptions --mandir=$optarg"
                diroptions="$diroptions --mandir=$optarg"
                ;;
                ;;
        --nfp | --nf*)
        --nfp | --nf*)
                floating_point=no
                floating_point=no
                floating_pointoption="--nfp"
                floating_pointoption="--nfp"
                ;;
                ;;
        --norecursion | --no*)
        --norecursion | --no*)
                norecursion=yes
                norecursion=yes
                ;;
                ;;
        --ol*)
        --ol*)
                oldincludedir=$optarg
                oldincludedir=$optarg
                diroptions="$diroptions --oldincludedir=$optarg"
                diroptions="$diroptions --oldincludedir=$optarg"
                ;;
                ;;
        --prefix* | --pre*)
        --prefix* | --pre*)
                prefix=$optarg
                prefix=$optarg
                prefixoption="--prefix=$optarg"
                prefixoption="--prefix=$optarg"
                ;;
                ;;
        --program-prefix* | --program-p*)
        --program-prefix* | --program-p*)
                program_prefix=$optarg
                program_prefix=$optarg
                program_prefixoption="--program-prefix=$optarg"
                program_prefixoption="--program-prefix=$optarg"
                ;;
                ;;
        --program-suffix* | --program-s*)
        --program-suffix* | --program-s*)
                program_suffix=$optarg
                program_suffix=$optarg
                program_suffixoption="--program-suffix=$optarg"
                program_suffixoption="--program-suffix=$optarg"
                ;;
                ;;
        --program-transform-name* | --program-t*)
        --program-transform-name* | --program-t*)
                # Double any backslashes or dollar signs in the argument
                # 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_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
                program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
                program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
                ;;
                ;;
        --rm)
        --rm)
                removing=--rm
                removing=--rm
                ;;
                ;;
        --sb*)
        --sb*)
                sbindir=$optarg
                sbindir=$optarg
                diroptions="$diroptions --sbindir=$optarg"
                diroptions="$diroptions --sbindir=$optarg"
                ;;
                ;;
        --sh*)
        --sh*)
                sharedstatedir=$optarg
                sharedstatedir=$optarg
                diroptions="$diroptions --sharedstatedir=$optarg"
                diroptions="$diroptions --sharedstatedir=$optarg"
                ;;
                ;;
        --silent | --sil* | --quiet | --q*)
        --silent | --sil* | --quiet | --q*)
                redirect=">/dev/null"
                redirect=">/dev/null"
                verbose=--silent
                verbose=--silent
                ;;
                ;;
        --site* | --sit*)
        --site* | --sit*)
                site=$optarg
                site=$optarg
                site_option="--site=$optarg"
                site_option="--site=$optarg"
                ;;
                ;;
        --srcdir*/ | --sr*/)
        --srcdir*/ | --sr*/)
                # Remove trailing slashes.  Otherwise, when the file name gets
                # Remove trailing slashes.  Otherwise, when the file name gets
                # bolted into an object file as debug info, it has two slashes
                # bolted into an object file as debug info, it has two slashes
                # in it.  Ordinarily this is ok, but emacs takes double slash
                # in it.  Ordinarily this is ok, but emacs takes double slash
                # to mean "forget the first part".
                # to mean "forget the first part".
                srcdir=`echo $optarg | sed -e 's:/$::'`
                srcdir=`echo $optarg | sed -e 's:/$::'`
                ;;
                ;;
        --srcdir* | --sr*)
        --srcdir* | --sr*)
                srcdir=$optarg
                srcdir=$optarg
                ;;
                ;;
        --sy*)
        --sy*)
                sysconfdir=$optarg
                sysconfdir=$optarg
                diroptions="$diroptions --sysconfdir=$optarg"
                diroptions="$diroptions --sysconfdir=$optarg"
                ;;
                ;;
        --target* | --ta*)
        --target* | --ta*)
                case $target_alias in
                case $target_alias in
                NOTARGET) target_alias=$optarg ;;
                NOTARGET) target_alias=$optarg ;;
                *) echo '***' Can only configure for one target at a time.  1>&2
                *) echo '***' Can only configure for one target at a time.  1>&2
                   fatal=yes
                   fatal=yes
                   ;;
                   ;;
                esac
                esac
                ;;
                ;;
        --tmpdir* | --tm*)
        --tmpdir* | --tm*)
                TMPDIR=$optarg
                TMPDIR=$optarg
                tmpdiroption="--tmpdir=$optarg"
                tmpdiroption="--tmpdir=$optarg"
                ;;
                ;;
        --verbose | --v | --verb*)
        --verbose | --v | --verb*)
                redirect=
                redirect=
                verbose=--verbose
                verbose=--verbose
                ;;
                ;;
        --version | --V | --vers*)
        --version | --V | --vers*)
                echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
                echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
                exit 0
                exit 0
                ;;
                ;;
        --with-*)
        --with-*)
                case "$option" in
                case "$option" in
                *=*)    ;;
                *=*)    ;;
                *)      optarg=yes ;;
                *)      optarg=yes ;;
                esac
                esac
                withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
                withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
                eval $withopt="\$optarg"
                eval $withopt="\$optarg"
                withoptions="$withoptions $option"
                withoptions="$withoptions $option"
                ;;
                ;;
        --without-*)
        --without-*)
                withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
                withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
                eval $withopt=no
                eval $withopt=no
                withoutoptions="$withoutoptions $option"
                withoutoptions="$withoutoptions $option"
                ;;
                ;;
        --x)    with_x=yes
        --x)    with_x=yes
                withoptions="$withoptions --with-x"
                withoptions="$withoptions --with-x"
                ;;
                ;;
        --x-i* | --x-l*) other_options="$other_options $orig_option"
        --x-i* | --x-l*) other_options="$other_options $orig_option"
                ;;
                ;;
        --*)
        --*)
                echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
                echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
                exit 1
                exit 1
                ;;
                ;;
        *)
        *)
                case $undefs in
                case $undefs in
                NOUNDEFS) undefs=$option ;;
                NOUNDEFS) undefs=$option ;;
                *) echo '***' Can only configure for one host and one target at a time.  1>&2
                *) echo '***' Can only configure for one host and one target at a time.  1>&2
                   fatal=yes
                   fatal=yes
                   ;;
                   ;;
                esac
                esac
                ;;
                ;;
        esac
        esac
done
done
# process host and target
# process host and target
# Do some error checking and defaulting for the host and target type.
# Do some error checking and defaulting for the host and target type.
# The inputs are:
# The inputs are:
#    configure --host=HOST --target=TARGET UNDEFS
#    configure --host=HOST --target=TARGET UNDEFS
#
#
# The rules are:
# The rules are:
# 1. You aren't allowed to specify --host, --target, and undefs at the
# 1. You aren't allowed to specify --host, --target, and undefs at the
#    same time.
#    same time.
# 2. Host defaults to undefs.
# 2. Host defaults to undefs.
# 3. If undefs is not specified, then host defaults to the current host,
# 3. If undefs is not specified, then host defaults to the current host,
#    as determined by config.guess.
#    as determined by config.guess.
# 4. Target defaults to undefs.
# 4. Target defaults to undefs.
# 5. If undefs is not specified, then target defaults to host.
# 5. If undefs is not specified, then target defaults to host.
case "${fatal}" in
case "${fatal}" in
"")
"")
        # Make sure that host, target & undefs aren't all specified at the
        # Make sure that host, target & undefs aren't all specified at the
        # same time.
        # same time.
        case $host_alias---$target_alias---$undefs in
        case $host_alias---$target_alias---$undefs in
        NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
        NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
                ;;
                ;;
        *) echo '***' Can only configure for one host and one target at a time.  1>&2
        *) echo '***' Can only configure for one host and one target at a time.  1>&2
           fatal=yes
           fatal=yes
           break 2
           break 2
                ;;
                ;;
        esac
        esac
        # Now, do defaulting for host.
        # Now, do defaulting for host.
        case $host_alias in
        case $host_alias in
        NOHOST)
        NOHOST)
                case $undefs in
                case $undefs in
                NOUNDEFS)
                NOUNDEFS)
                        # Neither --host option nor undefs were present.
                        # Neither --host option nor undefs were present.
                        # Call config.guess.
                        # Call config.guess.
                        guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
                        guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
                        if host_alias=`${config_shell} ${guesssys}`
                        if host_alias=`${config_shell} ${guesssys}`
                        then
                        then
                                # If the string we are going to use for
                                # If the string we are going to use for
                                # the target is a prefix of the string
                                # the target is a prefix of the string
                                # we just guessed for the host, then
                                # we just guessed for the host, then
                                # assume we are running native, and force
                                # assume we are running native, and force
                                # the same string for both target and host.
                                # the same string for both target and host.
                                case $target_alias in
                                case $target_alias in
                                NOTARGET) ;;
                                NOTARGET) ;;
                                *)
                                *)
                                        if expr $host_alias : $target_alias >/dev/null
                                        if expr $host_alias : $target_alias >/dev/null
                                        then
                                        then
                                                host_alias=$target_alias
                                                host_alias=$target_alias
                                        fi
                                        fi
                                        ;;
                                        ;;
                                esac
                                esac
                                echo "Configuring for a ${host_alias} host."
                                echo "Configuring for a ${host_alias} host."
                                arguments="--host=$host_alias $arguments"
                                arguments="--host=$host_alias $arguments"
                        else
                        else
                                echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
                                echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
                                fatal=yes
                                fatal=yes
                        fi
                        fi
                        ;;
                        ;;
                *)
                *)
                        host_alias=$undefs
                        host_alias=$undefs
                        arguments="--host=$host_alias $arguments"
                        arguments="--host=$host_alias $arguments"
                        undefs=NOUNDEFS
                        undefs=NOUNDEFS
                        ;;
                        ;;
                esac
                esac
        esac
        esac
        # Do defaulting for target.  If --target option isn't present, default
        # Do defaulting for target.  If --target option isn't present, default
        # to undefs.  If undefs isn't present, default to host.
        # to undefs.  If undefs isn't present, default to host.
        case $target_alias in
        case $target_alias in
        NOTARGET)
        NOTARGET)
                case $undefs in
                case $undefs in
                NOUNDEFS)
                NOUNDEFS)
                        target_alias=$host_alias
                        target_alias=$host_alias
                        ;;
                        ;;
                *)
                *)
                        target_alias=$undefs
                        target_alias=$undefs
                        arguments="--target=$target_alias $arguments"
                        arguments="--target=$target_alias $arguments"
                        ;;
                        ;;
                esac
                esac
        esac
        esac
        ;;
        ;;
*) ;;
*) ;;
esac
esac
if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
        exec 1>&2
        exec 1>&2
        echo Usage: configure [OPTIONS] [HOST]
        echo Usage: configure [OPTIONS] [HOST]
        echo
        echo
        echo Options: [defaults in brackets]
        echo Options: [defaults in brackets]
        echo ' --prefix=MYDIR            install into MYDIR [/usr/local]'
        echo ' --prefix=MYDIR            install into MYDIR [/usr/local]'
        echo ' --exec-prefix=MYDIR       install host-dependent files into MYDIR [/usr/local]'
        echo ' --exec-prefix=MYDIR       install host-dependent files into MYDIR [/usr/local]'
        echo ' --help                    print this message [normal config]'
        echo ' --help                    print this message [normal config]'
        echo ' --build=BUILD             configure for building on BUILD [BUILD=HOST]'
        echo ' --build=BUILD             configure for building on BUILD [BUILD=HOST]'
        echo ' --host=HOST               configure for HOST [determined via config.guess]'
        echo ' --host=HOST               configure for HOST [determined via config.guess]'
        echo ' --norecursion             configure this directory only [recurse]'
        echo ' --norecursion             configure this directory only [recurse]'
        echo ' --program-prefix=FOO      prepend FOO to installed program names [""]'
        echo ' --program-prefix=FOO      prepend FOO to installed program names [""]'
        echo ' --program-suffix=FOO      append 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 ' --program-transform-name=P transform installed names by sed pattern P [""]'
        echo ' --site=SITE               configure with site-specific makefile for SITE'
        echo ' --site=SITE               configure with site-specific makefile for SITE'
        echo ' --srcdir=DIR              find the sources in DIR [. or ..]'
        echo ' --srcdir=DIR              find the sources in DIR [. or ..]'
        echo ' --target=TARGET   configure for TARGET [TARGET=HOST]'
        echo ' --target=TARGET   configure for TARGET [TARGET=HOST]'
        echo ' --tmpdir=TMPDIR   create temporary files in TMPDIR [/tmp]'
        echo ' --tmpdir=TMPDIR   create temporary files in TMPDIR [/tmp]'
        echo ' --nfp                     configure for software floating point [hard float]'
        echo ' --nfp                     configure for software floating point [hard float]'
        echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
        echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
        echo ' --without-FOO             package FOO is NOT available'
        echo ' --without-FOO             package FOO is NOT available'
        echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
        echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
        echo ' --disable-FOO             do not include feature FOO'
        echo ' --disable-FOO             do not include feature FOO'
        echo
        echo
        echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
        echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
        echo
        echo
        if [ -r config.status ] ; then
        if [ -r config.status ] ; then
                cat config.status
                cat config.status
        fi
        fi
        exit 1
        exit 1
fi
fi
configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
## the sed command below emulates the dirname command
## the sed command below emulates the dirname command
topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}`
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.
# 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
if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
        true
        true
else
else
        echo '***' cannot find config.sub.  1>&2
        echo '***' cannot find config.sub.  1>&2
        exit 1
        exit 1
fi
fi
touch config.junk
touch config.junk
if ${config_shell} ${moveifchange} config.junk config.trash ; then
if ${config_shell} ${moveifchange} config.junk config.trash ; then
        true
        true
else
else
        echo '***' cannot find move-if-change.  1>&2
        echo '***' cannot find move-if-change.  1>&2
        exit 1
        exit 1
fi
fi
rm -f config.junk config.trash
rm -f config.junk config.trash
case "${srcdir}" in
case "${srcdir}" in
"")
"")
        if [ -r configure.in ] ; then
        if [ -r configure.in ] ; then
                srcdir=.
                srcdir=.
        else
        else
                if [ -r ${progname}.in ] ; then
                if [ -r ${progname}.in ] ; then
                        srcdir=`echo ${progname} | sed 's:/configure$::'`
                        srcdir=`echo ${progname} | sed 's:/configure$::'`
                else
                else
                        echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
                        echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
                        exit 1
                        exit 1
                fi
                fi
        fi
        fi
        ;;
        ;;
*)
*)
        # Set srcdir to "." if that's what it is.
        # Set srcdir to "." if that's what it is.
        # This is important for multilib support.
        # This is important for multilib support.
        if [ ! -d ${srcdir} ] ; then
        if [ ! -d ${srcdir} ] ; then
                echo "Invalid source directory ${srcdir}" >&2
                echo "Invalid source directory ${srcdir}" >&2
                exit 1
                exit 1
        fi
        fi
        pwd=`${PWDCMD-pwd}`
        pwd=`${PWDCMD-pwd}`
        srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
        srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
        if [ "${pwd}" = "${srcpwd}" ] ; then
        if [ "${pwd}" = "${srcpwd}" ] ; then
                srcdir=.
                srcdir=.
        fi
        fi
esac
esac
### warn about some conflicting configurations.
### warn about some conflicting configurations.
case "${srcdir}" in
case "${srcdir}" in
".") ;;
".") ;;
*)
*)
        if [ -f ${srcdir}/config.status ] ; then
        if [ -f ${srcdir}/config.status ] ; then
                echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2
                echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2
                exit 1
                exit 1
        fi
        fi
esac
esac
# default exec_prefix
# default exec_prefix
case "${exec_prefixoption}" in
case "${exec_prefixoption}" in
"") exec_prefix="\$(prefix)" ;;
"") exec_prefix="\$(prefix)" ;;
*) ;;
*) ;;
esac
esac
# Define the trigger file to make sure configure will re-run whenever
# Define the trigger file to make sure configure will re-run whenever
# the gcc version number changes.
# the gcc version number changes.
if [ "${with_gcc_version_trigger+set}" = set ]; then
if [ "${with_gcc_version_trigger+set}" = set ]; then
    gcc_version_trigger="$with_gcc_version_trigger"
    gcc_version_trigger="$with_gcc_version_trigger"
    gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
    gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
else
else
    # If gcc's sources are available, define the trigger file.
    # If gcc's sources are available, define the trigger file.
    if [ -f ${topsrcdir}/gcc/version.c ] ; then
    if [ -f ${topsrcdir}/gcc/version.c ] ; then
        gcc_version_trigger=${topsrcdir}/gcc/version.c
        gcc_version_trigger=${topsrcdir}/gcc/version.c
        gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
        gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
        case "$arguments" in
        case "$arguments" in
          *--with-gcc-version-trigger=$gcc_version_trigger* )
          *--with-gcc-version-trigger=$gcc_version_trigger* )
            ;;
            ;;
          * )
          * )
            # Make sure configure.in knows about this.
            # Make sure configure.in knows about this.
            arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
            arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
            ;;
            ;;
        esac
        esac
        withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
        withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
    fi
    fi
fi
fi
### break up ${srcdir}/configure.in.
### break up ${srcdir}/configure.in.
case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
"")
"")
        echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
        echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
        # Check for a directory that's been converted to use autoconf since
        # Check for a directory that's been converted to use autoconf since
        # it was last configured.
        # it was last configured.
        if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then
        if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then
          echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2
          echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2
          if [ -r ${srcdir}/configure ] ; then
          if [ -r ${srcdir}/configure ] ; then
            echo '***' Running the local configure script. 1>&2
            echo '***' Running the local configure script. 1>&2
            case "${cache_file}" in
            case "${cache_file}" in
            "") cache_file_option= ;;
            "") cache_file_option= ;;
            *)  cache_file_option="--cache-file=${cache_file}" ;;
            *)  cache_file_option="--cache-file=${cache_file}" ;;
            esac
            esac
            srcdiroption="--srcdir=${srcdir}"
            srcdiroption="--srcdir=${srcdir}"
            case "${build_alias}" in
            case "${build_alias}" in
            "") buildopt= ;;
            "") buildopt= ;;
            *)  buildopt="--build=${build_alias}" ;;
            *)  buildopt="--build=${build_alias}" ;;
            esac
            esac
            eval exec ${config_shell} ${srcdir}/configure ${verbose} \
            eval exec ${config_shell} ${srcdir}/configure ${verbose} \
                ${buildopt} --host=${host_alias} --target=${target_alias} \
                ${buildopt} --host=${host_alias} --target=${target_alias} \
                ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
                ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
                ${srcdiroption} ${diroptions} \
                ${srcdiroption} ${diroptions} \
                ${program_prefixoption} ${program_suffixoption} \
                ${program_prefixoption} ${program_suffixoption} \
                ${program_transform_nameoption} ${site_option} \
                ${program_transform_nameoption} ${site_option} \
                ${withoptions} ${withoutoptions} \
                ${withoptions} ${withoutoptions} \
                ${enableoptions} ${disableoptions} ${floating_pointoption} \
                ${enableoptions} ${disableoptions} ${floating_pointoption} \
                ${cache_file_option} ${removing} ${other_options} ${redirect}
                ${cache_file_option} ${removing} ${other_options} ${redirect}
          else
          else
            echo '***' There is no configure script present though. 1>&2
            echo '***' There is no configure script present though. 1>&2
          fi
          fi
        fi
        fi
        exit 1
        exit 1
        ;;
        ;;
*) ;;
*) ;;
esac
esac
case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
"")
"")
        echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
        echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
        exit 1
        exit 1
        ;;
        ;;
*) ;;
*) ;;
esac
esac
case "${TMPDIR}" in
case "${TMPDIR}" in
"") TMPDIR=/tmp ; export TMPDIR ;;
"") TMPDIR=/tmp ; export TMPDIR ;;
*) ;;
*) ;;
esac
esac
# keep this filename short for &%*%$*# 14 char file names and 8+3 file names
# keep this filename short for &%*%$*# 14 char file names and 8+3 file names
tmpdir=${TMPDIR}/cNf$$
tmpdir=${TMPDIR}/cNf$$
mkdir ${tmpdir} || exit 1
mkdir ${tmpdir} || exit 1
tmpfile=${tmpdir}/cNf$$
tmpfile=${tmpdir}/cNf$$
# Note that under many versions of sh a trap handler for 0 will *override* any
# 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
# 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
# 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
# the "exit 1".  Don't use "exit 0" anywhere after this without resetting the
# trap handler, or you'll lose.
# trap handler, or you'll lose.
trap "rm -rf Makefile.tem ${tmpdir}; exit 1" 0 1 2 15
trap "rm -rf Makefile.tem ${tmpdir}; exit 1" 0 1 2 15
# split ${srcdir}/configure.in into common, per-host, per-target,
# split ${srcdir}/configure.in into common, per-host, per-target,
# and post-target parts.  Post-target is optional.
# and post-target parts.  Post-target is optional.
sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
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
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
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,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
  sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
  sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
else
else
  sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
  sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
  echo >${tmpfile}.pos
  echo >${tmpfile}.pos
fi
fi
### do common part of configure.in
### do common part of configure.in
# If the language specific compiler does not exist, but the "gcc" directory does,
# 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
# 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
# of configure.in will create a small shell script "skip-this-dir" containing
# commands to completely clean up any temporary or created files.
# commands to completely clean up any temporary or created files.
. ${tmpfile}.com
. ${tmpfile}.com
if test -f skip-this-dir; then
if test -f skip-this-dir; then
        # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
        # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
        # and reset the trap handler.
        # and reset the trap handler.
        trap 0
        trap 0
        rm -rf Makefile* ${tmpdir}
        rm -rf Makefile* ${tmpdir}
        # Execute the final clean-up actions
        # Execute the final clean-up actions
        ${config_shell} skip-this-dir
        ${config_shell} skip-this-dir
        # and stop configuring this directory.
        # and stop configuring this directory.
        exit 0
        exit 0
fi
fi
# some sanity checks on configure.in
# some sanity checks on configure.in
case "${srctrigger}" in
case "${srctrigger}" in
"")
"")
        echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in.  1>&2
        echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in.  1>&2
        exit 1
        exit 1
        ;;
        ;;
*) ;;
*) ;;
esac
esac
case "${build_alias}" in
case "${build_alias}" in
"")
"")
        if result=`${config_shell} ${configsub} ${host_alias}` ; then
        if result=`${config_shell} ${configsub} ${host_alias}` ; then
            build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
            build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
            build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
            build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
            build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
            build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
            build=${build_cpu}-${build_vendor}-${build_os}
            build=${build_cpu}-${build_vendor}-${build_os}
            build_alias=${host_alias}
            build_alias=${host_alias}
        fi
        fi
        ;;
        ;;
*)
*)
        if result=`${config_shell} ${configsub} ${build_alias}` ; then
        if result=`${config_shell} ${configsub} ${build_alias}` ; then
            buildopt="--build=${build_alias}"
            buildopt="--build=${build_alias}"
            build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
            build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
            build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
            build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
            build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
            build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
            build=${build_cpu}-${build_vendor}-${build_os}
            build=${build_cpu}-${build_vendor}-${build_os}
        else
        else
            echo "Unrecognized build system name ${build_alias}." 1>&2
            echo "Unrecognized build system name ${build_alias}." 1>&2
            exit 1
            exit 1
        fi
        fi
        ;;
        ;;
esac
esac
if result=`${config_shell} ${configsub} ${host_alias}` ; then
if result=`${config_shell} ${configsub} ${host_alias}` ; then
    true
    true
else
else
    echo "Unrecognized host system name ${host_alias}." 1>&2
    echo "Unrecognized host system name ${host_alias}." 1>&2
    exit 1
    exit 1
fi
fi
host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
host=${host_cpu}-${host_vendor}-${host_os}
host=${host_cpu}-${host_vendor}-${host_os}
. ${tmpfile}.hst
. ${tmpfile}.hst
if result=`${config_shell} ${configsub} ${target_alias}` ; then
if result=`${config_shell} ${configsub} ${target_alias}` ; then
    true
    true
else
else
    echo "Unrecognized target system name ${target_alias}." 1>&2
    echo "Unrecognized target system name ${target_alias}." 1>&2
    exit 1
    exit 1
fi
fi
target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
target=${target_cpu}-${target_vendor}-${target_os}
target=${target_cpu}-${target_vendor}-${target_os}
. ${tmpfile}.tgt
. ${tmpfile}.tgt
# Find the source files, if location was not specified.
# Find the source files, if location was not specified.
case "${srcdir}" in
case "${srcdir}" in
"")
"")
        srcdirdefaulted=1
        srcdirdefaulted=1
        srcdir=.
        srcdir=.
        if [ ! -r ${srctrigger} ] ; then
        if [ ! -r ${srctrigger} ] ; then
                srcdir=..
                srcdir=..
        fi
        fi
        ;;
        ;;
*) ;;
*) ;;
esac
esac
if [ ! -r ${srcdir}/${srctrigger} ] ; then
if [ ! -r ${srcdir}/${srctrigger} ] ; then
        case "${srcdirdefaulted}" in
        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}`}/${srcdir}" 1>&2 ;;
        *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;;
        *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;;
        esac
        esac
        echo '***' \(At least ${srctrigger} is missing.\) 1>&2
        echo '***' \(At least ${srctrigger} is missing.\) 1>&2
        exit 1
        exit 1
fi
fi
# Some systems (e.g., one of the i386-aix systems the gas testers are
# 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.
# using) don't handle "\$" correctly, so don't use it here.
tooldir='$(exec_prefix)'/${target_alias}
tooldir='$(exec_prefix)'/${target_alias}
if [ "${host_alias}" != "${target_alias}" ] ; then
if [ "${host_alias}" != "${target_alias}" ] ; then
    if [ "${program_prefixoption}" = "" ] ; then
    if [ "${program_prefixoption}" = "" ] ; then
        if [ "${program_suffixoption}" = "" ] ; then
        if [ "${program_suffixoption}" = "" ] ; then
            if [ "${program_transform_nameoption}" = "" ] ; then
            if [ "${program_transform_nameoption}" = "" ] ; then
                program_prefix=${target_alias}- ;
                program_prefix=${target_alias}- ;
            fi
            fi
        fi
        fi
    fi
    fi
fi
fi
# Merge program_prefix and program_suffix onto program_transform_name.
# Merge program_prefix and program_suffix onto program_transform_name.
# (program_suffix used to use $, but it's hard to preserve $ through both
# (program_suffix used to use $, but it's hard to preserve $ through both
# make and sh.)
# make and sh.)
if [ "${program_suffix}" != "" ] ; then
if [ "${program_suffix}" != "" ] ; then
    program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
    program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
fi
fi
if [ "${program_prefix}" != "" ] ; then
if [ "${program_prefix}" != "" ] ; then
    program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
    program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
fi
fi
# If CC and CXX are not set in the environment, and the Makefile
# 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
# exists, try to extract them from it.  This is to handle running
# ./config.status by hand.
# ./config.status by hand.
if [ -z "${CC}" ] && [ -r Makefile ]; then
if [ -z "${CC}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
  sed -n -e ':loop
/\\$/ N
/\\$/ N
s/\\\n//g
s/\\\n//g
t loop
t loop
/^CC[   ]*=/ s/CC[      ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
/^CC[   ]*=/ s/CC[      ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CC=`tail -1 Makefile.cc`
  CC=`tail -1 Makefile.cc`
  rm -f Makefile.cc
  rm -f Makefile.cc
fi
fi
if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
  sed -n -e ':loop
/\\$/ N
/\\$/ N
s/\\\n//g
s/\\\n//g
t loop
t loop
/^CFLAGS[       ]*=/ s/CFLAGS[  ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
/^CFLAGS[       ]*=/ s/CFLAGS[  ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CFLAGS=`tail -1 Makefile.cc`
  CFLAGS=`tail -1 Makefile.cc`
  rm -f Makefile.cc
  rm -f Makefile.cc
fi
fi
if [ -z "${CXX}" ] && [ -r Makefile ]; then
if [ -z "${CXX}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
  sed -n -e ':loop
/\\$/ N
/\\$/ N
s/\\\n//g
s/\\\n//g
t loop
t loop
/^CXX[  ]*=/ s/CXX[     ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
/^CXX[  ]*=/ s/CXX[     ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CXX=`tail -1 Makefile.cc`
  CXX=`tail -1 Makefile.cc`
  rm -f Makefile.cc
  rm -f Makefile.cc
fi
fi
if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
  sed -n -e ':loop
  sed -n -e ':loop
/\\$/ N
/\\$/ N
s/\\\n//g
s/\\\n//g
t loop
t loop
/^CXXFLAGS[     ]*=/ s/CXXFLAGS[        ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
/^CXXFLAGS[     ]*=/ s/CXXFLAGS[        ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
  CXXFLAGS=`tail -1 Makefile.cc`
  CXXFLAGS=`tail -1 Makefile.cc`
  rm -f Makefile.cc
  rm -f Makefile.cc
fi
fi
# Generate a default definition for YACC.  This is used if the makefile can't
# Generate a default definition for YACC.  This is used if the makefile can't
# locate bison or byacc in objdir.
# locate bison or byacc in objdir.
for prog in 'bison -y' byacc yacc
for prog in 'bison -y' byacc yacc
do
do
  set dummy $prog; tmp=$2
  set dummy $prog; tmp=$2
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
  for dir in $PATH; do
    test -z "$dir" && dir=.
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
    if test -f $dir/$tmp; then
      DEFAULT_YACC="$prog"
      DEFAULT_YACC="$prog"
      break
      break
    fi
    fi
  done
  done
  IFS="$save_ifs"
  IFS="$save_ifs"
  test -n "$DEFAULT_YACC" && break
  test -n "$DEFAULT_YACC" && break
done
done
# Generate a default definition for M4.  This is used if the makefile can't
# Generate a default definition for M4.  This is used if the makefile can't
# locate m4 in objdir.
# locate m4 in objdir.
for prog in gm4 gnum4 m4
for prog in gm4 gnum4 m4
do
do
  set dummy $prog; tmp=$2
  set dummy $prog; tmp=$2
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
  for dir in $PATH; do
    test -z "$dir" && dir=.
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
    if test -f $dir/$tmp; then
      DEFAULT_M4="$prog"
      DEFAULT_M4="$prog"
      break
      break
    fi
    fi
  done
  done
  IFS="$save_ifs"
  IFS="$save_ifs"
  test -n "$DEFAULT_M4" && break
  test -n "$DEFAULT_M4" && break
done
done
# Generate a default definition for LEX.  This is used if the makefile can't
# Generate a default definition for LEX.  This is used if the makefile can't
# locate flex in objdir.
# locate flex in objdir.
for prog in flex lex
for prog in flex lex
do
do
  set dummy $prog; tmp=$2
  set dummy $prog; tmp=$2
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
  for dir in $PATH; do
    test -z "$dir" && dir=.
    test -z "$dir" && dir=.
    if test -f $dir/$tmp; then
    if test -f $dir/$tmp; then
      DEFAULT_LEX="$prog"
      DEFAULT_LEX="$prog"
      break
      break
    fi
    fi
  done
  done
  IFS="$save_ifs"
  IFS="$save_ifs"
  test -n "$DEFAULT_LEX" && break
  test -n "$DEFAULT_LEX" && break
done
done
if [ "${build}" != "${host}" ]; then
if [ "${build}" != "${host}" ]; then
  # If we are doing a Canadian Cross, in which the host and build systems
  # 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.
  # 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="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} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET"
  tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
  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} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
  tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
  tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
  tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
  tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
  tools="${tools} OBJCOPY OBJDUMP"
  tools="${tools} OBJCOPY OBJDUMP"
  for var in ${tools}; do
  for var in ${tools}; do
    if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
    if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
      sed -n -e ':loop
      sed -n -e ':loop
/\\$/ N
/\\$/ N
s/\\\n//g
s/\\\n//g
t loop
t loop
/^'"${var}"'[   ]*=/ s/'"${var}"'[      ]*=[    ]*\(.*\)/\1/p' \
/^'"${var}"'[   ]*=/ s/'"${var}"'[      ]*=[    ]*\(.*\)/\1/p' \
        < Makefile > Makefile.v
        < Makefile > Makefile.v
      t=`tail -1 Makefile.v`
      t=`tail -1 Makefile.v`
      if [ -n "${t}" ]; then
      if [ -n "${t}" ]; then
        eval "${var}=\${t}"
        eval "${var}=\${t}"
      fi
      fi
      rm -f Makefile.v
      rm -f Makefile.v
    fi
    fi
  done
  done
  AR=${AR-${host_alias}-ar}
  AR=${AR-${host_alias}-ar}
  AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
  AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
  AS=${AS-${host_alias}-as}
  AS=${AS-${host_alias}-as}
  AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
  AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
  BISON=${BISON-bison}
  BISON=${BISON-bison}
  CC=${CC-${host_alias}-gcc}
  CC=${CC-${host_alias}-gcc}
  CFLAGS=${CFLAGS-"-g -O2"}
  CFLAGS=${CFLAGS-"-g -O2"}
  CXX=${CXX-${host_alias}-c++}
  CXX=${CXX-${host_alias}-c++}
  CXXFLAGS=${CXXFLAGS-"-g -O2"}
  CXXFLAGS=${CXXFLAGS-"-g -O2"}
  CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
  CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
  CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
  CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
  CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
  CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
  GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
  GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
  DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
  DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
  DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
  DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
  GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
  GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
  BUILD_PREFIX=${build_alias}-
  BUILD_PREFIX=${build_alias}-
  BUILD_PREFIX_1=${build_alias}-
  BUILD_PREFIX_1=${build_alias}-
  LD=${LD-${host_alias}-ld}
  LD=${LD-${host_alias}-ld}
  LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
  LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
  MAKEINFO=${MAKEINFO-makeinfo}
  MAKEINFO=${MAKEINFO-makeinfo}
  NM=${NM-${host_alias}-nm}
  NM=${NM-${host_alias}-nm}
  NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
  NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
  RANLIB=${RANLIB-${host_alias}-ranlib}
  RANLIB=${RANLIB-${host_alias}-ranlib}
  RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
  RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
  WINDRES=${WINDRES-${host_alias}-windres}
  WINDRES=${WINDRES-${host_alias}-windres}
  WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
  WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
  OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
  OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
  OBJDUMP=${OBJDUMP-${host_alias}-objdump}
  OBJDUMP=${OBJDUMP-${host_alias}-objdump}
  if [ -z "${YACC}" ]; then
  if [ -z "${YACC}" ]; then
    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
    for dir in $PATH; do
      test -z "$dir" && dir=.
      test -z "$dir" && dir=.
      if test -f $dir/bison; then
      if test -f $dir/bison; then
        YACC="bison -y"
        YACC="bison -y"
        break
        break
      fi
      fi
      if test -f $dir/byacc; then
      if test -f $dir/byacc; then
        YACC=byacc
        YACC=byacc
        break
        break
      fi
      fi
      if test -f $dir/yacc; then
      if test -f $dir/yacc; then
        YACC=yacc
        YACC=yacc
        break
        break
      fi
      fi
    done
    done
    IFS="$save_ifs"
    IFS="$save_ifs"
    if [ -z "${YACC}" ]; then
    if [ -z "${YACC}" ]; then
      YACC="bison -y"
      YACC="bison -y"
    fi
    fi
  fi
  fi
  if [ -z "${LEX}" ]; then
  if [ -z "${LEX}" ]; then
    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
    for dir in $PATH; do
      test -z "$dir" && dir=.
      test -z "$dir" && dir=.
      if test -f $dir/flex; then
      if test -f $dir/flex; then
        LEX=flex
        LEX=flex
        break
        break
      fi
      fi
      if test -f $dir/lex; then
      if test -f $dir/lex; then
        LEX=lex
        LEX=lex
        break
        break
      fi
      fi
    done
    done
    IFS="$save_ifs"
    IFS="$save_ifs"
    LEX=${LEX-flex}
    LEX=${LEX-flex}
  fi
  fi
  # Export variables which autoconf might try to set.
  # Export variables which autoconf might try to set.
  export AS
  export AS
  export AR
  export AR
  export CC_FOR_BUILD
  export CC_FOR_BUILD
  export DLLTOOL
  export DLLTOOL
  export LD
  export LD
  export NM
  export NM
  export RANLIB
  export RANLIB
  export WINDRES
  export WINDRES
  export OBJCOPY
  export OBJCOPY
  export OBJDUMP
  export OBJDUMP
else
else
  # If CC is still not set, try to get gcc.
  # If CC is still not set, try to get gcc.
  if [ -z "${CC}" ]; then
  if [ -z "${CC}" ]; then
    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    for dir in $PATH; do
    for dir in $PATH; do
      test -z "$dir" && dir=.
      test -z "$dir" && dir=.
      if test -f $dir/gcc; then
      if test -f $dir/gcc; then
        CC="gcc"
        CC="gcc"
        echo 'void f(){}' > conftest.c
        echo 'void f(){}' > conftest.c
        if test -z "`${CC} -g -c conftest.c 2>&1`"; then
        if test -z "`${CC} -g -c conftest.c 2>&1`"; then
          CFLAGS=${CFLAGS-"-g -O2"}
          CFLAGS=${CFLAGS-"-g -O2"}
          CXXFLAGS=${CXXFLAGS-"-g -O2"}
          CXXFLAGS=${CXXFLAGS-"-g -O2"}
        else
        else
          CFLAGS=${CFLAGS-"-O2"}
          CFLAGS=${CFLAGS-"-O2"}
          CXXFLAGS=${CXXFLAGS-"-O2"}
          CXXFLAGS=${CXXFLAGS-"-O2"}
        fi
        fi
        rm -f conftest*
        rm -f conftest*
        break
        break
      fi
      fi
    done
    done
    IFS="$save_ifs"
    IFS="$save_ifs"
    CC=${CC-cc}
    CC=${CC-cc}
  else
  else
    if test -z "${CFLAGS}"; then
    if test -z "${CFLAGS}"; then
      # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
      # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
      # is set to a version of gcc.
      # is set to a version of gcc.
      case "${CC}" in
      case "${CC}" in
      *gcc)
      *gcc)
        echo 'void f(){}' > conftest.c
        echo 'void f(){}' > conftest.c
        if test -z "`${CC} -g -c conftest.c 2>&1`"; then
        if test -z "`${CC} -g -c conftest.c 2>&1`"; then
          CFLAGS=${CFLAGS-"-g -O2"}
          CFLAGS=${CFLAGS-"-g -O2"}
          CXXFLAGS=${CXXFLAGS-"-g -O2"}
          CXXFLAGS=${CXXFLAGS-"-g -O2"}
        else
        else
          CFLAGS=${CFLAGS-"-O2"}
          CFLAGS=${CFLAGS-"-O2"}
          CXXFLAGS=${CXXFLAGS-"-O2"}
          CXXFLAGS=${CXXFLAGS-"-O2"}
        fi
        fi
        rm -f conftest*
        rm -f conftest*
        ;;
        ;;
      esac
      esac
    fi
    fi
  fi
  fi
  CXX=${CXX-"c++"}
  CXX=${CXX-"c++"}
  CFLAGS=${CFLAGS-"-g"}
  CFLAGS=${CFLAGS-"-g"}
  CXXFLAGS=${CXXFLAGS-"-g -O2"}
  CXXFLAGS=${CXXFLAGS-"-g -O2"}
fi
fi
export CC
export CC
export CXX
export CXX
export CFLAGS
export CFLAGS
export CXXFLAGS
export CXXFLAGS
all_build_modules=
all_build_modules=
if test x"${build_alias}" != x"${host_alias}"
if test x"${build_alias}" != x"${host_alias}"
then
then
  all_build_modules='$(ALL_BUILD_MODULES_LIST)'
  all_build_modules='$(ALL_BUILD_MODULES_LIST)'
fi
fi
for subdir in . ${subdirs} ; do
for subdir in . ${subdirs} ; do
    # ${subdir} is relative path from . to the directory we're currently
    # ${subdir} is relative path from . to the directory we're currently
    # configuring.
    # configuring.
    # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
    # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
    invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
    invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
    ### figure out what to do with srcdir
    ### figure out what to do with srcdir
    case "${srcdir}" in
    case "${srcdir}" in
        ".")  # no -srcdir option.  We're building in place.
        ".")  # no -srcdir option.  We're building in place.
                makesrcdir=. ;;
                makesrcdir=. ;;
        /* | [A-Za-z]:[\\/]* ) # absolute path
        /* | [A-Za-z]:[\\/]* ) # absolute path
                makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
                makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
                ;;
                ;;
        *) # otherwise relative
        *) # otherwise relative
                case "${subdir}" in
                case "${subdir}" in
                .) makesrcdir=${srcdir} ;;
                .) makesrcdir=${srcdir} ;;
                *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;;
                *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;;
                esac
                esac
                ;;
                ;;
    esac
    esac
    if [ "${subdir}/" != "./" ] ; then
    if [ "${subdir}/" != "./" ] ; then
        Makefile=${subdir}/Makefile
        Makefile=${subdir}/Makefile
    fi
    fi
    if [ ! -d ${subdir} ] ; then
    if [ ! -d ${subdir} ] ; then
        if mkdir ${subdir} ; then
        if mkdir ${subdir} ; then
                true
                true
        else
        else
                echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${subdir}" 1>&2
                echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${subdir}" 1>&2
                exit 1
                exit 1
        fi
        fi
    fi
    fi
    case "${removing}" in
    case "${removing}" in
    "")
    "")
        case "${subdir}" in
        case "${subdir}" in
        .) ;;
        .) ;;
        *) eval echo Building in ${subdir} ${redirect} ;;
        *) eval echo Building in ${subdir} ${redirect} ;;
        esac
        esac
        # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
        # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
        # Set up the list of links to be made.
        # 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.
        # ${links} is the list of link names, and ${files} is the list of names to link to.
        # Make the links.
        # Make the links.
        configlinks="${links}"
        configlinks="${links}"
        if [ -r ${subdir}/config.status ] ; then
        if [ -r ${subdir}/config.status ] ; then
                mv -f ${subdir}/config.status ${subdir}/config.back
                mv -f ${subdir}/config.status ${subdir}/config.back
        fi
        fi
        while [ -n "${files}" ] ; do
        while [ -n "${files}" ] ; do
                # set file to car of files, files to cdr of files
                # set file to car of files, files to cdr of files
                set ${files}; file=$1; shift; files=$*
                set ${files}; file=$1; shift; files=$*
                set ${links}; link=$1; shift; links=$*
                set ${links}; link=$1; shift; links=$*
                if [ ! -r ${srcdir}/${file} ] ; then
                if [ ! -r ${srcdir}/${file} ] ; then
                  if [ ! -r ${file} ] ; then
                  if [ ! -r ${file} ] ; then
                        echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
                        echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
                        echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
                        echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
                        exit 1
                        exit 1
                  else
                  else
                        srcfile=${file}
                        srcfile=${file}
                  fi
                  fi
                else
                else
                        srcfile=${srcdir}/${file}
                        srcfile=${srcdir}/${file}
                fi
                fi
                ${remove} -f ${link}
                ${remove} -f ${link}
                # Make a symlink if possible, otherwise try a hard link
                # Make a symlink if possible, otherwise try a hard link
                if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
                if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
                        true
                        true
                else
                else
                        # We need to re-remove the file because Lynx leaves a
                        # We need to re-remove the file because Lynx leaves a
                        # very strange directory there when it fails an NFS symlink.
                        # very strange directory there when it fails an NFS symlink.
                        ${remove} -r -f ${link}
                        ${remove} -r -f ${link}
                        ${hard_link} ${srcfile} ${link}
                        ${hard_link} ${srcfile} ${link}
                fi
                fi
                if [ ! -r ${link} ] ; then
                if [ ! -r ${link} ] ; then
                        echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
                        echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
                        exit 1
                        exit 1
                fi
                fi
                echo "Linked \"${link}\" to \"${srcfile}\"."
                echo "Linked \"${link}\" to \"${srcfile}\"."
        done
        done
        # Create a .gdbinit file which runs the one in srcdir
        # Create a .gdbinit file which runs the one in srcdir
        # and tells GDB to look there for source files.
        # and tells GDB to look there for source files.
        if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
        if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
                case ${srcdir} in
                case ${srcdir} in
                .) ;;
                .) ;;
                *) cat > ${subdir}/.gdbinit <
                *) cat > ${subdir}/.gdbinit <
# ${NO_EDIT}
# ${NO_EDIT}
dir ${makesrcdir}
dir ${makesrcdir}
dir .
dir .
source ${makesrcdir}/.gdbinit
source ${makesrcdir}/.gdbinit
EOF
EOF
                        ;;
                        ;;
                esac
                esac
        fi
        fi
        # Install a makefile, and make it set VPATH
        # Install a makefile, and make it set VPATH
        # if necessary so that the sources are found.
        # if necessary so that the sources are found.
        # Also change its value of srcdir.
        # Also change its value of srcdir.
        # NOTE: Makefile generation constitutes the majority of the time in configure.  Hence, this section has
        # NOTE: Makefile generation constitutes the majority of the time in configure.  Hence, this section has
        # been somewhat optimized and is perhaps a bit twisty.
        # been somewhat optimized and is perhaps a bit twisty.
        # code is order so as to try to sed the smallest input files we know.
        # 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.
        # 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:
        # the five makefile fragments MUST end up in the resulting Makefile in this order:
        # package macros, target, host, site, and package rules.
        # package macros, target, host, site, and package rules.
        if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
        if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
            # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem.
            # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem.
            rm -f ${subdir}/${Makefile}.tem
            rm -f ${subdir}/${Makefile}.tem
            case "${package_makefile_rules_frag}" in
            case "${package_makefile_rules_frag}" in
              "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
              "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
              *)
              *)
                      if [ ! -f ${package_makefile_rules_frag} ] ; then
                      if [ ! -f ${package_makefile_rules_frag} ] ; then
                              package_makefile_rules_frag=${srcdir}/${package_makefile_rules_frag}
                              package_makefile_rules_frag=${srcdir}/${package_makefile_rules_frag}
                      fi
                      fi
                      if [ -f ${package_makefile_rules_frag} ] ; then
                      if [ -f ${package_makefile_rules_frag} ] ; then
                              sed -e "/^####/  r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem
                              sed -e "/^####/  r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem
                      else
                      else
                              echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2
                              echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
                              cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
                      fi
                      fi
            esac
            esac
            # working copy now in ${Makefile}.tem
            # working copy now in ${Makefile}.tem
            # Conditionalize for this site.
            # Conditionalize for this site.
            rm -f ${Makefile}
            rm -f ${Makefile}
              case "${site}" in
              case "${site}" in
              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
              *)
              *)
                      site_makefile_frag=${srcdir}/config/ms-${site}
                      site_makefile_frag=${srcdir}/config/ms-${site}
                      if [ -f ${site_makefile_frag} ] ; then
                      if [ -f ${site_makefile_frag} ] ; then
                              sed -e "/^####/  r ${site_makefile_frag}" ${subdir}/Makefile.tem \
                              sed -e "/^####/  r ${site_makefile_frag}" ${subdir}/Makefile.tem \
                                      > ${Makefile}
                                      > ${Makefile}
                      else
                      else
                              mv ${subdir}/Makefile.tem ${Makefile}
                              mv ${subdir}/Makefile.tem ${Makefile}
                              site_makefile_frag=
                              site_makefile_frag=
                      fi
                      fi
                      ;;
                      ;;
            esac
            esac
            # working copy now in ${Makefile}
            # working copy now in ${Makefile}
            # Conditionalize the makefile for this host.
            # Conditionalize the makefile for this host.
            rm -f ${subdir}/Makefile.tem
            rm -f ${subdir}/Makefile.tem
            case "${host_makefile_frag}" in
            case "${host_makefile_frag}" in
              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
              *)
              *)
                      if [ ! -f ${host_makefile_frag} ] ; then
                      if [ ! -f ${host_makefile_frag} ] ; then
                              host_makefile_frag=${srcdir}/${host_makefile_frag}
                              host_makefile_frag=${srcdir}/${host_makefile_frag}
                      fi
                      fi
                      if [ -f ${host_makefile_frag} ] ; then
                      if [ -f ${host_makefile_frag} ] ; then
                              sed -e "/^####/  r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                              sed -e "/^####/  r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                      else
                      else
                              echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
                              echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              mv ${Makefile} ${subdir}/Makefile.tem
                              mv ${Makefile} ${subdir}/Makefile.tem
                      fi
                      fi
            esac
            esac
            # working copy now in ${subdir)/Makefile.tem
            # working copy now in ${subdir)/Makefile.tem
            # Conditionalize the makefile for this target.
            # Conditionalize the makefile for this target.
            rm -f ${Makefile}
            rm -f ${Makefile}
            case "${target_makefile_frag}" in
            case "${target_makefile_frag}" in
              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
              *)
              *)
                      if [ ! -f ${target_makefile_frag} ] ; then
                      if [ ! -f ${target_makefile_frag} ] ; then
                              target_makefile_frag=${srcdir}/${target_makefile_frag}
                              target_makefile_frag=${srcdir}/${target_makefile_frag}
                      fi
                      fi
                      if [ -f ${target_makefile_frag} ] ; then
                      if [ -f ${target_makefile_frag} ] ; then
                              sed -e "/^####/  r ${target_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
                              sed -e "/^####/  r ${target_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
                      else
                      else
                              mv ${subdir}/Makefile.tem ${Makefile}
                              mv ${subdir}/Makefile.tem ${Makefile}
                              target_makefile_frag=
                              target_makefile_frag=
                      fi
                      fi
                      ;;
                      ;;
            esac
            esac
            # working copy now in ${Makefile}
            # working copy now in ${Makefile}
            # Emit the default values of this package's macros.
            # Emit the default values of this package's macros.
            rm -f ${subdir}/Makefile.tem
            rm -f ${subdir}/Makefile.tem
            case "${package_makefile_frag}" in
            case "${package_makefile_frag}" in
              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
              *)
              *)
                      if [ ! -f ${package_makefile_frag} ] ; then
                      if [ ! -f ${package_makefile_frag} ] ; then
                              package_makefile_frag=${srcdir}/${package_makefile_frag}
                              package_makefile_frag=${srcdir}/${package_makefile_frag}
                      fi
                      fi
                      if [ -f ${package_makefile_frag} ] ; then
                      if [ -f ${package_makefile_frag} ] ; then
                              sed -e "/^####/  r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                              sed -e "/^####/  r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                      else
                      else
                              echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2
                              echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
                              mv ${Makefile} ${subdir}/Makefile.tem
                              mv ${Makefile} ${subdir}/Makefile.tem
                      fi
                      fi
            esac
            esac
            # real copy now in ${subdir}/Makefile.tem
            # real copy now in ${subdir}/Makefile.tem
            # prepend warning about editing, and a bunch of variables.
            # prepend warning about editing, and a bunch of variables.
            rm -f ${Makefile}
            rm -f ${Makefile}
            cat > ${Makefile} <
            cat > ${Makefile} <
# ${NO_EDIT}
# ${NO_EDIT}
VPATH = ${makesrcdir}
VPATH = ${makesrcdir}
links = ${configlinks}
links = ${configlinks}
host_alias = ${host_alias}
host_alias = ${host_alias}
host_cpu = ${host_cpu}
host_cpu = ${host_cpu}
host_vendor = ${host_vendor}
host_vendor = ${host_vendor}
host_os = ${host_os}
host_os = ${host_os}
host_canonical = ${host_cpu}-${host_vendor}-${host_os}
host_canonical = ${host_cpu}-${host_vendor}-${host_os}
target_alias = ${target_alias}
target_alias = ${target_alias}
target_cpu = ${target_cpu}
target_cpu = ${target_cpu}
target_vendor = ${target_vendor}
target_vendor = ${target_vendor}
target_os = ${target_os}
target_os = ${target_os}
target_canonical = ${target_cpu}-${target_vendor}-${target_os}
target_canonical = ${target_cpu}-${target_vendor}-${target_os}
EOF
EOF
            case "${build}" in
            case "${build}" in
              "") ;;
              "") ;;
              *)  cat >> ${Makefile} << EOF
              *)  cat >> ${Makefile} << EOF
build_alias = ${build_alias}
build_alias = ${build_alias}
build_cpu = ${build_cpu}
build_cpu = ${build_cpu}
build_vendor = ${build_vendor}
build_vendor = ${build_vendor}
build_os = ${build_os}
build_os = ${build_os}
build_canonical = ${build_cpu}-${build_vendor}-${build_os}
build_canonical = ${build_cpu}-${build_vendor}-${build_os}
EOF
EOF
            esac
            esac
            case "${package_makefile_frag}" in
            case "${package_makefile_frag}" in
              "") ;;
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
              /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
              *)  echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
              *)  echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
            esac
            esac
            case "${target_makefile_frag}" in
            case "${target_makefile_frag}" in
              "") ;;
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
              /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
              *)  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
              *)  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
            esac
            esac
            case "${host_makefile_frag}" in
            case "${host_makefile_frag}" in
              "") ;;
              "") ;;
              /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
              /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
              *)  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
              *)  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
            esac
            esac
            if [ "${site_makefile_frag}" != "" ] ; then
            if [ "${site_makefile_frag}" != "" ] ; then
                echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
                echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
            fi
            fi
            echo enable_shared = ${enable_shared} >> ${Makefile}
            echo enable_shared = ${enable_shared} >> ${Makefile}
            echo enable_threads = ${enable_threads} >> ${Makefile}
            echo enable_threads = ${enable_threads} >> ${Makefile}
            # record if we want to rumtime library stuff installed in libsubdir.
            # record if we want to rumtime library stuff installed in libsubdir.
            if test -z "${enable_version_specific_runtime_libs}"; then
            if test -z "${enable_version_specific_runtime_libs}"; then
                echo enable_version_specific_runtime_libs = no >> ${Makefile}
                echo enable_version_specific_runtime_libs = no >> ${Makefile}
            else
            else
                echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
                echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
            fi
            fi
            # Emit a macro which describes the file containing gcc's
            # Emit a macro which describes the file containing gcc's
            # version number.
            # version number.
            echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
            echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
            # And emit a macro defining gcc's version number.
            # And emit a macro defining gcc's version number.
            echo gcc_version = ${gcc_version} >> ${Makefile}
            echo gcc_version = ${gcc_version} >> ${Makefile}
            # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
            # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
            # remove any form feeds.
            # remove any form feeds.
            if [ -z "${subdirs}" ]; then
            if [ -z "${subdirs}" ]; then
                rm -f ${subdir}/Makefile.tm2
                rm -f ${subdir}/Makefile.tm2
                sedtemp=sed.$$
                sedtemp=sed.$$
                cat >$sedtemp <
                cat >$sedtemp <
s:^SUBDIRS[     ]*=.*$:SUBDIRS = ${configdirs}:
s:^SUBDIRS[     ]*=.*$:SUBDIRS = ${configdirs}:
s:^NONSUBDIRS[  ]*=.*$:NONSUBDIRS = ${noconfigdirs}:
s:^NONSUBDIRS[  ]*=.*$:NONSUBDIRS = ${noconfigdirs}:
EOF
EOF
                sed -f $sedtemp \
                sed -f $sedtemp \
                    ${subdir}/Makefile.tem > ${subdir}/Makefile.tm2
                    ${subdir}/Makefile.tem > ${subdir}/Makefile.tm2
                rm -f $sedtemp
                rm -f $sedtemp
                rm -f ${subdir}/Makefile.tem
                rm -f ${subdir}/Makefile.tem
                mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem
                mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem
            fi
            fi
            sed     -e "s|^prefix[      ]*=.*$|prefix = ${prefix}|" \
            sed     -e "s|^prefix[      ]*=.*$|prefix = ${prefix}|" \
                    -e "s|^exec_prefix[         ]*=.*$|exec_prefix = ${exec_prefix}|" \
                    -e "s|^exec_prefix[         ]*=.*$|exec_prefix = ${exec_prefix}|" \
                    -e "s|^bindir[      ]*=.*$|bindir = ${bindir}|" \
                    -e "s|^bindir[      ]*=.*$|bindir = ${bindir}|" \
                    -e "s|^sbindir[     ]*=.*$|sbindir = ${sbindir}|" \
                    -e "s|^sbindir[     ]*=.*$|sbindir = ${sbindir}|" \
                    -e "s|^libexecdir[  ]*=.*$|libexecdir = ${libexecdir}|" \
                    -e "s|^libexecdir[  ]*=.*$|libexecdir = ${libexecdir}|" \
                    -e "s|^datadir[     ]*=.*$|datadir = ${datadir}|" \
                    -e "s|^datadir[     ]*=.*$|datadir = ${datadir}|" \
                    -e "s|^sysconfdir[  ]*=.*$|sysconfdir = ${sysconfdir}|" \
                    -e "s|^sysconfdir[  ]*=.*$|sysconfdir = ${sysconfdir}|" \
                    -e "s|^sharedstatedir[      ]*=.*$|sharedstatedir = ${sharedstatedir}|" \
                    -e "s|^sharedstatedir[      ]*=.*$|sharedstatedir = ${sharedstatedir}|" \
                    -e "s|^localstatedir[       ]*=.*$|localstatedir = ${localstatedir}|" \
                    -e "s|^localstatedir[       ]*=.*$|localstatedir = ${localstatedir}|" \
                    -e "s|^libdir[      ]*=.*$|libdir = ${libdir}|" \
                    -e "s|^libdir[      ]*=.*$|libdir = ${libdir}|" \
                    -e "s|^includedir[  ]*=.*$|includedir = ${includedir}|" \
                    -e "s|^includedir[  ]*=.*$|includedir = ${includedir}|" \
                    -e "s|^oldincludedir[       ]*=.*$|oldincludedir = ${oldincludedir}|" \
                    -e "s|^oldincludedir[       ]*=.*$|oldincludedir = ${oldincludedir}|" \
                    -e "s|^infodir[     ]*=.*$|infodir = ${infodir}|" \
                    -e "s|^infodir[     ]*=.*$|infodir = ${infodir}|" \
                    -e "s|^mandir[      ]*=.*$|mandir = ${mandir}|" \
                    -e "s|^mandir[      ]*=.*$|mandir = ${mandir}|" \
                    -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \
                    -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \
                    -e "/^CC[   ]*=/{
                    -e "/^CC[   ]*=/{
                        :loop1
                        :loop1
                        /\\\\$/ N
                        /\\\\$/ N
                        s/\\\\\\n//g
                        s/\\\\\\n//g
                        t loop1
                        t loop1
                        s%^CC[  ]*=.*$%CC = ${CC}%
                        s%^CC[  ]*=.*$%CC = ${CC}%
                        }" \
                        }" \
                    -e "/^CXX[  ]*=/{
                    -e "/^CXX[  ]*=/{
                        :loop2
                        :loop2
                        /\\\\$/ N
                        /\\\\$/ N
                        s/\\\\\\n//g
                        s/\\\\\\n//g
                        t loop2
                        t loop2
                        s%^CXX[         ]*=.*$%CXX = ${CXX}%
                        s%^CXX[         ]*=.*$%CXX = ${CXX}%
                        }" \
                        }" \
                    -e "/^CFLAGS[       ]*=/{
                    -e "/^CFLAGS[       ]*=/{
                        :loop3
                        :loop3
                        /\\\\$/ N
                        /\\\\$/ N
                        s/\\\\\\n//g
                        s/\\\\\\n//g
                        t loop3
                        t loop3
                        s%^CFLAGS[      ]*=.*$%CFLAGS = ${CFLAGS}%
                        s%^CFLAGS[      ]*=.*$%CFLAGS = ${CFLAGS}%
                        }" \
                        }" \
                    -e "/^CXXFLAGS[     ]*=/{
                    -e "/^CXXFLAGS[     ]*=/{
                        :loop4
                        :loop4
                        /\\\\$/ N
                        /\\\\$/ N
                        s/\\\\\\n//g
                        s/\\\\\\n//g
                        t loop4
                        t loop4
                        s%^CXXFLAGS[    ]*=.*$%CXXFLAGS = ${CXXFLAGS}%
                        s%^CXXFLAGS[    ]*=.*$%CXXFLAGS = ${CXXFLAGS}%
                        }" \
                        }" \
                    -e "s|^SHELL[        ]*=.*$|SHELL = ${config_shell}|" \
                    -e "s|^SHELL[        ]*=.*$|SHELL = ${config_shell}|" \
                    -e "s|^srcdir[      ]*=.*$|srcdir = ${makesrcdir}|" \
                    -e "s|^srcdir[      ]*=.*$|srcdir = ${makesrcdir}|" \
                    -e "s///" \
                    -e "s///" \
                    -e "s:^program_prefix[      ]*=.*$:program_prefix = ${program_prefix}:" \
                    -e "s:^program_prefix[      ]*=.*$:program_prefix = ${program_prefix}:" \
                    -e "s:^program_suffix[      ]*=.*$:program_suffix = ${program_suffix}:" \
                    -e "s:^program_suffix[      ]*=.*$:program_suffix = ${program_suffix}:" \
                    -e "s:^program_transform_name[      ]*=.*$:program_transform_name = ${program_transform_name}:" \
                    -e "s:^program_transform_name[      ]*=.*$:program_transform_name = ${program_transform_name}:" \
                    -e "s|^tooldir[     ]*=.*$|tooldir = ${tooldir}|" \
                    -e "s|^tooldir[     ]*=.*$|tooldir = ${tooldir}|" \
                    -e "s|^build_tooldir[       ]*=.*$|build_tooldir = ${tooldir}|" \
                    -e "s|^build_tooldir[       ]*=.*$|build_tooldir = ${tooldir}|" \
                    -e "s:^DEFAULT_YACC[         ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
                    -e "s:^DEFAULT_YACC[         ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
                    -e "s:^DEFAULT_LEX[  ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
                    -e "s:^DEFAULT_LEX[  ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
                    -e "s:^DEFAULT_M4[  ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
                    -e "s:^DEFAULT_M4[  ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
                    ${subdir}/Makefile.tem >> ${Makefile}
                    ${subdir}/Makefile.tem >> ${Makefile}
            sed -e "s:^GDB_TK[   ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
            sed -e "s:^GDB_TK[   ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
            mv -f ${Makefile}.tem ${Makefile}
            mv -f ${Makefile}.tem ${Makefile}
            # If this is a Canadian Cross, preset the values of many more
            # If this is a Canadian Cross, preset the values of many more
            # tools.
            # tools.
            if [ "${build}" != "${host}" ]; then
            if [ "${build}" != "${host}" ]; then
                for var in ${tools}; do
                for var in ${tools}; do
                    eval val=\$${var}
                    eval val=\$${var}
                    sed -e "/^${var}[   ]*=/{
                    sed -e "/^${var}[   ]*=/{
                           :loop1
                           :loop1
                           /\\\\$/ N
                           /\\\\$/ N
                           /\\\\$/ b loop1
                           /\\\\$/ b loop1
                           s/\\\\\\n//g
                           s/\\\\\\n//g
                           s%^${var}[   ]*=.*$%${var} = ${val}%
                           s%^${var}[   ]*=.*$%${var} = ${val}%
                           }" ${Makefile} > ${Makefile}.tem
                           }" ${Makefile} > ${Makefile}.tem
                    mv -f ${Makefile}.tem ${Makefile}
                    mv -f ${Makefile}.tem ${Makefile}
                done
                done
            fi
            fi
            # final copy now in ${Makefile}
            # final copy now in ${Makefile}
        else
        else
           echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
           echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
        fi
        fi
        rm -f ${subdir}/Makefile.tem
        rm -f ${subdir}/Makefile.tem
        case "${host_makefile_frag}" in
        case "${host_makefile_frag}" in
        "") using= ;;
        "") using= ;;
        *) using="and \"${host_makefile_frag}\"" ;;
        *) using="and \"${host_makefile_frag}\"" ;;
        esac
        esac
        case "${target_makefile_frag}" in
        case "${target_makefile_frag}" in
        "") ;;
        "") ;;
        *) using="${using} and \"${target_makefile_frag}\"" ;;
        *) using="${using} and \"${target_makefile_frag}\"" ;;
        esac
        esac
        case "${site_makefile_frag}" in
        case "${site_makefile_frag}" in
        "") ;;
        "") ;;
        *) using="${using} and \"${site_makefile_frag}\"" ;;
        *) using="${using} and \"${site_makefile_frag}\"" ;;
        esac
        esac
        newusing=`echo "${using}" | sed 's/and/using/'`
        newusing=`echo "${using}" | sed 's/and/using/'`
        using=${newusing}
        using=${newusing}
        echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using}
        echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using}
        . ${tmpfile}.pos
        . ${tmpfile}.pos
        # describe the chosen configuration in config.status.
        # describe the chosen configuration in config.status.
        # Make that file a shellscript which will reestablish
        # Make that file a shellscript which will reestablish
        # the same configuration.  Used in Makefiles to rebuild
        # the same configuration.  Used in Makefiles to rebuild
        # Makefiles.
        # Makefiles.
        case "${norecursion}" in
        case "${norecursion}" in
        "") arguments="${arguments} --norecursion" ;;
        "") arguments="${arguments} --norecursion" ;;
        *) ;;
        *) ;;
        esac
        esac
        if [ ${subdir} = . ] ; then
        if [ ${subdir} = . ] ; then
            echo "#!/bin/sh
            echo "#!/bin/sh
# ${NO_EDIT}
# ${NO_EDIT}
# This directory was configured as follows:
# This directory was configured as follows:
${progname}" ${arguments}  "
${progname}" ${arguments}  "
# ${using}" > ${subdir}/config.new
# ${using}" > ${subdir}/config.new
        else
        else
            echo "#!/bin/sh
            echo "#!/bin/sh
# ${NO_EDIT}
# ${NO_EDIT}
# This directory was configured as follows:
# This directory was configured as follows:
cd ${invsubdir}
cd ${invsubdir}
${progname}" ${arguments}  "
${progname}" ${arguments}  "
# ${using}" > ${subdir}/config.new
# ${using}" > ${subdir}/config.new
        fi
        fi
        chmod a+x ${subdir}/config.new
        chmod a+x ${subdir}/config.new
        if [ -r ${subdir}/config.back ] ; then
        if [ -r ${subdir}/config.back ] ; then
                mv -f ${subdir}/config.back ${subdir}/config.status
                mv -f ${subdir}/config.back ${subdir}/config.status
        fi
        fi
        ${config_shell} ${moveifchange} ${subdir}/config.new ${subdir}/config.status
        ${config_shell} ${moveifchange} ${subdir}/config.new ${subdir}/config.status
        ;;
        ;;
    *)  rm -f ${Makefile} ${subdir}/config.status ${links} ;;
    *)  rm -f ${Makefile} ${subdir}/config.status ${links} ;;
    esac
    esac
done
done
# If there are subdirectories, then recur.
# If there are subdirectories, then recur.
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
        for configdir in ${configdirs} ${extraconfigdirs} ; do
        for configdir in ${configdirs} ${extraconfigdirs} ; do
                # If configdir contains ',' it is
                # If configdir contains ',' it is
                # srcdir,builddir,target_alias
                # srcdir,builddir,target_alias
                # These come from extraconfigdirs.
                # These come from extraconfigdirs.
                case ${configdir} in
                case ${configdir} in
                *,*)
                *,*)
                    eval `echo ${configdir} | sed -e 's/\([^,]*\),\([^,]*\),\(.*\)/cfg_dir=\1 bld_dir=\2 tgt_alias=\3/'`
                    eval `echo ${configdir} | sed -e 's/\([^,]*\),\([^,]*\),\(.*\)/cfg_dir=\1 bld_dir=\2 tgt_alias=\3/'`
                    ;;
                    ;;
                *)
                *)
                    cfg_dir=${configdir}
                    cfg_dir=${configdir}
                    bld_dir=${configdir}
                    bld_dir=${configdir}
                    tgt_alias=${target_alias}
                    tgt_alias=${target_alias}
                    ;;
                    ;;
                esac
                esac
                if [ -d ${srcdir}/${cfg_dir} ] ; then
                if [ -d ${srcdir}/${cfg_dir} ] ; then
                        eval echo Configuring ${configdir}... ${redirect}
                        eval echo Configuring ${configdir}... ${redirect}
                        case "${srcdir}" in
                        case "${srcdir}" in
                        ".") ;;
                        ".") ;;
                        *)
                        *)
                                if [ ! -d ./${bld_dir} ] ; then
                                if [ ! -d ./${bld_dir} ] ; then
                                        if mkdir ./${bld_dir} ; then
                                        if mkdir ./${bld_dir} ; then
                                                true
                                                true
                                        else
                                        else
                                                echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${bld_dir}" 1>&2
                                                echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${bld_dir}" 1>&2
                                                exit 1
                                                exit 1
                                        fi
                                        fi
                                fi
                                fi
                                ;;
                                ;;
                        esac
                        esac
                        POPDIR=${PWD=`${PWDCMD-pwd}`}
                        POPDIR=${PWD=`${PWDCMD-pwd}`}
                        cd ${bld_dir}
                        cd ${bld_dir}
### figure out what to do with srcdir
### figure out what to do with srcdir
                        case "${srcdir}" in
                        case "${srcdir}" in
                        ".") newsrcdir=${srcdir} ;; # no -srcdir option.  We're building in place.
                        ".") newsrcdir=${srcdir} ;; # no -srcdir option.  We're building in place.
                        /* | [A-Za-z]:[\\/]* ) # absolute path
                        /* | [A-Za-z]:[\\/]* ) # absolute path
                                newsrcdir=${srcdir}/${cfg_dir}
                                newsrcdir=${srcdir}/${cfg_dir}
                                srcdiroption="--srcdir=${newsrcdir}"
                                srcdiroption="--srcdir=${newsrcdir}"
                                ;;
                                ;;
                        *) # otherwise relative
                        *) # otherwise relative
                                newsrcdir=../${srcdir}/${cfg_dir}
                                newsrcdir=../${srcdir}/${cfg_dir}
                                srcdiroption="--srcdir=${newsrcdir}"
                                srcdiroption="--srcdir=${newsrcdir}"
                                ;;
                                ;;
                        esac
                        esac
                        # Handle --cache-file=../XXX
                        # Handle --cache-file=../XXX
                        case "${cache_file}" in
                        case "${cache_file}" in
                        "") # empty
                        "") # empty
                                ;;
                                ;;
                        /* | [A-Za-z]:[\\/]* ) # absolute path
                        /* | [A-Za-z]:[\\/]* ) # absolute path
                                cache_file_option="--cache-file=${cache_file}"
                                cache_file_option="--cache-file=${cache_file}"
                                ;;
                                ;;
                        *) # relative path
                        *) # relative path
                                cache_file_option="--cache-file=../${cache_file}"
                                cache_file_option="--cache-file=../${cache_file}"
                                ;;
                                ;;
                        esac
                        esac
### check for guested configure, otherwise fix possibly relative progname
### check for guested configure, otherwise fix possibly relative progname
                        if [ -f ${newsrcdir}/configure ] ; then
                        if [ -f ${newsrcdir}/configure ] ; then
                                recprog=${newsrcdir}/configure
                                recprog=${newsrcdir}/configure
                        elif [ -f ${newsrcdir}/configure.in ] ; then
                        elif [ -f ${newsrcdir}/configure.in ] ; then
                                case "${progname}" in
                                case "${progname}" in
                                /* | [A-Za-z]:[\\/]* )  recprog=${progname} ;;
                                /* | [A-Za-z]:[\\/]* )  recprog=${progname} ;;
                                *)                      recprog=../${progname} ;;
                                *)                      recprog=../${progname} ;;
                                esac
                                esac
                        else
                        else
                                eval echo No configuration information in ${cfg_dir} ${redirect}
                                eval echo No configuration information in ${cfg_dir} ${redirect}
                                recprog=
                                recprog=
                        fi
                        fi
### The recursion line is here.
### The recursion line is here.
                        if [ ! -z "${recprog}" ] ; then
                        if [ ! -z "${recprog}" ] ; then
                                if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${tgt_alias} \
                                if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${tgt_alias} \
                                        ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
                                        ${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
                                        ${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
                                        true
                                else
                                else
                                        echo Configure in `${PWDCMD-pwd}` failed, exiting. 1>&2
                                        echo Configure in `${PWDCMD-pwd}` failed, exiting. 1>&2
                                        exit 1
                                        exit 1
                                fi
                                fi
                        fi
                        fi
                        cd ${POPDIR}
                        cd ${POPDIR}
                fi
                fi
        done
        done
fi
fi
# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
# and reset the trap handler.
# and reset the trap handler.
rm -rf ${tmpdir}
rm -rf ${tmpdir}
trap 0
trap 0
exit 0
exit 0
#
#
# Local Variables:
# Local Variables:
# fill-column: 131
# fill-column: 131
# End:
# End:
#
#
# end of configure
# end of configure
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.