]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/configure
sim: ppc: move libsim.a creation to top-level
[thirdparty/binutils-gdb.git] / sim / configure
index 85a72bfb56b71c98c8d1105d6cc371cd80883948..d7d92c2857ebd1169eae23ee8f39e7ec316d29f9 100755 (executable)
@@ -634,30 +634,226 @@ ac_includes_default="\
 
 ac_header_list=
 ac_func_list=
-enable_option_checking=no
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 SIM_RX_CYCLE_ACCURATE_FLAGS
-sim_reserved_bits
-sim_default_model
-sim_scache
-sim_float
-sim_bitsize
+SIM_RISCV_BITSIZE
+sim_ppc_model_issue
+sim_ppc_default_model
+sim_ppc_model
+sim_ppc_monitor
+sim_ppc_float
+sim_ppc_timebase
+sim_ppc_bitsize
+sim_ppc_igen_smp
+sim_ppc_smp
+sim_ppc_xor_endian
+sim_ppc_hw_obj
+sim_ppc_hw_src
+sim_ppc_icache
+sim_ppc_filter
+sim_ppc_jump
+sim_ppc_decode_mechanism
+sim_ppc_dup
+sim_ppc_switch
+sim_ppc_opcode
+sim_ppc_line_nr
+SIM_MIPS_GEN_MODE_MULTI_FALSE
+SIM_MIPS_GEN_MODE_MULTI_TRUE
+SIM_MIPS_GEN_MODE_M16_FALSE
+SIM_MIPS_GEN_MODE_M16_TRUE
+SIM_MIPS_GEN_MODE_SINGLE_FALSE
+SIM_MIPS_GEN_MODE_SINGLE_TRUE
+SIM_MIPS_MULTI_OBJ
+SIM_MIPS_MULTI_SRC
+SIM_MIPS_MULTI_IGEN_CONFIGS
+SIM_MIPS_IGEN_ITABLE_FLAGS
+SIM_MIPS_GEN
+SIM_MIPS_M16_FLAGS
+SIM_MIPS_SINGLE_FLAGS
+SIM_MIPS_FPU_BITSIZE
+SIM_MIPS_BITSIZE
+SIM_MIPS_SUBTARGET
+SIM_FRV_TRAPDUMP_FLAGS
+SIM_CFLAG_WNO_UNUSED_BUT_SET_VARIABLE
+SIM_CFLAG_WNO_SHADOW_LOCAL
+IGEN_FLAGS_SMP
 SIM_INLINE
-sim_hw_sockser
-sim_hw_cflags
+SIM_HW_SOCKSER
+SIM_HW_CFLAGS
 SIM_ENABLE_HW_FALSE
 SIM_ENABLE_HW_TRUE
 cgen
 cgendir
 CGEN_MAINT
-SIM_ENABLE_IGEN_FALSE
-SIM_ENABLE_IGEN_TRUE
+ENABLE_SIM_FALSE
+ENABLE_SIM_TRUE
+SIM_ENABLE_ARCH_examples_FALSE
+SIM_ENABLE_ARCH_examples_TRUE
+CC_FOR_TARGET_EXAMPLE_SYNACOR
+LD_FOR_TARGET_EXAMPLE_SYNACOR
+AS_FOR_TARGET_EXAMPLE_SYNACOR
+SIM_ENABLE_ARCH_v850_FALSE
+SIM_ENABLE_ARCH_v850_TRUE
+CC_FOR_TARGET_V850
+LD_FOR_TARGET_V850
+AS_FOR_TARGET_V850
+SIM_ENABLE_ARCH_erc32_FALSE
+SIM_ENABLE_ARCH_erc32_TRUE
+CC_FOR_TARGET_ERC32
+LD_FOR_TARGET_ERC32
+AS_FOR_TARGET_ERC32
+SIM_ENABLE_ARCH_sh_FALSE
+SIM_ENABLE_ARCH_sh_TRUE
+CC_FOR_TARGET_SH
+LD_FOR_TARGET_SH
+AS_FOR_TARGET_SH
+SIM_ENABLE_ARCH_rx_FALSE
+SIM_ENABLE_ARCH_rx_TRUE
+CC_FOR_TARGET_RX
+LD_FOR_TARGET_RX
+AS_FOR_TARGET_RX
+SIM_ENABLE_ARCH_rl78_FALSE
+SIM_ENABLE_ARCH_rl78_TRUE
+CC_FOR_TARGET_RL78
+LD_FOR_TARGET_RL78
+AS_FOR_TARGET_RL78
+SIM_ENABLE_ARCH_riscv_FALSE
+SIM_ENABLE_ARCH_riscv_TRUE
+CC_FOR_TARGET_RISCV
+LD_FOR_TARGET_RISCV
+AS_FOR_TARGET_RISCV
+SIM_ENABLE_ARCH_pru_FALSE
+SIM_ENABLE_ARCH_pru_TRUE
+CC_FOR_TARGET_PRU
+LD_FOR_TARGET_PRU
+AS_FOR_TARGET_PRU
+SIM_ENABLE_ARCH_ppc_FALSE
+SIM_ENABLE_ARCH_ppc_TRUE
+CC_FOR_TARGET_PPC
+LD_FOR_TARGET_PPC
+AS_FOR_TARGET_PPC
+SIM_ENABLE_ARCH_or1k_FALSE
+SIM_ENABLE_ARCH_or1k_TRUE
+CC_FOR_TARGET_OR1K
+LD_FOR_TARGET_OR1K
+AS_FOR_TARGET_OR1K
+SIM_ENABLE_ARCH_msp430_FALSE
+SIM_ENABLE_ARCH_msp430_TRUE
+CC_FOR_TARGET_MSP430
+LD_FOR_TARGET_MSP430
+AS_FOR_TARGET_MSP430
+SIM_ENABLE_ARCH_moxie_FALSE
+SIM_ENABLE_ARCH_moxie_TRUE
+CC_FOR_TARGET_MOXIE
+LD_FOR_TARGET_MOXIE
+AS_FOR_TARGET_MOXIE
+SIM_ENABLE_ARCH_mn10300_FALSE
+SIM_ENABLE_ARCH_mn10300_TRUE
+CC_FOR_TARGET_MN10300
+LD_FOR_TARGET_MN10300
+AS_FOR_TARGET_MN10300
+SIM_ENABLE_ARCH_mips_FALSE
+SIM_ENABLE_ARCH_mips_TRUE
+CC_FOR_TARGET_MIPS
+LD_FOR_TARGET_MIPS
+AS_FOR_TARGET_MIPS
+SIM_ENABLE_ARCH_microblaze_FALSE
+SIM_ENABLE_ARCH_microblaze_TRUE
+CC_FOR_TARGET_MICROBLAZE
+LD_FOR_TARGET_MICROBLAZE
+AS_FOR_TARGET_MICROBLAZE
+SIM_ENABLE_ARCH_mcore_FALSE
+SIM_ENABLE_ARCH_mcore_TRUE
+CC_FOR_TARGET_MCORE
+LD_FOR_TARGET_MCORE
+AS_FOR_TARGET_MCORE
+SIM_ENABLE_ARCH_m68hc11_FALSE
+SIM_ENABLE_ARCH_m68hc11_TRUE
+CC_FOR_TARGET_M68HC11
+LD_FOR_TARGET_M68HC11
+AS_FOR_TARGET_M68HC11
+SIM_ENABLE_ARCH_m32r_FALSE
+SIM_ENABLE_ARCH_m32r_TRUE
+CC_FOR_TARGET_M32R
+LD_FOR_TARGET_M32R
+AS_FOR_TARGET_M32R
+SIM_ENABLE_ARCH_m32c_FALSE
+SIM_ENABLE_ARCH_m32c_TRUE
+CC_FOR_TARGET_M32C
+LD_FOR_TARGET_M32C
+AS_FOR_TARGET_M32C
+SIM_ENABLE_ARCH_lm32_FALSE
+SIM_ENABLE_ARCH_lm32_TRUE
+CC_FOR_TARGET_LM32
+LD_FOR_TARGET_LM32
+AS_FOR_TARGET_LM32
+SIM_ENABLE_ARCH_iq2000_FALSE
+SIM_ENABLE_ARCH_iq2000_TRUE
+CC_FOR_TARGET_IQ2000
+LD_FOR_TARGET_IQ2000
+AS_FOR_TARGET_IQ2000
+SIM_ENABLE_ARCH_h8300_FALSE
+SIM_ENABLE_ARCH_h8300_TRUE
+CC_FOR_TARGET_H8300
+LD_FOR_TARGET_H8300
+AS_FOR_TARGET_H8300
+SIM_ENABLE_ARCH_ft32_FALSE
+SIM_ENABLE_ARCH_ft32_TRUE
+CC_FOR_TARGET_FT32
+LD_FOR_TARGET_FT32
+AS_FOR_TARGET_FT32
+SIM_ENABLE_ARCH_frv_FALSE
+SIM_ENABLE_ARCH_frv_TRUE
+CC_FOR_TARGET_FRV
+LD_FOR_TARGET_FRV
+AS_FOR_TARGET_FRV
+SIM_ENABLE_ARCH_d10v_FALSE
+SIM_ENABLE_ARCH_d10v_TRUE
+CC_FOR_TARGET_D10V
+LD_FOR_TARGET_D10V
+AS_FOR_TARGET_D10V
+SIM_ENABLE_ARCH_cris_FALSE
+SIM_ENABLE_ARCH_cris_TRUE
+CC_FOR_TARGET_CRIS
+LD_FOR_TARGET_CRIS
+AS_FOR_TARGET_CRIS
+SIM_ENABLE_ARCH_cr16_FALSE
+SIM_ENABLE_ARCH_cr16_TRUE
+CC_FOR_TARGET_CR16
+LD_FOR_TARGET_CR16
+AS_FOR_TARGET_CR16
+SIM_ENABLE_ARCH_bpf_FALSE
+SIM_ENABLE_ARCH_bpf_TRUE
+CC_FOR_TARGET_BPF
+LD_FOR_TARGET_BPF
+AS_FOR_TARGET_BPF
+SIM_ENABLE_ARCH_bfin_FALSE
+SIM_ENABLE_ARCH_bfin_TRUE
+CC_FOR_TARGET_BFIN
+LD_FOR_TARGET_BFIN
+AS_FOR_TARGET_BFIN
+SIM_ENABLE_ARCH_avr_FALSE
+SIM_ENABLE_ARCH_avr_TRUE
+CC_FOR_TARGET_AVR
+LD_FOR_TARGET_AVR
+AS_FOR_TARGET_AVR
+SIM_ENABLE_ARCH_arm_FALSE
+SIM_ENABLE_ARCH_arm_TRUE
+CC_FOR_TARGET_ARM
+LD_FOR_TARGET_ARM
+AS_FOR_TARGET_ARM
+SIM_ENABLE_ARCH_aarch64_FALSE
+SIM_ENABLE_ARCH_aarch64_TRUE
+CC_FOR_TARGET_AARCH64
+LD_FOR_TARGET_AARCH64
+AS_FOR_TARGET_AARCH64
+LD_FOR_TARGET
+AS_FOR_TARGET
+CC_FOR_TARGET
 subdirs
-SIM_COMMON_BUILD_FALSE
-SIM_COMMON_BUILD_TRUE
-SIM_SUBDIRS
+SIM_ENABLED_ARCHES
 SIM_PRIMARY_TARGET
 AM_BACKSLASH
 AM_DEFAULT_VERBOSITY
@@ -694,9 +890,11 @@ am__isrc
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
+READLINE_CFLAGS
+READLINE_LIB
+TERMCAP_LIB
 SDL_LIBS
 SDL_CFLAGS
-lt_cv_dlopen_libs
 OTOOL64
 OTOOL
 LIPO
@@ -713,22 +911,6 @@ LD
 FGREP
 SED
 LIBTOOL
-PLUGINS_FALSE
-PLUGINS_TRUE
-zlibinc
-zlibdir
-CATOBJEXT
-GENCAT
-INSTOBJEXT
-DATADIRNAME
-CATALOGS
-POSUB
-GMSGFMT
-XGETTEXT
-INCINTL
-LIBINTL_DEP
-LIBINTL
-USE_NLS
 LIBOBJS
 C_DIALECT
 PKG_CONFIG_LIBDIR
@@ -737,6 +919,7 @@ PKG_CONFIG
 RANLIB
 AR
 LDFLAGS_FOR_BUILD
+CPPFLAGS_FOR_BUILD
 CFLAGS_FOR_BUILD
 RANLIB_FOR_BUILD
 CC_FOR_BUILD
@@ -808,6 +991,7 @@ PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
 SHELL
+SIM_TOOLCHAIN_VARS
 WERROR_CFLAGS
 WARN_CFLAGS'
 ac_subst_files=''
@@ -815,8 +999,6 @@ ac_user_opts='
 enable_option_checking
 with_pkgversion
 with_bugurl
-with_system_zlib
-enable_plugins
 enable_shared
 enable_static
 with_pic
@@ -838,11 +1020,33 @@ enable_sim_environment
 enable_sim_hardware
 enable_sim_inline
 enable_sim_profile
+enable_sim_reserved_bits
+enable_sim_scache
+enable_sim_smp
 enable_sim_stdio
 enable_sim_trace
 enable_werror
 enable_build_warnings
 enable_sim_build_warnings
+enable_sim_frv_trapdump
+enable_sim_ppc_bitsize
+enable_sim_ppc_decode_mechanism
+enable_sim_ppc_default_model
+enable_sim_ppc_duplicate
+enable_sim_ppc_filter
+enable_sim_ppc_float
+enable_sim_ppc_hardware
+enable_sim_ppc_icache
+enable_sim_ppc_jump
+enable_sim_ppc_line_nr
+enable_sim_ppc_model
+enable_sim_ppc_model_issue
+enable_sim_ppc_monitor
+enable_sim_ppc_opcode
+enable_sim_ppc_smp
+enable_sim_ppc_switch
+enable_sim_ppc_timebase
+enable_sim_ppc_xor_endian
 enable_sim_rx_cycle_accurate
 '
       ac_precious_vars='build_alias
@@ -858,21 +1062,104 @@ PKG_CONFIG
 PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
 SDL_CFLAGS
-SDL_LIBS'
-ac_subdirs_all='bfin
-bpf
-cris
-frv
-iq2000
-lm32
-m32r
-mips
-mn10300
-or1k
-riscv
-erc32
-ppc
-v850'
+SDL_LIBS
+AS_FOR_TARGET_AARCH64
+LD_FOR_TARGET_AARCH64
+CC_FOR_TARGET_AARCH64
+AS_FOR_TARGET_ARM
+LD_FOR_TARGET_ARM
+CC_FOR_TARGET_ARM
+AS_FOR_TARGET_AVR
+LD_FOR_TARGET_AVR
+CC_FOR_TARGET_AVR
+AS_FOR_TARGET_BFIN
+LD_FOR_TARGET_BFIN
+CC_FOR_TARGET_BFIN
+AS_FOR_TARGET_BPF
+LD_FOR_TARGET_BPF
+CC_FOR_TARGET_BPF
+AS_FOR_TARGET_CR16
+LD_FOR_TARGET_CR16
+CC_FOR_TARGET_CR16
+AS_FOR_TARGET_CRIS
+LD_FOR_TARGET_CRIS
+CC_FOR_TARGET_CRIS
+AS_FOR_TARGET_D10V
+LD_FOR_TARGET_D10V
+CC_FOR_TARGET_D10V
+AS_FOR_TARGET_FRV
+LD_FOR_TARGET_FRV
+CC_FOR_TARGET_FRV
+AS_FOR_TARGET_FT32
+LD_FOR_TARGET_FT32
+CC_FOR_TARGET_FT32
+AS_FOR_TARGET_H8300
+LD_FOR_TARGET_H8300
+CC_FOR_TARGET_H8300
+AS_FOR_TARGET_IQ2000
+LD_FOR_TARGET_IQ2000
+CC_FOR_TARGET_IQ2000
+AS_FOR_TARGET_LM32
+LD_FOR_TARGET_LM32
+CC_FOR_TARGET_LM32
+AS_FOR_TARGET_M32C
+LD_FOR_TARGET_M32C
+CC_FOR_TARGET_M32C
+AS_FOR_TARGET_M32R
+LD_FOR_TARGET_M32R
+CC_FOR_TARGET_M32R
+AS_FOR_TARGET_M68HC11
+LD_FOR_TARGET_M68HC11
+CC_FOR_TARGET_M68HC11
+AS_FOR_TARGET_MCORE
+LD_FOR_TARGET_MCORE
+CC_FOR_TARGET_MCORE
+AS_FOR_TARGET_MICROBLAZE
+LD_FOR_TARGET_MICROBLAZE
+CC_FOR_TARGET_MICROBLAZE
+AS_FOR_TARGET_MIPS
+LD_FOR_TARGET_MIPS
+CC_FOR_TARGET_MIPS
+AS_FOR_TARGET_MN10300
+LD_FOR_TARGET_MN10300
+CC_FOR_TARGET_MN10300
+AS_FOR_TARGET_MOXIE
+LD_FOR_TARGET_MOXIE
+CC_FOR_TARGET_MOXIE
+AS_FOR_TARGET_MSP430
+LD_FOR_TARGET_MSP430
+CC_FOR_TARGET_MSP430
+AS_FOR_TARGET_OR1K
+LD_FOR_TARGET_OR1K
+CC_FOR_TARGET_OR1K
+AS_FOR_TARGET_PPC
+LD_FOR_TARGET_PPC
+CC_FOR_TARGET_PPC
+AS_FOR_TARGET_PRU
+LD_FOR_TARGET_PRU
+CC_FOR_TARGET_PRU
+AS_FOR_TARGET_RISCV
+LD_FOR_TARGET_RISCV
+CC_FOR_TARGET_RISCV
+AS_FOR_TARGET_RL78
+LD_FOR_TARGET_RL78
+CC_FOR_TARGET_RL78
+AS_FOR_TARGET_RX
+LD_FOR_TARGET_RX
+CC_FOR_TARGET_RX
+AS_FOR_TARGET_SH
+LD_FOR_TARGET_SH
+CC_FOR_TARGET_SH
+AS_FOR_TARGET_ERC32
+LD_FOR_TARGET_ERC32
+CC_FOR_TARGET_ERC32
+AS_FOR_TARGET_V850
+LD_FOR_TARGET_V850
+CC_FOR_TARGET_V850
+AS_FOR_TARGET_EXAMPLE_SYNACOR
+LD_FOR_TARGET_EXAMPLE_SYNACOR
+CC_FOR_TARGET_EXAMPLE_SYNACOR'
+
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1491,7 +1778,6 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-plugins        Enable support for plugins
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
@@ -1526,6 +1812,13 @@ Optional Features:
                           Specify which functions should be inlined
   --enable-sim-profile=opts
                           Enable profiling flags
+  --enable-sim-reserved-bits
+                          Specify whether to check reserved bits in
+                          instruction
+  --enable-sim-scache=size
+                          Specify simulator execution cache size
+  --enable-sim-smp=n      Specify number of processors to configure for
+                          (default 1)
   --enable-sim-stdio      Specify whether to use stdio for console
                           input/output
   --enable-sim-trace=opts Enable tracing of simulated programs
@@ -1534,6 +1827,44 @@ Optional Features:
   --enable-sim-build-warnings
                           enable SIM specific build-time compiler warnings if
                           gcc is used
+  --enable-sim-frv-trapdump
+                          Make unknown traps dump the registers
+  --enable-sim-ppc-bitsize=n
+                          Specify target bitsize (32 or 64).
+  --enable-sim-ppc-decode-mechanism=which
+                          Specify the instruction decode mechanism.
+  --enable-sim-ppc-default-model=which
+                          Specify default PowerPC to model.
+  --enable-sim-ppc-duplicate
+                          Expand (duplicate) semantic functions.
+  --enable-sim-ppc-filter=rule
+                          Specify filter rules.
+  --enable-sim-ppc-float  Specify whether the target has hard, soft, altivec
+                          or e500 floating point.
+  --enable-sim-ppc-hardware=list
+                          Specify the hardware to be included in the build.
+  --enable-sim-ppc-icache=size
+                          Specify instruction-decode cache size and type.
+  --enable-sim-ppc-jump   Jump between semantic code (instead of call/return).
+  --enable-sim-ppc-line-nr=opts
+                          Generate extra CPP code that references source
+                          rather than generated code
+  --enable-sim-ppc-model=which
+                          Specify PowerPC to model.
+  --enable-sim-ppc-model-issue
+                          Specify whether to simulate model specific actions
+  --enable-sim-ppc-monitor=mon
+                          Specify whether to enable monitoring events.
+  --enable-sim-ppc-opcode=which
+                          Override default opcode lookup.
+  --enable-sim-ppc-smp=n  Specify number of processors to configure for.
+  --enable-sim-ppc-switch Use a switch instead of a table for instruction
+                          call.
+  --enable-sim-ppc-timebase
+                          Specify whether the PPC timebase is supported.
+  --enable-sim-ppc-xor-endian=n
+                          Specify number bytes involved in PowerPC XOR
+                          bi-endian mode (default 8).
   --disable-sim-rx-cycle-accurate
                           Disable cycle accurate simulation (faster runtime)
 
@@ -1542,7 +1873,6 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-pkgversion=PKG   Use PKG in the version string in place of "SIM"
   --with-bugurl=URL       Direct users to URL to report a bug
-  --with-system-zlib      use installed libz
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -1563,6 +1893,198 @@ Some influential environment variables:
               path overriding pkg-config's built-in search path
   SDL_CFLAGS  C compiler flags for SDL, overriding pkg-config
   SDL_LIBS    linker flags for SDL, overriding pkg-config
