2002-12-04 David Carlton <carlton@math.stanford.edu>
[deliverable/binutils-gdb.git] / configure
index 362ccec1e37d2b28bd6c23e87503e557805cd915..9fe331424b7d8b5cb81cc010e37bd13fa6920452 100755 (executable)
--- a/configure
+++ b/configure
@@ -585,28 +585,6 @@ case "${exec_prefixoption}" in
 *) ;;
 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=`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=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
-       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.
 case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
 "")
@@ -682,24 +660,8 @@ 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 -rf Makefile* ${tmpdir}
-       # 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
 "")
@@ -936,6 +898,7 @@ t loop
 
   AR=${AR-${host_alias}-ar}
   AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
+  AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
   AS=${AS-${host_alias}-as}
   AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
   BISON=${BISON-bison}
@@ -957,6 +920,7 @@ t loop
   MAKEINFO=${MAKEINFO-makeinfo}
   NM=${NM-${host_alias}-nm}
   NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
+  NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
   RANLIB=${RANLIB-${host_alias}-ranlib}
   RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
   WINDRES=${WINDRES-${host_alias}-windres}
@@ -1032,6 +996,7 @@ else
 
   AR=ar
   AR_FOR_TARGET='\$(USUAL_AR_FOR_TARGET)'
+  AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
   AS=as
   AS_FOR_TARGET='\$(USUAL_AS_FOR_TARGET)'
   BISON='$(USUAL_BISON)'
@@ -1046,6 +1011,7 @@ else
   MAKEINFO='\$(USUAL_MAKEINFO)'
   NM=nm
   NM_FOR_TARGET='\$(USUAL_NM_FOR_TARGET)'
+  NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
   RANLIB_FOR_TARGET='\$(USUAL_RANLIB_FOR_TARGET)'
   WINDRES=windres
   WINDRES_FOR_TARGET='\$(USUAL_WINDRES_FOR_TARGET)'
@@ -1103,12 +1069,6 @@ export CXX
 export CFLAGS
 export CXXFLAGS
 
-all_build_modules=
-if test x"${build_alias}" != x"${host_alias}"
-then
-  all_build_modules='$(ALL_BUILD_MODULES_LIST)'
-fi
-
 # 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.
@@ -1272,83 +1232,40 @@ if [ -f ${srcdir}/${Makefile_in} ] ; then
   esac
   # real copy now in ./Makefile.tem
 
-  # prepend warning about editing, and a bunch of variables.
-  rm -f ${Makefile}
-  cat > ${Makefile} <<EOF
-# ${NO_EDIT}
-VPATH = ${srcdir}
-links = ${configlinks}
-host_alias = ${host_alias}
-host_cpu = ${host_cpu}
-host_vendor = ${host_vendor}
-host_os = ${host_os}
-host_canonical = ${host_cpu}-${host_vendor}-${host_os}
-target_alias = ${target_alias}
-target_cpu = ${target_cpu}
-target_vendor = ${target_vendor}
-target_os = ${target_os}
-target_canonical = ${target_cpu}-${target_vendor}-${target_os}
-EOF
-  case "${build}" in
-    "") ;;
-    *)  cat >> ${Makefile} << EOF
-build_alias = ${build_alias}
-build_cpu = ${build_cpu}
-build_vendor = ${build_vendor}
-build_os = ${build_os}
-build_canonical = ${build_cpu}-${build_vendor}-${build_os}
-EOF
-  esac
-
-  case "${package_makefile_frag}" in
-    "") ;;
-    /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
-    *)  echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
-  esac
-
-  case "${target_makefile_frag}" in
-    "") ;;
-    /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
-    *)  echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
-  esac
-
-  case "${host_makefile_frag}" in
-    "") ;;
-    /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
-    *)  echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
-  esac
-
-  if [ "${site_makefile_frag}" != "" ] ; then
-    echo site_makefile_frag = ${site_makefile_frag} >>${Makefile}
-  fi 
-
-  echo enable_shared = ${enable_shared} >> ${Makefile}
-  echo enable_threads = ${enable_threads} >> ${Makefile}
-  # record if we want to rumtime library stuff installed in libsubdir.
+  # record if we want runtime library stuff installed in libsubdir.
+  # Blank means no.
   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}
+    enable_version_specific_runtime_libs=no
   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}
+  sed -e "s|@configlinks@|${configlinks}|" \
+      -e "s|@build_alias@|${build_alias}|" \
+      -e "s|@build_cpu@|${build_cpu}|" \
+      -e "s|@build_vendor@|${build_vendor}|" \
+      -e "s|@build_os@|${build_os}|" \
+      -e "s|@host_alias@|${host_alias}|" \
+      -e "s|@host_cpu@|${host_cpu}|" \
+      -e "s|@host_vendor@|${host_vendor}|" \
+      -e "s|@host_os@|${host_os}|" \
+      -e "s|@target_alias@|${target_alias}|" \
+      -e "s|@target_cpu@|${target_cpu}|" \
+      -e "s|@target_vendor@|${target_vendor}|" \
+      -e "s|@target_os@|${target_os}|" \
+      -e "s|@target_makefile_frag@|${target_makefile_frag}|" \
+      -e "s|@host_makefile_frag@|${host_makefile_frag}|" \
+      -e "s|@enable_shared@|${enable_shared}|" \
+      -e "s|@enable_threads@|${enable_threads}|" \
+      -e "s|@enable_version_specific_runtime_libs@|${enable_version_specific_runtime_libs}|" \
+      -e "s|@gcc_version_trigger@|${gcc_version_trigger}|" \
+      -e "s|@gcc_version@|${gcc_version}|" \
+      ./Makefile.tem > ${Makefile}
+  mv -f ${Makefile} ./Makefile.tem
+  # Real copy now in Makefile.tem; no prologue.
 
   # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
   # remove any form feeds.
-  rm -f ./Makefile.tm2
-  sedtemp=sed.$$
-  cat >$sedtemp <<EOF
-s:@configdirs@:${configdirs}:
-EOF
-  sed -f $sedtemp ./Makefile.tem > ./Makefile.tm2
-  rm -f $sedtemp
-  rm -f ./Makefile.tem
-  mv ./Makefile.tm2 ./Makefile.tem
-  sed -e "s|@prefix@|${prefix}|" \
+  sed -e "s|@configdirs@|${configdirs}|" \
+      -e "s|@prefix@|${prefix}|" \
       -e "s|@exec_prefix@|${exec_prefix}|" \
       -e "s|@bindir@|${bindir}|" \
       -e "s|@sbindir@|${sbindir}|" \
@@ -1362,7 +1279,6 @@ EOF
       -e "s|@oldincludedir@|${oldincludedir}|" \
       -e "s|@infodir@|${infodir}|" \
       -e "s|@mandir@|${mandir}|" \
-      -e "s|@all_build_modules@|${all_build_modules}|" \
       -e "/^CC[        ]*=/{
           :loop1
           /\\\\$/ N
@@ -1400,9 +1316,7 @@ EOF
       -e "s:@DEFAULT_YACC@:${DEFAULT_YACC}:" \
       -e "s:@DEFAULT_LEX@:${DEFAULT_LEX}:" \
       -e "s:@DEFAULT_M4@:${DEFAULT_M4}:" \
-          ./Makefile.tem >> ${Makefile}
-  sed -e "s:@GDB_TK@:${GDB_TK}:" ${Makefile} >${Makefile}.tem
-  mv -f ${Makefile}.tem ${Makefile}
+          ./Makefile.tem > ${Makefile}
 
   # If this is a Canadian Cross, preset the values of many more
   # tools.
This page took 0.028636 seconds and 4 git commands to generate.