summaryrefslogtreecommitdiff
path: root/libffi/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'libffi/configure.ac')
-rw-r--r--libffi/configure.ac15
1 files changed, 12 insertions, 3 deletions
diff --git a/libffi/configure.ac b/libffi/configure.ac
index 22fc5690df0..438222775bc 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -65,6 +65,7 @@ dnl The -no-testsuite modules omit the test subdir.
AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
TARGETDIR="unknown"
+HAVE_LONG_DOUBLE_VARIANT=0
case "$host" in
aarch64*-*-*)
TARGET=AARCH64; TARGETDIR=aarch64
@@ -162,6 +163,7 @@ case "$host" in
powerpc*-*-linux* | powerpc-*-sysv*)
TARGET=POWERPC; TARGETDIR=powerpc
+ HAVE_LONG_DOUBLE_VARIANT=1
;;
powerpc-*-amigaos*)
TARGET=POWERPC; TARGETDIR=powerpc
@@ -177,6 +179,7 @@ case "$host" in
;;
powerpc-*-freebsd* | powerpc-*-openbsd*)
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
+ HAVE_LONG_DOUBLE_VARIANT=1
;;
powerpc64-*-freebsd*)
TARGET=POWERPC; TARGETDIR=powerpc
@@ -273,14 +276,20 @@ AC_CHECK_SIZEOF(long double)
# Also AC_SUBST this variable for ffi.h.
if test -z "$HAVE_LONG_DOUBLE"; then
HAVE_LONG_DOUBLE=0
- if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then
- if test $ac_cv_sizeof_long_double != 0; then
+ if test $ac_cv_sizeof_long_double != 0; then
+ if test $HAVE_LONG_DOUBLE_VARIANT != 0; then
+ AC_DEFINE(HAVE_LONG_DOUBLE_VARIANT, 1, [Define if you support more than one size of the long double type])
HAVE_LONG_DOUBLE=1
- AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double])
+ else
+ if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then
+ HAVE_LONG_DOUBLE=1
+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double])
+ fi
fi
fi
fi
AC_SUBST(HAVE_LONG_DOUBLE)
+AC_SUBST(HAVE_LONG_DOUBLE_VARIANT)
AC_C_BIGENDIAN