summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2002-03-11 01:11:47 +0100
committerKevin Ryde <user42@zip.com.au>2002-03-11 01:11:47 +0100
commitd7d8d004f0f471ff1e9c16bad01823fcf3e0be53 (patch)
treebf344d02800c31a2ef8fa2a2ec0d63433533c712 /acinclude.m4
parent810f93c9397e0720b94e1b93c5da72906afd6cc7 (diff)
downloadgmp-d7d8d004f0f471ff1e9c16bad01823fcf3e0be53.tar.gz
* acinclude.m4 (GMP_GCC_MIPS_O32): New macro.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m433
1 files changed, 33 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index c31e72fe9..c64a3d39a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -669,6 +669,39 @@ esac
])
+dnl GMP_GCC_MIPS_O32(gcc,[actions-yes][,[actions-no]])
+dnl -------------------------------------------------
+dnl Test whether gcc supports o32.
+dnl
+dnl gcc 2.7.2.2 only does o32, and doesn't accept -mabi=32.
+dnl
+dnl gcc 2.95 accepts -mabi=32 but it only works on irix5, on irix6 it gives
+dnl "cc1: The -mabi=32 support does not work yet".
+
+AC_DEFUN(GMP_GCC_MIPS_O32,
+[AC_MSG_CHECKING([whether gcc supports o32])
+echo 'int x;' >conftest.c
+echo "$1 -mabi=32 -c conftest.c" >&AC_FD_CC
+if $1 -mabi=32 -c conftest.c >conftest.out 2>&1; then
+ result=yes
+else
+ cat conftest.out >&AC_FD_CC
+ if grep "cc1: Invalid option \`abi=32'" conftest.out >/dev/null; then
+ result=yes
+ else
+ result=no
+ fi
+fi
+rm -f conftest.*
+AC_MSG_RESULT($result)
+if test $result = yes; then
+ ifelse([$2],,:,[$2])
+else
+ ifelse([$3],,:,[$3])
+fi
+])
+
+
dnl GMP_GCC_NO_CPP_PRECOMP(CCBASE,CC,CFLAGS,[ACTIONS-YES][,ACTIONS-NO])
dnl -------------------------------------------------------------------
dnl Check whether -no-cpp-precomp should be used on this compiler, and