From 30452bbe7e68581cdb0cd5004e6c4d4d5c9536e8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 23 Mar 2015 22:19:41 -0400 Subject: sim: fix sim-hardware configure option 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 --- sim/common/acinclude.m4 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'sim/common/acinclude.m4') diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4 index 3e9fb2f..6522fea 100644 --- a/sim/common/acinclude.m4 +++ b/sim/common/acinclude.m4 @@ -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/,/ /'`";; -- cgit v1.1