This file is indexed.

/usr/share/dune/aclocal/superlu.m4 is in libdune-istl-dev 2.3.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
## -*- autoconf -*-
# $Id: superlu.m4 5908 2010-02-23 16:46:05Z joe $
# searches for SuperLU headers and libs

# _slu_lib_path(SUPERLU_ROOT, HEADER)
#
# Try to find the subpath unter SUPERLU_ROOT containing HEADER.  Try
# SUPERLU_ROOT/"include/superlu", SUPERLU_ROOT/"include", and
# SUPERLU_ROOT/"SRC", in that order.  Set the subpath for the library to
# "lib".  If HEADER was found in SUPERLU_ROOT/"SRC", check whether
# SUPERLU_ROOT/"lib" is a directory, and set the subpath for the library to
# the empty string "" if it isn't.
#
# Shell variables:
#   my_include_path
#      The subpath HEADER was found in: "include/superlu", "include", or
#      "SRC".  Contents is only meaningful for my_slu_found=yes.
#   my_lib_path
#      The subpath for the library: "lib" or "". Contents is only meaningful
#      for my_slu_found=yes.
#   my_slu_found
#      Whether HEADER was found at all.  Either "yes" or "no".
AC_DEFUN([_slu_lib_path],
    [
        my_include_path=include/superlu
        my_lib_path=lib
        my_slu_found=yes
        if test ! -f "$1/$my_include_path/$2" ; then
            #Try to find headers under superlu
            my_include_path=include
            if test ! -f "$1/$my_include_path/$2" ; then
                my_include_path=SRC
                if test ! -f "$1/$my_include_path/$2"; then
                    my_slu_found=no
                else
                    if ! test -d "$1/$my_lib_path"; then
                        my_lib_path=""
                    fi
                fi
            fi
        fi
    ]
)

# _slu_search_versions(SUPERLU_ROOT)
#
# Search for either "slu_ddefs.h" or "dsp_defs.h" using _slu_lib_path().
#
# Shell variables:
#   my_slu_header
#      The name of the header that was found: first of "slu_ddefs.h" or
#      "dsp_defs.h".  Contents is only meaningful for my_slu_found=yes.
#   my_include_path
#      The subpath the header was found in: "include/superlu", "include", or
#      "SRC".  Contents is only meaningful for my_slu_found=yes.
#   my_lib_path
#      The subpath for the library: "lib" or "". Contents is only meaningful
#      for my_slu_found=yes.
#   my_slu_found
#      Whether any of the headers.  Either "yes" or "no".
AC_DEFUN([_slu_search_versions],
    [
        my_slu_header=slu_ddefs.h
        _slu_lib_path($1, $my_slu_header)
        if test "$my_slu_found" != "yes"; then
            my_slu_header="dsp_defs.h"
            _slu_lib_path($1, $my_slu_header)
        fi
    ]
)


# _slu_search_default()
#
# Search for SuperLU in the default locations "/usr" and "/usr/local".
#
# Shell variables:
#   with_superlu
#     Root of the SuperLU installation: first of "/usr" and "/usr/local".
#     Contents is only meaningful for my_slu_found=yes.
#   For other output variables see documentation of _slu_search_versions().
AC_DEFUN([_slu_search_default],
    [
        with_superlu=/usr
        _slu_search_versions($with_superlu)

        if test "$my_slu_found" = "no"; then
            with_superlu=/usr/local
            _slu_search_versions($with_superlu)
        fi
    ]
)