+  AS_FOR_TARGET_AARCH64
+              Assembler for aarch64 tests
+  LD_FOR_TARGET_AARCH64
+              Linker for aarch64 tests
+  CC_FOR_TARGET_AARCH64
+              C compiler for aarch64 tests
+  AS_FOR_TARGET_ARM
+              Assembler for arm tests
+  LD_FOR_TARGET_ARM
+              Linker for arm tests
+  CC_FOR_TARGET_ARM
+              C compiler for arm tests
+  AS_FOR_TARGET_AVR
+              Assembler for avr tests
+  LD_FOR_TARGET_AVR
+              Linker for avr tests
+  CC_FOR_TARGET_AVR
+              C compiler for avr tests
+  AS_FOR_TARGET_BFIN
+              Assembler for bfin tests
+  LD_FOR_TARGET_BFIN
+              Linker for bfin tests
+  CC_FOR_TARGET_BFIN
+              C compiler for bfin tests
+  AS_FOR_TARGET_BPF
+              Assembler for bpf tests
+  LD_FOR_TARGET_BPF
+              Linker for bpf tests
+  CC_FOR_TARGET_BPF
+              C compiler for bpf tests
+  AS_FOR_TARGET_CR16
+              Assembler for cr16 tests
+  LD_FOR_TARGET_CR16
+              Linker for cr16 tests
+  CC_FOR_TARGET_CR16
+              C compiler for cr16 tests
+  AS_FOR_TARGET_CRIS
+              Assembler for cris tests
+  LD_FOR_TARGET_CRIS
+              Linker for cris tests
+  CC_FOR_TARGET_CRIS
+              C compiler for cris tests
+  AS_FOR_TARGET_D10V
+              Assembler for d10v tests
+  LD_FOR_TARGET_D10V
+              Linker for d10v tests
+  CC_FOR_TARGET_D10V
+              C compiler for d10v tests
+  AS_FOR_TARGET_FRV
+              Assembler for frv tests
+  LD_FOR_TARGET_FRV
+              Linker for frv tests
+  CC_FOR_TARGET_FRV
+              C compiler for frv tests
+  AS_FOR_TARGET_FT32
+              Assembler for ft32 tests
+  LD_FOR_TARGET_FT32
+              Linker for ft32 tests
+  CC_FOR_TARGET_FT32
+              C compiler for ft32 tests
+  AS_FOR_TARGET_H8300
+              Assembler for h8300 tests
+  LD_FOR_TARGET_H8300
+              Linker for h8300 tests
+  CC_FOR_TARGET_H8300
+              C compiler for h8300 tests
+  AS_FOR_TARGET_IQ2000
+              Assembler for iq2000 tests
+  LD_FOR_TARGET_IQ2000
+              Linker for iq2000 tests
+  CC_FOR_TARGET_IQ2000
+              C compiler for iq2000 tests
+  AS_FOR_TARGET_LM32
+              Assembler for lm32 tests
+  LD_FOR_TARGET_LM32
+              Linker for lm32 tests
+  CC_FOR_TARGET_LM32
+              C compiler for lm32 tests
+  AS_FOR_TARGET_M32C
+              Assembler for m32c tests
+  LD_FOR_TARGET_M32C
+              Linker for m32c tests
+  CC_FOR_TARGET_M32C
+              C compiler for m32c tests
+  AS_FOR_TARGET_M32R
+              Assembler for m32r tests
+  LD_FOR_TARGET_M32R
+              Linker for m32r tests
+  CC_FOR_TARGET_M32R
+              C compiler for m32r tests
+  AS_FOR_TARGET_M68HC11
+              Assembler for m68hc11 tests
+  LD_FOR_TARGET_M68HC11
+              Linker for m68hc11 tests
+  CC_FOR_TARGET_M68HC11
+              C compiler for m68hc11 tests
+  AS_FOR_TARGET_MCORE
+              Assembler for mcore tests
+  LD_FOR_TARGET_MCORE
+              Linker for mcore tests
+  CC_FOR_TARGET_MCORE
+              C compiler for mcore tests
+  AS_FOR_TARGET_MICROBLAZE
+              Assembler for microblaze tests
+  LD_FOR_TARGET_MICROBLAZE
+              Linker for microblaze tests
+  CC_FOR_TARGET_MICROBLAZE
+              C compiler for microblaze tests
+  AS_FOR_TARGET_MIPS
+              Assembler for mips tests
+  LD_FOR_TARGET_MIPS
+              Linker for mips tests
+  CC_FOR_TARGET_MIPS
+              C compiler for mips tests
+  AS_FOR_TARGET_MN10300
+              Assembler for mn10300 tests
+  LD_FOR_TARGET_MN10300
+              Linker for mn10300 tests
+  CC_FOR_TARGET_MN10300
+              C compiler for mn10300 tests
+  AS_FOR_TARGET_MOXIE
+              Assembler for moxie tests
+  LD_FOR_TARGET_MOXIE
+              Linker for moxie tests
+  CC_FOR_TARGET_MOXIE
+              C compiler for moxie tests
+  AS_FOR_TARGET_MSP430
+              Assembler for msp430 tests
+  LD_FOR_TARGET_MSP430
+              Linker for msp430 tests
+  CC_FOR_TARGET_MSP430
+              C compiler for msp430 tests
+  AS_FOR_TARGET_OR1K
+              Assembler for or1k tests
+  LD_FOR_TARGET_OR1K
+              Linker for or1k tests
+  CC_FOR_TARGET_OR1K
+              C compiler for or1k tests
+  AS_FOR_TARGET_PPC
+              Assembler for ppc tests
+  LD_FOR_TARGET_PPC
+              Linker for ppc tests
+  CC_FOR_TARGET_PPC
+              C compiler for ppc tests
+  AS_FOR_TARGET_PRU
+              Assembler for pru tests
+  LD_FOR_TARGET_PRU
+              Linker for pru tests
+  CC_FOR_TARGET_PRU
+              C compiler for pru tests
+  AS_FOR_TARGET_RISCV
+              Assembler for riscv tests
+  LD_FOR_TARGET_RISCV
+              Linker for riscv tests
+  CC_FOR_TARGET_RISCV
+              C compiler for riscv tests
+  AS_FOR_TARGET_RL78
+              Assembler for rl78 tests
+  LD_FOR_TARGET_RL78
+              Linker for rl78 tests
+  CC_FOR_TARGET_RL78
+              C compiler for rl78 tests
+  AS_FOR_TARGET_RX
+              Assembler for rx tests
+  LD_FOR_TARGET_RX
+              Linker for rx tests
+  CC_FOR_TARGET_RX
+              C compiler for rx tests
+  AS_FOR_TARGET_SH
+              Assembler for sh tests
+  LD_FOR_TARGET_SH
+              Linker for sh tests
+  CC_FOR_TARGET_SH
+              C compiler for sh tests
+  AS_FOR_TARGET_ERC32
+              Assembler for erc32 tests
+  LD_FOR_TARGET_ERC32
+              Linker for erc32 tests
+  CC_FOR_TARGET_ERC32
+              C compiler for erc32 tests
+  AS_FOR_TARGET_V850
+              Assembler for v850 tests
+  LD_FOR_TARGET_V850
+              Linker for v850 tests
+  CC_FOR_TARGET_V850
+              C compiler for v850 tests
+  AS_FOR_TARGET_EXAMPLE_SYNACOR
+              Assembler for example-synacor tests
+  LD_FOR_TARGET_EXAMPLE_SYNACOR
+              Linker for example-synacor tests
+  CC_FOR_TARGET_EXAMPLE_SYNACOR
+              C compiler for example-synacor tests
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -1720,97 +2242,6 @@ fi
 
 } # ac_fn_c_try_cpp
 
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## -------------------------------------------------------------------------------------- ##
-## Report this to https://sourceware.org/bugzilla/enter_bug.cgi?product=gdb&component=sim ##
-## -------------------------------------------------------------------------------------- ##"
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
 # ac_fn_c_try_run LINENO
 # ----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
@@ -2441,7 +2872,6 @@ as_fn_append ac_header_list " dlfcn.h"
 as_fn_append ac_header_list " fcntl.h"
 as_fn_append ac_header_list " fpu_control.h"
 as_fn_append ac_header_list " termios.h"
-as_fn_append ac_header_list " unistd.h"
 as_fn_append ac_header_list " utime.h"
 as_fn_append ac_header_list " linux/if_tun.h"
 as_fn_append ac_header_list " linux/mii.h"
@@ -2455,7 +2885,6 @@ as_fn_append ac_header_list " sys/mount.h"
 as_fn_append ac_header_list " sys/param.h"
 as_fn_append ac_header_list " sys/resource.h"
 as_fn_append ac_header_list " sys/socket.h"
-as_fn_append ac_header_list " sys/stat.h"
 as_fn_append ac_header_list " sys/statfs.h"
 as_fn_append ac_header_list " sys/termio.h"
 as_fn_append ac_header_list " sys/termios.h"
@@ -2493,6 +2922,8 @@ as_fn_append ac_func_list " ioctl"
 as_fn_append ac_func_list " kill"
 as_fn_append ac_func_list " link"
 as_fn_append ac_func_list " lseek"
+as_fn_append ac_func_list " lstat"
+as_fn_append ac_func_list " mkdir"
 as_fn_append ac_func_list " mmap"
 as_fn_append ac_func_list " munmap"
 as_fn_append ac_func_list " pipe"
@@ -2653,6 +3084,8 @@ _ACEOF
 ac_config_headers="$ac_config_headers config.h"
 
 
+. $srcdir/../bfd/development.sh
+
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -3643,7 +4076,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3782,6 +4214,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
 if ${ac_cv_path_GREP+:} false; then :
@@ -4041,67 +4474,6 @@ fi
 done
 
 
-
-  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
-  MINIX=yes
-else
-  MINIX=
-fi
-
-
-  if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
-  fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#         define __EXTENSIONS__ 1
-          $ac_includes_default
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_define___extensions__=yes
-else
-  ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
-  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -4208,7 +4580,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
 
-
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
 if ${ac_cv_c_bigendian+:} false; then :
@@ -4534,12 +4905,14 @@ if test "x$cross_compiling" = "xno"; then
   : "${CC_FOR_BUILD:=\$(CC)}"
   : "${RANLIB_FOR_BUILD:=\$(RANLIB)}"
   : "${CFLAGS_FOR_BUILD:=\$(CFLAGS)}"
+  : "${CPPFLAGS_FOR_BUILD:=\$(CPPFLAGS)}"
   : "${LDFLAGS_FOR_BUILD:=\$(LDFLAGS)}"
 else
   : "${AR_FOR_BUILD:=ar}"
   : "${CC_FOR_BUILD:=gcc}"
   : "${RANLIB_FOR_BUILD:=ranlib}"
   : "${CFLAGS_FOR_BUILD:=-g -O}"
+  : "${CPPFLAGS_FOR_BUILD:=}"
   : "${LDLFAGS_FOR_BUILD:=}"
 fi
 
@@ -4549,6 +4922,7 @@ fi
 
 
 
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -4962,10 +5336,6 @@ done
 
 
 
-
-
-
-
 
 
 
@@ -5100,6 +5470,10 @@ done
 
 
 
+
+
+
+
 
 
 
@@ -5550,48 +5924,55 @@ if ${lt_cv_path_NM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-         lt_cv_path_NM="$tmp_nm -B"
-         break
-         ;;
-       *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-         */dev/null*)
-           lt_cv_path_NM="$tmp_nm -p"
-           break
-           ;;
-         *)
-           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-           continue # so that we can try to find one that supports BSD flags
-           ;;
-         esac
-         ;;
-       esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi
+   # Let the user override the nm to test.
+   lt_nm_to_check="$NM"
+ else
+   lt_nm_to_check="${ac_tool_prefix}nm"
+   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+     lt_nm_to_check="$lt_nm_to_check nm"
+   fi
+ fi
+ for lt_tmp_nm in "$lt_nm_to_check"; do
+   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+   for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+     IFS="$lt_save_ifs"
+     test -z "$ac_dir" && ac_dir=.
+     # Strip out any user-provided options from the nm to test twice,
+     # the first time to test to see if nm (rather than its options) has
+     # an explicit path, the second time to yield a file which can be
+     # nm'ed itself.
+     tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`"
+     case "$tmp_nm_path" in
+     */*|*\\*) tmp_nm="$lt_tmp_nm";;
+     *) tmp_nm="$ac_dir/$lt_tmp_nm";;
+     esac
+     tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`"
+     if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then
+       # Check to see if the nm accepts a BSD-compat flag.
+       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       #   nm: unknown option "B" ignored
+       case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+       *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
+        break
+        ;;
+       *)
+        case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+        *$tmp_nm*)
+          lt_cv_path_NM="$tmp_nm -p"
+          break
+          ;;
+        *)
+          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+          continue # so that we can try to find one that supports BSD flags
+          ;;
+        esac
+        ;;
+       esac
+     fi
+   done
+   IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
 $as_echo "$lt_cv_path_NM" >&6; }
@@ -6212,7 +6593,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -6288,6 +6669,11 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+vxworks*)
+  # Assume VxWorks cross toolchains are built on Linux, possibly
+  # as canadian for Windows hosts.
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 
 fi
@@ -6792,7 +7178,7 @@ osf*)
   symcode='[BCDEGQRST]'
   ;;
 solaris*)
-  symcode='[BDRT]'
+  symcode='[BCDRT]'
   ;;
 sco3.2v5*)
   symcode='[DT]'
@@ -7791,23 +8177,25 @@ _LT_EOF
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
 $as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
+    # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
+    # build without first building modern cctools / linker.
+    case $host_cpu-$host_os in
+    *-rhapsody* | *-darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
+    *-darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-       10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+    *-darwin*)
+      # darwin 5.x (macOS 10.1) onwards we only need to adjust when the
+      # deployment target is forced to an earlier version.
+      case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
+       UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
+         ;;
        10.[012][,.]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-       10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         ;;
+       *)
+         ;;
+     esac
     ;;
   esac
     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@@ -8118,9 +8506,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_dev" "ac_cv_member_struct_stat_st_dev" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_dev" = xyes; then :
 
@@ -8133,9 +8519,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_ino" "ac_cv_member_struct_stat_st_ino" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_ino" = xyes; then :
 
@@ -8148,9 +8532,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_mode" "ac_cv_member_struct_stat_st_mode" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_mode" = xyes; then :
 
@@ -8163,9 +8545,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_nlink" "ac_cv_member_struct_stat_st_nlink" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_nlink" = xyes; then :
 
@@ -8178,9 +8558,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_uid" "ac_cv_member_struct_stat_st_uid" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_uid" = xyes; then :
 
@@ -8193,9 +8571,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_gid" "ac_cv_member_struct_stat_st_gid" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_gid" = xyes; then :
 
@@ -8208,9 +8584,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
 
@@ -8223,9 +8597,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_size" "ac_cv_member_struct_stat_st_size" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_size" = xyes; then :
 
@@ -8238,9 +8610,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
 
@@ -8253,9 +8623,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
 
@@ -8268,9 +8636,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_atime" "ac_cv_member_struct_stat_st_atime" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_atime" = xyes; then :
 
@@ -8283,9 +8649,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime" "ac_cv_member_struct_stat_st_mtime" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_mtime" = xyes; then :
 
@@ -8298,9 +8662,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct stat" "st_ctime" "ac_cv_member_struct_stat_st_ctime" "#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 "
 if test "x$ac_cv_member_struct_stat_st_ctime" = xyes; then :
 
@@ -8335,416 +8697,536 @@ _ACEOF
 
 fi
 
+ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
+if test "x$ac_cv_type_long_long" = xyes; then :
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
-$as_echo_n "checking type of array argument to getgroups... " >&6; }
-if ${ac_cv_type_getgroups+:} false; then :
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LONG_LONG 1
+_ACEOF
+
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct statfs" >&5
+$as_echo_n "checking for struct statfs... " >&6; }
+if ${sim_cv_struct_statfs+:} false; then :
   $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_type_getgroups=cross
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Thanks to Mike Rendell for this test.  */
-$ac_includes_default
-#define NGID 256
-#undef MAX
-#define MAX(x, y) ((x) > (y) ? (x) : (y))
 
+#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
 int
 main ()
 {
-  gid_t gidset[NGID];
-  int i, n;
-  union { gid_t gval; long int lval; }  val;
 
-  val.lval = -1;
-  for (i = 0; i < NGID; i++)
-    gidset[i] = val.gval;
-  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
-                gidset);
-  /* Exit non-zero if getgroups seems to require an array of ints.  This
-     happens when gid_t is short int but getgroups modifies an array
-     of ints.  */
-  return n > 0 && gidset[n] != val.gval;
+  struct statfs s;
+
+  ;
+  return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_type_getgroups=gid_t
+if ac_fn_c_try_compile "$LINENO"; then :
+  sim_cv_struct_statfs="yes"
 else
-  ac_cv_type_getgroups=int
+  sim_cv_struct_statfs="no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_struct_statfs" >&5
+$as_echo "$sim_cv_struct_statfs" >&6; }
+if test x"sim_cv_struct_statfs" = x"yes"; then :
 
-if test $ac_cv_type_getgroups = cross; then
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <unistd.h>
+$as_echo "#define HAVE_STRUCT_STATFS 1" >>confdefs.h
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
-  ac_cv_type_getgroups=gid_t
-else
-  ac_cv_type_getgroups=int
-fi
-rm -f conftest*
 
 fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
-$as_echo "$ac_cv_type_getgroups" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define GETGROUPS_T $ac_cv_type_getgroups
-_ACEOF
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if union semun defined" >&5
+$as_echo_n "checking if union semun defined... " >&6; }
+if ${sim_cv_has_union_semun+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-if test "x$ac_cv_type_mode_t" = xyes; then :
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+int
+main ()
+{
 
-else
+  union semun arg;
 
-cat >>confdefs.h <<_ACEOF
-#define mode_t int
+  ;
+  return 0;
+}
 _ACEOF
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  sim_cv_has_union_semun="yes"
+else
+  sim_cv_has_union_semun="no"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_has_union_semun" >&5
+$as_echo "$sim_cv_has_union_semun" >&6; }
+if test x"$sim_cv_has_union_semun" = x"yes"; then :
 
-ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-if test "x$ac_cv_type_off_t" = xyes; then :
-
-else
+$as_echo "#define HAVE_UNION_SEMUN 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define off_t long int
-_ACEOF
 
 fi
 
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether System V semaphores are supported" >&5
+$as_echo_n "checking whether System V semaphores are supported... " >&6; }
+if ${sim_cv_sysv_sem+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
+  #include <sys/types.h>
+  #include <sys/ipc.h>
+  #include <sys/sem.h>
+#ifndef HAVE_UNION_SEMUN
+  union semun {
+    int val;
+    struct semid_ds *buf;
+    ushort *array;
+  };
+#endif
+int
+main ()
+{
+
+  union semun arg;
+  int id = semget(IPC_PRIVATE, 1, IPC_CREAT|0400);
+  if (id == -1)
+    return 1;
+  arg.val = 0; /* avoid implicit type cast to union */
+  if (semctl(id, 0, IPC_RMID, arg) == -1)
+    return 1;
+
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  sim_cv_sysv_sem="yes"
+else
+  sim_cv_sysv_sem="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_sysv_sem" >&5
+$as_echo "$sim_cv_sysv_sem" >&6; }
+if test x"$sim_cv_sysv_sem" = x"yes"; then :
+
+$as_echo "#define HAVE_SYSV_SEM 1" >>confdefs.h
+
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if ${ac_cv_type_signal+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether System V shared memory is supported" >&5
+$as_echo_n "checking whether System V shared memory is supported... " >&6; }
+if ${sim_cv_sysv_shm+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
 
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
 int
 main ()
 {
-return *(signal (0, 0)) (0) == 1;
+
+  int id = shmget(IPC_PRIVATE, 1, IPC_CREAT|0400);
+  if (id == -1)
+    return 1;
+  if (shmctl(id, IPC_RMID, 0) == -1)
+    return 1;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_signal=int
+  sim_cv_sysv_shm="yes"
 else
-  ac_cv_type_signal=void
+  sim_cv_sysv_shm="no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_sysv_shm" >&5
+$as_echo "$sim_cv_sysv_shm" >&6; }
+if test x"$sim_cv_sysv_shm" = x"yes"; then :
 
-else
+$as_echo "#define HAVE_SYSV_SHM 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termios" >&5
+$as_echo_n "checking for struct termios... " >&6; }
+if ${sim_cv_termios_struct+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
 #include <sys/types.h>
+#include <sys/termios.h>
+int
+main ()
+{
 
+  static struct termios x;
+  x.c_iflag = 0;
+  x.c_oflag = 0;
+  x.c_cflag = 0;
+  x.c_lflag = 0;
+  x.c_cc[NCCS] = 0;
+
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "uid_t" >/dev/null 2>&1; then :
-  ac_cv_type_uid_t=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  sim_cv_termios_struct="yes"
 else
-  ac_cv_type_uid_t=no
+  sim_cv_termios_struct="no"
 fi
-rm -f conftest*
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
-
-$as_echo "#define uid_t int" >>confdefs.h
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_termios_struct" >&5
+$as_echo "$sim_cv_termios_struct" >&6; }
+if test $sim_cv_termios_struct = yes; then
 
-$as_echo "#define gid_t int" >>confdefs.h
+$as_echo "#define HAVE_TERMIOS_STRUCTURE 1" >>confdefs.h
 
 fi
 
-
-ALL_LINGUAS=
-# If we haven't got the data from the intl directory,
-# assume NLS is disabled.
-USE_NLS=no
-LIBINTL=
-LIBINTL_DEP=
-INCINTL=
-XGETTEXT=
-GMSGFMT=
-POSUB=
-
-if test -f  ../intl/config.intl; then
-  .  ../intl/config.intl
+if test "$sim_cv_termios_struct" = "yes"; then
+  if ${sim_cv_termios_cline+:} false; then :
+  $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
-$as_echo_n "checking whether NLS is requested... " >&6; }
-if test x"$USE_NLS" != xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+  ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" "
+#include <sys/types.h>
+#include <sys/termios.h>
 
+"
+if test "x$ac_cv_member_struct_termios_c_line" = xyes; then :
+  sim_cv_termios_cline="yes"
+else
+  sim_cv_termios_cline="no"
+fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
-$as_echo_n "checking for catalogs to be installed... " >&6; }
-  # Look for .po and .gmo files in the source directory.
-  CATALOGS=
-  XLINGUAS=
-  for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
-    # If there aren't any .gmo files the shell will give us the
-    # literal string "../path/to/srcdir/po/*.gmo" which has to be
-    # weeded out.
-    case "$cat" in *\**)
-      continue;;
-    esac
-    # The quadruple backslash is collapsed to a double backslash
-    # by the backticks, then collapsed again by the double quotes,
-    # leaving us with one backslash in the sed expression (right
-    # before the dot that mustn't act as a wildcard).
-    cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
-    lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
-    # The user is allowed to set LINGUAS to a list of languages to
-    # install catalogs for.  If it's empty that means "all of them."
-    if test "x$LINGUAS" = x; then
-      CATALOGS="$CATALOGS $cat"
-      XLINGUAS="$XLINGUAS $lang"
-    else
-      case "$LINGUAS" in *$lang*)
-        CATALOGS="$CATALOGS $cat"
-        XLINGUAS="$XLINGUAS $lang"
-        ;;
-      esac
-    fi
-  done
-  LINGUAS="$XLINGUAS"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
-$as_echo "$LINGUAS" >&6; }
+  if test $sim_cv_termios_cline = yes; then
 
+$as_echo "#define HAVE_TERMIOS_CLINE 1" >>confdefs.h
 
-    DATADIRNAME=share
+  fi
+else
+  sim_cv_termios_cline=no
+fi
 
