This file is indexed.

/usr/share/dune/aclocal/hdf5.m4 is in libdune-common-dev 2.4.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
## -*- autoconf -*-
# searches for HDF5-stuff

# DUNE_PATH_HDF5()
#
# shell variables:
#   with_hdf5
#     no, yes, or "yes (parallel)"
#   with_hdf5_libs
#     empty or something apropriate for LIBS
#   HDF5_CPPFLAGS
#   HDF5_LDFLAGS
#   HDF5_LIBS
#   direct_HDF5_CPPFLAGS
#   direct_HDF5_LDFLAGS
#   direct_HDF5_LIBS
#     same as above, but without variable indirections (e.g. the contents of
#     DUNEMPICPPFLAGS instead of '${DUNEMPICPPFLAGS}')
#   HDF5_PARALLEL
#     1 or undef
#   HAVE_HDF5
#     0 or 1
#
# substitutions:
#   HDF5_CPPFLAGS
#   HDF5_LDFLAGS
#   HDF5_LIBS
#
# defines:
#   HAVE_HDF5
#
# conditionals:
#   HDF5
AC_DEFUN([DUNE_PATH_HDF5],[
  AC_REQUIRE([AC_PROG_CC])
  AC_REQUIRE([AC_PATH_XTRA])
  AC_REQUIRE([DUNE_MPI])

  AC_ARG_WITH(hdf5,
    AC_HELP_STRING([--with-hdf5=PATH],[directory with HDF5 inside]),
    # expand tilde / other stuff
    eval with_hdf5=$with_hdf5
  )
	  
  AC_ARG_WITH(hdf5_libs,
    [AC_HELP_STRING([--with-hdf5-libs=LIBS],[additional libraries needed to link hdf5 programs. Those might be needed if your hdf5 library is static. Possible values are: -lz or -lz -lsz.])],[])

 # store values
 ac_save_CPPFLAGS="$CPPFLAGS"
 ac_save_LDFLAGS="$LDFLAGS"
 ac_save_LIBS="$LIBS"

 # start building variables

 # use special HDF5-lib-path if it's set
 if test x$with_hdf5 != x ; then
   #  extract absolute path
   if test -d $with_hdf5; then
     eval with_hdf5=`cd $with_hdf5 ; pwd`
   else
     AC_MSG_ERROR([HDF5-directory $with_hdf5 does not exist])
   fi
   _dune_hdf5_libpath="-L$with_hdf5/lib"
   _dune_hdf5_incpath="-I$with_hdf5/include"
 else
   _dune_hdf5_libpath=""
   _dune_hdf5_incpath=""
 fi

 CPPFLAGS="$CPPFLAGS $_dune_hdf5_incpath"

 direct_HDF5_CPPFLAGS="$_dune_hdf5_incpath"
 nodep_HDF5_CPPFLAGS="$_dune_hdf5_incpath"
 HDF5_CPPFLAGS="$_dune_hdf5_incpath"
 direct_HDF5_LDFLAGS=""
 nodep_HDF5_LDFLAGS=""
 HDF5_LDFLAGS=""
 direct_HDF5_LIBS=""
 nodep_HDF5_LIBS=""
 HDF5_LIBS=""
 HDF5_PARALLEL=0
 # test if we are parallel
 AC_CHECK_DECL(H5_HAVE_PARALLEL, [dnl
	CPPFLAGS="$CPPFLAGS $DUNEMPICPPFLAGS"
	direct_HDF5_CPPFLAGS="$HDF5_CPPFLAGS $DUNEMPICPPFLAGS"
	HDF5_CPPFLAGS="$HDF5_CPPFLAGS \${DUNEMPICPPFLAGS}"
	LDFLAGS="$LDFLAGS $DUNEMPILDFLAGS"
	direct_HDF5_LDFLAGS="$HDF5_LDFLAGS $DUNEMPILDFLAGS"
	HDF5_LDFLAGS="$HDF5_LDFLAGS \${DUNEMPILDFLAGS}"
	LIBS="$DUNEMPILIBS $LIBS"
	direct_HDF5_LIBS="$DUNEMPILIBS $HDF5_LIBS"
	HDF5_LIBS="\${DUNEMPILIBS} $HDF5_LIBS"
	HDF5_PARALLEL=1],[],[#include"H5pubconf.h"])

 # test for an arbitrary header
 AC_CHECK_HEADER([hdf5.h], 
   [HAVE_HDF5=1],
   [HAVE_HDF5=0])
	
 # Just for the configure check.  In the end, -L has to go into LIBS.
 LDFLAGS="$LDFLAGS $_dune_hdf5_libpath"
 # test for lib
 if test x$HAVE_HDF5 = x1 ; then
   AC_CHECK_LIB([hdf5], [H5open],
     [
       direct_HDF5_LIBS="$_dune_hdf5_libpath -lhdf5 $with_hdf5_libs $direct_HDF5_LIBS"
       nodep_HDF5_LIBS="$_dune_hdf5_libpath -lhdf5 $with_hdf5_libs $nodep_HDF5_LIBS"
       HDF5_LIBS="$_dune_hdf5_libpath -lhdf5 $with_hdf5_libs $HDF5_LIBS"
     ],
     [HAVE_HDF5=0], ["$with_hdf5_libs"])
 fi

 # pre-set variable for summary
 with_hdf5="no"

 # did we succeed?
 if test x$HAVE_HDF5 = x1 ; then
   AC_DEFINE(HAVE_HDF5, 1, [Define to 1 if hdf5 was found])

   # proudly show in summary
   with_hdf5="yes"
   if test x"$HDF5_PARALLEL" = x1; then
     with_hdf5="$with_hdf5 (parallel)"
   fi
 else
   # clear variables
   direct_HDF5_CPPFLAGS=
   nodep_HDF5_CPPFLAGS=
   HDF5_CPPFLAGS=
   direct_HDF5_LDFLAGS=
   nodep_HDF5_LDFLAGS=
   HDF5_LDFLAGS=
   direct_HDF5_LIBS=
   nodep_HDF5_LIBS=
   HDF5_LIBS=
   HDF5_PARALLEL=0
 fi

 AC_SUBST([HDF5_CPPFLAGS])
 AC_SUBST([HDF5_LDFLAGS])
 AC_SUBST([HDF5_LIBS])

 # also tell automake
 AM_CONDITIONAL(HDF5, test x$HAVE_HDF5 = x1)

 # add to global list
 DUNE_ADD_ALL_PKG([HDF5], [$nodep_HDF5_CPPFLAGS],
                  [$nodep_HDF5_LDFLAGS], [$nodep_HDF5_LIBS])

 # reset values					    
 LIBS="$ac_save_LIBS"
 LDFLAGS="$ac_save_LDFLAGS"
 CPPFLAGS="$ac_save_CPPFLAGS"

 DUNE_ADD_SUMMARY_ENTRY([HDF5],[$with_hdf5])

])