# DUNE_PATH_SUPERLU()
#
# REQUIRES: AC_PROG_CC, ACX_BLAS
#
# Shell variables:
#   with_superlu
#     "no", "yes (version 4.3 or newer)", "yes (version 4.2 or older, post 2005)" or "yes (pre 2005)"
#   direct_SUPERLU_CPPFLAGS
#   direct_SUPERLU_LIBS
#      CPPFLAGS and LIBS necessary to link against SuperLU.  This variable
#      contains no indirect references and is suitable for use inside
#      configure.  Guaranteed empty if SuperLU was not found.
#   SUPERLU_CPPFLAGS
#   SUPERLU_LIBS
#      CPPFLAGS and LIBS necessary to link against SuperLU.  This variable may
#      contain indirect references and is suitable for use inside makefiles.
#      Guaranteed empty if SuperLU was not found.
#   HAVE_SUPERLU
#      "0" or "1" depending on whether SuperLU was found.
#
# Substitutions:
#   SUPERLU_LIBS
#   SUPERLU_CPPFLAGS
#     Substitutes the values of the corresponding shell variables.
#   ALL_PKG_LIBS
#   ALL_PKG_CPPFLAGS
#     Adds references to SuperLU's substitutions.
#
# Defines:
#   HAVE_SUPERLU
#     ENABLE_SUPERLU or undefined.  Whether SuperLU was found.  The correct
#     way to check this is "#if HAVE_SUPERLU": This way SuperLU features will
#     be disabled unless ${SUPERLU_CPPFLAGS} was given when compiling.
#   SUPERLU_POST_2005_VERSION
#     1 or undefined.  A post-2005 version of SuperLU uses the header
#     "slu_ddefs.h" while earlier versions use "dsp_defs.h".
#   SUPERLU_MIN_VERSION_4_3
#     1 or undefined. SuperLU version 4.3 or newer uses the symbol
#     "SLU_DOUBLE" while earlier versions use "DOUBLE".
#   HAVE_MEM_USAGE_T_EXPANSIONS
#     1 or undefined.  Whether "mem_usage_t.expansions" was found in
#     "slu_ddefs.h" or "dsp_defs.h" as apropriate.
#
# Conditionals:
#   SUPERLU
AC_DEFUN([DUNE_PATH_SUPERLU],[
    AC_REQUIRE([AC_PROG_CC])
    # we need this for FLIBS
    AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
    AC_REQUIRE([ACX_BLAS])

    #
    # User hints ...
    #
    my_lib_path=""
    my_include_path=""
    AC_ARG_WITH([superlu],
        [AC_HELP_STRING([--with-superlu],[user defined path to SuperLU library])],
        [dnl
            if test x"$withval" != xno ; then
                if test x"$withval" = xyes; then
                    # Search in default locations
                    _slu_search_default
                else
                    # get absolute path
                    with_superlu=`eval cd $withval 2>&1 && pwd`
                    # Search for the headers in the specified location
                    _slu_search_versions(["$with_superlu"])
                fi
            fi
        ], [dnl
            # Search in default locations
            _slu_search_default
        ])

    AC_ARG_WITH([superlu-lib],
        [AC_HELP_STRING([--with-superlu-lib],
                [The name of the static SuperLU library to link to.  By default
                    the static library with the name superlu.a is tried, but
                    only if shared linking has failed first.  Giving this
                    options forces static linking for SuperLU.])],
        [
            if test x"$withval" = xno ; then
                with_superlu_lib=
            fi
        ])

    AC_ARG_WITH([superlu-blaslib],
        [AC_HELP_STRING([--with-superlu-blaslib],
                [The name of the static blas library to link to.  By default
                    we try to link to the systems blas library (see
                    --with-blas).  Giving this options forces static linking
                    for SuperLU.])],
        [
            if test "$withval" = no ; then
                with_superlu_blaslib=
            fi
        ])

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

    # do nothing if --without-superlu is used
    if test x"$with_superlu" != x"no" ; then
        # defaultpath
        SUPERLU_LIB_PATH="$with_superlu/$my_lib_path"
        SUPERLU_INCLUDE_PATH="$with_superlu/$my_include_path"

        # set variables so that tests can use them
        direct_SUPERLU_CPPFLAGS="-I$SUPERLU_INCLUDE_PATH -DENABLE_SUPERLU"
        SUPERLU_CPPFLAGS="-I$SUPERLU_INCLUDE_PATH -DENABLE_SUPERLU"
        CPPFLAGS="$CPPFLAGS $direct_SUPERLU_CPPFLAGS"

        # check for central header
        AC_CHECK_HEADER([$my_slu_header],
            [HAVE_SUPERLU="1"],
            [
                HAVE_SUPERLU="0"
                AC_MSG_WARN([$my_slu_header not found in $SUPERLU_INCLUDE_PATH with $CPPFLAGS])
            ])

        # if header is found check for the libs
        if test x$HAVE_SUPERLU = x1 ; then
            HAVE_SUPERLU=0

            # if neither --with-superlu-lib nor --with-superlu-blaslib was
            # given, try to link dynamically or with properly names static libs
            if test x"$with_superlu_lib$with_superlu_blaslib" = x; then
                LDFLAGS="$ac_save_LDFLAGS -L$SUPERLU_LIB_PATH"
                LIBS="$ac_save_LIBS"
                AC_CHECK_LIB([superlu], [dgssvx],
                    [
                        direct_SUPERLU_LIBS="-L$SUPERLU_LIB_PATH -lsuperlu $BLAS_LIBS $FLIBS"
                        SUPERLU_LIBS="-L$SUPERLU_LIB_PATH -lsuperlu \${BLAS_LIBS} \${FLIBS}"
                        HAVE_SUPERLU="1"
                    ], [], [$BLAS_LIBS $FLIBS])
            fi

            if test $HAVE_SUPERLU = 0 && test x"$with_superlu_lib" = x; then
                # set the default
                with_superlu_lib=superlu.a
            fi

            if test $HAVE_SUPERLU = 0 &&
                test x"$with_superlu_blaslib" = x; then
                # try system blas
                LDFLAGS="$ac_save_LDFLAGS"
                LIBS="$SUPERLU_LIB_PATH/$with_superlu_lib $BLAS_LIBS $FLIBS $ac_save_LIBS"
                AC_CHECK_FUNC([dgssvx],
                    [
                        direct_SUPERLU_LIBS="$SUPERLU_LIB_PATH/$with_superlu_lib $BLAS_LIBS $FLIBS"
                        SUPERLU_LIBS="$SUPERLU_LIB_PATH/$with_superlu_lib \${BLAS_LIBS} \${FLIBS}"
                        HAVE_SUPERLU="1"
                    ])
            fi

            # No default for with_superlu_blaslib

            if test $HAVE_SUPERLU = 0 &&
                    test x"$with_superlu_blaslib" != x; then
                # try internal blas
                LDFLAGS="$ac_save_LDFLAGS"
                LIBS="$SUPERLU_LIB_PATH/$with_superlu_lib $SUPERLU_LIB_PATH/$with_superlu_blaslib $FLIBS $ac_save_LIBS"
                AC_CHECK_FUNC([dgssvx],
                    [
                        direct_SUPERLU_LIBS="$SUPERLU_LIB_PATH/$with_superlu_lib $SUPERLU_LIB_PATH/$with_superlu_blaslib $FLIBS"
                        SUPERLU_LIBS="$SUPERLU_LIB_PATH/$with_superlu_lib $SUPERLU_LIB_PATH/$with_superlu_blaslib \${FLIBS}"
                        HAVE_SUPERLU="1"
                    ])
            fi
            
            # test whether SuperLU version is at least 4.3
            if test $HAVE_SUPERLU = "1" ; then
                AC_CHECK_DECL([SLU_DOUBLE], [SUPERLU_MIN_VERSION_4_3="1"], [], [#include <$my_slu_header>])
            fi
        fi

    else # $with_superlu = no
        HAVE_SUPERLU=0
    fi

    # Inform the user whether SuperLU was sucessfully found
    AC_MSG_CHECKING([SuperLU])
    if test x$HAVE_SUPERLU = x1 ; then
        if test "$my_slu_header" = "slu_ddefs.h"; then
            if test x$SUPERLU_MIN_VERSION_4_3 = x1 ; then
                with_superlu="yes (version 4.3 or newer)"
            else
                with_superlu="yes (version 4.2 or older, post 2005)"
            fi
        else
            with_superlu="yes (pre 2005)"
        fi
    else
        with_superlu="no"
    fi
    AC_MSG_RESULT([$with_superlu])

    # check for optional member
    if test $HAVE_SUPERLU = 1 ; then
        if test "$my_slu_header" = "slu_ddefs.h"; then
            AC_CHECK_MEMBERS([mem_usage_t.expansions],[],[],[#include "slu_ddefs.h"])
        else
            AC_CHECK_MEMBERS([mem_usage_t.expansions],[],[],[#include "dsp_defs.h"])
        fi
    fi

    # substitute variables
    if test x$HAVE_SUPERLU = x0 ; then
        SUPERLU_LIBS=
        SUPERLU_CPPFLAGS=
    fi
    AC_SUBST([SUPERLU_LIBS])
    AC_SUBST([SUPERLU_CPPFLAGS])
    DUNE_ADD_ALL_PKG([SUPERLU], [\${SUPERLU_CPPFLAGS}], [], [\${SUPERLU_LIBS}])

    # tell automake
    AM_CONDITIONAL(SUPERLU, test x$HAVE_SUPERLU = x1)

    # tell the preprocessor
    if test x$HAVE_SUPERLU = x1 ; then
        AC_DEFINE([HAVE_SUPERLU], [ENABLE_SUPERLU], [Define to ENABLE_SUPERLU if SUPERLU is found])
        if test "$my_slu_header" = "slu_ddefs.h"; then
            AC_DEFINE([SUPERLU_POST_2005_VERSION], 1, [define to 1 if there is  a header slu_ddefs.h in SuperLU])
            if test x$SUPERLU_MIN_VERSION_4_3 = x1 ; then
                AC_DEFINE([SUPERLU_MIN_VERSION_4_3], 1, [define to 1 if there SLU_DOUBLE imported by header slu_ddefs.h from SuperLU])
            fi
        fi
    fi

    # summary
    DUNE_ADD_SUMMARY_ENTRY([SuperLU],[$with_superlu])

    # restore variables
    LDFLAGS="$ac_save_LDFLAGS"
    CPPFLAGS="$ac_save_CPPFLAGS"
    LIBS="$ac_save_LIBS"
])