aboutsummaryrefslogtreecommitdiff
path: root/sim/common/aclocal.m4
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-09-22 02:49:57 +0000
committerAndrew Cagney <cagney@redhat.com>1997-09-22 02:49:57 +0000
commit794e9ac96aca71d2cb7683383bb445c3125d9660 (patch)
tree184c46e9b1a6aa36caa9beac96b3837845fb5f12 /sim/common/aclocal.m4
parent6438209c609ad46dd1dc8a3cc967bfeb5e28686f (diff)
downloadgdb-794e9ac96aca71d2cb7683383bb445c3125d9660.zip
gdb-794e9ac96aca71d2cb7683383bb445c3125d9660.tar.gz
gdb-794e9ac96aca71d2cb7683383bb445c3125d9660.tar.bz2
Simplify logic behind the generic configuration option --enable-sim-alignment.
Diffstat (limited to 'sim/common/aclocal.m4')
-rw-r--r--sim/common/aclocal.m434
1 files changed, 25 insertions, 9 deletions
diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4
index d3e6843..d05e8f8 100644
--- a/sim/common/aclocal.m4
+++ b/sim/common/aclocal.m4
@@ -211,13 +211,12 @@ dnl and SIM_AC_OUTPUT lines.
dnl Specify the alignment restrictions of the target architecture.
-dnl Without this option all possible alignment restrictions are accomidated.
+dnl Without this option all possible alignment restrictions are accommodated.
dnl arg[1] is hardwired target alignment
dnl arg[2] is default target alignment
AC_DEFUN(SIM_AC_OPTION_ALIGNMENT,
-wire_alignment="ifelse([$2],,ifelse([$1],,,[$1]),[$2])"
-default_alignment="ifelse([$2],,ifelse([$1],,,[$1]),[$2])"
-default_sim_alignment="ifelse([$1],,ifelse([$2],,,-DWITH_DEFAULT_ALIGNMENT=[$2]),-DWITH_ALIGNMENT=[$1])"
+wire_alignment="[$1]"
+default_alignment="[$2]"
[
AC_ARG_ENABLE(sim-alignment,
[ --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses.],
@@ -228,20 +227,37 @@ AC_ARG_ENABLE(sim-alignment,
yes) if test x"$wire_alignment" != x; then
sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
else
- echo "No hard-wired alignment for target $target" 1>&6
- sim_alignment="-DWITH_ALIGNMENT=0"
+ if test x"$default_alignment" != x; then
+ sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
+ else
+ echo "No hard-wired alignment for target $target" 1>&6
+ sim_alignment="-DWITH_ALIGNMENT=0"
+ fi
fi;;
no) if test x"$default_alignment" != x; then
sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
else
- echo "No default alignment for target $target" 1>&6
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
+ if test x"$wire_alignment" != x; then
+ sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
+ else
+ echo "No default alignment for target $target" 1>&6
+ sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
+ fi
fi;;
*) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";;
esac
if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
echo "Setting alignment flags = $sim_alignment" 6>&1
-fi],[sim_alignment="${default_sim_alignment}"])dnl
+fi],
+[if test x"$default_alignment" != x; then
+ sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
+else
+ if test x"$wire_alignment" != x; then
+ sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
+ else
+ sim_alignment=
+ fi
+fi])dnl
AC_SUBST(sim_alignment)
])dnl