+ if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
+ if test x$with_cpu_32 = x; then
+ with_cpu_32=$with_cpu
+ fi
+ if test x$with_cpu_64 = x; then
+ with_cpu_64=$with_cpu
+ fi
+ with_cpu=
+ fi
+ ;;
+ esac
+fi
+
+# Support for --with-arch and related options (and a few unrelated options,
+# too).
+case ${with_arch} in
+ yes | no)
+ echo "--with-arch must be passed a value" 1>&2
+ exit 1
+ ;;
+esac
+
+# If there is no $with_arch option, try to infer one from ${target}.
+# This block sets nothing except for with_arch.
+if test x$with_arch = x ; then
+ case ${target} in
+ i[34567]86-*-darwin*|x86_64-*-darwin*)
+ # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
+ # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
+ ;;
+ i[34567]86-*-*)
+ # --with-fpmath sets the default ISA to SSE2, which is the same
+ # ISA supported by Pentium 4.
+ if test x$with_fpmath = x || test $arch_without_sse2 = no; then
+ with_arch=$arch
+ else
+ with_arch=pentium4
+ fi
+ ;;
+ x86_64-*-*)
+ with_arch=$arch
+ ;;
+ esac
+
+ # Avoid overriding --with-arch-32 and --with-arch-64 values.
+ case ${target} in
+ i[34567]86-*-darwin*|x86_64-*-darwin*)
+ # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
+ # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
+ ;;
+ i[34567]86-*-*|x86_64-*-*)
+ if test x$with_arch_32 != x || test x$with_arch_64 != x; then
+ if test x$with_arch_32 = x; then
+ with_arch_32=$with_arch
+ fi
+ if test x$with_arch_64 = x; then
+ if test $arch_without_64bit = yes; then
+ # Set the default 64bit arch to x86-64 if the default arch
+ # doesn't support 64bit.
+ with_arch_64=x86-64
+ else
+ with_arch_64=$with_arch
+ fi
+ fi
+ with_arch=
+ elif test $arch_without_64bit$need_64bit_isa = yesyes; then
+ # Set the default 64bit arch to x86-64 if the default arch
+ # doesn't support 64bit and we need 64bit ISA.
+ with_arch_32=$with_arch
+ with_arch_64=x86-64
+ with_arch=