diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-06-08 21:13:15 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-06-08 21:13:15 (GMT) |
commit | 32703c9fc5a315a005abf26965d5545043fd3605 (patch) | |
tree | 342146825782a26babcd939201f7d657520c84dc /m4 | |
parent | 8641814c4e5b4211e0980df783c3d2d25f484226 (diff) | |
download | hdf5-32703c9fc5a315a005abf26965d5545043fd3605.zip hdf5-32703c9fc5a315a005abf26965d5545043fd3605.tar.gz hdf5-32703c9fc5a315a005abf26965d5545043fd3605.tar.bz2 |
[svn-r27164] various bug fixes for DT
Diffstat (limited to 'm4')
-rw-r--r-- | m4/aclocal_fc.m4 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 8051752..febd73c 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -510,3 +510,37 @@ rm -f pac_fconftest.out AC_MSG_RESULT([$pack_int_sizeof]) AC_LANG_POP([Fortran]) ]) + +AC_DEFUN([PAC_LDBL_DIG],[ +AC_MSG_CHECKING([maximum decimal precision for C]) +rm -f pac_Cconftest.out + AC_LANG_CONFTEST([ + AC_LANG_PROGRAM([ + #include <float.h> + #include <stdio.h> + #if __STDC_VERSION__ >= 199901L + #define C_LDBL_DIG DECIMAL_DIG + #else + #define C_LDBL_DIG LDBL_DIG + #endif + ],[[ + FILE * pFile; + pFile = fopen("pac_Cconftest.out","w"); + fprintf(pFile, "%d\n", C_LDBL_DIG); + ]]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_Cconftest.out ; then + LDBL_DIG="`cat pac_Cconftest.out`" + AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $LDBL_DIG, [Determine the decimal precision of C long double]) + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_Cconftest.out + ],[ + AC_MSG_WARN([C program fails to build or run!]) + ],[]) +AC_MSG_RESULT([$LDBL_DIG]) +]) + + |