summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-01-14 13:09:42 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-01-14 13:09:42 (GMT)
commita365f0e6aabfa6a13b008e0263e6a2d6c86d5d7e (patch)
treea99fc3c171fc1fd0080f8ca9519e907450fba744 /configure.in
parent84a14c0f25b52a9bba1e2be59051b18cb0317b15 (diff)
downloadhdf5-a365f0e6aabfa6a13b008e0263e6a2d6c86d5d7e.zip
hdf5-a365f0e6aabfa6a13b008e0263e6a2d6c86d5d7e.tar.gz
hdf5-a365f0e6aabfa6a13b008e0263e6a2d6c86d5d7e.tar.bz2
[svn-r16306] Description:
Bring r16305 back from revise_chunks branch: Add detection of C99 "designated initializers" to configure script and use new H5_HAVE_C99_DESIGNATED_INITIALIZER macro to conditionally compile default layout variables in src/H5Pdcpl.c Also, minor code cleanups, etc. Tested on: FreeBSD/32 6.3 (duty) in debug mode (Other platforms tested on branch)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index ff9ded5..ee19951 100644
--- a/configure.in
+++ b/configure.in
@@ -2060,13 +2060,27 @@ AC_TRY_COMPILE(,[int __attribute__((unused)) x],
AC_MSG_CHECKING([for __func__ extension])
AC_TRY_COMPILE(,[ const char *fname = __func__; ],
AC_DEFINE([HAVE_C99_FUNC], [1],
- [Define if the compiler understand the __func__ keyword])
+ [Define if the compiler understands the __func__ keyword])
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]))
AC_MSG_CHECKING([for __FUNCTION__ extension])
AC_TRY_COMPILE(,[ const char *fname = __FUNCTION__; ],
AC_DEFINE([HAVE_FUNCTION], [1],
- [Define if the compiler understand the __FUNCTION__ keyword])
+ [Define if the compiler understands the __FUNCTION__ keyword])
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no]))
+AC_MSG_CHECKING([for C99 designated initialization support])
+AC_TRY_COMPILE(,[
+ typedef struct {
+ int x;
+ union {
+ int i;
+ double d;
+ } u;
+ } di_struct_t;
+ di_struct_t x = {0, { .d = 0.0}}; ],
+ AC_DEFINE([HAVE_C99_DESIGNATED_INITIALIZER], [1],
+ [Define if the compiler understands C99 designated initialization of structs and unions])
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]))