Don't die on TYPE_CODE_UNDEF nodes as base classes.
[deliverable/binutils-gdb.git] / configure
index dab81462c208e846b8059ffa4aeb5833d474084f..0975c38cab23f90604a06ff525cba760c761b7cd 100755 (executable)
--- a/configure
+++ b/configure
@@ -55,30 +55,29 @@ floating_point=default
 gas=default
 host_alias=
 host_makefile_frag=
+moveifchange=
 next_host=
 next_prefix=
 next_site=
 next_srcdir=
 next_target=
-moveifchange=
 next_tmpdir=
 norecursion=
-removing=
 prefix=/usr/local
 progname=
 program_prefix=
 program_prefix_option=
-silent=
+redirect=">/dev/null"
+removing=
 site=
-site_option=
 site_makefile_frag=
+site_option=
 srcdir=
 srctrigger=
 subdirs=
 target_alias=
 target_makefile_frag=
 undefinedargs=
-verbose=
 version="$Revision$"
 x11=default
 
@@ -93,14 +92,13 @@ NO_EDIT="This file was generated automatically by configure.  Do not edit."
 ## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
 ##
 
-PWD=`pwd`
 progname=$0
 
 case "${progname}" in
 /*) ;;
 */*) ;;
 *)
-       PATH=$PATH:${PWD} ; export PATH
+       PATH=$PATH:${PWD=`pwd`} ; export PATH
        ;;
 esac
 
@@ -182,10 +180,6 @@ do
                -program_prefix | --program_prefix | --program_prefi | --program_pref | --program_pre | --program_pr | --program_p | --program_ | --program | --progra | --progr | --prog | --pro)
                        next_program_prefix=yes
                        ;;
-               -s | -silent | --silent | --silen | --sile | --sil)
-                       silent=true
-                       arguments=`echo ${arguments} | sed "s:${arg}::"`
-                       ;;
                -site=* | --site=* | --sit=* | --si=*)
                        site_option=${arg}
                        site=`echo ${arg} | sed 's/^[-a-z]*=//'`
@@ -223,7 +217,8 @@ do
                        next_tmpdir=yes
                        ;;
                -v | -verbose | --v)
-                       verbose=${arg}
+                       redirect=
+                       verbose=-v
                        ;;
                -version | -V | --version | --V)
                        echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
@@ -365,7 +360,7 @@ case "${srcdir}" in
 ".") ;;
 *)
        if [ -f ${srcdir}/config.status ] ; then
-               echo '***' Cannot configure here in \"${PWD}\" when \"${srcdir}\" is currently configured. 1>&2
+               echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2
                exit 1
        fi
 esac
@@ -421,7 +416,7 @@ fi
 # some sanity checks on configure.in
 case "${srctrigger}" in
 "")
-       echo '***' srctrigger not set in ${PWD}/configure.in.  1>&2
+       echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in.  1>&2
        exit 1
        ;;
 *) ;;
@@ -457,8 +452,8 @@ esac
 
 if [ ! -r ${srcdir}/${srctrigger} ] ; then
        case "${srcdirdefaulted}" in
-       "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD}/${srcdir}" 1>&2 ;;
-       *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD}/. or ${PWD}/.." 1>&2 ;;
+       "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;;
+       *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;;
        esac
 
        echo '***' \(At least ${srctrigger} is missing.\) 1>&2
@@ -482,7 +477,7 @@ for subdir in . ${subdirs} ; do
        *) # otherwise relative
                case "${subdir}" in
                .) makesrcdir=${srcdir} ;;
-               *) makesrcdir=../${srcdir}/${subdir} ;;
+               *) makesrcdir=`echo ${subdir} | sed -e 's:[^./][^./]*:..:g'`/${srcdir}/${subdir} ;;
                esac
                ;;
     esac
@@ -497,16 +492,20 @@ for subdir in . ${subdirs} ; do
 
     case "${removing}" in
     "")
-       if [ -n "${verbose}" -o -z "${silent}" ] ; then
-           echo Building in ${subdir}
-       fi
+       case "${subdir}" in
+       .) ;;
+       *) eval echo Building in ${subdir} ${redirect} ;;
+       esac
+
        # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
        # Set up the list of links to be made.
        # ${links} is the list of link names, and ${files} is the list of names to link to.
 
        # Make the links.
        configlinks="${links}"
-       mv -f config.status config.back
+       if [ -r ${subdir}/config.status ] ; then
+               mv -f ${subdir}/config.status ${subdir}/config.back
+       fi
        while [ -n "${files}" ] ; do
                # set file to car of files, files to cdr of files
                set ${files}; file=$1; shift; files=$*
@@ -527,10 +526,7 @@ for subdir in . ${subdirs} ; do
                        exit 1
                fi
 
-               case "${verbose}" in
-               "") ;;
-               *)  echo "Linked \"${link}\" to \"${srcdir}/${file}\"." ;;
-               esac
+               echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
        done
 
        # Create a .gdbinit file which runs the one in srcdir
@@ -538,8 +534,7 @@ for subdir in . ${subdirs} ; do
 
        if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
                case ${srcdir} in
-               .)
-                       ;;
+               .) ;;
                *) cat > ${subdir}/.gdbinit <<EOF
 # ${NO_EDIT}
 dir .
@@ -591,7 +586,7 @@ EOF
                        sed -e "/^####/  r ${host_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
                else
                        echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
