report error when --enable-extflonums fails

The `--enable-extflonums` option doesn't really do anything, since
extflonum support is enabled automtatically when the compiler's
configuration allows it. To make this slightly less confusing, report
an error when extflonums cannot be supported, despite
`--enable-extflonums`. The error is reported via compiling, instead of
via `configure`, but hopefully that's enough to be helpful.
This commit is contained in:
Matthew Flatt 2015-11-01 13:44:52 -07:00
parent 14d25abd76
commit 37dc3ffa01
4 changed files with 15 additions and 0 deletions

View File

@ -6583,6 +6583,11 @@ $as_echo "#define MZ_NO_EXTFLONUMS 1" >>confdefs.h
fi
fi
if test "${enable_extflonum}" = "yes" ; then
$as_echo "#define MZ_INSIST_EXTFLONUMS 1" >>confdefs.h
fi
############## libffi ################
# Depends on pthread on some platforms

View File

@ -1475,6 +1475,10 @@ if test "${enable_extflonum}" = "default" ; then
fi
fi
if test "${enable_extflonum}" = "yes" ; then
AC_DEFINE(MZ_INSIST_EXTFLONUMS)
fi
############## libffi ################
# Depends on pthread on some platforms

View File

@ -93,6 +93,9 @@ typedef struct {
typedef long double mz_long_double;
# endif
#else
# ifdef MZ_INSIST_EXTFLONUMS
# error "cannot support extflonums; you may need to adjust compiler options"
# endif
typedef double mz_long_double;
#endif

View File

@ -95,6 +95,9 @@ typedef unsigned long uintptr_t;
/* To disable extflonums when they would otherwise work: */
#undef MZ_NO_EXTFLONUMS
/* Extflonums are specifically requested (so complain if not supported): */
#undef MZ_INSIST_EXTFLONUMS
/* Library subpath */
#undef SPLS_SUFFIX