summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-01-14 14:01:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-01-14 14:01:12 (GMT)
commit60915ff8aaa392bebd82826b5b95ab741fedd832 (patch)
tree0b523fbcdd8db22e7146147a0e19ca40cdca02fd /configure.in
parentbbd83d97e03960839804ef3c87eb6c17fb940acd (diff)
downloadhdf5-60915ff8aaa392bebd82826b5b95ab741fedd832.zip
hdf5-60915ff8aaa392bebd82826b5b95ab741fedd832.tar.gz
hdf5-60915ff8aaa392bebd82826b5b95ab741fedd832.tar.bz2
[svn-r16307] Description:
Bring r16306 back from trunk: 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 revise_chunks branch)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in23
1 files changed, 21 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 51b5d58..06fcff1 100644
--- a/configure.in
+++ b/configure.in
@@ -2067,11 +2067,30 @@ AC_TRY_COMPILE(,[int __attribute__((unused)) x],
[Define if the __attribute__(()) extension is present])
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]))
-
+AC_MSG_CHECKING([for __func__ extension])
+AC_TRY_COMPILE(,[ const char *fname = __func__; ],
+ AC_DEFINE([HAVE_C99_FUNC], [1],
+ [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(,[(void)__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]))