-  INSTOBJEXT=.mo
+if test "$sim_cv_termios_struct" != "yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termio" >&5
+$as_echo_n "checking for struct termio... " >&6; }
+if ${sim_cv_termio_struct+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  GENCAT=gencat
+#include <sys/types.h>
+#include <sys/termio.h>
+int
+main ()
+{
 
-  CATOBJEXT=.gmo
+  static struct termio x;
+  x.c_iflag = 0;
+  x.c_oflag = 0;
+  x.c_cflag = 0;
+  x.c_lflag = 0;
+  x.c_cc[NCC] = 0;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  sim_cv_termio_struct="yes"
+else
+  sim_cv_termio_struct="no"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_termio_struct" >&5
+$as_echo "$sim_cv_termio_struct" >&6; }
+  if test $sim_cv_termio_struct = yes; then
 
+$as_echo "#define HAVE_TERMIO_STRUCTURE 1" >>confdefs.h
 
-  # Use the system's zlib library.
-  zlibdir="-L\$(top_builddir)/../zlib"
-  zlibinc="-I\$(top_srcdir)/../zlib"
-
-# Check whether --with-system-zlib was given.
-if test "${with_system_zlib+set}" = set; then :
-  withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
-    zlibdir=
-    zlibinc=
   fi
-
+else
+  sim_cv_termio_struct=no
 fi
 
-
-
-
-
-
-  maybe_plugins=no
-  for ac_header in dlfcn.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
- maybe_plugins=yes
+if test "$sim_cv_termio_struct" = "yes"; then
+  if ${sim_cv_termio_cline+:} false; then :
+  $as_echo_n "(cached) " >&6
 fi
 
-done
+  ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" "
+#include <sys/types.h>
+#include <sys/termio.h>
 
-  for ac_header in windows.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
 "
-if test "x$ac_cv_header_windows_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_WINDOWS_H 1
-_ACEOF
- maybe_plugins=yes
+if test "x$ac_cv_member_struct_termio_c_line" = xyes; then :
+  sim_cv_termio_cline="yes"
+else
+  sim_cv_termio_cline="no"
 fi
 
-done
+  if test $sim_cv_termio_cline = yes; then
 
+$as_echo "#define HAVE_TERMIO_CLINE 1" >>confdefs.h
 
-  # Check whether --enable-plugins was given.
-if test "${enable_plugins+set}" = set; then :
-  enableval=$enable_plugins; case "${enableval}" in
-      no) plugins=no ;;
-      *) plugins=yes
-         if test "$maybe_plugins" != "yes" ; then
-          as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
-        fi ;;
-     esac
+  fi
 else
-  plugins=$maybe_plugins
-
+  sim_cv_termio_cline=no
 fi
 
-  if test "$plugins" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
-$as_echo_n "checking for library containing dlsym... " >&6; }
-if ${ac_cv_search_dlsym+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
+$as_echo_n "checking type of array argument to getgroups... " >&6; }
+if ${ac_cv_type_getgroups+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then :
+  ac_cv_type_getgroups=cross
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+/* Thanks to Mike Rendell for this test.  */
+$ac_includes_default
+#define NGID 256
+#undef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlsym ();
 int
 main ()
 {
-return dlsym ();
-  ;
-  return 0;
+  gid_t gidset[NGID];
+  int i, n;
+  union { gid_t gval; long int lval; }  val;
+
+  val.lval = -1;
+  for (i = 0; i < NGID; i++)
+    gidset[i] = val.gval;
+  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
+                gidset);
+  /* Exit non-zero if getgroups seems to require an array of ints.  This
+     happens when gid_t is short int but getgroups modifies an array
+     of ints.  */
+  return n > 0 && gidset[n] != val.gval;
 }
 _ACEOF
-for ac_lib in '' dl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_dlsym=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_dlsym+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_dlsym+:} false; then :
-
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_type_getgroups=gid_t
 else
-  ac_cv_search_dlsym=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+  ac_cv_type_getgroups=int
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
-$as_echo "$ac_cv_search_dlsym" >&6; }
-ac_res=$ac_cv_search_dlsym
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-  fi
+if test $ac_cv_type_getgroups = cross; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
 
- if test "$plugins" = yes; then
-  PLUGINS_TRUE=
-  PLUGINS_FALSE='#'
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
+  ac_cv_type_getgroups=gid_t
 else
-  PLUGINS_TRUE='#'
-  PLUGINS_FALSE=
+  ac_cv_type_getgroups=int
 fi
+rm -f conftest*
 
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
+$as_echo "$ac_cv_type_getgroups" >&6; }
 
+cat >>confdefs.h <<_ACEOF
+#define GETGROUPS_T $ac_cv_type_getgroups
+_ACEOF
 
 
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = xyes; then :
 
-# Set options
-enable_dlopen=yes
+else
 
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
 
+fi
 
+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+if test "x$ac_cv_type_off_t" = xyes; then :
 
-  enable_win32_dll=no
+else
 
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
 
-            # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
-  enableval=$enable_shared; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_shared=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_shared=yes
+fi
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if ${ac_cv_type_signal+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_signal=int
+else
+  ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+
+# Set options
+
+
+
+        enable_dlopen=no
+
+
+  enable_win32_dll=no
+
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
 fi
 
 
@@ -9968,7 +10450,7 @@ _LT_EOF
       archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
       tmp_diet=no
       if test "$host_os" = linux-dietlibc; then
        case $cc_basename in
@@ -10477,7 +10959,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
        case $host_cpu in
        hppa*64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
          archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
@@ -10489,7 +10971,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       else
        case $host_cpu in
        hppa*64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
          archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
@@ -11382,7 +11864,7 @@ haiku*)
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -11489,7 +11971,12 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+
+# uclinux* changes (here and below) have been submitted to the libtool
+# project, but have not yet been accepted: they are GCC-local changes
+# for the time being.  (See
+# https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -11737,6 +12224,25 @@ uts4*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
+# Shared libraries for VwWorks, >= 7 only at this stage
+# and (fpic) still incompatible with "large" code models
+# in a few configurations. Only for RTP mode in any case,
+# and upon explicit request at configure time.
+vxworks7*)
+  dynamic_linker=no
+  case ${with_multisubdir}-${enable_shared} in
+    *large*)
+      ;;
+    *mrtp*-yes)
+      version_type=linux
+      need_lib_prefix=no
+      need_version=no
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+      soname_spec='${libname}${release}${shared_ext}$major'
+      dynamic_linker="$host_os module_loader"
+      ;;
+  esac
+  ;;
 *)
   dynamic_linker=no
   ;;
@@ -12178,7 +12684,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12181 "configure"
+#line 12687 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12284,7 +12790,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12287 "configure"
+#line 12793 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12522,14 +13028,12 @@ CC="$lt_save_CC"
 
 
 
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind in -lsocket" >&5
-$as_echo_n "checking for bind in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_bind+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind" >&5
+$as_echo_n "checking for library containing bind... " >&6; }
+if ${ac_cv_search_bind+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -12548,33 +13052,44 @@ return bind ();
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_socket_bind=yes
-else
-  ac_cv_lib_socket_bind=no
+for ac_lib in '' socket; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_bind=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+    conftest$ac_exeext
+  if ${ac_cv_search_bind+:} false; then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_bind" >&5
-$as_echo "$ac_cv_lib_socket_bind" >&6; }
-if test "x$ac_cv_lib_socket_bind" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
-_ACEOF
+done
+if ${ac_cv_search_bind+:} false; then :
 
-  LIBS="-lsocket $LIBS"
+else
+  ac_cv_search_bind=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind" >&5
+$as_echo "$ac_cv_search_bind" >&6; }
+ac_res=$ac_cv_search_bind
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
+$as_echo_n "checking for library containing gethostbyname... " >&6; }
+if ${ac_cv_search_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -12593,33 +13108,44 @@ return gethostbyname ();
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nsl_gethostbyname=yes
-else
-  ac_cv_lib_nsl_gethostbyname=no
+for ac_lib in '' nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_gethostbyname=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+    conftest$ac_exeext
+  if ${ac_cv_search_gethostbyname+:} false; then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
-_ACEOF
+done
+if ${ac_cv_search_gethostbyname+:} false; then :
 
-  LIBS="-lnsl $LIBS"
+else
+  ac_cv_search_gethostbyname=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
+$as_echo "$ac_cv_search_gethostbyname" >&6; }
+ac_res=$ac_cv_search_gethostbyname
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabs in -lm" >&5
-$as_echo_n "checking for fabs in -lm... " >&6; }
-if ${ac_cv_lib_m_fabs+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fabs" >&5
+$as_echo_n "checking for library containing fabs... " >&6; }
+if ${ac_cv_search_fabs+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -12638,33 +13164,44 @@ return fabs ();
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_m_fabs=yes
-else
-  ac_cv_lib_m_fabs=no
+for ac_lib in '' m; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_fabs=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+    conftest$ac_exeext
+  if ${ac_cv_search_fabs+:} false; then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fabs" >&5
-$as_echo "$ac_cv_lib_m_fabs" >&6; }
-if test "x$ac_cv_lib_m_fabs" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
+done
+if ${ac_cv_search_fabs+:} false; then :
 
-  LIBS="-lm $LIBS"
+else
+  ac_cv_search_fabs=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fabs" >&5
+$as_echo "$ac_cv_search_fabs" >&6; }
+ac_res=$ac_cv_search_fabs
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
-$as_echo_n "checking for log2 in -lm... " >&6; }
-if ${ac_cv_lib_m_log2+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing log2" >&5
+$as_echo_n "checking for library containing log2... " >&6; }
+if ${ac_cv_search_log2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -12683,56 +13220,209 @@ return log2 ();
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_m_log2=yes
-else
-  ac_cv_lib_m_log2=no
+for ac_lib in '' m; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_log2=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+    conftest$ac_exeext
+  if ${ac_cv_search_log2+:} false; then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5
-$as_echo "$ac_cv_lib_m_log2" >&6; }
-if test "x$ac_cv_lib_m_log2" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
-  LIBS="-lm $LIBS"
+done
+if ${ac_cv_search_log2+:} false; then :
 
+else
+  ac_cv_search_log2=no
 fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_log2" >&5
+$as_echo "$ac_cv_search_log2" >&6; }
+ac_res=$ac_cv_search_log2
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+fi
 
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdl" >&5
-$as_echo_n "checking for sdl... " >&6; }
-
-if test -n "$SDL_CFLAGS"; then
-    pkg_cv_SDL_CFLAGS="$SDL_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "sdl") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if ${ac_cv_search_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$SDL_LIBS"; then
-    pkg_cv_SDL_LIBS="$SDL_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "sdl") 2>&5
-  ac_status=$?
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dlopen+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_dlopen+:} false; then :
+
+else
+  ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+if test "${ac_cv_search_dlopen}" = "none required" || test "${ac_cv_lib_dl_dlopen}" = "yes"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdl2" >&5
+$as_echo_n "checking for sdl2... " >&6; }
+
+if test -n "$SDL_CFLAGS"; then
+    pkg_cv_SDL_CFLAGS="$SDL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sdl2") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl2" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SDL_LIBS"; then
+    pkg_cv_SDL_LIBS="$SDL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sdl2") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl2" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+if test $pkg_failed = no; then
+  pkg_save_LDFLAGS="$LDFLAGS"
+  LDFLAGS="$LDFLAGS $pkg_cv_SDL_LIBS"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+  pkg_failed=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$pkg_save_LDFLAGS
+fi
+
+
+
+if test $pkg_failed = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl2" 2>&1`
+        else
+               SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$SDL_PKG_ERRORS" >&5
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdl" >&5
+$as_echo_n "checking for sdl... " >&6; }
+
+if test -n "$SDL_CFLAGS"; then
+    pkg_cv_SDL_CFLAGS="$SDL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sdl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SDL_LIBS"; then
+    pkg_cv_SDL_LIBS="$SDL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sdl") 2>&5
+  ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl" 2>/dev/null`
@@ -12797,58 +13487,306 @@ else
        SDL_LIBS=$pkg_cv_SDL_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
+             SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=1"
+
+fi
+
+elif test $pkg_failed = untried; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdl" >&5
+$as_echo_n "checking for sdl... " >&6; }
+
+if test -n "$SDL_CFLAGS"; then
+    pkg_cv_SDL_CFLAGS="$SDL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sdl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SDL_LIBS"; then
+    pkg_cv_SDL_LIBS="$SDL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sdl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+if test $pkg_failed = no; then
+  pkg_save_LDFLAGS="$LDFLAGS"
+  LDFLAGS="$LDFLAGS $pkg_cv_SDL_LIBS"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
 int
 main ()
 {
-return dlopen ();
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
+
 else
-  ac_cv_lib_dl_dlopen=no
+  pkg_failed=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  LDFLAGS=$pkg_save_LDFLAGS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-      SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL"
-    SDL_LIBS="-ldl"
 
+
+
+if test $pkg_failed = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  SDL_CFLAGS= SDL_LIBS=
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+               SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl" 2>&1`
+        else
+               SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$SDL_PKG_ERRORS" >&5
 
+       :
+elif test $pkg_failed = untried; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       :
+else
+       SDL_CFLAGS=$pkg_cv_SDL_CFLAGS
+       SDL_LIBS=$pkg_cv_SDL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+             SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=1"
 
 fi
 
+else
+       SDL_CFLAGS=$pkg_cv_SDL_CFLAGS
+       SDL_LIBS=$pkg_cv_SDL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+           SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=2"
 
+fi
+    if test -n "$SDL_CFLAGS"; then :
+      if test "$ac_cv_search_dlopen" = no; then :
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SDL support requires dlopen support" >&5
+$as_echo "$as_me: WARNING: SDL support requires dlopen support" >&2;}
 
+fi
 
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+fi
+else
+  SDL_CFLAGS=
+fi
+SDL_LIBS=
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
+$as_echo_n "checking for cygwin... " >&6; }
+if ${sim_cv_os_cygwin+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __CYGWIN__
+lose
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "lose" >/dev/null 2>&1; then :
+  sim_cv_os_cygwin=yes
+else
+  sim_cv_os_cygwin=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5
+$as_echo "$sim_cv_os_cygwin" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
+$as_echo_n "checking for library containing tgetent... " >&6; }
+if ${ac_cv_search_tgetent+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' termcap tinfo curses ncurses; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_tgetent=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_tgetent+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_tgetent+:} false; then :
+
+else
+  ac_cv_search_tgetent=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
+$as_echo "$ac_cv_search_tgetent" >&6; }
+ac_res=$ac_cv_search_tgetent
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  TERMCAP_LIB=$ac_cv_search_tgetent
+else
+  TERMCAP_LIB=""
+fi
+
+if test x$sim_cv_os_cygwin = xyes; then
+  TERMCAP_LIB="${TERMCAP_LIB} -luser32"
+fi
+
+
+if test -r ../readline/Makefile; then
+  READLINE_LIB=../readline/readline/libreadline.a
+  READLINE_CFLAGS='-I$(READLINE_SRC)/..'
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+$as_echo_n "checking for readline in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_readline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $TERMCAP_LIB $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_readline_readline=yes
+else
+  ac_cv_lib_readline_readline=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
+$as_echo "$ac_cv_lib_readline_readline" >&6; }
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
+  READLINE_LIB=-lreadline
+else
+  as_fn_error $? "the required \"readline\" library is missing" "$LINENO" 5
+fi
+
+  READLINE_CFLAGS=
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a known getopt prototype in unistd.h" >&5
+$as_echo_n "checking for a known getopt prototype in unistd.h... " >&6; }
+if ${sim_cv_decl_getopt_unistd_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+int
+main ()
+{
+extern int getopt (int, char *const*, const char *);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  sim_cv_decl_getopt_unistd_h=yes
+else
+  sim_cv_decl_getopt_unistd_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_decl_getopt_unistd_h" >&5
+$as_echo "$sim_cv_decl_getopt_unistd_h" >&6; }
+if test $sim_cv_decl_getopt_unistd_h = yes; then
+
+$as_echo "#define HAVE_DECL_GETOPT 1" >>confdefs.h
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then :
 SIM_PRIMARY_TARGET=
 
 
-SIM_SUBDIRS=
+SIM_ENABLED_ARCHES=
 
 
-SIM_COMMON_BUILD_TRUE=
-SIM_COMMON_BUILD_FALSE='#'
+ENABLE_SIM=no
 
 
 
-ac_config_files="$ac_config_files Make-common.sim:common/Make-common.in"
-
-
+subdirs=""
 
 
 if test "${enable_sim}" != no; then
-  sim_igen=no
   for targ in `echo $target $enable_targets | sed 's/,/ /g'`
   do
-      case "${targ}" in
+      sim_enable_arch_aarch64=false
+  case "${targ}" in
     all|aarch64*-*-*)
       if test "${targ}" = "${target}"; then
         SIM_PRIMARY_TARGET=aarch64
       fi
-            ac_config_files="$ac_config_files aarch64/Makefile.sim:aarch64/Makefile.in"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " aarch64"
 
-    ac_config_commands="$ac_config_commands aarch64/Makefile"
+  ac_config_files="$ac_config_files aarch64/.gdbinit:common/gdbinit.in"
 
-    as_fn_append SIM_SUBDIRS " aarch64"
 
-    ac_config_commands="$ac_config_commands depdir-aarch64"
+      sim_enable_arch_aarch64=true
+      ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target cc" >&5
+$as_echo_n "checking where to find the target cc... " >&6; }
+if test "x${build}" != "x${host}" ; then
+  if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
+    # We already found the complete path
+    ac_dir=`dirname $CC_FOR_TARGET`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+  else
+    # Canadian cross, just use what we found
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+  fi
+else
+  ok=yes
+  case " ${configdirs} " in
+    *" ${target_alias}-gcc "*) ;;
+    *) ok=no ;;
+  esac
+
+  if test $ok = yes; then
+    # An in-tree tool is available and we can use it
+    CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/${target_alias}-gcc'
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
+$as_echo "just compiled" >&6; }
+  elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
+    # We already found the complete path
+    ac_dir=`dirname $CC_FOR_TARGET`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+  elif test "x$target" = "x$host"; then
+    # We can use an host tool
+    CC_FOR_TARGET='$(CC)'
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+  else
+    # We need a cross tool
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+  fi
+fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target as" >&5
+$as_echo_n "checking where to find the target as... " >&6; }
+if test "x${build}" != "x${host}" ; then
+  if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
+    # We already found the complete path
+    ac_dir=`dirname $AS_FOR_TARGET`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+  else
+    # Canadian cross, just use what we found
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+  fi
+else
+  ok=yes
+  case " ${configdirs} " in
+    *" \$(abs_builddir) "*) ;;
+    *) ok=no ;;
+  esac
 
+  if test $ok = yes; then
+    # An in-tree tool is available and we can use it
+    AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/\$(abs_builddir)/../gas/as-new'
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
+$as_echo "just compiled" >&6; }
+  elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
+    # We already found the complete path
+    ac_dir=`dirname $AS_FOR_TARGET`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+  elif test "x$target" = "x$host"; then
+    # We can use an host tool
+    AS_FOR_TARGET='$(AS)'
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+  else
+    # We need a cross tool
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+  fi
+fi
 
-      ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ld" >&5
+$as_echo_n "checking where to find the target ld... " >&6; }
+if test "x${build}" != "x${host}" ; then
+  if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
+    # We already found the complete path
+    ac_dir=`dirname $LD_FOR_TARGET`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+  else
+    # Canadian cross, just use what we found
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+  fi
+else
+  ok=yes
+  case " ${configdirs} " in
+    *" \$(abs_builddir) "*) ;;
+    *) ok=no ;;
   esac
 
-      case "${targ}" in
-    all|arm*-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=arm
-      fi
-            ac_config_files="$ac_config_files arm/Makefile.sim:arm/Makefile.in"
+  if test $ok = yes; then
+    # An in-tree tool is available and we can use it
+    LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/\$(abs_builddir)/../ld/ld-new'
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
+$as_echo "just compiled" >&6; }
+  elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
+    # We already found the complete path
+    ac_dir=`dirname $LD_FOR_TARGET`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+  elif test "x$target" = "x$host"; then
+    # We can use an host tool
+    LD_FOR_TARGET='$(LD)'
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+  else
+    # We need a cross tool
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+  fi
+fi
 
-    ac_config_commands="$ac_config_commands arm/Makefile"
 
-    as_fn_append SIM_SUBDIRS " arm"
 
-    ac_config_commands="$ac_config_commands depdir-arm"
 
 
 
-      ;;
-  esac
+  if test "$SIM_PRIMARY_TARGET" = "aarch64"; then :
+      : "${AS_FOR_TARGET_AARCH64:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_AARCH64:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_AARCH64:=\$(CC_FOR_TARGET)}"
 
-      case "${targ}" in
-    all|avr*-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=avr
-      fi
-            ac_config_files="$ac_config_files avr/Makefile.sim:avr/Makefile.in"
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_AARCH64 LD_FOR_TARGET_AARCH64 CC_FOR_TARGET_AARCH64"
 
-    ac_config_commands="$ac_config_commands avr/Makefile"
+   if ${sim_enable_arch_aarch64}; then
+  SIM_ENABLE_ARCH_aarch64_TRUE=
+  SIM_ENABLE_ARCH_aarch64_FALSE='#'
+else
+  SIM_ENABLE_ARCH_aarch64_TRUE='#'
+  SIM_ENABLE_ARCH_aarch64_FALSE=
+fi
 
-    as_fn_append SIM_SUBDIRS " avr"
 
-    ac_config_commands="$ac_config_commands depdir-avr"
+      sim_enable_arch_arm=false
+  case "${targ}" in
+    all|arm*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=arm
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " arm"
 
+  ac_config_files="$ac_config_files arm/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_arm=true
       ;;
   esac
 
-      case "${targ}" in
-    all|bfin-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=bfin
-      fi
 
 
-subdirs="$subdirs bfin"
 
+  if test "$SIM_PRIMARY_TARGET" = "arm"; then :
+      : "${AS_FOR_TARGET_ARM:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_ARM:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_ARM:=\$(CC_FOR_TARGET)}"
 
-    ac_config_commands="$ac_config_commands depdir-bfin"
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_ARM LD_FOR_TARGET_ARM CC_FOR_TARGET_ARM"
 
+   if ${sim_enable_arch_arm}; then
+  SIM_ENABLE_ARCH_arm_TRUE=
+  SIM_ENABLE_ARCH_arm_FALSE='#'
+else
+  SIM_ENABLE_ARCH_arm_TRUE='#'
+  SIM_ENABLE_ARCH_arm_FALSE=
+fi
 
-      ;;
-  esac
 
-      case "${targ}" in
-    all|bpf-*-*)
+      sim_enable_arch_avr=false
+  case "${targ}" in
+    all|avr*-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=bpf
+        SIM_PRIMARY_TARGET=avr
       fi
-            subdirs="$subdirs bpf"
-
-
-    ac_config_commands="$ac_config_commands depdir-bpf"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " avr"
 
+  ac_config_files="$ac_config_files avr/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_avr=true
       ;;
   esac
 
-      case "${targ}" in
-    all|cr16*-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=cr16
-      fi
-            ac_config_files="$ac_config_files cr16/Makefile.sim:cr16/Makefile.in"
 
-    ac_config_commands="$ac_config_commands cr16/Makefile"
 
-    as_fn_append SIM_SUBDIRS " cr16"
 
-    ac_config_commands="$ac_config_commands depdir-cr16"
+  if test "$SIM_PRIMARY_TARGET" = "avr"; then :
+      : "${AS_FOR_TARGET_AVR:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_AVR:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_AVR:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_AVR LD_FOR_TARGET_AVR CC_FOR_TARGET_AVR"
 
-      ;;
-  esac
+   if ${sim_enable_arch_avr}; then
+  SIM_ENABLE_ARCH_avr_TRUE=
+  SIM_ENABLE_ARCH_avr_FALSE='#'
+else
+  SIM_ENABLE_ARCH_avr_TRUE='#'
+  SIM_ENABLE_ARCH_avr_FALSE=
+fi
 
-      case "${targ}" in
-    all|cris-*-* | crisv32-*-*)
+
+      sim_enable_arch_bfin=false
+  case "${targ}" in
+    all|bfin-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=cris
+        SIM_PRIMARY_TARGET=bfin
       fi
-            subdirs="$subdirs cris"
-
-
-    ac_config_commands="$ac_config_commands depdir-cris"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " bfin"
 
+  ac_config_files="$ac_config_files bfin/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_bfin=true
       ;;
   esac
 
