diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2005-01-11 21:05:21 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2005-01-11 21:05:21 (GMT) |
commit | 7945e9929ee7fcbbe28e7dd1c56816ef3307cbcf (patch) | |
tree | 67163271d341b809d96afd5df653ab1e11496115 /configure | |
parent | 7b42f786bd4a80259d3731d00f890ca1bcec9cba (diff) | |
download | hdf5-7945e9929ee7fcbbe28e7dd1c56816ef3307cbcf.zip hdf5-7945e9929ee7fcbbe28e7dd1c56816ef3307cbcf.tar.gz hdf5-7945e9929ee7fcbbe28e7dd1c56816ef3307cbcf.tar.bz2 |
[svn-r9809] Purpose: bug fix
Description: For HP-UX11.00, compiler's casting from 'long double' to most of
integers. A macro was hard set in config/hpux11.00 before.
Solution: Let configure detect this case and set the macro.
Platforms tested: kelgia, fuss, modi4. These systems are mainly concerned.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -33548,12 +33548,66 @@ else echo "${ECHO_T}no" >&6 fi + echo "$as_me:$LINENO: checking if accurately converting from long double to integers works" >&5 echo $ECHO_N "checking if accurately converting from long double to integers works... $ECHO_C" >&6 + if test "${hdf5_cv_sw_ldouble_to_integer_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + + int main(void) + { + void *align; + long double ld= 9701917572145405952.00L; + unsigned char v1; + short v2; + unsigned int v3; + int ret = 0; + + align = (void*)malloc(sizeof(long double)); + memcpy(align, &ld, sizeof(long double)); + + /*For HU-UX11.00, there's floating exception(core dump) when doing some of casting + *from 'long double' to integers*/ + v1=(unsigned char)(*((long double*)align)); + v2=(short)(*((long double*)align)); + v3=(unsigned int)(*((long double*)align)); + +done: + exit(ret); + } + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then hdf5_cv_sw_ldouble_to_integer_works=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +hdf5_cv_sw_ldouble_to_integer_works=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi fi |