summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-01-14 12:10:53 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-01-14 12:10:53 (GMT)
commite0bb475838f0c31743018e5c1c770b30b9373440 (patch)
tree295663cfdc5d032aa77e0f32e387adca39013183 /configure.in
parent2ac77da499ca7e4dc5df553f7bf7d2ac279eb2de (diff)
downloadhdf5-e0bb475838f0c31743018e5c1c770b30b9373440.zip
hdf5-e0bb475838f0c31743018e5c1c770b30b9373440.tar.gz
hdf5-e0bb475838f0c31743018e5c1c770b30b9373440.tar.bz2
[svn-r16305] Description:
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 FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
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]))