This file is indexed.

/usr/share/dune/aclocal/umfpack.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
158
159
160
161
162
# courtesy of the dune-fem maintainers

AC_DEFUN([DUNE_PATH_UMFPACK],[
  AC_REQUIRE([AC_PROG_CC])

  AC_ARG_WITH(umfpack,
    AC_HELP_STRING([--with-umfpack=PATH],[directory with UMFPACK inside]))
  AC_ARG_WITH(umfpack-includedir,
    AC_HELP_STRING([--with-umfpack-includedir=PATH],[directory with UMFPACK headers inside]))
  AC_ARG_WITH(umfpack-libdir,
    AC_HELP_STRING([--with-umfpack-libdir=PATH],[directory with UMFPACK libraries inside]))

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

UMFPACKYES=0
## do nothing if no --with-umfpack was supplied
if test x$with_umfpack != x && test x$with_umfpack != xno ; then
  UMFPACKYES=1
fi
if test x$with_umfpack_includedir != x && test x$with_umfpack_includedir != xno ; then
  UMFPACKYES=1
fi
if test x$with_umfpack_libdir != x && test x$with_umfpack_libdir != xno ; then
  UMFPACKYES=1
fi

if test x$UMFPACKYES = x1 ; then

  # is --with-umfpack=bla used?
  if test "x$with_umfpack" != x ; then
    UMFPACKROOT=`cd $with_umfpack && pwd`
    if ! test -d $UMFPACKROOT;  then
      AC_MSG_WARN([UMFPACK directory $with_umfpack does not exist])
    fi

    if test "x$UMFPACKROOT" = x; then
      # use some default value...
      UMFPACKROOT="/usr/local/umfpack"
    fi

    UMFCHOL_LIB_PATH="$UMFPACKROOT/CHOLMOD/Lib"
    UMFAMD_LIB_PATH="$UMFPACKROOT/AMD/Lib"
    UMFPACK_LIB_PATH="$UMFPACKROOT/UMFPACK/Lib"
    UMFPACK_INCLUDE_PATH="$UMFPACKROOT/UMFPACK/Include"
  else
    if test "x$with_umfpack_includedir" != x ; then
      UMFPACK_INCLUDE_PATH=`cd $with_umfpack_includedir && pwd`
      if ! test -d $UMFPACK_INCLUDE_PATH;  then
        AC_MSG_WARN([UMFPACK directory $with_umfpack_includedir does not exist])
      fi
    fi
    if test "x$with_umfpack_libdir" != x ; then
      UMFPACK_LIB_PATH=`cd $with_umfpack_libdir && pwd`
      if ! test -d $UMFPACK_LIB_PATH;  then
        AC_MSG_WARN([UMFPACK directory $with_umfpack_libdir does not exist])
      fi
    fi
    UMFAMD_LIB_PATH=$UMFPACK_LIB_PATH
    UMFCHOL_LIB_PATH=$UMFPACK_LIB_PATH
  fi

  # set variables so that tests can use them
  REM_CPPFLAGS=$CPPFLAGS

  LDFLAGS="$LDFLAGS -L$UMFPACK_LIB_PATH -L$UMFAMD_LIB_PATH -L$UMFCHOL_LIB_PATH" 
  UMFPACK_INC_FLAG="-I$UMFPACK_INCLUDE_PATH -I$UMFPACKROOT/UFconfig -I$UMFPACKROOT/AMD/Include -I$UMFPACKROOT/SuiteSparse_config -DENABLE_UMFPACK=1"
  CPPFLAGS="$CPPFLAGS $UMFPACK_INC_FLAG $MPI_CPPFLAGS"

  # check for header
  AC_LANG_PUSH([C])
  AC_CHECK_HEADERS([umfpack.h],
    [UMFPACK_CPPFLAGS="$UMFPACK_INC_FLAG"
      HAVE_UMFPACK="1"],
    AC_MSG_WARN([umfpack.h not found in $UMFPACK_INCLUDE_PATH]))

  CPPFLAGS="$REM_CPPFLAGS"
  REM_CPPFLAGS=

  REM_LDFLAGS=$LDFLAGS

  # check for umfpack lib
  if test x$HAVE_UMFPACK = x1 ; then
    AC_CHECK_LIB(umfpack,[main],
      [UMFPACK_LIBS="-lumfpack"
        UMFPACK_LDFLAGS="-L$UMFPACK_LIB_PATH"],
      [HAVE_UMFPACK="0"
        AC_MSG_WARN(libumfpack not found!)])
  fi

  # check for amd lib
  if test x$HAVE_UMFPACK = x1 ; then
    AC_CHECK_LIB(amd,[main],
      [UMFPACK_LIBS="$UMFPACK_LIBS -lamd"
        UMFPACK_LDFLAGS="$UMFPACK_LDFLAGS -L$UMFAMD_LIB_PATH"
        LIBS="$LIBS $UMFPACK_LIBS"],
      [HAVE_UMFPACK="0"
        AC_MSG_WARN(libamd not found!)])
  fi

  # check for cholmod lib
  if test x$HAVE_UMFPACK = x1 ; then
    AC_CHECK_LIB(cholmod,[main],
      [UMFPACK_LIBS="$UMFPACK_LIBS -lcholmod"
        UMFPACK_LDFLAGS="$UMFPACK_LDFLAGS -L$UMFCHOL_LIB_PATH"
        LIBS="$LIBS $UMFPACK_LIBS"],
      [AC_MSG_WARN(libcholmod not found!)])
  fi

  # check for suitesparseconfig lib
  if test x$HAVE_UMFPACK = x1 ; then
    AC_CHECK_LIB(suitesparseconfig,[main],
      [UMFPACK_LIBS="$UMFPACK_LIBS -lsuitesparseconfig"
        UMFPACK_LDFLAGS="$UMFPACK_LDFLAGS"
        LIBS="$LIBS"],
      [AC_MSG_WARN(libsuitesparseconfig not found!)])
  fi
    

  LDFLAGS=$REM_LDFLAGS
  AC_LANG_POP

## end of umfpack check (--without wasn't set)
fi

# survived all tests?
if test x$HAVE_UMFPACK = x1 ; then
  AC_SUBST(UMFPACK_LIBS, $UMFPACK_LIBS)
  AC_SUBST(UMFPACK_LDFLAGS, $UMFPACK_LDFLAGS)
  AC_SUBST(UMFPACK_CPPFLAGS, $UMFPACK_CPPFLAGS)
  AC_DEFINE(HAVE_UMFPACK, ENABLE_UMFPACK,
    [This is only true if umfpack-library was found by configure
     _and_ if the application uses the UMFPACK_CPPFLAGS])

  # add to global list
  DUNE_ADD_ALL_PKG([UMFPACK], [\${UMFPACK_CPPFLAGS}],
                   [\${UMFPACK_LDFLAGS}], [\${UMFPACK_LIBS}])

  # set variable for summary
  with_umfpack="yes"

else
  AC_SUBST(UMFPACK_LIBS, "")
  AC_SUBST(UMFPACK_LDFLAGS, "")
  AC_SUBST(UMFPACK_CPPFLAGS, "")

  # set variable for summary
  with_umfpack="no"
fi

# also tell automake
AM_CONDITIONAL(UMFPACK, test x$HAVE_UMFPACK = x1)

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

  DUNE_ADD_SUMMARY_ENTRY([UMFPACK],[$with_umfpack])
])