-
Notifications
You must be signed in to change notification settings - Fork 9
/
cit_hdf.m4
83 lines (70 loc) · 2.08 KB
/
cit_hdf.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# -*- Autoconf -*-
## Old autoconf macros (used by Cigma?)
## ------------------------ ##
## Autoconf macros for HDF. ##
## ------------------------ ##
# CIT_ARG_HDF5
# ------------
AC_DEFUN([CIT_ARG_HDF5], [
# $Id$
AC_ARG_VAR(PHDF5_HOME, [home path to HDF5 library])
AC_ARG_WITH([hdf5],
[AC_HELP_STRING([--with-hdf5],
[enable HDF5 output @<:@default=$1@:>@])],
[want_hdf5="$withval"],
[want_hdf5=$1])
])dnl CIT_ARG_HDF5
# CIT_CHECK_LIB_HDF5
# ------------------
AC_DEFUN([CIT_CHECK_LIB_HDF5], [
# $Id$
if test "$want_hdf5" != no; then
if test -n "$PHDF5_HOME"; then
LDFLAGS="-L$PHDF5_HOME/lib $LDFLAGS"
fi
# check for basic HDF5 function
AC_SEARCH_LIBS([H5Fopen], [hdf5], [], [
if test "$want_hdf5" = auto; then
want_hdf5=no
AC_MSG_WARN([HDF5 library not found; disabling HDF5 support])
else
AC_MSG_ERROR([HDF5 library not found; try setting PHDF5_HOME])
fi
])
fi
])dnl CIT_CHECK_LIB_HDF5
# CIT_CHECK_LIB_HDF5_PARALLEL
# ---------------------------
AC_DEFUN([CIT_CHECK_LIB_HDF5_PARALLEL], [
# $Id$
if test "$want_hdf5" != no; then
# check for HDF5 parallel-IO function
AC_SEARCH_LIBS([H5Pset_dxpl_mpio], [hdf5], [], [
if test "$want_hdf5" = auto; then
want_hdf5=no
AC_MSG_WARN([parallel HDF5 library not found; disabling HDF5 support])
else
AC_MSG_ERROR([parallel HDF5 library not found; try configuring HDF5 with '--enable-parallel'])
fi
])
fi
])dnl CIT_CHECK_LIB_HDF5_PARALLEL
# CIT_CHECK_HEADER_HDF5
# ---------------------
AC_DEFUN([CIT_CHECK_HEADER_HDF5], [
# $Id$
if test "$want_hdf5" != no; then
if test -n "$PHDF5_HOME"; then
CPPFLAGS="-I$PHDF5_HOME/include $CPPFLAGS"
fi
AC_CHECK_HEADERS([hdf5.h], [AC_DEFINE([HAVE_HDF5_H])], [
if test "$want_hdf5" = auto; then
want_hdf5=no
AC_MSG_WARN([header 'hdf5.h' not found; disabling HDF5 support])
else
AC_MSG_ERROR([header 'hdf5.h' not found])
fi
])
fi
])dnl CIT_CHECK_HEADER_HDF5
dnl end of file