OSDN Git Service

Regenerate after this patch:
[pf3gnuchains/gcc-fork.git] / configure
index a5d82c8..e137fbc 100755 (executable)
--- a/configure
+++ b/configure
@@ -86,7 +86,7 @@ subdirs=
 target_alias=NOTARGET
 target_makefile_frag=
 undefs=NOUNDEFS
-version="$Revision: 1.22 $"
+version="$Revision: 1.24 $"
 x11=default
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
@@ -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-*)
@@ -586,12 +586,12 @@ esac
 # 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}`
+    gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
 else
     # If gcc's sources are available, define the trigger file.
     if [ -f ${topsrcdir}/gcc/version.c ] ; then
        gcc_version_trigger=${topsrcdir}/gcc/version.c
-       gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
+       gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
        case "$arguments" in
          *--with-gcc-version-trigger=$gcc_version_trigger* )
            ;;
@@ -677,8 +677,24 @@ fi
 
 ### do common part of configure.in
 
+# If the language specific compiler does not exist, but the "gcc" directory does,
+# we will skip this directory; in this case the sub-directory's common part
+# of configure.in will create a small shell script "skip-this-dir" containing
+# commands to completely clean up any temporary or created files.
+
 . ${tmpfile}.com
 
+if test -f skip-this-dir; then
+       # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
+       # and reset the trap handler.
+       trap 0
+       rm -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
 case "${srctrigger}" in
 "")
@@ -897,7 +913,7 @@ if [ "${build}" != "${host}" ]; then
   tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
 
   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
@@ -906,7 +922,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
@@ -1315,35 +1331,6 @@ EOF
                 echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
             fi 
 
-           # provide a proper gxx_include_dir to all subdirs.
-           # Note, if you change the default, make sure to fix both here
-           # and in the gcc subdirectory.
-           # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
-           gxx_include_dir=
-           if test -n "${with_gxx_include_dir}"; then
-               case "${with_gxx_include_dir}" in
-                 yes )
-                   echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2
-                   exit 1
-                   ;;
-                 no )
-                   ;;
-                 * )
-                   gxx_include_dir=${with_gxx_include_dir}
-                   ;;
-               esac
-           fi
-           if test x${gxx_include_dir} = x; then
-               if test x${enable_version_specific_runtime_libs} = xyes; then
-                   echo gxx_include_dir = '${libsubdir}/include/g++' >> ${Makefile}
-               else
-                   . ${topsrcdir}/config.if
-                   echo gxx_include_dir = '${prefix}/include/g++'-${libstdcxx_interface} >> ${Makefile}
-               fi
-           else
-               echo gxx_include_dir = ${gxx_include_dir} >> ${Makefile}
-           fi
-
            # record if we want to build shared libs.
            if test -z "${enable_shared}"; then
                echo enable_shared = no >> ${Makefile}
@@ -1423,6 +1410,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}:" \
@@ -1432,7 +1420,7 @@ EOF
            # tools.
            if [ "${build}" != "${host}" ]; then
                for var in ${tools}; do
-                   val=`eval 'echo $'"${var}"`
+                   eval val=\$${var}
                    sed -e "/^${var}[   ]*=/{
                           :loop1
                           /\\\\$/ N