-      case "${targ}" in
-    all|d10v-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=d10v
-      fi
-            ac_config_files="$ac_config_files d10v/Makefile.sim:d10v/Makefile.in"
 
-    ac_config_commands="$ac_config_commands d10v/Makefile"
 
-    as_fn_append SIM_SUBDIRS " d10v"
 
-    ac_config_commands="$ac_config_commands depdir-d10v"
+  if test "$SIM_PRIMARY_TARGET" = "bfin"; then :
+      : "${AS_FOR_TARGET_BFIN:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_BFIN:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_BFIN:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_BFIN LD_FOR_TARGET_BFIN CC_FOR_TARGET_BFIN"
 
-      ;;
-  esac
+   if ${sim_enable_arch_bfin}; then
+  SIM_ENABLE_ARCH_bfin_TRUE=
+  SIM_ENABLE_ARCH_bfin_FALSE='#'
+else
+  SIM_ENABLE_ARCH_bfin_TRUE='#'
+  SIM_ENABLE_ARCH_bfin_FALSE=
+fi
 
-      case "${targ}" in
-    all|frv-*-*)
+
+      sim_enable_arch_bpf=false
+  case "${targ}" in
+    all|bpf-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=frv
+        SIM_PRIMARY_TARGET=bpf
       fi
-            subdirs="$subdirs frv"
-
-
-    ac_config_commands="$ac_config_commands depdir-frv"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " bpf"
 
+  ac_config_files="$ac_config_files bpf/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_bpf=true
       ;;
   esac
 
-      case "${targ}" in
-    all|ft32-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=ft32
-      fi
-            ac_config_files="$ac_config_files ft32/Makefile.sim:ft32/Makefile.in"
 
-    ac_config_commands="$ac_config_commands ft32/Makefile"
 
-    as_fn_append SIM_SUBDIRS " ft32"
 
-    ac_config_commands="$ac_config_commands depdir-ft32"
+  if test "$SIM_PRIMARY_TARGET" = "bpf"; then :
+      : "${AS_FOR_TARGET_BPF:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_BPF:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_BPF:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_BPF LD_FOR_TARGET_BPF CC_FOR_TARGET_BPF"
 
-      ;;
-  esac
+   if ${sim_enable_arch_bpf}; then
+  SIM_ENABLE_ARCH_bpf_TRUE=
+  SIM_ENABLE_ARCH_bpf_FALSE='#'
+else
+  SIM_ENABLE_ARCH_bpf_TRUE='#'
+  SIM_ENABLE_ARCH_bpf_FALSE=
+fi
 
-      case "${targ}" in
-    all|h8300*-*-*)
+
+      sim_enable_arch_cr16=false
+  case "${targ}" in
+    all|cr16*-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=h8300
+        SIM_PRIMARY_TARGET=cr16
       fi
-            ac_config_files="$ac_config_files h8300/Makefile.sim:h8300/Makefile.in"
-
-    ac_config_commands="$ac_config_commands h8300/Makefile"
-
-    as_fn_append SIM_SUBDIRS " h8300"
-
-    ac_config_commands="$ac_config_commands depdir-h8300"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " cr16"
 
+  ac_config_files="$ac_config_files cr16/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_cr16=true
       ;;
   esac
 
-      case "${targ}" in
-    all|iq2000-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=iq2000
-      fi
-            subdirs="$subdirs iq2000"
 
 
-    ac_config_commands="$ac_config_commands depdir-iq2000"
 
+  if test "$SIM_PRIMARY_TARGET" = "cr16"; then :
+      : "${AS_FOR_TARGET_CR16:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_CR16:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_CR16:=\$(CC_FOR_TARGET)}"
 
+fi
 
-      ;;
-  esac
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_CR16 LD_FOR_TARGET_CR16 CC_FOR_TARGET_CR16"
 
-      case "${targ}" in
-    all|lm32-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=lm32
-      fi
-            subdirs="$subdirs lm32"
+   if ${sim_enable_arch_cr16}; then
+  SIM_ENABLE_ARCH_cr16_TRUE=
+  SIM_ENABLE_ARCH_cr16_FALSE='#'
+else
+  SIM_ENABLE_ARCH_cr16_TRUE='#'
+  SIM_ENABLE_ARCH_cr16_FALSE=
+fi
 
 
-    ac_config_commands="$ac_config_commands depdir-lm32"
+      sim_enable_arch_cris=false
+  case "${targ}" in
+    all|cris-*-* | crisv32-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=cris
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " cris"
 
+  ac_config_files="$ac_config_files cris/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_cris=true
       ;;
   esac
 
-      case "${targ}" in
-    all|m32c-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=m32c
-      fi
-            ac_config_files="$ac_config_files m32c/Makefile.sim:m32c/Makefile.in"
 
-    ac_config_commands="$ac_config_commands m32c/Makefile"
 
-    as_fn_append SIM_SUBDIRS " m32c"
 
-    ac_config_commands="$ac_config_commands depdir-m32c"
+  if test "$SIM_PRIMARY_TARGET" = "cris"; then :
+      : "${AS_FOR_TARGET_CRIS:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_CRIS:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_CRIS:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_CRIS LD_FOR_TARGET_CRIS CC_FOR_TARGET_CRIS"
 
-      ;;
-  esac
+   if ${sim_enable_arch_cris}; then
+  SIM_ENABLE_ARCH_cris_TRUE=
+  SIM_ENABLE_ARCH_cris_FALSE='#'
+else
+  SIM_ENABLE_ARCH_cris_TRUE='#'
+  SIM_ENABLE_ARCH_cris_FALSE=
+fi
 
-      case "${targ}" in
-    all|m32r-*-*)
+
+      sim_enable_arch_d10v=false
+  case "${targ}" in
+    all|d10v-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=m32r
+        SIM_PRIMARY_TARGET=d10v
       fi
-            subdirs="$subdirs m32r"
-
-
-    ac_config_commands="$ac_config_commands depdir-m32r"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " d10v"
 
+  ac_config_files="$ac_config_files d10v/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_d10v=true
       ;;
   esac
 
-      case "${targ}" in
-    all|m68hc11-*-*|m6811-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=m68hc11
-      fi
-            ac_config_files="$ac_config_files m68hc11/Makefile.sim:m68hc11/Makefile.in"
 
-    ac_config_commands="$ac_config_commands m68hc11/Makefile"
 
-    as_fn_append SIM_SUBDIRS " m68hc11"
 
-    ac_config_commands="$ac_config_commands depdir-m68hc11"
+  if test "$SIM_PRIMARY_TARGET" = "d10v"; then :
+      : "${AS_FOR_TARGET_D10V:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_D10V:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_D10V:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_D10V LD_FOR_TARGET_D10V CC_FOR_TARGET_D10V"
 
-      ;;
-  esac
+   if ${sim_enable_arch_d10v}; then
+  SIM_ENABLE_ARCH_d10v_TRUE=
+  SIM_ENABLE_ARCH_d10v_FALSE='#'
+else
+  SIM_ENABLE_ARCH_d10v_TRUE='#'
+  SIM_ENABLE_ARCH_d10v_FALSE=
+fi
 
-      case "${targ}" in
-    all|mcore-*-*)
+
+      sim_enable_arch_frv=false
+  case "${targ}" in
+    all|frv-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=mcore
+        SIM_PRIMARY_TARGET=frv
       fi
-            ac_config_files="$ac_config_files mcore/Makefile.sim:mcore/Makefile.in"
-
-    ac_config_commands="$ac_config_commands mcore/Makefile"
-
-    as_fn_append SIM_SUBDIRS " mcore"
-
-    ac_config_commands="$ac_config_commands depdir-mcore"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " frv"
 
+  ac_config_files="$ac_config_files frv/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_frv=true
       ;;
   esac
 
-      case "${targ}" in
-    all|microblaze-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=microblaze
-      fi
-            ac_config_files="$ac_config_files microblaze/Makefile.sim:microblaze/Makefile.in"
 
-    ac_config_commands="$ac_config_commands microblaze/Makefile"
 
-    as_fn_append SIM_SUBDIRS " microblaze"
 
-    ac_config_commands="$ac_config_commands depdir-microblaze"
+  if test "$SIM_PRIMARY_TARGET" = "frv"; then :
+      : "${AS_FOR_TARGET_FRV:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_FRV:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_FRV:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_FRV LD_FOR_TARGET_FRV CC_FOR_TARGET_FRV"
 
-      ;;
-  esac
+   if ${sim_enable_arch_frv}; then
+  SIM_ENABLE_ARCH_frv_TRUE=
+  SIM_ENABLE_ARCH_frv_FALSE='#'
+else
+  SIM_ENABLE_ARCH_frv_TRUE='#'
+  SIM_ENABLE_ARCH_frv_FALSE=
+fi
 
-      case "${targ}" in
-    all|mips*-*-*)
+
+      sim_enable_arch_ft32=false
+  case "${targ}" in
+    all|ft32-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=mips
+        SIM_PRIMARY_TARGET=ft32
       fi
-            subdirs="$subdirs mips"
-
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " ft32"
 
-    ac_config_commands="$ac_config_commands depdir-mips"
+  ac_config_files="$ac_config_files ft32/.gdbinit:common/gdbinit.in"
 
 
-      sim_igen=yes
+      sim_enable_arch_ft32=true
       ;;
   esac
 
-      case "${targ}" in
-    all|mn10300*-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=mn10300
-      fi
-            subdirs="$subdirs mn10300"
 
 
-    ac_config_commands="$ac_config_commands depdir-mn10300"
 
+  if test "$SIM_PRIMARY_TARGET" = "ft32"; then :
+      : "${AS_FOR_TARGET_FT32:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_FT32:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_FT32:=\$(CC_FOR_TARGET)}"
 
-      sim_igen=yes
-      ;;
-  esac
+fi
 
-      case "${targ}" in
-    all|moxie-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=moxie
-      fi
-            ac_config_files="$ac_config_files moxie/Makefile.sim:moxie/Makefile.in"
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_FT32 LD_FOR_TARGET_FT32 CC_FOR_TARGET_FT32"
 
-    ac_config_commands="$ac_config_commands moxie/Makefile"
+   if ${sim_enable_arch_ft32}; then
+  SIM_ENABLE_ARCH_ft32_TRUE=
+  SIM_ENABLE_ARCH_ft32_FALSE='#'
+else
+  SIM_ENABLE_ARCH_ft32_TRUE='#'
+  SIM_ENABLE_ARCH_ft32_FALSE=
+fi
 
-    as_fn_append SIM_SUBDIRS " moxie"
 
-    ac_config_commands="$ac_config_commands depdir-moxie"
+      sim_enable_arch_h8300=false
+  case "${targ}" in
+    all|h8300*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=h8300
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " h8300"
 
+  ac_config_files="$ac_config_files h8300/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_h8300=true
       ;;
   esac
 
-      case "${targ}" in
-    all|msp430*-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=msp430
-      fi
-            ac_config_files="$ac_config_files msp430/Makefile.sim:msp430/Makefile.in"
 
-    ac_config_commands="$ac_config_commands msp430/Makefile"
 
-    as_fn_append SIM_SUBDIRS " msp430"
 
-    ac_config_commands="$ac_config_commands depdir-msp430"
+  if test "$SIM_PRIMARY_TARGET" = "h8300"; then :
+      : "${AS_FOR_TARGET_H8300:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_H8300:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_H8300:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_H8300 LD_FOR_TARGET_H8300 CC_FOR_TARGET_H8300"
 
-      ;;
-  esac
+   if ${sim_enable_arch_h8300}; then
+  SIM_ENABLE_ARCH_h8300_TRUE=
+  SIM_ENABLE_ARCH_h8300_FALSE='#'
+else
+  SIM_ENABLE_ARCH_h8300_TRUE='#'
+  SIM_ENABLE_ARCH_h8300_FALSE=
+fi
 
-      case "${targ}" in
-    all|or1k-*-* | or1knd-*-*)
+
+      sim_enable_arch_iq2000=false
+  case "${targ}" in
+    all|iq2000-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=or1k
+        SIM_PRIMARY_TARGET=iq2000
       fi
-            subdirs="$subdirs or1k"
-
-
-    ac_config_commands="$ac_config_commands depdir-or1k"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " iq2000"
 
+  ac_config_files="$ac_config_files iq2000/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_iq2000=true
       ;;
   esac
 
-      case "${targ}" in
-    all|pru*-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=pru
-      fi
-            ac_config_files="$ac_config_files pru/Makefile.sim:pru/Makefile.in"
 
-    ac_config_commands="$ac_config_commands pru/Makefile"
 
-    as_fn_append SIM_SUBDIRS " pru"
 
-    ac_config_commands="$ac_config_commands depdir-pru"
+  if test "$SIM_PRIMARY_TARGET" = "iq2000"; then :
+      : "${AS_FOR_TARGET_IQ2000:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_IQ2000:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_IQ2000:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_IQ2000 LD_FOR_TARGET_IQ2000 CC_FOR_TARGET_IQ2000"
 
-      ;;
-  esac
+   if ${sim_enable_arch_iq2000}; then
+  SIM_ENABLE_ARCH_iq2000_TRUE=
+  SIM_ENABLE_ARCH_iq2000_FALSE='#'
+else
+  SIM_ENABLE_ARCH_iq2000_TRUE='#'
+  SIM_ENABLE_ARCH_iq2000_FALSE=
+fi
 
-      case "${targ}" in
-    all|riscv*-*-*)
+
+      sim_enable_arch_lm32=false
+  case "${targ}" in
+    all|lm32-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=riscv
+        SIM_PRIMARY_TARGET=lm32
       fi
-            subdirs="$subdirs riscv"
-
-
-    ac_config_commands="$ac_config_commands depdir-riscv"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " lm32"
 
+  ac_config_files="$ac_config_files lm32/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_lm32=true
       ;;
   esac
 
-      case "${targ}" in
-    all|rl78-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=rl78
-      fi
-            ac_config_files="$ac_config_files rl78/Makefile.sim:rl78/Makefile.in"
 
-    ac_config_commands="$ac_config_commands rl78/Makefile"
 
-    as_fn_append SIM_SUBDIRS " rl78"
 
-    ac_config_commands="$ac_config_commands depdir-rl78"
+  if test "$SIM_PRIMARY_TARGET" = "lm32"; then :
+      : "${AS_FOR_TARGET_LM32:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_LM32:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_LM32:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_LM32 LD_FOR_TARGET_LM32 CC_FOR_TARGET_LM32"
 
-      ;;
-  esac
+   if ${sim_enable_arch_lm32}; then
+  SIM_ENABLE_ARCH_lm32_TRUE=
+  SIM_ENABLE_ARCH_lm32_FALSE='#'
+else
+  SIM_ENABLE_ARCH_lm32_TRUE='#'
+  SIM_ENABLE_ARCH_lm32_FALSE=
+fi
 
-      case "${targ}" in
-    all|rx-*-*)
+
+      sim_enable_arch_m32c=false
+  case "${targ}" in
+    all|m32c-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=rx
+        SIM_PRIMARY_TARGET=m32c
       fi
-            ac_config_files="$ac_config_files rx/Makefile.sim:rx/Makefile.in"
-
-    ac_config_commands="$ac_config_commands rx/Makefile"
-
-    as_fn_append SIM_SUBDIRS " rx"
-
-    ac_config_commands="$ac_config_commands depdir-rx"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " m32c"
 
+  ac_config_files="$ac_config_files m32c/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_m32c=true
       ;;
   esac
 
-      case "${targ}" in
-    all|sh*-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=sh
-      fi
-            ac_config_files="$ac_config_files sh/Makefile.sim:sh/Makefile.in"
 
-    ac_config_commands="$ac_config_commands sh/Makefile"
 
-    as_fn_append SIM_SUBDIRS " sh"
 
-    ac_config_commands="$ac_config_commands depdir-sh"
+  if test "$SIM_PRIMARY_TARGET" = "m32c"; then :
+      : "${AS_FOR_TARGET_M32C:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_M32C:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_M32C:=\$(CC_FOR_TARGET)}"
 
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_M32C LD_FOR_TARGET_M32C CC_FOR_TARGET_M32C"
 
-      ;;
-  esac
+   if ${sim_enable_arch_m32c}; then
+  SIM_ENABLE_ARCH_m32c_TRUE=
+  SIM_ENABLE_ARCH_m32c_FALSE='#'
+else
+  SIM_ENABLE_ARCH_m32c_TRUE='#'
+  SIM_ENABLE_ARCH_m32c_FALSE=
+fi
 
-      case "${targ}" in
-    all|sparc-*-rtems*|sparc-*-elf*)
+
+      sim_enable_arch_m32r=false
+  case "${targ}" in
+    all|m32r-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=erc32
+        SIM_PRIMARY_TARGET=m32r
       fi
-            subdirs="$subdirs erc32"
-
-
-    ac_config_commands="$ac_config_commands depdir-erc32"
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " m32r"
 
+  ac_config_files="$ac_config_files m32r/.gdbinit:common/gdbinit.in"
 
 
+      sim_enable_arch_m32r=true
       ;;
   esac
 
-      case "${targ}" in
-    all|powerpc*-*-*)
-      if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=ppc
-      fi
-            subdirs="$subdirs ppc"
 
 
-    ac_config_commands="$ac_config_commands depdir-ppc"
 
+  if test "$SIM_PRIMARY_TARGET" = "m32r"; then :
+      : "${AS_FOR_TARGET_M32R:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_M32R:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_M32R:=\$(CC_FOR_TARGET)}"
 
+fi
 
-      ;;
-  esac
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_M32R LD_FOR_TARGET_M32R CC_FOR_TARGET_M32R"
 
-      case "${targ}" in
-    all|v850*-*-*)
+   if ${sim_enable_arch_m32r}; then
+  SIM_ENABLE_ARCH_m32r_TRUE=
+  SIM_ENABLE_ARCH_m32r_FALSE='#'
+else
+  SIM_ENABLE_ARCH_m32r_TRUE='#'
+  SIM_ENABLE_ARCH_m32r_FALSE=
+fi
+
+
+      sim_enable_arch_m68hc11=false
+  case "${targ}" in
+    all|m68hc11-*-*|m6811-*-*)
       if test "${targ}" = "${target}"; then
-        SIM_PRIMARY_TARGET=v850
+        SIM_PRIMARY_TARGET=m68hc11
       fi
-            subdirs="$subdirs v850"
-
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " m68hc11"
 
-    ac_config_commands="$ac_config_commands depdir-v850"
+  ac_config_files="$ac_config_files m68hc11/.gdbinit:common/gdbinit.in"
 
 
-      sim_igen=yes
+      sim_enable_arch_m68hc11=true
       ;;
   esac
 
-  done
 
-  if test "x${enable_example_sims}" = xyes; then
-          ac_config_files="$ac_config_files example-synacor/Makefile.sim:example-synacor/Makefile.in"
 
-    ac_config_commands="$ac_config_commands example-synacor/Makefile"
 
-    as_fn_append SIM_SUBDIRS " example-synacor"
+  if test "$SIM_PRIMARY_TARGET" = "m68hc11"; then :
+      : "${AS_FOR_TARGET_M68HC11:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_M68HC11:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_M68HC11:=\$(CC_FOR_TARGET)}"
 
-    ac_config_commands="$ac_config_commands depdir-example-synacor"
+fi
 
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_M68HC11 LD_FOR_TARGET_M68HC11 CC_FOR_TARGET_M68HC11"
 
-  fi
-fi
- if test "$sim_igen" = "yes"; then
-  SIM_ENABLE_IGEN_TRUE=
-  SIM_ENABLE_IGEN_FALSE='#'
+   if ${sim_enable_arch_m68hc11}; then
+  SIM_ENABLE_ARCH_m68hc11_TRUE=
+  SIM_ENABLE_ARCH_m68hc11_FALSE='#'
 else
-  SIM_ENABLE_IGEN_TRUE='#'
-  SIM_ENABLE_IGEN_FALSE=
+  SIM_ENABLE_ARCH_m68hc11_TRUE='#'
+  SIM_ENABLE_ARCH_m68hc11_FALSE=
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to force sim alignment" >&5
-$as_echo_n "checking whether to force sim alignment... " >&6; }
-sim_alignment=
-# Check whether --enable-sim-alignment was given.
-if test "${enable_sim_alignment+set}" = set; then :
-  enableval=$enable_sim_alignment; case "${enableval}" in
-  yes | strict | STRICT)      sim_alignment="STRICT_ALIGNMENT";;
-  no | nonstrict | NONSTRICT) sim_alignment="NONSTRICT_ALIGNMENT";;
-  forced | FORCED)            sim_alignment="FORCED_ALIGNMENT";;
-  *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5;;
-esac
-fi
+      sim_enable_arch_mcore=false
+  case "${targ}" in
+    all|mcore-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=mcore
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " mcore"
 
-cat >>confdefs.h <<_ACEOF
-#define WITH_ALIGNMENT ${sim_alignment:-0}
-_ACEOF
+  ac_config_files="$ac_config_files mcore/.gdbinit:common/gdbinit.in"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sim_alignment:-no}" >&5
-$as_echo "${sim_alignment:-no}" >&6; }
 
+      sim_enable_arch_mcore=true
+      ;;
+  esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable sim asserts" >&5
-$as_echo_n "checking whether to enable sim asserts... " >&6; }
-sim_assert="1"
-# Check whether --enable-sim-assert was given.
-if test "${enable_sim_assert+set}" = set; then :
-  enableval=$enable_sim_assert; case "${enableval}" in
-  yes) sim_assert="1";;
-  no)  sim_assert="0";;
-  *)   as_fn_error $? "--enable-sim-assert does not take a value" "$LINENO" 5;;
-esac
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define WITH_ASSERT $sim_assert
-_ACEOF
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_assert" >&5
-$as_echo "$sim_assert" >&6; }
 
+  if test "$SIM_PRIMARY_TARGET" = "mcore"; then :
+      : "${AS_FOR_TARGET_MCORE:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_MCORE:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_MCORE:=\$(CC_FOR_TARGET)}"
 
-cgen_maint=no
-cgen=guile
-cgendir='$(srcdir)/../../cgen'
-# Check whether --enable-cgen-maint was given.
-if test "${enable_cgen_maint+set}" = set; then :
-  enableval=$enable_cgen_maint; case "${enableval}" in
-  yes) cgen_maint=yes ;;
-  no)  cgen_maint=no ;;
-  *)
-       # Argument is a directory where cgen can be found.  In some
-       # future world cgen could be installable, but right now this
-       # is not the case.  Instead we assume the directory is a path
-       # to the cgen source tree.
-       cgen_maint=yes
-        if test -r ${enableval}/iformat.scm; then
-          # This looks like a cgen source tree.
-         cgendir=${enableval}
-        else
-         as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
-        fi
-       ;;
-esac
 fi
-if test x${cgen_maint} != xno ; then
-  CGEN_MAINT=''
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_MCORE LD_FOR_TARGET_MCORE CC_FOR_TARGET_MCORE"
+
+   if ${sim_enable_arch_mcore}; then
+  SIM_ENABLE_ARCH_mcore_TRUE=
+  SIM_ENABLE_ARCH_mcore_FALSE='#'
 else
-  CGEN_MAINT='#'
+  SIM_ENABLE_ARCH_mcore_TRUE='#'
+  SIM_ENABLE_ARCH_mcore_FALSE=
 fi
 
 
