This file is indexed.

/usr/bin/sundials-config is in libsundials-serial-dev 2.4.0-5.

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

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
#! /bin/bash
# -----------------------------------------------------------------------------------

    NAME_="sundials-config"
 PURPOSE_="returns required flags for linking to SUNDIALS libraries"
SYNOPSIS_="$NAME_ -m cvode|cvodes|ida|idas|kinsol -t s|p -l c|f [-s libs|cppflags -hv]"
REQUIRES_="standard GNU commands"
 VERSION_="0.1"
    DATE_="2006-07-25"
  AUTHOR_="Radu Serban <radu@llnl.gov>"

# -----------------------------------------------------------------------------------

usage () {

echo >&2 "$NAME_ $VERSION_ - $PURPOSE_
Usage: $SYNOPSIS_
Requires: $REQUIRES_
Options:
    -m cvode|cvodes|ida|idas|kinsol  SUNDIALS module
    -t s|p                           use serial or parallel vectors
    -l c|f                           use C or Fortran
    -s libs|cppflags                 show linking flags or C preprocessor flags. 
                                     (show both if option not given.)
    -h                               usage and options (this help)
    -v                               view this script
Notes:
    '-l f' is not valid for '-m cvodes' or '-m idas'
    '-s cppflags' returns an empty string for '-l f'" 
    exit 1
}


# args check
[ $# -eq 0 ] && { echo >&2 missing argument, type $NAME_ -h for help; exit 1; }

# process args
while getopts hvm:t:l:s: options
do
    case $options in
        m) module=$OPTARG ;;
        t) vector=$OPTARG ;;
        l) lang=$OPTARG ;;
        s) show=$OPTARG ;;
        h) usage ;;
        v) more $0; exit 1 ;;
       \?) echo invalid argument, type $NAME_ -h for help; exit 1 ;;
    esac
done
shift $(( $OPTIND - 1 ))

# args check
[[ $module ]] || { echo >&2 the -m option and argument must be specified; exit 1; }
[[ $vector ]] || { echo >&2 the -t option and argument must be specified; exit 1; }
[[ $lang ]]   || { echo >&2 the -l option and argument must be specified; exit 1; }
[[ $show ]]   || { show=both; }

# main

prefix=/usr;
exec_prefix=${prefix};
includedir=${prefix}/include;
libdir=${exec_prefix}/lib;

abs_includedir=`cd "${includedir}" > /dev/null 2>&1 && pwd`;
abs_libdir=`cd "${libdir}" > /dev/null 2>&1 && pwd`;

if test $abs_includedir != /usr/include ; then
    includes=-I$abs_includedir
fi

libdirs=-L$abs_libdir

case $module in
    cvode) 
        sun_lib="-lsundials_cvode";
        sun_flib="-lsundials_fcvode";
        ;;
    cvodes)
        sun_lib="-lsundials_cvodes";
        sun_flib=;
        ;;
    ida) 
        sun_lib="-lsundials_ida";
        sun_flib="-lsundials_fida";
        ;;
    idas) 
        sun_lib="-lsundials_idas";
        sun_flib=;
        ;;
    kinsol) 
        sun_lib="-lsundials_kinsol";
        sun_flib="-lsundials_fkinsol";
        ;;  
esac

case $vector in
    s)
        nvec_lib="-lsundials_nvecserial";
        nvec_flib="-lsundials_fnvecserial";
        ;;
    p)
        nvec_lib="-lsundials_nvecparallel";
        nvec_flib="-lsundials_fnvecparallel";
        ;;
esac

case $lang in
    c)
        cppflags=$includes;
        libs="$libdirs $sun_lib $nvec_lib -lm ";
        ;;
    f)
        cppflags=;
        if test $module = cvodes ; then
            libs="Fortran interface not available for CVODES";
        else
            libs="$libdirs $sun_flib $sun_lib $nvec_flib $nvec_lib -lm   -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath";
        fi
        ;;
esac

case $show in
    cppflags)
        echo $cppflags
        ;;
    libs)
        echo $libs
        ;;
    both)
        echo $cppflags
        echo $libs
        ;;
esac

# end script