-                       echo '***' is missing in ${PWD}. 1>&2
+                       echo '***' is missing in ${PWD=`pwd`}. 1>&2
                        mv ${subdir}/Makefile.tem ${Makefile}
                fi
        esac
@@ -602,7 +597,9 @@ EOF
        case "${target_makefile_frag}" in
        "") mv ${Makefile} ${subdir}/Makefile.tem ;;
        *)
-               target_makefile_frag=${srcdir}/${target_makefile_frag}
+               if [ ! -f ${target_makefile_frag} ] ; then
+                       target_makefile_frag=${srcdir}/${target_makefile_frag}
+               fi
                if [ -f ${target_makefile_frag} ] ; then
                        sed -e "/^####/  r ${target_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
                else
@@ -628,12 +625,22 @@ target_cpu = ${target_cpu}
 target_vendor = ${target_vendor}
 target_os = ${target_os}
 EOF
-       if [ "${target_makefile_frag}" != "" ] ; then
-           echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile}
-       fi 
-       if [ "${host_makefile_frag}" != "" ] ; then
-           echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile}
-       fi 
+       case "${target_makefile_frag}" in
+       "") ;;
+       /*)
+  echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
+       *)
+  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
+       esac
+
+       case "${host_makefile_frag}" in
+       "") ;;
+       /*)
+  echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
+       *)
+  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
+       esac
+
        if [ "${site_makefile_frag}" != "" ] ; then
            echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
        fi 
@@ -676,24 +683,24 @@ EOF
 
        rm -f ${subdir}/Makefile.tem
 
-       if [ -n "${verbose}" -o -z "${silent}" ] ; then
-               case "${host_makefile_frag}" in
-               "") using= ;;
-               *) using="and \"${host_makefile_frag}\"" ;;
-               esac
+       case "${host_makefile_frag}" in
+       "") using= ;;
+       *) using="and \"${host_makefile_frag}\"" ;;
+       esac
 
-               case "${target_makefile_frag}" in
-               "") ;;
-               *) using="${using} and \"${target_makefile_frag}\"" ;;
-               esac
+       case "${target_makefile_frag}" in
+       "") ;;
+       *) using="${using} and \"${target_makefile_frag}\"" ;;
+       esac
 
-               case "${site_makefile_frag}" in
-               "") ;;
-               *) using="${using} and \"${site_makefile_frag}\"" ;;
-               esac
+       case "${site_makefile_frag}" in
+       "") ;;
+       *) using="${using} and \"${site_makefile_frag}\"" ;;
+       esac
 
-               echo "Created \"${Makefile}\" in" ${PWD} `echo "${using}" | sed 's/and/using/'`
-       fi
+       newusing=`echo "${using}" | sed 's/and/using/'`
+       using=${newusing}
+       echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
 
        . ${tmpfile}.pos
 
@@ -710,20 +717,22 @@ EOF
        if [ ${subdir} = . ] ; then
            echo "#!/bin/sh
 # ${NO_EDIT}
-# ${PWD} was configured as follows:
+# This directory was configured as follows:
 ${progname}" ${arguments}  "
 # ${using}" > ${subdir}/config.new
        else
            echo "#!/bin/sh
 # ${NO_EDIT}
-# ${PWD}/${subdir} was configured as follows:
+# This directory was configured as follows:
 cd ${invsubdir}
 ${progname}" ${arguments}  "
 # ${using}" > ${subdir}/config.new
        fi
        chmod a+x ${subdir}/config.new
-       mv -f config.back config.status
-       ${moveifchange} config.new config.back
+       if [ -r ${subdir}/config.back ] ; then
+               mv -f ${subdir}/config.back ${subdir}/config.status
+       fi
+       ${moveifchange} ${subdir}/config.new ${subdir}/config.status
        ;;
 
     *) rm -f ${Makefile} ${subdir}/config.status ${links} ;;
@@ -733,10 +742,7 @@ done
 # If there are subdirectories, then recur. 
 if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then 
        for configdir in ${configdirs} ; do
-               case "${verbose}" in
-               "") ;;
-               *) echo Configuring ${configdir}... ;;
-               esac
+               eval echo Configuring ${configdir}... ${redirect}
 
                if [ -d ${srcdir}/${configdir} ] ; then
                        case "${srcdir}" in
@@ -748,7 +754,7 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
                                ;;
                        esac
 
-                       POPDIR=${PWD}
+                       POPDIR=${PWD=`pwd`}
                        cd ${configdir} 
 
 ### figure out what to do with srcdir
@@ -775,9 +781,9 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
                        fi
 
 ### The recursion line is here.
-                       if ${recprog} -s ${host_alias} -target=${target_alias} \
-                               ${verbose} ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
-                               ${srcdiroption} ${program_prefixoption} ${site_option} ${removing} ; then
+                       if eval ${recprog} ${verbose} ${host_alias} -target=${target_alias} \
+                               ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
+                               ${srcdiroption} ${program_prefixoption} ${site_option} ${removing} ${redirect} ; then
                                true
                        else
                                exit 1
@@ -785,19 +791,11 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
 
                        cd ${POPDIR}
                else
-                       case "${verbose}" in
-                       "") ;;
-                       *) echo Warning: source directory \"${srcdir}/${configdir}\" is missing. ;;
-                       esac
+                       eval echo Warning: source directory \"${srcdir}/${configdir}\" is missing. ${redirect}
                fi
        done
 fi
 
-### clean up.
-
-# trap cmd above handles this now:
-#rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
-
 exit 0
 
 #
This page took 0.027628 seconds and 4 git commands to generate.