+      sim_enable_arch_microblaze=false
+  case "${targ}" in
+    all|microblaze*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=microblaze
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " microblaze"
 
+  ac_config_files="$ac_config_files microblaze/.gdbinit:common/gdbinit.in"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim debug setting" >&5
-$as_echo_n "checking for sim debug setting... " >&6; }
-sim_debug="0"
-# Check whether --enable-sim-debug was given.
-if test "${enable_sim_debug+set}" = set; then :
-  enableval=$enable_sim_debug; case "${enableval}" in
-  yes) sim_debug="7";;
-  no)  sim_debug="0";;
-  *)   sim_debug="($enableval)";;
-esac
-fi
-if test "$sim_debug" != "0"; then
 
-cat >>confdefs.h <<_ACEOF
-#define DEBUG $sim_debug
-_ACEOF
+      sim_enable_arch_microblaze=true
+      ;;
+  esac
 
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define WITH_DEBUG $sim_debug
-_ACEOF
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_debug" >&5
-$as_echo "$sim_debug" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to force sim endianness" >&5
-$as_echo_n "checking whether to force sim endianness... " >&6; }
-sim_endian=
-# Check whether --enable-sim-endian was given.
-if test "${enable_sim_endian+set}" = set; then :
-  enableval=$enable_sim_endian; case "${enableval}" in
-  b*|B*) sim_endian="BFD_ENDIAN_BIG";;
-  l*|L*) sim_endian="BFD_ENDIAN_LITTLE";;
-  yes | no) ;;
-  *)    as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5;;
-esac
+  if test "$SIM_PRIMARY_TARGET" = "microblaze"; then :
+      : "${AS_FOR_TARGET_MICROBLAZE:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_MICROBLAZE:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_MICROBLAZE:=\$(CC_FOR_TARGET)}"
+
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define WITH_TARGET_BYTE_ORDER ${sim_endian:-BFD_ENDIAN_UNKNOWN}
-_ACEOF
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_MICROBLAZE LD_FOR_TARGET_MICROBLAZE CC_FOR_TARGET_MICROBLAZE"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sim_alignment:-no}" >&5
-$as_echo "${sim_alignment:-no}" >&6; }
+   if ${sim_enable_arch_microblaze}; then
+  SIM_ENABLE_ARCH_microblaze_TRUE=
+  SIM_ENABLE_ARCH_microblaze_FALSE='#'
+else
+  SIM_ENABLE_ARCH_microblaze_TRUE='#'
+  SIM_ENABLE_ARCH_microblaze_FALSE=
+fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default sim environment setting" >&5
-$as_echo_n "checking default sim environment setting... " >&6; }
-sim_environment="ALL_ENVIRONMENT"
-# Check whether --enable-sim-environment was given.
+      sim_enable_arch_mips=false
+  case "${targ}" in
+    all|mips*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=mips
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " mips"
+
+  ac_config_files="$ac_config_files mips/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_mips=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "mips"; then :
+      : "${AS_FOR_TARGET_MIPS:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_MIPS:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_MIPS:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_MIPS LD_FOR_TARGET_MIPS CC_FOR_TARGET_MIPS"
+
+   if ${sim_enable_arch_mips}; then
+  SIM_ENABLE_ARCH_mips_TRUE=
+  SIM_ENABLE_ARCH_mips_FALSE='#'
+else
+  SIM_ENABLE_ARCH_mips_TRUE='#'
+  SIM_ENABLE_ARCH_mips_FALSE=
+fi
+
+
+      sim_enable_arch_mn10300=false
+  case "${targ}" in
+    all|mn10300*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=mn10300
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " mn10300"
+
+  ac_config_files="$ac_config_files mn10300/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_mn10300=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "mn10300"; then :
+      : "${AS_FOR_TARGET_MN10300:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_MN10300:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_MN10300:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_MN10300 LD_FOR_TARGET_MN10300 CC_FOR_TARGET_MN10300"
+
+   if ${sim_enable_arch_mn10300}; then
+  SIM_ENABLE_ARCH_mn10300_TRUE=
+  SIM_ENABLE_ARCH_mn10300_FALSE='#'
+else
+  SIM_ENABLE_ARCH_mn10300_TRUE='#'
+  SIM_ENABLE_ARCH_mn10300_FALSE=
+fi
+
+
+      sim_enable_arch_moxie=false
+  case "${targ}" in
+    all|moxie-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=moxie
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " moxie"
+
+  ac_config_files="$ac_config_files moxie/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_moxie=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "moxie"; then :
+      : "${AS_FOR_TARGET_MOXIE:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_MOXIE:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_MOXIE:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_MOXIE LD_FOR_TARGET_MOXIE CC_FOR_TARGET_MOXIE"
+
+   if ${sim_enable_arch_moxie}; then
+  SIM_ENABLE_ARCH_moxie_TRUE=
+  SIM_ENABLE_ARCH_moxie_FALSE='#'
+else
+  SIM_ENABLE_ARCH_moxie_TRUE='#'
+  SIM_ENABLE_ARCH_moxie_FALSE=
+fi
+
+
+      sim_enable_arch_msp430=false
+  case "${targ}" in
+    all|msp430*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=msp430
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " msp430"
+
+  ac_config_files="$ac_config_files msp430/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_msp430=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "msp430"; then :
+      : "${AS_FOR_TARGET_MSP430:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_MSP430:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_MSP430:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_MSP430 LD_FOR_TARGET_MSP430 CC_FOR_TARGET_MSP430"
+
+   if ${sim_enable_arch_msp430}; then
+  SIM_ENABLE_ARCH_msp430_TRUE=
+  SIM_ENABLE_ARCH_msp430_FALSE='#'
+else
+  SIM_ENABLE_ARCH_msp430_TRUE='#'
+  SIM_ENABLE_ARCH_msp430_FALSE=
+fi
+
+
+      sim_enable_arch_or1k=false
+  case "${targ}" in
+    all|or1k*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=or1k
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " or1k"
+
+  ac_config_files="$ac_config_files or1k/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_or1k=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "or1k"; then :
+      : "${AS_FOR_TARGET_OR1K:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_OR1K:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_OR1K:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_OR1K LD_FOR_TARGET_OR1K CC_FOR_TARGET_OR1K"
+
+   if ${sim_enable_arch_or1k}; then
+  SIM_ENABLE_ARCH_or1k_TRUE=
+  SIM_ENABLE_ARCH_or1k_FALSE='#'
+else
+  SIM_ENABLE_ARCH_or1k_TRUE='#'
+  SIM_ENABLE_ARCH_or1k_FALSE=
+fi
+
+
+      sim_enable_arch_ppc=false
+  case "${targ}" in
+    all|powerpc*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=ppc
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " ppc"
+      ac_config_files="$ac_config_files ppc/Makefile"
+
+
+  ac_config_files="$ac_config_files ppc/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_ppc=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "ppc"; then :
+      : "${AS_FOR_TARGET_PPC:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_PPC:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_PPC:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_PPC LD_FOR_TARGET_PPC CC_FOR_TARGET_PPC"
+
+   if ${sim_enable_arch_ppc}; then
+  SIM_ENABLE_ARCH_ppc_TRUE=
+  SIM_ENABLE_ARCH_ppc_FALSE='#'
+else
+  SIM_ENABLE_ARCH_ppc_TRUE='#'
+  SIM_ENABLE_ARCH_ppc_FALSE=
+fi
+
+
+      sim_enable_arch_pru=false
+  case "${targ}" in
+    all|pru*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=pru
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " pru"
+
+  ac_config_files="$ac_config_files pru/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_pru=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "pru"; then :
+      : "${AS_FOR_TARGET_PRU:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_PRU:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_PRU:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_PRU LD_FOR_TARGET_PRU CC_FOR_TARGET_PRU"
+
+   if ${sim_enable_arch_pru}; then
+  SIM_ENABLE_ARCH_pru_TRUE=
+  SIM_ENABLE_ARCH_pru_FALSE='#'
+else
+  SIM_ENABLE_ARCH_pru_TRUE='#'
+  SIM_ENABLE_ARCH_pru_FALSE=
+fi
+
+
+      sim_enable_arch_riscv=false
+  case "${targ}" in
+    all|riscv*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=riscv
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " riscv"
+
+  ac_config_files="$ac_config_files riscv/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_riscv=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "riscv"; then :
+      : "${AS_FOR_TARGET_RISCV:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_RISCV:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_RISCV:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_RISCV LD_FOR_TARGET_RISCV CC_FOR_TARGET_RISCV"
+
+   if ${sim_enable_arch_riscv}; then
+  SIM_ENABLE_ARCH_riscv_TRUE=
+  SIM_ENABLE_ARCH_riscv_FALSE='#'
+else
+  SIM_ENABLE_ARCH_riscv_TRUE='#'
+  SIM_ENABLE_ARCH_riscv_FALSE=
+fi
+
+
+      sim_enable_arch_rl78=false
+  case "${targ}" in
+    all|rl78-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=rl78
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " rl78"
+
+  ac_config_files="$ac_config_files rl78/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_rl78=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "rl78"; then :
+      : "${AS_FOR_TARGET_RL78:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_RL78:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_RL78:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_RL78 LD_FOR_TARGET_RL78 CC_FOR_TARGET_RL78"
+
+   if ${sim_enable_arch_rl78}; then
+  SIM_ENABLE_ARCH_rl78_TRUE=
+  SIM_ENABLE_ARCH_rl78_FALSE='#'
+else
+  SIM_ENABLE_ARCH_rl78_TRUE='#'
+  SIM_ENABLE_ARCH_rl78_FALSE=
+fi
+
+
+      sim_enable_arch_rx=false
+  case "${targ}" in
+    all|rx-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=rx
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " rx"
+
+  ac_config_files="$ac_config_files rx/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_rx=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "rx"; then :
+      : "${AS_FOR_TARGET_RX:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_RX:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_RX:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_RX LD_FOR_TARGET_RX CC_FOR_TARGET_RX"
+
+   if ${sim_enable_arch_rx}; then
+  SIM_ENABLE_ARCH_rx_TRUE=
+  SIM_ENABLE_ARCH_rx_FALSE='#'
+else
+  SIM_ENABLE_ARCH_rx_TRUE='#'
+  SIM_ENABLE_ARCH_rx_FALSE=
+fi
+
+
+      sim_enable_arch_sh=false
+  case "${targ}" in
+    all|sh*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=sh
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " sh"
+
+  ac_config_files="$ac_config_files sh/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_sh=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "sh"; then :
+      : "${AS_FOR_TARGET_SH:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_SH:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_SH:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_SH LD_FOR_TARGET_SH CC_FOR_TARGET_SH"
+
+   if ${sim_enable_arch_sh}; then
+  SIM_ENABLE_ARCH_sh_TRUE=
+  SIM_ENABLE_ARCH_sh_FALSE='#'
+else
+  SIM_ENABLE_ARCH_sh_TRUE='#'
+  SIM_ENABLE_ARCH_sh_FALSE=
+fi
+
+
+      sim_enable_arch_erc32=false
+  case "${targ}" in
+    all|sparc-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=erc32
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " erc32"
+
+  ac_config_files="$ac_config_files erc32/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_erc32=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "erc32"; then :
+      : "${AS_FOR_TARGET_ERC32:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_ERC32:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_ERC32:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_ERC32 LD_FOR_TARGET_ERC32 CC_FOR_TARGET_ERC32"
+
+   if ${sim_enable_arch_erc32}; then
+  SIM_ENABLE_ARCH_erc32_TRUE=
+  SIM_ENABLE_ARCH_erc32_FALSE='#'
+else
+  SIM_ENABLE_ARCH_erc32_TRUE='#'
+  SIM_ENABLE_ARCH_erc32_FALSE=
+fi
+
+
+      sim_enable_arch_v850=false
+  case "${targ}" in
+    all|v850*-*-*)
+      if test "${targ}" = "${target}"; then
+        SIM_PRIMARY_TARGET=v850
+      fi
+        ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " v850"
+
+  ac_config_files="$ac_config_files v850/.gdbinit:common/gdbinit.in"
+
+
+      sim_enable_arch_v850=true
+      ;;
+  esac
+
+
+
+
+  if test "$SIM_PRIMARY_TARGET" = "v850"; then :
+      : "${AS_FOR_TARGET_V850:=\$(AS_FOR_TARGET)}"
+    : "${LD_FOR_TARGET_V850:=\$(LD_FOR_TARGET)}"
+    : "${CC_FOR_TARGET_V850:=\$(CC_FOR_TARGET)}"
+
+fi
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_V850 LD_FOR_TARGET_V850 CC_FOR_TARGET_V850"
+
+   if ${sim_enable_arch_v850}; then
+  SIM_ENABLE_ARCH_v850_TRUE=
+  SIM_ENABLE_ARCH_v850_FALSE='#'
+else
+  SIM_ENABLE_ARCH_v850_TRUE='#'
+  SIM_ENABLE_ARCH_v850_FALSE=
+fi
+
+
+  done
+
+  if test "x${enable_example_sims}" = xyes; then
+
+
+
+
+  : "${AS_FOR_TARGET_EXAMPLE_SYNACOR:=\$(AS_FOR_TARGET)}"
+  : "${LD_FOR_TARGET_EXAMPLE_SYNACOR:=\$(LD_FOR_TARGET)}"
+  : "${CC_FOR_TARGET_EXAMPLE_SYNACOR:=\$(CC)}"
+
+as_fn_append SIM_TOOLCHAIN_VARS " AS_FOR_TARGET_EXAMPLE_SYNACOR LD_FOR_TARGET_EXAMPLE_SYNACOR CC_FOR_TARGET_EXAMPLE_SYNACOR"
+
+      ENABLE_SIM=yes
+  as_fn_append SIM_ENABLED_ARCHES " example-synacor"
+
+  ac_config_files="$ac_config_files example-synacor/.gdbinit:common/gdbinit.in"
+
+
+  fi
+   if test "${enable_example_sims}" = "yes"; then
+  SIM_ENABLE_ARCH_examples_TRUE=
+  SIM_ENABLE_ARCH_examples_FALSE='#'
+else
+  SIM_ENABLE_ARCH_examples_TRUE='#'
+  SIM_ENABLE_ARCH_examples_FALSE=
+fi
+
+fi
+ if test "$ENABLE_SIM" = "yes"; then
+  ENABLE_SIM_TRUE=
+  ENABLE_SIM_FALSE='#'
+else
+  ENABLE_SIM_TRUE='#'
+  ENABLE_SIM_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to force sim alignment" >&5
+$as_echo_n "checking whether to force sim alignment... " >&6; }
+sim_alignment=
+# Check whether --enable-sim-alignment was given.
+if test "${enable_sim_alignment+set}" = set; then :
+  enableval=$enable_sim_alignment; case "${enableval}" in
+  yes | strict | STRICT)      sim_alignment="STRICT_ALIGNMENT";;
+  no | nonstrict | NONSTRICT) sim_alignment="NONSTRICT_ALIGNMENT";;
+  forced | FORCED)            sim_alignment="FORCED_ALIGNMENT";;
+  *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5;;
+esac
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_ALIGNMENT ${sim_alignment:-0}
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sim_alignment:-no}" >&5
+$as_echo "${sim_alignment:-no}" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable sim asserts" >&5
+$as_echo_n "checking whether to enable sim asserts... " >&6; }
+sim_assert="1"
+# Check whether --enable-sim-assert was given.
+if test "${enable_sim_assert+set}" = set; then :
+  enableval=$enable_sim_assert; case "${enableval}" in
+  yes) sim_assert="1";;
+  no)  sim_assert="0";;
+  *)   as_fn_error $? "--enable-sim-assert does not take a value" "$LINENO" 5;;
+esac
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_ASSERT $sim_assert
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_assert" >&5
+$as_echo "$sim_assert" >&6; }
+
+
+cgen_maint=no
+cgen=guile
+cgendir='$(srcdir)/../../cgen'
+if test -r ${srcdir}/../cgen/iformat.scm; then
+    cgendir='$(srcdir)/../cgen'
+fi
+# Check whether --enable-cgen-maint was given.
+if test "${enable_cgen_maint+set}" = set; then :
+  enableval=$enable_cgen_maint; case "${enableval}" in
+  yes) cgen_maint=yes ;;
+  no)  cgen_maint=no ;;
+  *)
+       # Argument is a directory where cgen can be found.  In some
+       # future world cgen could be installable, but right now this
+       # is not the case.  Instead we assume the directory is a path
+       # to the cgen source tree.
+       cgen_maint=yes
+        if test -r ${enableval}/iformat.scm; then
+          # This looks like a cgen source tree.
+         cgendir=${enableval}
+        else
+         as_fn_error $? "${enableval} doesn't look like a cgen source tree" "$LINENO" 5
+        fi
+       ;;
+esac
+fi
+if test x${cgen_maint} != xno ; then
+  CGEN_MAINT=''
+else
+  CGEN_MAINT='#'
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim debug setting" >&5
+$as_echo_n "checking for sim debug setting... " >&6; }
+sim_debug="0"
+# Check whether --enable-sim-debug was given.
+if test "${enable_sim_debug+set}" = set; then :
+  enableval=$enable_sim_debug; case "${enableval}" in
+  yes) sim_debug="7";;
+  no)  sim_debug="0";;
+  *)   sim_debug="($enableval)";;
+esac
+fi
+if test "$sim_debug" != "0"; then
+
+cat >>confdefs.h <<_ACEOF
+#define DEBUG $sim_debug
+_ACEOF
+
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_DEBUG $sim_debug
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_debug" >&5
+$as_echo "$sim_debug" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to force sim endianness" >&5
+$as_echo_n "checking whether to force sim endianness... " >&6; }
+sim_endian=
+# Check whether --enable-sim-endian was given.
+if test "${enable_sim_endian+set}" = set; then :
+  enableval=$enable_sim_endian; case "${enableval}" in
+  b*|B*) sim_endian="BFD_ENDIAN_BIG";;
+  l*|L*) sim_endian="BFD_ENDIAN_LITTLE";;
+  yes | no) ;;
+  *)    as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5;;
+esac
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_TARGET_BYTE_ORDER ${sim_endian:-BFD_ENDIAN_UNKNOWN}
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sim_alignment:-no}" >&5
+$as_echo "${sim_alignment:-no}" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default sim environment setting" >&5
+$as_echo_n "checking default sim environment setting... " >&6; }
+sim_environment="ALL_ENVIRONMENT"
+# Check whether --enable-sim-environment was given.
 if test "${enable_sim_environment+set}" = set; then :
   enableval=$enable_sim_environment; case "${enableval}" in
   all | ALL)             sim_environment="ALL_ENVIRONMENT";;
