Line 1... |
Line 1... |
#!/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, 1997
|
# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
|
# Free Software Foundation, Inc.
|
# 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
|
Line 49... |
Line 49... |
arguments=
|
arguments=
|
build_alias=
|
build_alias=
|
cache_file=config.cache
|
cache_file=config.cache
|
cache_file_option=
|
cache_file_option=
|
configdirs=
|
configdirs=
|
|
extraconfigdirs=
|
diroptions=
|
diroptions=
|
exec_prefix=
|
exec_prefix=
|
exec_prefixoption=
|
exec_prefixoption=
|
fatal=
|
fatal=
|
floating_point=default
|
floating_point=default
|
gas=default
|
gas=default
|
|
gcc_version=
|
|
gcc_version_trigger=
|
host_alias=NOHOST
|
host_alias=NOHOST
|
host_makefile_frag=
|
host_makefile_frag=
|
moveifchange=
|
moveifchange=
|
norecursion=
|
norecursion=
|
other_options=
|
other_options=
|
Line 81... |
Line 84... |
srctrigger=
|
srctrigger=
|
subdirs=
|
subdirs=
|
target_alias=NOTARGET
|
target_alias=NOTARGET
|
target_makefile_frag=
|
target_makefile_frag=
|
undefs=NOUNDEFS
|
undefs=NOUNDEFS
|
version="$Revision: 1.1.1.1 $"
|
version="$Revision: 1.1.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'
|
Line 232... |
Line 235... |
*=*) ;;
|
*=*) ;;
|
*) 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"
|
Line 365... |
Line 368... |
*=*) ;;
|
*=*) ;;
|
*) 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
|
Line 513... |
Line 516... |
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/'`
|
|
topsrcdir=`cd \`dirname ${progname}\`; 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
|
Line 576... |
Line 581... |
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
|
|
# the gcc version number changes.
|
|
if [ "${with_gcc_version_trigger+set}" = set ]; then
|
|
gcc_version_trigger="$with_gcc_version_trigger"
|
|
gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${with_gcc_version_trigger}`
|
|
else
|
|
# If gcc's sources are available, define the trigger file.
|
|
if [ -f ${topsrcdir}/gcc/version.c ] ; then
|
|
gcc_version_trigger=${topsrcdir}/gcc/version.c
|
|
gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
|
|
case "$arguments" in
|
|
*--with-gcc-version-trigger=$gcc_version_trigger* )
|
|
;;
|
|
* )
|
|
# Make sure configure.in knows about this.
|
|
arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
|
|
;;
|
|
esac
|
|
withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
|
|
fi
|
|
fi
|
|
|
### break up ${srcdir}/configure.in.
|
### 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
|
Line 649... |
Line 676... |
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,
|
|
# we will skip this directory; in this case the sub-directory's common part
|
|
# of configure.in will create a small shell script "skip-this-dir" containing
|
|
# commands to completely clean up any temporary or created files.
|
|
|
. ${tmpfile}.com
|
. ${tmpfile}.com
|
|
|
|
if test -f skip-this-dir; then
|
|
# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
|
|
# and reset the trap handler.
|
|
trap 0
|
|
rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
|
|
# Execute the final clean-up actions
|
|
${config_shell} skip-this-dir
|
|
# and stop configuring this directory.
|
|
exit 0
|
|
fi
|
|
|
# some sanity checks on configure.in
|
# some sanity checks on configure.in
|
case "${srctrigger}" in
|
case "${srctrigger}" in
|
"")
|
"")
|
echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2
|
echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2
|
exit 1
|
exit 1
|
Line 760... |
Line 803... |
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}" -a -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}" -a -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}" -a -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}" -a -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
|
Line 819... |
Line 862... |
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
|
|
# locate m4 in objdir.
|
|
|
|
for prog in gm4 gnum4 m4
|
|
do
|
|
set dummy $prog; tmp=$2
|
|
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
|
|
for dir in $PATH; do
|
|
test -z "$dir" && dir=.
|
|
if test -f $dir/$tmp; then
|
|
DEFAULT_M4="$prog"
|
|
break
|
|
fi
|
|
done
|
|
IFS="$save_ifs"
|
|
|
|
test -n "$DEFAULT_M4" && break
|
|
done
|
|
|
# Generate a default definition for LEX. This is used if the makefile can't
|
# 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
|
Line 838... |
Line 900... |
IFS="$save_ifs"
|
IFS="$save_ifs"
|
|
|
test -n "$DEFAULT_LEX" && break
|
test -n "$DEFAULT_LEX" && break
|
done
|
done
|
|
|
|
# BINUTILS LOCAL: This is included in the default CFLAGS when using gcc.
|
|
warn_cflags="-W -Wall"
|
|
|
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"
|
tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET"
|
tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX"
|
tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX"
|
tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
|
tools="${tools} HOST_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"
|
|
|
for var in ${tools}; do
|
for var in ${tools}; do
|
if [ -z "`eval 'echo $'"${var}"`" -a -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
|
|
|
Line 871... |
Line 937... |
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 ${warn_cflags}"}
|
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++}
|
Line 891... |
Line 957... |
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}
|
|
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=.
|
Line 941... |
Line 1009... |
export DLLTOOL
|
export DLLTOOL
|
export LD
|
export LD
|
export NM
|
export NM
|
export RANLIB
|
export RANLIB
|
export WINDRES
|
export WINDRES
|
|
export OBJCOPY
|
|
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 ${warn_cflags}"}
|
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
else
|
else
|
CFLAGS=${CFLAGS-"-O2"}
|
CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"}
|
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
|
|
if test -z "${CFLAGS}"; then
|
|
# Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
|
|
# is set to a version of gcc.
|
|
case "${CC}" in
|
|
*gcc)
|
|
echo 'void f(){}' > conftest.c
|
|
if test -z "`${CC} -g -c conftest.c 2>&1`"; then
|
|
CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"}
|
|
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
|
else
|
|
CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"}
|
|
CXXFLAGS=${CXXFLAGS-"-O2"}
|
|
fi
|
|
rm -f conftest*
|
|
;;
|
|
esac
|
|
fi
|
fi
|
fi
|
|
|
CXX=${CXX-"c++"}
|
CXX=${CXX-"c++"}
|
CFLAGS=${CFLAGS-"-g"}
|
CFLAGS=${CFLAGS-"-g"}
|
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
Line 1048... |
Line 1136... |
# 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
|
|
|
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
|
|
srcfile=${file}
|
|
fi
|
|
else
|
|
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} ${srcdir}/${file} ${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} ${srcdir}/${file} ${link}
|
${hard_link} ${srcfile} ${link}
|
fi
|
fi
|
if [ ! -r ${link} ] ; then
|
if [ ! -r ${link} ] ; then
|
echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
|
echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
|
exit 1
|
exit 1
|
fi
|
fi
|
|
|
echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
|
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.
|
|
|
Line 1241... |
Line 1336... |
|
|
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
|
|
|
# provide a proper gxx_include_dir to all subdirs.
|
# record if we want to build shared libs.
|
# Note, if you change the default, make sure to fix both here
|
if test -z "${enable_shared}"; then
|
# and in the gcc subdirectory.
|
echo enable_shared = no >> ${Makefile}
|
if test -z "${with_gxx_include_dir}"; then
|
|
echo gxx_include_dir = '${prefix}/include/g++' >> ${Makefile}
|
|
else
|
else
|
echo gxx_include_dir = ${with_gxx_include_dir} >> ${Makefile}
|
echo enable_shared = ${enable_shared} >> ${Makefile}
|
fi
|
fi
|
|
# record if we want to rumtime library stuff installed in libsubdir.
|
|
if test -z "${enable_version_specific_runtime_libs}"; then
|
|
echo enable_version_specific_runtime_libs = no >> ${Makefile}
|
|
else
|
|
echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
|
|
fi
|
|
|
|
# Emit a macro which describes the file containing gcc's
|
|
# version number.
|
|
echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
|
|
# And emit a macro defining gcc's version number.
|
|
echo gcc_version = ${gcc_version} >> ${Makefile}
|
|
|
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
|
# 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
|
Line 1309... |
Line 1414... |
-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:^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}:" \
|
${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
|
val=`eval 'echo $'"${var}"`
|
eval val=\$${var}
|
sed -e "/^${var}[ ]*=/{
|
sed -e "/^${var}[ ]*=/{
|
:loop1
|
:loop1
|
/\\\\$/ N
|
/\\\\$/ N
|
/\\\\$/ b loop1
|
/\\\\$/ b loop1
|
s/\\\\\\n//g
|
s/\\\\\\n//g
|
Line 1396... |
Line 1504... |
*) 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}" -a -n "${configdirs}" ] ; then
|
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
|
for configdir in ${configdirs} ; do
|
for configdir in ${configdirs} ${extraconfigdirs} ; do
|
|
|
|
# If configdir contains ',' it is
|
|
# srcdir,builddir,target_alias
|
|
# These come from extraconfigdirs.
|
|
case ${configdir} in
|
|
*,*)
|
|
eval `echo ${configdir} | sed -e 's/\([^,]*\),\([^,]*\),\(.*\)/cfg_dir=\1 bld_dir=\2 tgt_alias=\3/'`
|
|
;;
|
|
*)
|
|
cfg_dir=${configdir}
|
|
bld_dir=${configdir}
|
|
tgt_alias=${target_alias}
|
|
;;
|
|
esac
|
|
|
if [ -d ${srcdir}/${configdir} ] ; 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 ./${configdir} ] ; then
|
if [ ! -d ./${bld_dir} ] ; then
|
if mkdir ./${configdir} ; then
|
if mkdir ./${bld_dir} ; then
|
true
|
true
|
else
|
else
|
echo '***' "${progname}: could not make ${PWD=`pwd`}/${configdir}" 1>&2
|
echo '***' "${progname}: could not make ${PWD=`pwd`}/${bld_dir}" 1>&2
|
exit 1
|
exit 1
|
fi
|
fi
|
fi
|
fi
|
;;
|
;;
|
esac
|
esac
|
|
|
POPDIR=${PWD=`pwd`}
|
POPDIR=${PWD=`pwd`}
|
cd ${configdir}
|
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.
|
/*) # absolute path
|
/*) # absolute path
|
newsrcdir=${srcdir}/${configdir}
|
newsrcdir=${srcdir}/${cfg_dir}
|
srcdiroption="--srcdir=${newsrcdir}"
|
srcdiroption="--srcdir=${newsrcdir}"
|
;;
|
;;
|
?:*) # absolute path on win32
|
?:*) # absolute path on win32
|
newsrcdir=${srcdir}/${configdir}
|
newsrcdir=${srcdir}/${cfg_dir}
|
srcdiroption="--srcdir=${newsrcdir}"
|
srcdiroption="--srcdir=${newsrcdir}"
|
;;
|
;;
|
*) # otherwise relative
|
*) # otherwise relative
|
newsrcdir=../${srcdir}/${configdir}
|
newsrcdir=../${srcdir}/${cfg_dir}
|
srcdiroption="--srcdir=${newsrcdir}"
|
srcdiroption="--srcdir=${newsrcdir}"
|
;;
|
;;
|
esac
|
esac
|
|
|
# Handle --cache-file=../XXX
|
# Handle --cache-file=../XXX
|
Line 1460... |
Line 1582... |
/*) recprog=${progname} ;;
|
/*) recprog=${progname} ;;
|
?:*) recprog=${progname} ;;
|
?:*) recprog=${progname} ;;
|
*) recprog=../${progname} ;;
|
*) recprog=../${progname} ;;
|
esac
|
esac
|
else
|
else
|
eval echo No configuration information in ${configdir} ${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=${target_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 `pwd` failed, exiting. 1>&2
|
echo Configure in `pwd` failed, exiting. 1>&2
|