OSDN Git Service

2003-08-23 Phil Edwards <pme@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / configure.in
index c85919c..161ea35 100644 (file)
@@ -23,6 +23,9 @@ AC_PREREQ(2.13)
 AC_CANONICAL_SYSTEM
 AC_ARG_PROGRAM
 
+# Get 'install' or 'install-sh' and its variants.
+AC_PROG_INSTALL
+
 sinclude(config/acx.m4)
 
 ### we might need to use some other shell than /bin/sh for running subshells
@@ -63,8 +66,20 @@ progname=$0
 # if PWD already has a value, it is probably wrong.
 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
 
-# Export original configure arguments for use by sub-configures.
-TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
+# Export original configure arguments for use by sub-configures.  These
+# will be expanded once by make, and once by the shell, so they need to
+# have '$' quoted for make, and then each argument quoted for the shell.
+# What's more, the 'echo' below might expand backslashes.
+cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+tmp="'$progname'"
+for ac_arg
+do
+  tmp="$tmp '"`echo "$ac_arg" | sed -fconftestsed`
+done
+rm -f conftestsed
+TOPLEVEL_CONFIGURE_ARGUMENTS="$tmp"
 AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
 
 moveifchange=${srcdir}/move-if-change
@@ -189,27 +204,9 @@ else
   is_cross_compiler=yes
 fi     
 
-# Find the build and target subdirs.
+# Find the build and target subdir names.
 GCC_TOPLEV_SUBDIRS
 
-if test ! -d ${target_subdir} ; then
-  if mkdir ${target_subdir} ; then true
-  else
-    echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
-    exit 1
-  fi
-fi
-
-if test x"${build_alias}" != x"${host}" ; then
-  if test ! -d ${build_subdir} ; then
-    if mkdir ${build_subdir} ; then true
-    else
-      echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
-      exit 1
-    fi
-  fi
-fi
-
 # Skipdirs are removed silently.
 skipdirs=
 # Noconfigdirs are removed loudly.
@@ -257,7 +254,8 @@ esac
 
 # If both --with-headers and --with-libs are specified, default to
 # --without-newlib.
-if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
+if test x"${with_headers}" != x && test x"${with_headers} != xno \
+   && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
   if test x"${with_newlib}" = x ; then
     with_newlib=no
   fi
@@ -334,6 +332,10 @@ case "${target}" in
   *-*-chorusos)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
+  powerpc-*-darwin*)
+    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
+    noconfigdirs="$noconfigdirs target-libobjc"
+    ;;
   *-*-darwin*)
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
     noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
@@ -396,6 +398,9 @@ case "${target}" in
     # newlib is not 64 bit ready
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
+  am33_2.0-*-linux*)
+    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+    ;;
   sh-*-linux*)
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
     ;;    
@@ -574,7 +579,7 @@ case "${target}" in
     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
     ;;
   m32r-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj} gdb"
+    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
@@ -934,7 +939,7 @@ copy_dirs=
 
 # Handle --with-headers=XXX.  If the value is not "yes", the contents of
 # the named directory are copied to $(tooldir)/sys-include.
-if test x"${with_headers}" != x ; then
+if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
   if test x${is_cross_compiler} = xno ; then
     echo 1>&2 '***' --with-headers is only supported when cross compiling
     exit 1
@@ -951,7 +956,7 @@ fi
 # Handle --with-libs=XXX.  If the value is not "yes", the contents of
 # the name directories are copied to $(tooldir)/lib.  Multiple directories
 # are permitted.
-if test x"${with_libs}" != x ; then
+if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
   if test x${is_cross_compiler} = xno ; then
     echo 1>&2 '***' --with-libs is only supported when cross compiling
     exit 1
@@ -1762,20 +1767,24 @@ AC_SUBST_FILE(serialization_dependencies)
 # Base args.  Strip norecursion, cache-file, srcdir, host, build,
 # target and nonopt.  These are the ones we might not want to pass
 # down to subconfigures.
-baseargs=`echo " ${ac_configure_args} " | \
-       sed -e 's/ --no[[^ ]]* / /' \
-           -e 's/ --c[[a-z-]]*[[= ]][[^ ]]* / /' \
-           -e 's/ --sr[[a-z-]]*[[= ]][[^ ]]* / /' \
-           -e 's/ --ho[[a-z-]]*[[= ]][[^ ]]* / /' \
-           -e 's/ --bu[[a-z-]]*[[= ]][[^ ]]* / /' \
-           -e 's/ --t[[a-z-]]*[[= ]][[^ ]]* / /' \
-           -e 's/ -cache-file[[= ]][[^ ]]* / /' \
-           -e 's/ -srcdir[[= ]][[^ ]]* / /' \
-           -e 's/ -host[[= ]][[^ ]]* / /' \
-           -e 's/ -build[[= ]][[^ ]]* / /' \
-           -e 's/ -target[[= ]][[^ ]]* / /' \
-           -e "s/ [[^' -][^ ]*] / /" \
-           -e 's/^ *//;s/ *$//'`
+cat <<\EOF_SED > conftestsed
+s/ --no[[^ ]]* / /
+s/ --c[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --sr[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --ho[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --bu[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --t[[a-z-]]*[[= ]][[^ ]]* / /
+s/ -cache-file[[= ]][[^ ]]* / /
+s/ -srcdir[[= ]][[^ ]]* / /
+s/ -host[[= ]][[^ ]]* / /
+s/ -build[[= ]][[^ ]]* / /
+s/ -target[[= ]][[^ ]]* / /
+s/ [[^' -][^ ]*] / /
+s/^ *//;s/ *$//
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+baseargs=`echo " ${ac_configure_args} " | sed -fconftestsed`
+rm -f conftestsed
 
 # For the build-side libraries, we just need to pretend we're native,
 # and not use the same cache file.  Multilibs are neither needed nor