* Makefile.in: Add support for xstormy16.
[deliverable/binutils-gdb.git] / configure
index fb636f84954ca45c26c8d722eb24bfe9dd8aa3d1..9a8b19743bfc370d8b87c05d43f99542d6f467d7 100755 (executable)
--- a/configure
+++ b/configure
@@ -237,7 +237,7 @@ do
                esac
 
                enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
-               eval "$enableopt='$optarg'"
+               eval "$enableopt=\$optarg"
                enableoptions="$enableoptions '$option'"
                ;;
        --exec-prefix* | --ex*)
@@ -370,7 +370,7 @@ do
                esac
 
                withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
-               eval $withopt="$optarg"
+               eval $withopt="\$optarg"
                withoptions="$withoptions $option"
                ;;
        --without-*)
@@ -450,7 +450,7 @@ case "${fatal}" in
                                        fi
                                        ;;
                                esac
-                               echo "Configuring for a ${host_alias} host." 1>&2
+                               echo "Configuring for a ${host_alias} host."
                                arguments="--host=$host_alias $arguments"
                        else
                                echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
@@ -518,7 +518,8 @@ fi
 
 configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
 moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
-topsrcdir=`cd \`dirname ${progname}\`; pwd`
+## the sed command below emulates the dirname command
+topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd`
 
 
 # this is a hack.  sun4 must always be a valid host alias or this will fail.
@@ -576,7 +577,6 @@ case "${srcdir}" in
         fi
 esac
 
-
 # default exec_prefix
 case "${exec_prefixoption}" in
 "") exec_prefix="\$(prefix)" ;;
@@ -753,30 +753,6 @@ target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 target=${target_cpu}-${target_vendor}-${target_os}
 
-# We have to make sure the gcc directory exists for the non-canadian
-# cross compiler if necessary. In that case, we will run the cross
-# compiler we just build to compile other stuff. Due to how the cross
-# compiler finds the C header files, the gcc directory may be needed
-# for successful cross-compilation. This sanity check can be disabled
-# by passing
-#
-#      --disable-target-dir-sanity-checking
-#
-# to configure.
-if test x${target} != x${build} && test x${build} = x${host} ; then
-    if test x${enable_target_dir_sanity_checking} != xno \
-       && test x${gcc_version} != x \
-       && test -d ${prefix}/${target_alias} \
-       && test ! -d ${prefix}/lib/gcc-lib/${target_alias}/${gcc_version} ; then
-       echo "Please create the directory:" 1>&2
-       echo 1>&2
-       echo "  ${prefix}/lib/gcc-lib/${target_alias}/${gcc_version}" 1>&2
-       echo 1>&2
-       echo "first for successful cross-compilation." 1>&2
-       exit 1
-    fi
-fi
-
 . ${tmpfile}.tgt
 
 # Find the source files, if location was not specified.
@@ -936,9 +912,10 @@ if [ "${build}" != "${host}" ]; then
   tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
   tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
   tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
+  tools="${tools} OBJCOPY OBJDUMP"
 
   for var in ${tools}; do
-    if [ -z "`eval 'echo $'"${var}"`" ] && [ -r Makefile ]; then
+    if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
       sed -n -e ':loop
 /\\$/ N
 s/\\\n//g
@@ -947,7 +924,7 @@ t loop
        < Makefile > Makefile.v
       t=`tail -1 Makefile.v`
       if [ -n "${t}" ]; then
-       eval "${var}='${t}'"
+       eval "${var}=\${t}"
       fi
       rm -f Makefile.v
     fi
@@ -979,6 +956,8 @@ t loop
   RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
   WINDRES=${WINDRES-${host_alias}-windres}
   WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
+  OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
+  OBJDUMP=${OBJDUMP-${host_alias}-objdump}
 
   if [ -z "${YACC}" ]; then
     IFS="${IFS=        }"; save_ifs="$IFS"; IFS="${IFS}:"
@@ -1029,6 +1008,8 @@ t loop
   export NM
   export RANLIB
   export WINDRES
+  export OBJCOPY
+  export OBJDUMP
 else
   # If CC is still not set, try to get gcc.
   if [ -z "${CC}" ]; then
@@ -1097,6 +1078,12 @@ else
        GDB_TK=""
 fi
 
+all_build_modules=
+if test x"${build_alias}" != x"${host_alias}"
+then
+  all_build_modules='$(ALL_BUILD_MODULES_LIST)'
+fi
+
 for subdir in . ${subdirs} ; do
 
     # ${subdir} is relative path from . to the directory we're currently
@@ -1397,6 +1384,7 @@ EOF
                     -e "s|^oldincludedir[      ]*=.*$|oldincludedir = ${oldincludedir}|" \
                     -e "s|^infodir[    ]*=.*$|infodir = ${infodir}|" \
                     -e "s|^mandir[     ]*=.*$|mandir = ${mandir}|" \
+                   -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \
                    -e "/^CC[   ]*=/{
                        :loop1
                        /\\\\$/ N
@@ -1432,6 +1420,7 @@ EOF
                     -e "s:^program_suffix[     ]*=.*$:program_suffix = ${program_suffix}:" \
                     -e "s:^program_transform_name[     ]*=.*$:program_transform_name = ${program_transform_name}:" \
                     -e "s|^tooldir[    ]*=.*$|tooldir = ${tooldir}|" \
+                    -e "s|^build_tooldir[      ]*=.*$|build_tooldir = ${tooldir}|" \
                    -e "s:^DEFAULT_YACC[         ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
                    -e "s:^DEFAULT_LEX[  ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
                    -e "s:^DEFAULT_M4[  ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
@@ -1444,7 +1433,7 @@ EOF
            # tools.
            if [ "${build}" != "${host}" ]; then
                for var in ${tools}; do
-                   val=`eval 'echo $'"${var}"`
+                   eval val=\$${var}
                    sed -e "/^${var}[   ]*=/{
                           :loop1
                           /\\\\$/ N
This page took 0.041957 seconds and 4 git commands to generate.