summaryrefslogtreecommitdiff
path: root/sim/m68hc11/configure
diff options
context:
space:
mode:
Diffstat (limited to 'sim/m68hc11/configure')
-rwxr-xr-xsim/m68hc11/configure69
1 files changed, 41 insertions, 28 deletions
diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
index cb6c81d7759..819c756e701 100755
--- a/sim/m68hc11/configure
+++ b/sim/m68hc11/configure
@@ -602,6 +602,7 @@ ac_subst_vars='LTLIBOBJS
LIBOBJS
cgen_breaks
m68hc11_extra_objs
+SIM_DV_SOCKSER_O
REPORT_BUGS_TEXI
REPORT_BUGS_TO
PKGVERSION
@@ -1414,7 +1415,8 @@ Optional Features:
--enable-sim-build-warnings
enable SIM specific build-time compiler warnings if
gcc is used
- --enable-sim-hardware=LIST Specify the hardware to be included in the build.
+ --enable-sim-hardware=LIST
+ Specify the hardware to be included in the build.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -12271,7 +12273,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12274 "configure"
+#line 12276 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12377,7 +12379,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12380 "configure"
+#line 12382 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13319,7 +13321,6 @@ case "${target}" in
m68hc11-*-*|m6811-*-*)
hw_enabled=yes
hw_extra_devices="m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram"
- m68hc11_extra_objs="dv-sockser.o"
SIM_SUBTARGET="$SIM_SUBTARGET -DTARGET_M68HC11=1"
;;
*)
@@ -13327,31 +13328,41 @@ case "${target}" in
;;
esac
-if test x"$hw_enabled" = x"yes"; then
- sim_hw_p=yes
+if test x"$hw_enabled" != x"no"; then
+ enable_sim_hardware=yes
else
- sim_hw_p=no
+ enable_sim_hardware=no
fi
+
if test "$hw_devices"; then
hardware="$hw_devices"
else
hardware="cfi core pal glue"
fi
hardware="$hardware $hw_extra_devices"
+
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
+
# Check whether --enable-sim-hardware was given.
if test "${enable_sim_hardware+set}" = set; then :
enableval=$enable_sim_hardware;
-case "${enableval}" in
- yes) sim_hw_p=yes;;
- no) sim_hw_p=no;;
+fi
+
+case ${enable_sim_hardware} in
+ yes) sim_hw_p=yes;;
+ no) sim_hw_p=no;;
,*) sim_hw_p=yes; hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";;
*,) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";;
- *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';;
+ *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';;
esac
+
if test "$sim_hw_p" != yes; then
+ if test "$hw_enabled" = "always"; then
+ as_fn_error "Sorry, but this simulator requires that hardware support
+be enabled. Please configure without --disable-hw-support." "$LINENO" 5
+ fi
sim_hw_objs=
sim_hw_cflags="-DWITH_HW=0"
sim_hw=
@@ -13366,24 +13377,24 @@ else
*) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
esac
done
-fi
-if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then
- echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
-fi
-else
+ # mingw does not support sockser
+ SIM_DV_SOCKSER_O=""
+ case ${host} in
+ *mingw*) ;;
+ *) SIM_DV_SOCKSER_O="dv-sockser.o"
-if test "$sim_hw_p" != yes; then
- sim_hw_objs=
- sim_hw_cflags="-DWITH_HW=0"
- sim_hw=
-fi
-if test x"$silent" != x"yes"; then
- echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
-fi
-fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DV_SOCKSER 1
+_ACEOF
-case " $hardware " in
- *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
+ ;;
+ esac
+
+ if test x"$silent" != x"yes"; then
+ echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
+ fi
+ case " $hardware " in
+ *" cfi "*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5
$as_echo_n "checking for log2 in -lm... " >&6; }
if test "${ac_cv_lib_m_log2+set}" = set; then :
$as_echo_n "(cached) " >&6
@@ -13428,7 +13439,8 @@ _ACEOF
fi
;;
-esac
+ esac
+fi
for ac_header in string.h strings.h stdlib.h stdlib.h fcntl.h
@@ -13446,6 +13458,7 @@ fi
done
+m68hc11_extra_objs="$SIM_DV_SOCKSER_O"