@@ -14255,270 +15965,1128 @@ if test "${enable_sim_environment+set}" = set; then :
 esac
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define WITH_ENVIRONMENT $sim_environment
-_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define WITH_ENVIRONMENT $sim_environment
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_environment" >&5
+$as_echo "$sim_environment" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim hardware settings" >&5
+$as_echo_n "checking for sim hardware settings... " >&6; }
+# Check whether --enable-sim-hardware was given.
+if test "${enable_sim_hardware+set}" = set; then :
+  enableval=$enable_sim_hardware;
+else
+  enable_sim_hardware="yes"
+fi
+
+sim_hw_sockser=
+if test "$enable_sim_hardware" = no; then
+  sim_hw_cflags="-DWITH_HW=0"
+elif test "$enable_sim_hardware" = yes; then
+  sim_hw_cflags="-DWITH_HW=1"
+        sim_hw_sockser="dv-sockser.o"
+  sim_hw_cflags="$sim_hw_cflags -DHAVE_DV_SOCKSER"
+else
+  as_fn_error $? "unknown argument \"$enable_sim_hardware\"" "$LINENO" 5
+fi
+ if test "$enable_sim_hardware" = "yes"; then
+  SIM_ENABLE_HW_TRUE=
+  SIM_ENABLE_HW_FALSE='#'
+else
+  SIM_ENABLE_HW_TRUE='#'
+  SIM_ENABLE_HW_FALSE=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_sim_hardware}" >&5
+$as_echo "${enable_sim_hardware}" >&6; }
+SIM_HW_CFLAGS=$sim_hw_cflags
+
+SIM_HW_SOCKSER=$sim_hw_sockser
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sim inline settings" >&5
+$as_echo_n "checking sim inline settings... " >&6; }
+sim_inline="-DDEFAULT_INLINE=0"
+# Check whether --enable-sim-inline was given.
+if test "${enable_sim_inline+set}" = set; then :
+  enableval=$enable_sim_inline; sim_inline=""
+case "$enableval" in
+  no)          sim_inline="-DDEFAULT_INLINE=0";;
+  0)           sim_inline="-DDEFAULT_INLINE=0";;
+  yes | 2)     sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
+  1)           sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
+  *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
+       new_flag=""
+       case "$x" in
+        *_INLINE=*)    new_flag="-D$x";;
+        *=*)           new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
+        *_INLINE)      new_flag="-D$x=ALL_C_INLINE";;
+        *)             new_flag="-D$x""_INLINE=ALL_C_INLINE";;
+       esac
+       if test x"$sim_inline" = x""; then
+        sim_inline="$new_flag"
+       else
+        sim_inline="$sim_inline $new_flag"
+       fi
+     done;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_inline" >&5
+$as_echo "$sim_inline" >&6; }
+SIM_INLINE=$sim_inline
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim profile settings" >&5
+$as_echo_n "checking for sim profile settings... " >&6; }
+profile="1"
+sim_profile="-1"
+# Check whether --enable-sim-profile was given.
+if test "${enable_sim_profile+set}" = set; then :
+  enableval=$enable_sim_profile; case "${enableval}" in
+  yes) profile="1" sim_profile="-1";;
+  no)  profile="0" sim_profile="0";;
+  [-0-9]*)
+       profile="(${enableval})" sim_profile="(${enableval})";;
+  [a-z]*)
+    profile="1"
+       sim_profile=""
+       for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
+         if test x"$sim_profile" = x; then
+           sim_profile="(PROFILE_$x"
+         else
+           sim_profile="${sim_profile}|PROFILE_$x"
+         fi
+       done
+       sim_profile="$sim_profile)" ;;
+esac
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define PROFILE $profile
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_PROFILE $sim_profile
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_profile" >&5
+$as_echo "$sim_profile" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to check reserved bits in instruction" >&5
+$as_echo_n "checking whether to check reserved bits in instruction... " >&6; }
+# Check whether --enable-sim-reserved-bits was given.
+if test "${enable_sim_reserved_bits+set}" = set; then :
+  enableval=$enable_sim_reserved_bits; case "${enableval}" in
+yes|no) ;;
+*) as_fn_error $? "\"--enable-sim-reserved-bits does not take a value\"" "$LINENO" 5;;
+esac
+fi
+
+if test "x${enable_sim_reserved_bits}" != xno; then
+  sim_reserved_bits=1
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  sim_reserved_bits=0
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_RESERVED_BITS $sim_reserved_bits
+_ACEOF
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim cache size" >&5
+$as_echo_n "checking for sim cache size... " >&6; }
+sim_scache="16384"
+# Check whether --enable-sim-scache was given.
+if test "${enable_sim_scache+set}" = set; then :
+  enableval=$enable_sim_scache; case "${enableval}" in
+  yes) ;;
+  no)  sim_scache="0";;
+  [0-9]*) sim_scache="${enableval}";;
+  *)   as_fn_error $? "\"Bad value $enableval passed to --enable-sim-scache\"" "$LINENO" 5;;
+esac
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_SCACHE $sim_scache
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_scache" >&5
+$as_echo "$sim_scache" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of sim cpus to support" >&5
+$as_echo_n "checking number of sim cpus to support... " >&6; }
+default_sim_smp="0"
+sim_smp="$default_sim_smp"
+# Check whether --enable-sim-smp was given.
+if test "${enable_sim_smp+set}" = set; then :
+  enableval=$enable_sim_smp; case "${enableval}" in
+  yes) sim_smp="5";;
+  no)  sim_smp="0";;
+  *)   sim_smp="$enableval";;
+esac
+fi
+IGEN_FLAGS_SMP="-N ${sim_smp}"
+
+if test "x$sim_smp" = x0; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_SMP $sim_smp
+_ACEOF
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_smp" >&5
+$as_echo "$sim_smp" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim stdio debug behavior" >&5
+$as_echo_n "checking for sim stdio debug behavior... " >&6; }
+sim_stdio="0"
+# Check whether --enable-sim-stdio was given.
+if test "${enable_sim_stdio+set}" = set; then :
+  enableval=$enable_sim_stdio; case "${enableval}" in
+  yes) sim_stdio="DO_USE_STDIO";;
+  no)  sim_stdio="DONT_USE_STDIO";;
+  *)   as_fn_error $? "Unknown value $enableval passed to --enable-sim-stdio" "$LINENO" 5;;
+esac
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_STDIO $sim_stdio
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_stdio" >&5
+$as_echo "$sim_stdio" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim trace settings" >&5
+$as_echo_n "checking for sim trace settings... " >&6; }
+sim_trace="~TRACE_debug"
+# Check whether --enable-sim-trace was given.
+if test "${enable_sim_trace+set}" = set; then :
+  enableval=$enable_sim_trace; case "${enableval}" in
+  yes) sim_trace="-1";;
+  no)  sim_trace="0";;
+  [-0-9]*)
+       sim_trace="'(${enableval})'";;
+  [[:lower:]]*)
+       sim_trace=""
+       for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
+         if test x"$sim_trace" = x; then
+           sim_trace="(TRACE_$x"
+         else
+           sim_trace="${sim_trace}|TRACE_$x"
+         fi
+       done
+       sim_trace="$sim_trace)" ;;
+esac
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_TRACE $sim_trace
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_trace" >&5
+$as_echo "$sim_trace" >&6; }
+
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror; case "${enableval}" in
+     yes | y) ERROR_ON_WARNING="yes" ;;
+     no | n)  ERROR_ON_WARNING="no" ;;
+     *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
+   esac
+fi
+
+
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
+  ERROR_ON_WARNING=yes
+fi
+
+WERROR_CFLAGS=""
+if test "${ERROR_ON_WARNING}" = yes ; then
+  WERROR_CFLAGS="-Werror"
+fi
+
+build_warnings="-Wall -Wpointer-arith
+-Wno-unused -Wunused-value -Wunused-variable -Wunused-function
+-Wno-switch -Wno-char-subscripts
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable
+-Wno-sign-compare -Wno-error=maybe-uninitialized
+-Wno-error=deprecated-register
+-Wimplicit-fallthrough=5
+-Wduplicated-cond
+-Wmissing-declarations
+"
+build_warnings="$build_warnings
+-Wdeclaration-after-statement
+-Wdeprecated-non-prototype
+-Wimplicit-function-declaration
+-Wimplicit-int
+-Wincompatible-function-pointer-types
+-Wincompatible-pointer-types
+-Wint-conversion
+-Wmisleading-indentation
+-Wmissing-parameter-type
+-Wmissing-prototypes
+-Wold-style-declaration
+-Wold-style-definition
+-Wpointer-sign
+-Wreturn-mismatch
+-Wreturn-type
+-Wstrict-prototypes
+-Wno-enum-conversion
+"
+
+case "${host}" in
+  *-*-mingw32*)
+    # Enable -Wno-format by default when using gcc on mingw since many
+    # GCC versions complain about %I64.
+    build_warnings="$build_warnings -Wno-format" ;;
+  *-*-solaris*)
+    # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
+    # doesn't understand.
+    build_warnings="$build_warnings -Wno-unknown-pragmas"
+    # Solaris 11 <unistd.h> marks vfork deprecated.
+    build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
+  *)
+    # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
+    # but there's a special case for this below.
+    build_warnings="$build_warnings -Wformat-nonliteral" ;;
+esac
+
+# Check whether --enable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then :
+  enableval=$enable_build_warnings; case "${enableval}" in
+  yes) ;;
+  no)  build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then :
+  enableval=$enable_sim_build_warnings; case "${enableval}" in
+  yes) ;;
+  no)  build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
+then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
+$as_echo_n "checking compiler warning flags... " >&6; }
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+       case $w in
+       -Werr*) WERROR_CFLAGS=-Werror ;;
+       *)       w="$w"
+  case $w in
+  -Wno-*)
+    wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+  -Wformat-nonliteral)
+            w="-Wformat $w"
+    wtest="$w"
+    ;;
+  *)
+    wtest=$w ;;
+  esac
+
+    saved_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Werror $wtest"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$saved_CFLAGS"
+ ;;
+       esac
+    done
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
+$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-shadow=local is supported" >&5
+$as_echo_n "checking whether -Wno-shadow=local is supported... " >&6; }
+        w="-Wno-shadow=local"
+  case $w in
+  -Wno-*)
+    wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+  -Wformat-nonliteral)
+            w="-Wformat $w"
+    wtest="$w"
+    ;;
+  *)
+    wtest=$w ;;
+  esac
+
+    saved_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Werror $wtest"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+        SIM_CFLAG_WNO_SHADOW_LOCAL=-Wno-shadow=local
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$saved_CFLAGS"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-unused-but-set-variable is supported" >&5
+$as_echo_n "checking whether -Wno-unused-but-set-variable is supported... " >&6; }
+        w="-Wno-unused-but-set-variable"
+  case $w in
+  -Wno-*)
+    wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+  -Wformat-nonliteral)
+            w="-Wformat $w"
+    wtest="$w"
+    ;;
+  *)
+    wtest=$w ;;
+  esac
+
+    saved_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Werror $wtest"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+        SIM_CFLAG_WNO_UNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$saved_CFLAGS"
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sim frv should dump cpu state on unknown traps" >&5
+$as_echo_n "checking whether sim frv should dump cpu state on unknown traps... " >&6; }
+# Check whether --enable-sim-frv-trapdump was given.
+if test "${enable_sim_frv_trapdump+set}" = set; then :
+  enableval=$enable_sim_frv_trapdump; case "${enableval}" in
+yes|no) ;;
+*) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-trapdump\"" "$LINENO" 5;;
+esac
+fi
+
+if test "x${enable_sim_frv_trapdump}" = xyes; then
+  SIM_FRV_TRAPDUMP_FLAGS="-DTRAPDUMP=1"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  SIM_FRV_TRAPDUMP_FLAGS="-DTRAPDUMP=0"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_environment" >&5
-$as_echo "$sim_environment" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim hardware settings" >&5
-$as_echo_n "checking for sim hardware settings... " >&6; }
-# Check whether --enable-sim-hardware was given.
-if test "${enable_sim_hardware+set}" = set; then :
-  enableval=$enable_sim_hardware;
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking mips subtarget" >&5
+$as_echo_n "checking mips subtarget... " >&6; }
+SIM_MIPS_SUBTARGET=
+case ${target} in #(
+  mips64vr*-*-*) :
+    SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
+  mips*tx39*) :
+    SIM_MIPS_SUBTARGET="-DSUBTARGET_R3900=1" ;; #(
+  mips*-sde-elf*) :
+    SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
+  mips*-mti-elf*) :
+    SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
+  mipsisa32*-*-*) :
+    SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
+  mipsisa64*-*-*) :
+    SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
+  *) :
+     ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SIM_MIPS_SUBTARGET:-none}" >&5
+$as_echo "${SIM_MIPS_SUBTARGET:-none}" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking mips bitsize" >&5
+$as_echo_n "checking mips bitsize... " >&6; }
+SIM_MIPS_BITSIZE=64
+case ${target} in #(
+  mips*-sde-elf*) :
+    SIM_MIPS_BITSIZE=64 ;; #(
+  mips*-mti-elf*) :
+    SIM_MIPS_BITSIZE=64 ;; #(
+  mips64*-*-*) :
+    SIM_MIPS_BITSIZE=64 ;; #(
+  mips16*-*-*) :
+    SIM_MIPS_BITSIZE=64 ;; #(
+  mipsisa32*-*-*) :
+    SIM_MIPS_BITSIZE=32 ;; #(
+  mipsisa64*-*-*) :
+    SIM_MIPS_BITSIZE=64 ;; #(
+  mips*-*-*) :
+    SIM_MIPS_BITSIZE=32 ;; #(
+  *) :
+     ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SIM_MIPS_BITSIZE" >&5
+$as_echo "$SIM_MIPS_BITSIZE" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking mips fpu bitsize" >&5
+$as_echo_n "checking mips fpu bitsize... " >&6; }
+SIM_MIPS_FPU_BITSIZE=64
+case ${target} in #(
+  mips*tx39*) :
+    SIM_MIPS_FPU_BITSIZE=32 ;; #(
+  mips*-sde-elf*) :
+    SIM_MIPS_FPU_BITSIZE=64 ;; #(
+  mips*-mti-elf*) :
+    SIM_MIPS_FPU_BITSIZE=64 ;; #(
+  mipsisa32*-*-*) :
+    SIM_MIPS_FPU_BITSIZE=64 ;; #(
+  mipsisa64*-*-*) :
+    SIM_MIPS_FPU_BITSIZE=64 ;; #(
+  mips*-*-*) :
+    SIM_MIPS_FPU_BITSIZE=32 ;; #(
+  *) :
+     ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SIM_MIPS_FPU_BITSIZE" >&5
+$as_echo "$SIM_MIPS_FPU_BITSIZE" >&6; }
+
+
+SIM_MIPS_GEN=SINGLE
+sim_mips_single_machine="-M mipsIV"
+sim_mips_m16_machine="-M mips16,mipsIII"
+sim_mips_single_filter="32,64,f"
+sim_mips_m16_filter="16"
+case ${target} in #(
+  mips*tx39*) :
+        SIM_MIPS_GEN=SINGLE
+    sim_mips_single_filter="32,f"
+    sim_mips_single_machine="-M r3900" ;; #(
+  mips64vr41*) :
+        SIM_MIPS_GEN=M16
+    sim_mips_single_machine="-M vr4100"
+    sim_mips_m16_machine="-M vr4100" ;; #(
+  mips64*) :
+        SIM_MIPS_GEN=MULTI
+    sim_mips_multi_configs="\
+      vr4100:mipsIII,mips16,vr4100:32,64:mips4100,mips4111\
+      vr4120:mipsIII,mips16,vr4120:32,64:mips4120\
+      vr5000:mipsIV:32,64,f:mips4300,mips5000,mips8000\
+      vr5400:mipsIV,vr5400:32,64,f:mips5400\
+      vr5500:mipsIV,vr5500:32,64,f:mips5500"
+    sim_mips_multi_default=mips5000 ;; #(
+  mips*-sde-elf* | mips*-mti-elf*) :
+        SIM_MIPS_GEN=MULTI
+    sim_mips_multi_configs="\
+      micromips:micromips64,micromipsdsp:32,64,f:mips_micromips\
+      mipsisa64r2:mips64r2,mips16,mips16e,mdmx,dsp,dsp2,mips3d,smartmips:32,64,f:mipsisa32r2,mipsisa64r2,mipsisa32r5,mipsisa64r5\
+      mipsisa64r6:mips64r6:32,64,f:mipsisa32r6,mipsisa64r6"
+    sim_mips_multi_default=mipsisa64r2 ;; #(
+  mips16*) :
+        SIM_MIPS_GEN=M16 ;; #(
+  mipsisa32r2*) :
+        SIM_MIPS_GEN=MULTI
+    sim_mips_multi_configs="\
+      micromips:micromips32,micromipsdsp:32,f:mips_micromips\
+      mips32r2:mips32r2,mips3d,mips16,mips16e,mdmx,dsp,dsp2,smartmips:32,f:mipsisa32r2"
+    sim_mips_multi_default=mipsisa32r2 ;; #(
+  mipsisa32r6*) :
+        SIM_MIPS_GEN=SINGLE
+    sim_mips_single_machine="-M mips32r6"
+    sim_mips_single_filter="32,f" ;; #(
+  mipsisa32*) :
+        SIM_MIPS_GEN=M16
+    sim_mips_single_machine="-M mips32,mips16,mips16e,smartmips"
+    sim_mips_m16_machine="-M mips16,mips16e,mips32"
+    sim_mips_single_filter="32,f" ;; #(
+  mipsisa64r2*) :
+        SIM_MIPS_GEN=M16
+    sim_mips_single_machine="-M mips64r2,mips3d,mips16,mips16e,mdmx,dsp,dsp2"
+    sim_mips_m16_machine="-M mips16,mips16e,mips64r2" ;; #(
+  mipsisa64r6*) :
+        SIM_MIPS_GEN=SINGLE
+    sim_mips_single_machine="-M mips64r6" ;; #(
+  mipsisa64sb1*) :
+        SIM_MIPS_GEN=SINGLE
+    sim_mips_single_machine="-M mips64,mips3d,sb1" ;; #(
+  mipsisa64*) :
+        SIM_MIPS_GEN=M16
+    sim_mips_single_machine="-M mips64,mips3d,mips16,mips16e,mdmx"
+    sim_mips_m16_machine="-M mips16,mips16e,mips64" ;; #(
+  mips*lsi*) :
+        SIM_MIPS_GEN=M16
+    sim_mips_single_machine="-M mipsIII,mips16"
+    sim_mips_m16_machine="-M mips16,mipsIII"
+    sim_mips_single_filter="32,f" ;; #(
+  mips*) :
+        SIM_MIPS_GEN=SINGLE
+    sim_mips_single_filter="32,f" ;; #(
+  *) :
+     ;;
+esac
+
+SIM_MIPS_IGEN_ITABLE_FLAGS=
+SIM_MIPS_MULTI_SRC=
+SIM_MIPS_MULTI_OBJ=
+SIM_MIPS_MULTI_IGEN_CONFIGS=
+if test "x$SIM_MIPS_GEN" = x"MULTI"; then :
+      if test -z "${sim_mips_multi_configs}" || test -z "${sim_mips_multi_default}"; then :
+      as_fn_error $? "Error in configure.ac: MULTI simulator not set up correctly" "$LINENO" 5
+fi
+
+    as_dir=mips; as_fn_mkdir_p
+  rm -f mips/multi-include.h mips/multi-run.c
+  sim_mips_seen_default=no
+
+  cat << __EOF__ > mips/multi-run.c
+/* Main entry point for MULTI simulators.
+   Copyright (C) 2003-2023 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   --
+
+   This file was generated by sim/mips/configure.  */
+
+#include "sim-main.h"
+#include "multi-include.h"
+#include "bfd/elf-bfd.h"
+#include "bfd/elfxx-mips.h"
+#include "elf/mips.h"
+
+#define SD sd
+#define CPU cpu
+
+void
+sim_engine_run (SIM_DESC sd,
+               int next_cpu_nr,
+               int nr_cpus,
+               int signal) /* ignore */
+{
+  int mach;
+
+  if (STATE_ARCHITECTURE (sd) == NULL)
+    mach = bfd_mach_${sim_mips_multi_default};
+  else if (elf_elfheader (STATE_PROG_BFD (sd))->e_flags
+          & EF_MIPS_ARCH_ASE_MICROMIPS)
+    mach = bfd_mach_mips_micromips;
+  else
+  {
+     mach = _bfd_elf_mips_mach (elf_elfheader (STATE_PROG_BFD (sd))->e_flags);
+     if (!mach)
+       mach = STATE_ARCHITECTURE (SD)->mach;
+  }
+
+  switch (mach)
+    {
+__EOF__
+
+  for fc in ${sim_mips_multi_configs}; do
+
+            c=`echo ${fc} | sed 's/:[^:]*$//'`
+    bfdmachs=`echo ${fc} | sed 's/.*://'`
+    name=`echo ${c} | sed 's/:.*//'`
+    machine=`echo ${c} | sed 's/.*:\(.*\):.*/\1/'`
+    filter=`echo ${c} | sed 's/.*://'`
+
+                                            as_fn_append SIM_MIPS_IGEN_ITABLE_FLAGS " -F ${filter} -M ${machine}"
+
+        case ${c} in #(
+  *:*mips16*:*) :
+               ws="m32 m16"
+
+                               as_fn_append SIM_MIPS_MULTI_SRC " mips/m16${name}_run.c"
+       as_fn_append SIM_MIPS_MULTI_OBJ " mips/m16${name}_run.o"
+       as_fn_append SIM_MIPS_IGEN_ITABLE_FLAGS " -F 16"
+        ;; #(
+  *:*micromips32*:*) :
+                       ws="micromips_m32 micromips16 micromips32"
+
+                               as_fn_append SIM_MIPS_MULTI_SRC " mips/micromips${name}_run.c"
+       as_fn_append SIM_MIPS_MULTI_OBJ " mips/micromips${name}_run.o"
+       as_fn_append SIM_MIPS_IGEN_ITABLE_FLAGS " -F 16,32"
+        ;; #(
+  *:*micromips64*:*) :
+                       ws="micromips_m64 micromips16 micromips64"
+
+                               as_fn_append SIM_MIPS_MULTI_SRC " mips/micromips${name}_run.c"
+       as_fn_append SIM_MIPS_MULTI_OBJ " mips/micromips${name}_run.o"
+       as_fn_append SIM_MIPS_IGEN_ITABLE_FLAGS " -F 16,32,64"
+        ;; #(
+  *) :
+    ws=m32 ;;
+esac
+
+            for w in ${ws}; do
+      for base in engine icache idecode model semantics support; do
+       as_fn_append SIM_MIPS_MULTI_SRC " mips/${w}${name}_${base}.c"
+       as_fn_append SIM_MIPS_MULTI_SRC " mips/${w}${name}_${base}.h"
+       as_fn_append SIM_MIPS_MULTI_OBJ " mips/${w}${name}_${base}.o"
+      done
+      as_fn_append SIM_MIPS_MULTI_IGEN_CONFIGS " ${w}${c}"
+    done
+
+            echo "#include \"${w}${name}_engine.h\"" >> mips/multi-include.h
+
+        for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
+      echo "    case bfd_mach_${mach}:" >> mips/multi-run.c
+      if test "x$mach" = x"${sim_mips_multi_default}"; then :
+       echo "    default:" >> mips/multi-run.c
+       sim_mips_seen_default=yes
+
+fi
+    done
+    echo "      ${w}${name}_engine_run (sd, next_cpu_nr, nr_cpus, signal);" \
+      >> mips/multi-run.c
+    echo "      break;" >> mips/multi-run.c
+  done
+
+    if test "x$sim_mips_seen_default" = xno; then :
+      as_fn_error $? "Error in configure.ac: \${sim_mips_multi_configs} doesn't have an entry for \${sim_mips_multi_default}" "$LINENO" 5
+fi
+
+  cat << __EOF__ >> mips/multi-run.c
+    }
+}
+__EOF__
+
 else
-  enable_sim_hardware="yes"
+      SIM_MIPS_MULTI_SRC=mips/doesnt-exist.c
+  SIM_MIPS_IGEN_ITABLE_FLAGS='$(SIM_MIPS_SINGLE_FLAGS)'
+  if test "x$SIM_MIPS_GEN" = x"M16"; then :
+  as_fn_append SIM_MIPS_IGEN_ITABLE_FLAGS ' $(SIM_MIPS_M16_FLAGS)'
 fi
 
-sim_hw_sockser=
-if test "$enable_sim_hardware" = no; then
-  sim_hw_cflags="-DWITH_HW=0"
-elif test "$enable_sim_hardware" = yes; then
-  sim_hw_cflags="-DWITH_HW=1"
-  # mingw does not support sockser
-  case ${host} in
-    *mingw*) ;;
-    *) # TODO: We don't add dv-sockser to sim_hw as it is not a "real" device
-       # that you instatiate.  Instead, other code will call into it directly.
-       # At some point, we should convert it over.
-       sim_hw_sockser="dv-sockser.o"
-       sim_hw_cflags="$sim_hw_cflags -DHAVE_DV_SOCKSER"
-       ;;
-  esac
+fi
+SIM_MIPS_SINGLE_FLAGS="-F ${sim_mips_single_filter} ${sim_mips_single_machine}"
+SIM_MIPS_M16_FLAGS="-F ${sim_mips_m16_filter} ${sim_mips_m16_machine}"
+
+
+
+
+
+
+
+ if test "$SIM_MIPS_GEN" = "SINGLE"; then
+  SIM_MIPS_GEN_MODE_SINGLE_TRUE=
+  SIM_MIPS_GEN_MODE_SINGLE_FALSE='#'
 else
-  as_fn_error $? "unknown argument \"$enable_sim_hardware\"" "$LINENO" 5
+  SIM_MIPS_GEN_MODE_SINGLE_TRUE='#'
+  SIM_MIPS_GEN_MODE_SINGLE_FALSE=
 fi
- if test "$enable_sim_hardware" = "yes"; then
-  SIM_ENABLE_HW_TRUE=
-  SIM_ENABLE_HW_FALSE='#'
+
+ if test "$SIM_MIPS_GEN" = "M16"; then
+  SIM_MIPS_GEN_MODE_M16_TRUE=
+  SIM_MIPS_GEN_MODE_M16_FALSE='#'
 else
-  SIM_ENABLE_HW_TRUE='#'
-  SIM_ENABLE_HW_FALSE=
+  SIM_MIPS_GEN_MODE_M16_TRUE='#'
+  SIM_MIPS_GEN_MODE_M16_FALSE=
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_sim_hardware}" >&5
-$as_echo "${enable_sim_hardware}" >&6; }
+ if test "$SIM_MIPS_GEN" = "MULTI"; then
+  SIM_MIPS_GEN_MODE_MULTI_TRUE=
+  SIM_MIPS_GEN_MODE_MULTI_FALSE='#'
+else
+  SIM_MIPS_GEN_MODE_MULTI_TRUE='#'
+  SIM_MIPS_GEN_MODE_MULTI_FALSE=
+fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc bitsize settings" >&5
+$as_echo_n "checking for sim ppc bitsize settings... " >&6; }
+# Check whether --enable-sim-ppc-bitsize was given.
+if test "${enable_sim_ppc_bitsize+set}" = set; then :
+  enableval=$enable_sim_ppc_bitsize; case "${enableval}" in
+  32|64) sim_ppc_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
+  *)    as_fn_error $? "\"--enable-sim-ppc-bitsize was given $enableval.  Expected 32 or 64\"" "$LINENO" 5;;
+esac
+else
+  sim_ppc_bitsize=""
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sim inline settings" >&5
-$as_echo_n "checking sim inline settings... " >&6; }
-sim_inline="-DDEFAULT_INLINE=0"
-# Check whether --enable-sim-inline was given.
-if test "${enable_sim_inline+set}" = set; then :
-  enableval=$enable_sim_inline; sim_inline=""
-case "$enableval" in
-  no)          sim_inline="-DDEFAULT_INLINE=0";;
-  0)           sim_inline="-DDEFAULT_INLINE=0";;
-  yes | 2)     sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
-  1)           sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
-  *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-       new_flag=""
-       case "$x" in
-        *_INLINE=*)    new_flag="-D$x";;
-        *=*)           new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
-        *_INLINE)      new_flag="-D$x=ALL_C_INLINE";;
-        *)             new_flag="-D$x""_INLINE=ALL_C_INLINE";;
-       esac
-       if test x"$sim_inline" = x""; then
-        sim_inline="$new_flag"
-       else
-        sim_inline="$sim_inline $new_flag"
-       fi
-     done;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_bitsize" >&5
+$as_echo "$sim_ppc_bitsize" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc decode mechanism" >&5
+$as_echo_n "checking for sim ppc decode mechanism... " >&6; }
+# Check whether --enable-sim-ppc-decode-mechanism was given.
+if test "${enable_sim_ppc_decode_mechanism+set}" = set; then :
+  enableval=$enable_sim_ppc_decode_mechanism; case "${enableval}" in
+  yes|no)      as_fn_error $? "\"No value supplied for --enable-sim-ppc-decode-mechanism=file\"" "$LINENO" 5;;
+  array|switch|padded-switch|goto-switch)      sim_ppc_decode_mechanism="-T ${enableval}";;
+  *)           as_fn_error $? "\"File $enableval is not an opcode rules file\"" "$LINENO" 5;;
 esac
