842b95e
--- singular-4.1.1/m4/cpu-check.m4.orig	2018-07-31 07:05:52.000000000 -0600
842b95e
+++ singular-4.1.1/m4/cpu-check.m4	2018-10-24 08:32:44.713629407 -0600
7addda8
@@ -37,6 +37,18 @@ if test "$ac_cv_singcpuname" = ppc; then
7addda8
   AC_DEFINE(SI_CPU_PPC,1,"PPC")
Rex Dieter 31b36bd
   AC_SUBST(SI_CPU_PPC)
Rex Dieter 31b36bd
 fi
7addda8
+if test "$ac_cv_singcpuname" = arm -o "$ac_cv_singcpuname" = armel; then
7addda8
+  AC_DEFINE(SI_CPU_ARM,1,"ARM")
Rex Dieter 31b36bd
+  AC_SUBST(SI_CPU_ARM)
Rex Dieter 31b36bd
+fi
7addda8
+if test "$ac_cv_singcpuname" = aarch64; then
7addda8
+  AC_DEFINE(SI_CPU_AARCH64,1,"AARCH64")
90662c5
+  AC_SUBST(SI_CPU_AARCH64)
Rex Dieter 31b36bd
+fi
Rex Dieter 31b36bd
+if test "$ac_cv_singcpuname" = s390; then
7addda8
+  AC_DEFINE(SI_CPU_S390,1,"S390")
Rex Dieter 31b36bd
+  AC_SUBST(SI_CPU_S390)
90662c5
+fi
Rex Dieter 31b36bd
 
7addda8
 # UNAME and PATH
7addda8
 AC_MSG_CHECKING(uname for Singular)
842b95e
@@ -65,6 +77,14 @@ dnl testet on: ppc_Linux, 740/750 PowerM
842b95e
   [powerpc*|ppc*], [AC_DEFINE(HAVE_GENERIC_MULT,1,multiplication is fast on the cpu: a*b is with mod otherwise using tables of logartihms)],
842b95e
 dnl the following settings seems to be better on arm processors
842b95e
   [arm*], [],
7addda8
+dnl FIXME: need to run some tests
7addda8
+  [aarch64*], [
7addda8
+            AC_DEFINE(HAVE_MULT_MOD,1,multiplication is fast on the cpu: a*b is with mod otherwise using tables of logartihms)
7addda8
+            AC_DEFINE(HAVE_GENERIC_ADD,1,use branch for addition in Z/p otherwise it uses a generic add)
7addda8
+            AC_DEFINE(HAVE_DIV_MOD,1,division using extend euclidian algorithm otherwise using tables of logartihms)
7addda8
+            ],
7addda8
+dnl FIXME: need to run some tests
7addda8
+  [s390*], [AC_DEFINE(HAVE_GENERIC_ADD,1,use branch for addition in Z/p otherwise it uses a generic add)],
7addda8
   []
7addda8
 )
Rex Dieter 31b36bd