aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac52
1 files changed, 52 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 445f5d95..6777b1b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -682,6 +682,58 @@ AC_SUBST(CPFLAGS)
AC_SUBST(CEFLAGS)
AC_SUBST(LDEFLAGS)
+dnl ,------------------------------------------------------------------
+dnl Check if we need TRIO
+needtrio=0
+if test "$FORCE_TRIO" = "yes" ; then
+ needtrio=1
+ ac_cv_func_vsnprintf=no
+ ac_cv_func_snprintf=no
+fi
+if test "x$ac_cv_func_snprintf" != "xyes" ; then
+ AC_DEFINE(snprintf, trio_snprintf,
+ [Define to trio_snprintf if your system lacks snprintf])
+ needtrio=1
+fi
+if test "x$ac_cv_func_vsnprintf" != "xyes" ; then
+ AC_DEFINE(vsnprintf, trio_vsnprintf,
+ [Define to trio_vsnprintf if your system lacks vsnprintf])
+ needtrio=1
+fi
+AM_CONDITIONAL(NEED_TRIO, test "$needtrio" = 1)
+
+dnl TRIO IEEE compiler option for Alpha
+dnl
+if test "$needtrio" = 1 ; then
+ AC_MSG_CHECKING(for IEEE compilation options)
+ AC_CACHE_VAL(ac_cv_ieee_option, [
+ AC_TRY_COMPILE(,[
+ #if !(defined(__alpha) && (defined(__DECC) || defined(__DECCXX) || (defined(__osf__) && defined(__LANGUAGE_C__))) && (defined(VMS) || defined(__VMS)))
+ # error "Option needed"
+ #endif
+ ],ac_cv_ieee_option="/IEEE_MODE=UNDERFLOW_TO_ZERO/FLOAT=IEEE",
+ AC_TRY_COMPILE(,[
+ #if !(defined(__alpha) && (defined(__DECC) || defined(__DECCXX) || (defined(__osf__) && defined(__LANGUAGE_C__))) && !(defined(VMS) || defined(__VMS)) && !defined(_CFE))
+ # error "Option needed"
+ #endif
+ ],ac_cv_ieee_option="-ieee",
+ AC_TRY_COMPILE(,[
+ #if !(defined(__alpha) && (defined(__GNUC__) && (defined(__osf__) || defined(__linux__))))
+ # error "Option needed"
+ #endif
+ ],ac_cv_ieee_option="-mieee",
+ ac_cv_ieee_option="none"
+ )
+ )
+ )
+ ])
+ AC_MSG_RESULT($ac_cv_ieee_option)
+ if test $ac_cv_ieee_option != none; then
+ CFLAGS="${CFLAGS} ${ac_cv_ieee_option}"
+ fi
+fi
+dnl ----------------------------------------------------------------'
+
AC_CONFIG_FILES([Makefile m4/Makefile po/Makefile.in intl/Makefile])
AC_OUTPUT