+else
+  sim_ppc_decode_mechanism=""
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_decode_mechanism" >&5
+$as_echo "$sim_ppc_decode_mechanism" >&6; }
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc default model" >&5
+$as_echo_n "checking for sim ppc default model... " >&6; }
+# Check whether --enable-sim-ppc-default-model was given.
+if test "${enable_sim_ppc_default_model+set}" = set; then :
+  enableval=$enable_sim_ppc_default_model; case "${enableval}" in
+  yes|no)      as_fn_error $? "\"No value supplied for --enable-sim-ppc-default-model=model\"" "$LINENO" 5;;
+  *)           sim_ppc_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
+esac
+else
+  sim_ppc_default_model=""
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_inline" >&5
-$as_echo "$sim_inline" >&6; }
-SIM_INLINE=$sim_inline
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_default_model" >&5
+$as_echo "$sim_ppc_default_model" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim profile settings" >&5
-$as_echo_n "checking for sim profile settings... " >&6; }
-profile="1"
-sim_profile="-1"
-# Check whether --enable-sim-profile was given.
-if test "${enable_sim_profile+set}" = set; then :
-  enableval=$enable_sim_profile; case "${enableval}" in
-  yes) profile="1" sim_profile="-1";;
-  no)  profile="0" sim_profile="0";;
-  [-0-9]*)
-       profile="(${enableval})" sim_profile="(${enableval})";;
-  [a-z]*)
-    profile="1"
-       sim_profile=""
-       for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-         if test x"$sim_profile" = x; then
-           sim_profile="(PROFILE_$x"
-         else
-           sim_profile="${sim_profile}|PROFILE_$x"
-         fi
-       done
-       sim_profile="$sim_profile)" ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc duplicate settings" >&5
+$as_echo_n "checking for sim ppc duplicate settings... " >&6; }
+# Check whether --enable-sim-ppc-duplicate was given.
+if test "${enable_sim_ppc_duplicate+set}" = set; then :
+  enableval=$enable_sim_ppc_duplicate; case "${enableval}" in
+  yes) sim_ppc_dup="-E";;
+  no)  sim_ppc_dup="";;
+  *)   as_fn_error $? "\"--enable-sim-ppc-duplicate does not take a value\"" "$LINENO" 5;;
 esac
