sim: fix sim-hardware configure option
authorMike Frysinger <vapier@gentoo.org>
Tue, 24 Mar 2015 02:19:41 +0000 (22:19 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 24 Mar 2015 04:13:57 +0000 (00:13 -0400)
The current default handling for the --enable-sim-hardware option ends up
forcing the value to whatever is set as the first argument when calling
the macro (by virtue of how autoconf works).  Relocate the setup code to
the 4th parameter of the AC_ARG_ENABLE macro to fix it.

This was caused by the simplification work in 1517bd274290e06af498ef7e49.

Reported-by: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
22 files changed:
sim/bfin/ChangeLog
sim/bfin/configure
sim/common/ChangeLog
sim/common/acinclude.m4
sim/cris/ChangeLog
sim/cris/configure
sim/frv/ChangeLog
sim/frv/configure
sim/iq2000/ChangeLog
sim/iq2000/configure
sim/lm32/ChangeLog
sim/lm32/configure
sim/m32r/ChangeLog
sim/m32r/configure
sim/m68hc11/ChangeLog
sim/m68hc11/configure
sim/mips/ChangeLog
sim/mips/configure
sim/mn10300/ChangeLog
sim/mn10300/configure
sim/sh64/ChangeLog
sim/sh64/configure

index 4d2619c..d0615a8 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index f3e2a7a..2aa9563 100755 (executable)
@@ -13511,12 +13511,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
 fi
 
 
-if test x"yes" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test ""; then
   hardware=""
 else
@@ -13563,6 +13557,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # 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
 
 case ${enable_sim_hardware} in
index 1cfb4d3..655d98a 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * acinclude.m4 (SIM_AC_OPTION_HARDWARE): Move default option setting
+       of enable_sim_hardware to AC_ARG_ENABLE.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * acinclude.m4 (SIM_AC_OPTION_HARDWARE): Delete SIM_DV_SOCKSER_O.
index 3e9fb2f..6522fea 100644 (file)
@@ -590,12 +590,6 @@ dnl arg[2] is a space separated list of devices that override the defaults
 dnl arg[3] is a space separated list of extra target specific devices.
 AC_DEFUN([SIM_AC_OPTION_HARDWARE],
 [
-if test x"[$1]" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test "[$2]"; then
   hardware="[$2]"
 else
@@ -609,7 +603,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/
 
 AC_ARG_ENABLE(sim-hardware,
   [AS_HELP_STRING([--enable-sim-hardware=LIST],
-                  [Specify the hardware to be included in the build.])])
+                  [Specify the hardware to be included in the build.])],
+  ,[enable_sim_hardware="[$1]"])
 case ${enable_sim_hardware} in
   yes|no) ;;
   ,*) hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";;
index d587122..4a8d181 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (CONFIG_DEVICES): Delete.
index 08bc681..7b3795c 100755 (executable)
@@ -13411,12 +13411,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
 fi
 
 
-if test x"no" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test ""; then
   hardware=""
 else
@@ -13431,6 +13425,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # Check whether --enable-sim-hardware was given.
 if test "${enable_sim_hardware+set}" = set; then :
   enableval=$enable_sim_hardware;
+else
+  enable_sim_hardware="no"
 fi
 
 case ${enable_sim_hardware} in
index d7f23f1..2e4f8b6 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 06f015f..39a1567 100755 (executable)
 
 
 
-if test x"no" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test """"; then
   hardware=""""
 else
@@ -13433,6 +13427,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # Check whether --enable-sim-hardware was given.
 if test "${enable_sim_hardware+set}" = set; then :
   enableval=$enable_sim_hardware;
+else
+  enable_sim_hardware="no"
 fi
 
 case ${enable_sim_hardware} in
index d5acc6c..1f95a08 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (CONFIG_DEVICES): Delete.
index cbf6674..49c0f3a 100755 (executable)
 
 
 
-if test x"no" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test """"; then
   hardware=""""
 else
@@ -13458,6 +13452,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # Check whether --enable-sim-hardware was given.
 if test "${enable_sim_hardware+set}" = set; then :
   enableval=$enable_sim_hardware;
+else
+  enable_sim_hardware="no"
 fi
 
 case ${enable_sim_hardware} in
index 653c10d..8d917b4 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 6a52056..d1110fa 100755 (executable)
 
 
 
-if test x"yes" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test ""; then
   hardware=""
 else
@@ -13411,6 +13405,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # 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
 
 case ${enable_sim_hardware} in
index e5d013e..48f2e47 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index dc22e7f..bd17e87 100755 (executable)
 
 
 
-if test x"no" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test """"; then
   hardware=""""
 else
@@ -13473,6 +13467,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # Check whether --enable-sim-hardware was given.
 if test "${enable_sim_hardware+set}" = set; then :
   enableval=$enable_sim_hardware;
+else
+  enable_sim_hardware="no"
 fi
 
 case ${enable_sim_hardware} in
index 67815b1..fc18f38 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index e056512..1fccfb5 100755 (executable)
@@ -13421,12 +13421,6 @@ case "${target}" in
        ;;
 esac
 
-if test x"$hw_enabled" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test "$hw_devices"; then
   hardware="$hw_devices"
 else
@@ -13441,6 +13435,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # Check whether --enable-sim-hardware was given.
 if test "${enable_sim_hardware+set}" = set; then :
   enableval=$enable_sim_hardware;
+else
+  enable_sim_hardware="$hw_enabled"
 fi
 
 case ${enable_sim_hardware} in
index 6f3c938..d5f8ec0 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 60c1cf8..03f34f2 100755 (executable)
@@ -14007,12 +14007,6 @@ case "${target}" in
        ;;
 esac
 
-if test x"$hw_enabled" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test "$hw_devices"; then
   hardware="$hw_devices"
 else
@@ -14027,6 +14021,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # Check whether --enable-sim-hardware was given.
 if test "${enable_sim_hardware+set}" = set; then :
   enableval=$enable_sim_hardware;
+else
+  enable_sim_hardware="$hw_enabled"
 fi
 
 case ${enable_sim_hardware} in
index d188dda..cf8a025 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (MN10300_OBJS): Delete dv-sockser.o.
index 5c0327a..d539b06 100755 (executable)
 fi
 
 
-if test x"yes" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test ""; then
   hardware=""
 else
@@ -13555,6 +13549,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # 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
 
 case ${enable_sim_hardware} in
index b96e542..8c3c872 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index efd5484..6851755 100755 (executable)
 
 
 
-if test x"no" != x"no"; then
-  enable_sim_hardware=yes
-else
-  enable_sim_hardware=no
-fi
-
 if test """"; then
   hardware=""""
 else
@@ -13458,6 +13452,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 # Check whether --enable-sim-hardware was given.
 if test "${enable_sim_hardware+set}" = set; then :
   enableval=$enable_sim_hardware;
+else
+  enable_sim_hardware="no"
 fi
 
 case ${enable_sim_hardware} in