+else
+  sim_ppc_dup="-E"
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define PROFILE $profile
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_dup" >&5
+$as_echo "$sim_ppc_dup" >&6; }
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc filter rules" >&5
+$as_echo_n "checking for sim ppc filter rules... " >&6; }
+# Check whether --enable-sim-ppc-filter was given.
+if test "${enable_sim_ppc_filter+set}" = set; then :
+  enableval=$enable_sim_ppc_filter; case "${enableval}" in
+  yes) as_fn_error $? "\"--enable-sim-ppc-filter must be specified with a rule to filter or no\"" "$LINENO" 5;;
+  no)  sim_ppc_filter="";;
+  *)   sim_ppc_filter="-F $enableval";;
+esac
+else
+  sim_ppc_filter="-F 32,f,o"
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define WITH_PROFILE $sim_profile
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_filter" >&5
+$as_echo "$sim_ppc_filter" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_profile" >&5
-$as_echo "$sim_profile" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc float settings" >&5
+$as_echo_n "checking for sim ppc float settings... " >&6; }
+# Check whether --enable-sim-ppc-float was given.
+if test "${enable_sim_ppc_float+set}" = set; then :
+  enableval=$enable_sim_ppc_float; case "${enableval}" in
+  yes | hard)  sim_ppc_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
+  no | soft)   sim_ppc_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
+  altivec)      sim_ppc_float="-DWITH_ALTIVEC" ; sim_ppc_filter="${sim_ppc_filter},av" ;;
+  *spe*|*simd*) sim_ppc_float="-DWITH_E500" ; sim_ppc_filter="${sim_ppc_filter},e500" ;;
+  *)           as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-ppc-float\"" "$LINENO" 5;;
+esac
+else
+  case "${target}" in
+  *altivec*) sim_ppc_float="-DWITH_ALTIVEC" ; sim_ppc_filter="${sim_ppc_filter},av" ;;
+  *spe*|*simd*)        sim_ppc_float="-DWITH_E500" ; sim_ppc_filter="${sim_ppc_filter},e500" ;;
+  *) sim_ppc_float=""
+esac
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim stdio debug behavior" >&5
-$as_echo_n "checking for sim stdio debug behavior... " >&6; }
-sim_stdio="0"
-# Check whether --enable-sim-stdio was given.
-if test "${enable_sim_stdio+set}" = set; then :
-  enableval=$enable_sim_stdio; case "${enableval}" in
-  yes) sim_stdio="DO_USE_STDIO";;
-  no)  sim_stdio="DONT_USE_STDIO";;
-  *)   as_fn_error $? "Unknown value $enableval passed to --enable-sim-stdio" "$LINENO" 5;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_float" >&5
+$as_echo "$sim_ppc_float" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc hardware settings" >&5
+$as_echo_n "checking for sim ppc hardware settings... " >&6; }
+hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
+# Check whether --enable-sim-ppc-hardware was given.
+if test "${enable_sim_ppc_hardware+set}" = set; then :
+  enableval=$enable_sim_ppc_hardware; case "${enableval}" in
+  yes) ;;
+  no)  as_fn_error $? "\"List of hardware must be specified for --enable-sim-ppc-hardware\"" "$LINENO" 5;;
+  ,*)   hardware="${hardware}${enableval}";;
+  *,)   hardware="${enableval}${hardware}";;
+  *)   hardware="${enableval}"'';;
 esac
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define WITH_STDIO $sim_stdio
-_ACEOF
+sim_ppc_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
+sim_ppc_hw_obj=`echo $sim_ppc_hw_src | sed -e 's/\.c/.o/g'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardware" >&5
+$as_echo "$hardware" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc icache settings" >&5
+$as_echo_n "checking for sim ppc icache settings... " >&6; }
+# Check whether --enable-sim-ppc-icache was given.
+if test "${enable_sim_ppc_icache+set}" = set; then :
+  enableval=$enable_sim_ppc_icache; icache="-R"
+ case "${enableval}" in
+  yes)         icache="1024"; sim_ppc_icache="-I $icache";;
+  no)          sim_ppc_icache="-R";;
+  *) icache=1024
+     sim_ppc_icache="-"
+     for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do
+       case "$x" in
+         define)       sim_ppc_icache="${sim_ppc_icache}R";;
+         semantic)     sim_ppc_icache="${sim_ppc_icache}C";;
+        insn)          sim_ppc_icache="${sim_ppc_icache}S";;
+        0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;;
+         *)            as_fn_error $? "\"Unknown value $x for --enable-sim-ppc-icache\"" "$LINENO" 5;;
+       esac
+     done
+     sim_ppc_icache="${sim_ppc_icache}I $icache";;
+esac
+else
+  sim_ppc_icache="-CSRI 1024"
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_stdio" >&5
-$as_echo "$sim_stdio" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_icache" >&5
+$as_echo "$sim_ppc_icache" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim trace settings" >&5
-$as_echo_n "checking for sim trace settings... " >&6; }
-sim_trace="~TRACE_debug"
-# Check whether --enable-sim-trace was given.
-if test "${enable_sim_trace+set}" = set; then :
-  enableval=$enable_sim_trace; case "${enableval}" in
-  yes) sim_trace="-1";;
-  no)  sim_trace="0";;
-  [-0-9]*)
-       sim_trace="'(${enableval})'";;
-  [[:lower:]]*)
-       sim_trace=""
-       for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-         if test x"$sim_trace" = x; then
-           sim_trace="(TRACE_$x"
-         else
-           sim_trace="${sim_trace}|TRACE_$x"
-         fi
-       done
-       sim_trace="$sim_trace)" ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc jump settings" >&5
+$as_echo_n "checking for sim ppc jump settings... " >&6; }
+# Check whether --enable-sim-ppc-jump was given.
+if test "${enable_sim_ppc_jump+set}" = set; then :
+  enableval=$enable_sim_ppc_jump; case "${enableval}" in
+  yes) sim_ppc_jump="-J";;
+  no)  sim_ppc_jump="";;
+  *)   as_fn_error $? "\"--enable-sim-ppc-jump does not take a value\"" "$LINENO" 5;;
 esac
+else
+  sim_ppc_jump=""
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define WITH_TRACE $sim_trace
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_jump" >&5
+$as_echo "$sim_ppc_jump" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_trace" >&5
-$as_echo "$sim_trace" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc source debug line numbers" >&5
+$as_echo_n "checking for sim ppc source debug line numbers... " >&6; }
+# Check whether --enable-sim-ppc-line-nr was given.
+if test "${enable_sim_ppc_line_nr+set}" = set; then :
+  enableval=$enable_sim_ppc_line_nr; case "${enableval}" in
+  yes) sim_ppc_line_nr="";;
+  no)  sim_ppc_line_nr="-L";;
+  *)   as_fn_error $? "\"--enable-sim-ppc-line-nr does not take a value\"" "$LINENO" 5;;
+esac
+else
+  sim_ppc_line_nr=""
+fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_line_nr" >&5
+$as_echo "$sim_ppc_line_nr" >&6; }
 
-# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
-  enableval=$enable_werror; case "${enableval}" in
-     yes | y) ERROR_ON_WARNING="yes" ;;
-     no | n)  ERROR_ON_WARNING="no" ;;
-     *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
-   esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc model" >&5
+$as_echo_n "checking for sim ppc model... " >&6; }
+# Check whether --enable-sim-ppc-model was given.
+if test "${enable_sim_ppc_model+set}" = set; then :
+  enableval=$enable_sim_ppc_model; case "${enableval}" in
+  yes|no)      as_fn_error $? "\"No value supplied for --enable-sim-ppc-model=model\"" "$LINENO" 5;;
+  *)           sim_ppc_model="-DWITH_MODEL=${enableval}";;
+esac
+else
+  sim_ppc_model=""
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_model" >&5
+$as_echo "$sim_ppc_model" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc model issue" >&5
+$as_echo_n "checking for sim ppc model issue... " >&6; }
+# Check whether --enable-sim-ppc-model-issue was given.
+if test "${enable_sim_ppc_model_issue+set}" = set; then :
+  enableval=$enable_sim_ppc_model_issue; case "${enableval}" in
+  yes) sim_ppc_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
+  no)  sim_ppc_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
+  *)   as_fn_error $? "\"--enable-sim-ppc-model-issue does not take a value\"" "$LINENO" 5;;
+esac
+else
+  sim_ppc_model_issue=""
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_model_issue" >&5
+$as_echo "$sim_ppc_model_issue" >&6; }
 
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
-  ERROR_ON_WARNING=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc event monitoring" >&5
+$as_echo_n "checking for sim ppc event monitoring... " >&6; }
+# Check whether --enable-sim-ppc-monitor was given.
+if test "${enable_sim_ppc_monitor+set}" = set; then :
+  enableval=$enable_sim_ppc_monitor; case "${enableval}" in
+  yes)         sim_ppc_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
+  no)          sim_ppc_monitor="-DWITH_MON=0";;
+  instruction) sim_ppc_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
+  memory)      sim_ppc_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
+  *)           as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-ppc-mon\"" "$LINENO" 5;;
+esac
+else
+  sim_ppc_monitor=""
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_monitor" >&5
+$as_echo "$sim_ppc_monitor" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc opcode lookup settings" >&5
+$as_echo_n "checking for sim ppc opcode lookup settings... " >&6; }
+# Check whether --enable-sim-ppc-opcode was given.
+if test "${enable_sim_ppc_opcode+set}" = set; then :
+  enableval=$enable_sim_ppc_opcode; case "${enableval}" in
+  yes|no)      as_fn_error $? "\"No value supplied for --enable-sim-ppc-opcode=file\"" "$LINENO" 5;;
+  *)           if test -f "${srcdir}/${enableval}"; then
+                 sim_ppc_opcode="${enableval}"
+               elif test -f "${srcdir}/dc-${enableval}"; then
+                 sim_ppc_opcode="dc-${enableval}"
+               else
+                 as_fn_error $? "\"File $enableval is not an opcode rules file\"" "$LINENO" 5
+               fi;;
+esac
+else
+  sim_ppc_opcode="dc-complex"
 fi
 
-WERROR_CFLAGS=""
-if test "${ERROR_ON_WARNING}" = yes ; then
-  WERROR_CFLAGS="-Werror"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_opcode" >&5
+$as_echo "$sim_ppc_opcode" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc smp settings" >&5
+$as_echo_n "checking for sim ppc smp settings... " >&6; }
+# Check whether --enable-sim-ppc-smp was given.
+if test "${enable_sim_ppc_smp+set}" = set; then :
+  enableval=$enable_sim_ppc_smp; case "${enableval}" in
+  yes) sim_ppc_smp="-DWITH_SMP=5" ; sim_ppc_igen_smp="-N 5";;
+  no)  sim_ppc_smp="-DWITH_SMP=0" ; sim_ppc_igen_smp="-N 0";;
+  *)   sim_ppc_smp="-DWITH_SMP=$enableval" ; sim_ppc_igen_smp="-N $enableval";;
+esac
+else
+  sim_ppc_smp="-DWITH_SMP=5" ; sim_ppc_igen_smp="-N 5"
 fi
 
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wpointer-sign \
--Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_smp" >&5
+$as_echo "$sim_ppc_smp" >&6; }
 
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
-  *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
-  *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc switch table settings" >&5
+$as_echo_n "checking for sim ppc switch table settings... " >&6; }
+# Check whether --enable-sim-ppc-switch was given.
+if test "${enable_sim_ppc_switch+set}" = set; then :
+  enableval=$enable_sim_ppc_switch; case "${enableval}" in
+  yes) sim_ppc_switch="-DWITH_SPREG_SWITCH_TABLE";;
+  no)  sim_ppc_switch="";;
+  *)   as_fn_error $? "\"--enable-sim-ppc-switch does not take a value\"" "$LINENO" 5;;
 esac
+else
+  sim_ppc_switch=""
+fi
 
-# Check whether --enable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then :
-  enableval=$enable_build_warnings; case "${enableval}" in
-  yes) ;;
-  no)  build_warnings="-w";;
-  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${build_warnings} ${t}";;
-  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${t} ${build_warnings}";;
-  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_switch" >&5
+$as_echo "$sim_ppc_switch" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc timebase" >&5
+$as_echo_n "checking for sim ppc timebase... " >&6; }
+# Check whether --enable-sim-ppc-timebase was given.
+if test "${enable_sim_ppc_timebase+set}" = set; then :
+  enableval=$enable_sim_ppc_timebase; case "${enableval}" in
+  yes) sim_ppc_timebase="-DWITH_TIME_BASE=1";;
+  no)  sim_ppc_timebase="-DWITH_TIME_BASE=0";;
+  *)   as_fn_error $? "\"--enable-sim-ppc-timebase does not take a value\"" "$LINENO" 5;;
 esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting compiler warning flags = $build_warnings" 6>&1
-fi
+else
+  sim_ppc_timebase=""
 fi
-# Check whether --enable-sim-build-warnings was given.
-if test "${enable_sim_build_warnings+set}" = set; then :
-  enableval=$enable_sim_build_warnings; case "${enableval}" in
-  yes) ;;
-  no)  build_warnings="-w";;
-  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${build_warnings} ${t}";;
-  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${t} ${build_warnings}";;
-  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_timebase" >&5
+$as_echo "$sim_ppc_timebase" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim ppc xor endian settings" >&5
+$as_echo_n "checking for sim ppc xor endian settings... " >&6; }
+# Check whether --enable-sim-ppc-xor-endian was given.
+if test "${enable_sim_ppc_xor_endian+set}" = set; then :
+  enableval=$enable_sim_ppc_xor_endian; case "${enableval}" in
+  yes) sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=8";;
+  no)  sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=0";;
+  *)   sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;
 esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
-fi
+else
+  sim_ppc_xor_endian=""
 fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
-$as_echo_n "checking compiler warning flags... " >&6; }
-    # Separate out the -Werror flag as some files just cannot be
-    # compiled with it enabled.
-    for w in ${build_warnings}; do
-       case $w in
-       -Werr*) WERROR_CFLAGS=-Werror ;;
-       *) # Check that GCC accepts it
-           saved_CFLAGS="$CFLAGS"
-           CFLAGS="$CFLAGS -Werror $w"
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_ppc_xor_endian" >&5
+$as_echo "$sim_ppc_xor_endian" >&6; }
+
+
+
+
+
+
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  WARN_CFLAGS="${WARN_CFLAGS} $w"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           CFLAGS="$saved_CFLAGS"
-       esac
-    done
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
-$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
-fi
 
 
 
 
 
 
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking riscv bitsize" >&5
+$as_echo_n "checking riscv bitsize... " >&6; }
+SIM_RISCV_BITSIZE=64
+case $target in #(
+  riscv32*) :
+    SIM_RISCV_BITSIZE=32 ;; #(
+  *) :
+     ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SIM_RISCV_BITSIZE" >&5
+$as_echo "$SIM_RISCV_BITSIZE" >&6; }
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sim rx should be cycle accurate" >&5
 $as_echo_n "checking whether sim rx should be cycle accurate... " >&6; }
 # Check whether --enable-sim-rx-cycle-accurate was given.
@@ -14548,7 +17136,7 @@ fi
 
 
 
-ac_config_files="$ac_config_files arch-subdir.mk Makefile"
+ac_config_files="$ac_config_files arch-subdir.mk Makefile .gdbinit:gdbinit.in"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -14660,10 +17248,6 @@ LTLIBOBJS=$ac_ltlibobjs
 
 
 
-if test -z "${PLUGINS_TRUE}" && test -z "${PLUGINS_FALSE}"; then
-  as_fn_error $? "conditional \"PLUGINS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -14692,14 +17276,154 @@ else
   am__EXEEXT_FALSE=
 fi
 
-if test -z "${SIM_ENABLE_IGEN_TRUE}" && test -z "${SIM_ENABLE_IGEN_FALSE}"; then
-  as_fn_error $? "conditional \"SIM_ENABLE_IGEN\" was never defined.
+if test -z "${SIM_ENABLE_ARCH_aarch64_TRUE}" && test -z "${SIM_ENABLE_ARCH_aarch64_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_aarch64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_arm_TRUE}" && test -z "${SIM_ENABLE_ARCH_arm_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_arm\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_avr_TRUE}" && test -z "${SIM_ENABLE_ARCH_avr_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_avr\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_bfin_TRUE}" && test -z "${SIM_ENABLE_ARCH_bfin_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_bfin\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_bpf_TRUE}" && test -z "${SIM_ENABLE_ARCH_bpf_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_bpf\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_cr16_TRUE}" && test -z "${SIM_ENABLE_ARCH_cr16_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_cr16\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_cris_TRUE}" && test -z "${SIM_ENABLE_ARCH_cris_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_cris\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_d10v_TRUE}" && test -z "${SIM_ENABLE_ARCH_d10v_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_d10v\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_frv_TRUE}" && test -z "${SIM_ENABLE_ARCH_frv_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_frv\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_ft32_TRUE}" && test -z "${SIM_ENABLE_ARCH_ft32_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_ft32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_h8300_TRUE}" && test -z "${SIM_ENABLE_ARCH_h8300_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_h8300\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_iq2000_TRUE}" && test -z "${SIM_ENABLE_ARCH_iq2000_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_iq2000\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_lm32_TRUE}" && test -z "${SIM_ENABLE_ARCH_lm32_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_lm32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_m32c_TRUE}" && test -z "${SIM_ENABLE_ARCH_m32c_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_m32c\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_m32r_TRUE}" && test -z "${SIM_ENABLE_ARCH_m32r_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_m32r\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_m68hc11_TRUE}" && test -z "${SIM_ENABLE_ARCH_m68hc11_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_m68hc11\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_mcore_TRUE}" && test -z "${SIM_ENABLE_ARCH_mcore_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_mcore\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_microblaze_TRUE}" && test -z "${SIM_ENABLE_ARCH_microblaze_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_microblaze\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_mips_TRUE}" && test -z "${SIM_ENABLE_ARCH_mips_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_mips\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_mn10300_TRUE}" && test -z "${SIM_ENABLE_ARCH_mn10300_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_mn10300\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_moxie_TRUE}" && test -z "${SIM_ENABLE_ARCH_moxie_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_moxie\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_msp430_TRUE}" && test -z "${SIM_ENABLE_ARCH_msp430_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_msp430\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_or1k_TRUE}" && test -z "${SIM_ENABLE_ARCH_or1k_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_or1k\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_ppc_TRUE}" && test -z "${SIM_ENABLE_ARCH_ppc_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_ppc\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_pru_TRUE}" && test -z "${SIM_ENABLE_ARCH_pru_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_pru\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_riscv_TRUE}" && test -z "${SIM_ENABLE_ARCH_riscv_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_riscv\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_rl78_TRUE}" && test -z "${SIM_ENABLE_ARCH_rl78_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_rl78\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_rx_TRUE}" && test -z "${SIM_ENABLE_ARCH_rx_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_rx\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_sh_TRUE}" && test -z "${SIM_ENABLE_ARCH_sh_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_sh\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_erc32_TRUE}" && test -z "${SIM_ENABLE_ARCH_erc32_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_erc32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_v850_TRUE}" && test -z "${SIM_ENABLE_ARCH_v850_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_v850\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_ENABLE_ARCH_examples_TRUE}" && test -z "${SIM_ENABLE_ARCH_examples_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_ENABLE_ARCH_examples\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_SIM_TRUE}" && test -z "${ENABLE_SIM_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_SIM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${SIM_ENABLE_HW_TRUE}" && test -z "${SIM_ENABLE_HW_FALSE}"; then
   as_fn_error $? "conditional \"SIM_ENABLE_HW\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${SIM_MIPS_GEN_MODE_SINGLE_TRUE}" && test -z "${SIM_MIPS_GEN_MODE_SINGLE_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_MIPS_GEN_MODE_SINGLE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_MIPS_GEN_MODE_M16_TRUE}" && test -z "${SIM_MIPS_GEN_MODE_M16_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_MIPS_GEN_MODE_M16\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIM_MIPS_GEN_MODE_MULTI_TRUE}" && test -z "${SIM_MIPS_GEN_MODE_MULTI_FALSE}"; then
+  as_fn_error $? "conditional \"SIM_MIPS_GEN_MODE_MULTI\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 
 
 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
 
 _ACEOF
 
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Make-common.sim") CONFIG_FILES="$CONFIG_FILES Make-common.sim:common/Make-common.in" ;;
-    "aarch64/Makefile.sim") CONFIG_FILES="$CONFIG_FILES aarch64/Makefile.sim:aarch64/Makefile.in" ;;
-    "aarch64/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS aarch64/Makefile" ;;
-    "depdir-aarch64") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-aarch64" ;;
-    "arm/Makefile.sim") CONFIG_FILES="$CONFIG_FILES arm/Makefile.sim:arm/Makefile.in" ;;
-    "arm/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS arm/Makefile" ;;
-    "depdir-arm") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-arm" ;;
-    "avr/Makefile.sim") CONFIG_FILES="$CONFIG_FILES avr/Makefile.sim:avr/Makefile.in" ;;
-    "avr/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS avr/Makefile" ;;
-    "depdir-avr") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-avr" ;;
-    "depdir-bfin") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-bfin" ;;
-    "depdir-bpf") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-bpf" ;;
-    "cr16/Makefile.sim") CONFIG_FILES="$CONFIG_FILES cr16/Makefile.sim:cr16/Makefile.in" ;;
-    "cr16/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS cr16/Makefile" ;;
-    "depdir-cr16") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-cr16" ;;
-    "depdir-cris") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-cris" ;;
-    "d10v/Makefile.sim") CONFIG_FILES="$CONFIG_FILES d10v/Makefile.sim:d10v/Makefile.in" ;;
-    "d10v/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS d10v/Makefile" ;;
-    "depdir-d10v") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-d10v" ;;
-    "depdir-frv") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-frv" ;;
-    "ft32/Makefile.sim") CONFIG_FILES="$CONFIG_FILES ft32/Makefile.sim:ft32/Makefile.in" ;;
-    "ft32/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS ft32/Makefile" ;;
-    "depdir-ft32") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-ft32" ;;
-    "h8300/Makefile.sim") CONFIG_FILES="$CONFIG_FILES h8300/Makefile.sim:h8300/Makefile.in" ;;
-    "h8300/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS h8300/Makefile" ;;
-    "depdir-h8300") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-h8300" ;;
-    "depdir-iq2000") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-iq2000" ;;
-    "depdir-lm32") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-lm32" ;;
-    "m32c/Makefile.sim") CONFIG_FILES="$CONFIG_FILES m32c/Makefile.sim:m32c/Makefile.in" ;;
-    "m32c/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS m32c/Makefile" ;;
-    "depdir-m32c") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-m32c" ;;
-    "depdir-m32r") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-m32r" ;;
-    "m68hc11/Makefile.sim") CONFIG_FILES="$CONFIG_FILES m68hc11/Makefile.sim:m68hc11/Makefile.in" ;;
-    "m68hc11/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS m68hc11/Makefile" ;;
-    "depdir-m68hc11") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-m68hc11" ;;
-    "mcore/Makefile.sim") CONFIG_FILES="$CONFIG_FILES mcore/Makefile.sim:mcore/Makefile.in" ;;
-    "mcore/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS mcore/Makefile" ;;
-    "depdir-mcore") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-mcore" ;;
-    "microblaze/Makefile.sim") CONFIG_FILES="$CONFIG_FILES microblaze/Makefile.sim:microblaze/Makefile.in" ;;
-    "microblaze/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS microblaze/Makefile" ;;
-    "depdir-microblaze") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-microblaze" ;;
-    "depdir-mips") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-mips" ;;
-    "depdir-mn10300") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-mn10300" ;;
-    "moxie/Makefile.sim") CONFIG_FILES="$CONFIG_FILES moxie/Makefile.sim:moxie/Makefile.in" ;;
-    "moxie/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS moxie/Makefile" ;;
-    "depdir-moxie") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-moxie" ;;
-    "msp430/Makefile.sim") CONFIG_FILES="$CONFIG_FILES msp430/Makefile.sim:msp430/Makefile.in" ;;
-    "msp430/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS msp430/Makefile" ;;
-    "depdir-msp430") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-msp430" ;;
-    "depdir-or1k") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-or1k" ;;
-    "pru/Makefile.sim") CONFIG_FILES="$CONFIG_FILES pru/Makefile.sim:pru/Makefile.in" ;;
-    "pru/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS pru/Makefile" ;;
-    "depdir-pru") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-pru" ;;
-    "depdir-riscv") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-riscv" ;;
-    "rl78/Makefile.sim") CONFIG_FILES="$CONFIG_FILES rl78/Makefile.sim:rl78/Makefile.in" ;;
-    "rl78/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS rl78/Makefile" ;;
-    "depdir-rl78") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-rl78" ;;
-    "rx/Makefile.sim") CONFIG_FILES="$CONFIG_FILES rx/Makefile.sim:rx/Makefile.in" ;;
-    "rx/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS rx/Makefile" ;;
-    "depdir-rx") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-rx" ;;
-    "sh/Makefile.sim") CONFIG_FILES="$CONFIG_FILES sh/Makefile.sim:sh/Makefile.in" ;;
-    "sh/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS sh/Makefile" ;;
-    "depdir-sh") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-sh" ;;
-    "depdir-erc32") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-erc32" ;;
-    "depdir-ppc") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-ppc" ;;
-    "depdir-v850") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-v850" ;;
-    "example-synacor/Makefile.sim") CONFIG_FILES="$CONFIG_FILES example-synacor/Makefile.sim:example-synacor/Makefile.in" ;;
-    "example-synacor/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS example-synacor/Makefile" ;;
-    "depdir-example-synacor") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-example-synacor" ;;
+    "aarch64/.gdbinit") CONFIG_FILES="$CONFIG_FILES aarch64/.gdbinit:common/gdbinit.in" ;;
+    "arm/.gdbinit") CONFIG_FILES="$CONFIG_FILES arm/.gdbinit:common/gdbinit.in" ;;
+    "avr/.gdbinit") CONFIG_FILES="$CONFIG_FILES avr/.gdbinit:common/gdbinit.in" ;;
+    "bfin/.gdbinit") CONFIG_FILES="$CONFIG_FILES bfin/.gdbinit:common/gdbinit.in" ;;
+    "bpf/.gdbinit") CONFIG_FILES="$CONFIG_FILES bpf/.gdbinit:common/gdbinit.in" ;;
+    "cr16/.gdbinit") CONFIG_FILES="$CONFIG_FILES cr16/.gdbinit:common/gdbinit.in" ;;
+    "cris/.gdbinit") CONFIG_FILES="$CONFIG_FILES cris/.gdbinit:common/gdbinit.in" ;;
+    "d10v/.gdbinit") CONFIG_FILES="$CONFIG_FILES d10v/.gdbinit:common/gdbinit.in" ;;
+    "frv/.gdbinit") CONFIG_FILES="$CONFIG_FILES frv/.gdbinit:common/gdbinit.in" ;;
+    "ft32/.gdbinit") CONFIG_FILES="$CONFIG_FILES ft32/.gdbinit:common/gdbinit.in" ;;
+    "h8300/.gdbinit") CONFIG_FILES="$CONFIG_FILES h8300/.gdbinit:common/gdbinit.in" ;;
+    "iq2000/.gdbinit") CONFIG_FILES="$CONFIG_FILES iq2000/.gdbinit:common/gdbinit.in" ;;
+    "lm32/.gdbinit") CONFIG_FILES="$CONFIG_FILES lm32/.gdbinit:common/gdbinit.in" ;;
+    "m32c/.gdbinit") CONFIG_FILES="$CONFIG_FILES m32c/.gdbinit:common/gdbinit.in" ;;
+    "m32r/.gdbinit") CONFIG_FILES="$CONFIG_FILES m32r/.gdbinit:common/gdbinit.in" ;;
+    "m68hc11/.gdbinit") CONFIG_FILES="$CONFIG_FILES m68hc11/.gdbinit:common/gdbinit.in" ;;
+    "mcore/.gdbinit") CONFIG_FILES="$CONFIG_FILES mcore/.gdbinit:common/gdbinit.in" ;;
+    "microblaze/.gdbinit") CONFIG_FILES="$CONFIG_FILES microblaze/.gdbinit:common/gdbinit.in" ;;
+    "mips/.gdbinit") CONFIG_FILES="$CONFIG_FILES mips/.gdbinit:common/gdbinit.in" ;;
+    "mn10300/.gdbinit") CONFIG_FILES="$CONFIG_FILES mn10300/.gdbinit:common/gdbinit.in" ;;
+    "moxie/.gdbinit") CONFIG_FILES="$CONFIG_FILES moxie/.gdbinit:common/gdbinit.in" ;;
+    "msp430/.gdbinit") CONFIG_FILES="$CONFIG_FILES msp430/.gdbinit:common/gdbinit.in" ;;
+    "or1k/.gdbinit") CONFIG_FILES="$CONFIG_FILES or1k/.gdbinit:common/gdbinit.in" ;;
+    "ppc/Makefile") CONFIG_FILES="$CONFIG_FILES ppc/Makefile" ;;
+    "ppc/.gdbinit") CONFIG_FILES="$CONFIG_FILES ppc/.gdbinit:common/gdbinit.in" ;;
+    "pru/.gdbinit") CONFIG_FILES="$CONFIG_FILES pru/.gdbinit:common/gdbinit.in" ;;
+    "riscv/.gdbinit") CONFIG_FILES="$CONFIG_FILES riscv/.gdbinit:common/gdbinit.in" ;;
+    "rl78/.gdbinit") CONFIG_FILES="$CONFIG_FILES rl78/.gdbinit:common/gdbinit.in" ;;
+    "rx/.gdbinit") CONFIG_FILES="$CONFIG_FILES rx/.gdbinit:common/gdbinit.in" ;;
+    "sh/.gdbinit") CONFIG_FILES="$CONFIG_FILES sh/.gdbinit:common/gdbinit.in" ;;
+    "erc32/.gdbinit") CONFIG_FILES="$CONFIG_FILES erc32/.gdbinit:common/gdbinit.in" ;;
+    "v850/.gdbinit") CONFIG_FILES="$CONFIG_FILES v850/.gdbinit:common/gdbinit.in" ;;
+    "example-synacor/.gdbinit") CONFIG_FILES="$CONFIG_FILES example-synacor/.gdbinit:common/gdbinit.in" ;;
     "arch-subdir.mk") CONFIG_FILES="$CONFIG_FILES arch-subdir.mk" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -16986,254 +19643,6 @@ $as_echo X"$file" |
   done
 }
  ;;
-    "aarch64/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/aarch64:
-               p
-       }' \
-       <Make-common.sim >aarch64/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >aarch64/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r aarch64/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r aarch64/Makesim2.tmp' \
-       <aarch64/Makefile.sim >aarch64/Makefile
- rm -f aarch64/Makesim1.tmp aarch64/Makesim2.tmp
- ;;
-    "depdir-aarch64":C) $SHELL $ac_aux_dir/mkinstalldirs aarch64/$DEPDIR ;;
-    "arm/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/arm:
-               p
-       }' \
-       <Make-common.sim >arm/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >arm/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r arm/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r arm/Makesim2.tmp' \
-       <arm/Makefile.sim >arm/Makefile
- rm -f arm/Makesim1.tmp arm/Makesim2.tmp
- ;;
-    "depdir-arm":C) $SHELL $ac_aux_dir/mkinstalldirs arm/$DEPDIR ;;
-    "avr/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/avr:
-               p
-       }' \
-       <Make-common.sim >avr/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >avr/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r avr/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r avr/Makesim2.tmp' \
-       <avr/Makefile.sim >avr/Makefile
- rm -f avr/Makesim1.tmp avr/Makesim2.tmp
- ;;
-    "depdir-avr":C) $SHELL $ac_aux_dir/mkinstalldirs avr/$DEPDIR ;;
-    "depdir-bfin":C) $SHELL $ac_aux_dir/mkinstalldirs bfin/$DEPDIR ;;
-    "depdir-bpf":C) $SHELL $ac_aux_dir/mkinstalldirs bpf/$DEPDIR ;;
-    "cr16/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/cr16:
-               p
-       }' \
-       <Make-common.sim >cr16/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >cr16/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r cr16/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r cr16/Makesim2.tmp' \
-       <cr16/Makefile.sim >cr16/Makefile
- rm -f cr16/Makesim1.tmp cr16/Makesim2.tmp
- ;;
-    "depdir-cr16":C) $SHELL $ac_aux_dir/mkinstalldirs cr16/$DEPDIR ;;
-    "depdir-cris":C) $SHELL $ac_aux_dir/mkinstalldirs cris/$DEPDIR ;;
-    "d10v/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/d10v:
-               p
-       }' \
-       <Make-common.sim >d10v/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >d10v/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r d10v/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r d10v/Makesim2.tmp' \
-       <d10v/Makefile.sim >d10v/Makefile
- rm -f d10v/Makesim1.tmp d10v/Makesim2.tmp
- ;;
-    "depdir-d10v":C) $SHELL $ac_aux_dir/mkinstalldirs d10v/$DEPDIR ;;
-    "depdir-frv":C) $SHELL $ac_aux_dir/mkinstalldirs frv/$DEPDIR ;;
-    "ft32/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/ft32:
-               p
-       }' \
-       <Make-common.sim >ft32/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >ft32/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r ft32/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r ft32/Makesim2.tmp' \
-       <ft32/Makefile.sim >ft32/Makefile
- rm -f ft32/Makesim1.tmp ft32/Makesim2.tmp
- ;;
-    "depdir-ft32":C) $SHELL $ac_aux_dir/mkinstalldirs ft32/$DEPDIR ;;
-    "h8300/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/h8300:
-               p
-       }' \
-       <Make-common.sim >h8300/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >h8300/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r h8300/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r h8300/Makesim2.tmp' \
-       <h8300/Makefile.sim >h8300/Makefile
- rm -f h8300/Makesim1.tmp h8300/Makesim2.tmp
- ;;
-    "depdir-h8300":C) $SHELL $ac_aux_dir/mkinstalldirs h8300/$DEPDIR ;;
-    "depdir-iq2000":C) $SHELL $ac_aux_dir/mkinstalldirs iq2000/$DEPDIR ;;
-    "depdir-lm32":C) $SHELL $ac_aux_dir/mkinstalldirs lm32/$DEPDIR ;;
-    "m32c/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/m32c:
-               p
-       }' \
-       <Make-common.sim >m32c/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >m32c/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r m32c/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r m32c/Makesim2.tmp' \
-       <m32c/Makefile.sim >m32c/Makefile
- rm -f m32c/Makesim1.tmp m32c/Makesim2.tmp
- ;;
-    "depdir-m32c":C) $SHELL $ac_aux_dir/mkinstalldirs m32c/$DEPDIR ;;
-    "depdir-m32r":C) $SHELL $ac_aux_dir/mkinstalldirs m32r/$DEPDIR ;;
-    "m68hc11/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/m68hc11:
-               p
-       }' \
-       <Make-common.sim >m68hc11/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >m68hc11/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r m68hc11/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r m68hc11/Makesim2.tmp' \
-       <m68hc11/Makefile.sim >m68hc11/Makefile
- rm -f m68hc11/Makesim1.tmp m68hc11/Makesim2.tmp
- ;;
-    "depdir-m68hc11":C) $SHELL $ac_aux_dir/mkinstalldirs m68hc11/$DEPDIR ;;
-    "mcore/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/mcore:
-               p
-       }' \
-       <Make-common.sim >mcore/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >mcore/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r mcore/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r mcore/Makesim2.tmp' \
-       <mcore/Makefile.sim >mcore/Makefile
- rm -f mcore/Makesim1.tmp mcore/Makesim2.tmp
- ;;
-    "depdir-mcore":C) $SHELL $ac_aux_dir/mkinstalldirs mcore/$DEPDIR ;;
-    "microblaze/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/microblaze:
-               p
-       }' \
-       <Make-common.sim >microblaze/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >microblaze/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r microblaze/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r microblaze/Makesim2.tmp' \
-       <microblaze/Makefile.sim >microblaze/Makefile
- rm -f microblaze/Makesim1.tmp microblaze/Makesim2.tmp
- ;;
-    "depdir-microblaze":C) $SHELL $ac_aux_dir/mkinstalldirs microblaze/$DEPDIR ;;
-    "depdir-mips":C) $SHELL $ac_aux_dir/mkinstalldirs mips/$DEPDIR ;;
-    "depdir-mn10300":C) $SHELL $ac_aux_dir/mkinstalldirs mn10300/$DEPDIR ;;
-    "moxie/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/moxie:
-               p
-       }' \
-       <Make-common.sim >moxie/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >moxie/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r moxie/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r moxie/Makesim2.tmp' \
-       <moxie/Makefile.sim >moxie/Makefile
- rm -f moxie/Makesim1.tmp moxie/Makesim2.tmp
- ;;
-    "depdir-moxie":C) $SHELL $ac_aux_dir/mkinstalldirs moxie/$DEPDIR ;;
-    "msp430/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/msp430:
-               p
-       }' \
-       <Make-common.sim >msp430/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >msp430/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r msp430/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r msp430/Makesim2.tmp' \
-       <msp430/Makefile.sim >msp430/Makefile
- rm -f msp430/Makesim1.tmp msp430/Makesim2.tmp
- ;;
-    "depdir-msp430":C) $SHELL $ac_aux_dir/mkinstalldirs msp430/$DEPDIR ;;
-    "depdir-or1k":C) $SHELL $ac_aux_dir/mkinstalldirs or1k/$DEPDIR ;;
-    "pru/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/pru:
-               p
-       }' \
-       <Make-common.sim >pru/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >pru/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r pru/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r pru/Makesim2.tmp' \
-       <pru/Makefile.sim >pru/Makefile
- rm -f pru/Makesim1.tmp pru/Makesim2.tmp
- ;;
-    "depdir-pru":C) $SHELL $ac_aux_dir/mkinstalldirs pru/$DEPDIR ;;
-    "depdir-riscv":C) $SHELL $ac_aux_dir/mkinstalldirs riscv/$DEPDIR ;;
-    "rl78/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/rl78:
-               p
-       }' \
-       <Make-common.sim >rl78/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >rl78/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r rl78/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r rl78/Makesim2.tmp' \
-       <rl78/Makefile.sim >rl78/Makefile
- rm -f rl78/Makesim1.tmp rl78/Makesim2.tmp
- ;;
-    "depdir-rl78":C) $SHELL $ac_aux_dir/mkinstalldirs rl78/$DEPDIR ;;
-    "rx/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/rx:
-               p
-       }' \
-       <Make-common.sim >rx/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >rx/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r rx/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r rx/Makesim2.tmp' \
-       <rx/Makefile.sim >rx/Makefile
- rm -f rx/Makesim1.tmp rx/Makesim2.tmp
- ;;
-    "depdir-rx":C) $SHELL $ac_aux_dir/mkinstalldirs rx/$DEPDIR ;;
-    "sh/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/sh:
-               p
-       }' \
-       <Make-common.sim >sh/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >sh/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r sh/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r sh/Makesim2.tmp' \
-       <sh/Makefile.sim >sh/Makefile
- rm -f sh/Makesim1.tmp sh/Makesim2.tmp
- ;;
-    "depdir-sh":C) $SHELL $ac_aux_dir/mkinstalldirs sh/$DEPDIR ;;
-    "depdir-erc32":C) $SHELL $ac_aux_dir/mkinstalldirs erc32/$DEPDIR ;;
-    "depdir-ppc":C) $SHELL $ac_aux_dir/mkinstalldirs ppc/$DEPDIR ;;
-    "depdir-v850":C) $SHELL $ac_aux_dir/mkinstalldirs v850/$DEPDIR ;;
-    "example-synacor/Makefile":C) sed -n \
-       -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
-               /^srcdir = / s:$:/example-synacor:
-               p
-       }' \
-       <Make-common.sim >example-synacor/Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >example-synacor/Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r example-synacor/Makesim1.tmp' \
-       -e '/^## COMMON_POST_/ r example-synacor/Makesim2.tmp' \
-       <example-synacor/Makefile.sim >example-synacor/Makefile
- rm -f example-synacor/Makesim1.tmp example-synacor/Makesim2.tmp
- ;;
-    "depdir-example-synacor":C) $SHELL $ac_aux_dir/mkinstalldirs example-synacor/$DEPDIR ;;
 
   esac
 done # for ac_tag
@@ -17267,151 +19676,6 @@ if test "$no_create" != yes; then
   # would make configure fail if this is the last instruction.
   $ac_cs_success || as_fn_exit 1
 fi
-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
-  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
-  # so they do not pile up.
-  ac_sub_configure_args=
-  ac_prev=
-  eval "set x $ac_configure_args"
-  shift
-  for ac_arg
-  do
-    if test -n "$ac_prev"; then
-      ac_prev=
-      continue
-    fi
-    case $ac_arg in
-    -cache-file | --cache-file | --cache-fil | --cache-fi \
-    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-      ac_prev=cache_file ;;
-    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
-    | --c=*)
-      ;;
-    --config-cache | -C)
-      ;;
-    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-      ac_prev=srcdir ;;
-    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-      ;;
-    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-      ac_prev=prefix ;;
-    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-      ;;
-    --disable-option-checking)
-      ;;
-    *)
-      case $ac_arg in
-      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-      esac
-      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
-    esac
-  done
-
-  # Always prepend --prefix to ensure using the same prefix
-  # in subdir configurations.
-  ac_arg="--prefix=$prefix"
-  case $ac_arg in
-  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-  esac
-  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
-  # Pass --silent
-  if test "$silent" = yes; then
-    ac_sub_configure_args="--silent $ac_sub_configure_args"
-  fi
-
-  # Always prepend --disable-option-checking to silence warnings, since
-  # different subdirs can have different --enable and --with options.
-  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
-
-  ac_popdir=`pwd`
-  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
-    # Do not complain, so a configure script can configure whichever
-    # parts of a large source tree are present.
-    test -d "$srcdir/$ac_dir" || continue
-
-    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
-    $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
-    $as_echo "$ac_msg" >&6
-    as_dir="$ac_dir"; as_fn_mkdir_p
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-    cd "$ac_dir"
-
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      ac_sub_configure=$ac_srcdir/configure.gnu
-    elif test -f "$ac_srcdir/configure"; then
-      ac_sub_configure=$ac_srcdir/configure
-    elif test -f "$ac_srcdir/configure.in"; then
-      # This should be Cygnus configure.
-      ac_sub_configure=$ac_aux_dir/configure
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
-$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
-      ac_sub_configure=
-    fi
-
-    # The recursion is here.
-    if test -n "$ac_sub_configure"; then
-      # Make the cache file name correct relative to the subdirectory.
-      case $cache_file in
-      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
-      *) # Relative name.
-       ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
-      esac
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
-      # The eval makes quoting arguments work.
-      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-          --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
-       as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
-    fi
-
-    cd "$ac_popdir"
-  done
-fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}