This file is indexed.

/usr/bin/magics-config is in libmagics++-dev 2.22.7.dfsg.1-4.

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

prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib
includedir=/usr/include

# These may be arch-specific, and hence are fetched from the arch-specific
# pkg-config file.
F77=`pkg-config magics --variable=F77`
CC=`pkg-config magics --variable=CC`
CXX=`pkg-config magics --variable=CXX`
CXXFLAGS=`pkg-config magics --variable=CXXFLAGS`
AXX=`pkg-config magics --variable=AXX`
SHLIB_EXT=`pkg-config magics --variable=SHLIB_EXT`
FFLAGS=`pkg-config magics --variable=FFLAGS`
CPPLIBS=`pkg-config magics --variable=CPPLIBS`
py_dir=`pkg-config magics --variable=py_dir`
LDFLAGS=`pkg-config magics --variable=LDFLAGS`
FLIBS=`pkg-config magics --variable=FLIBS`
MAGICS_EXTRA_LIBS=`pkg-config magics --variable=MAGICS_EXTRA_LIBS`

suffix=""
 
# 
#  add --print-config
#
#
# test 64bit C/C++ & intel compiler
#
#  configure.ac  -  deprecated string option for gcc !!!!
#



usage()
{
	cat <<EOF
Usage: magics-config [OPTION] ...

Uses by default version  of Magics.

Generic options
  --version     output Magics version information.
  --help        display this help and exit.
  --print-setup print how the environment can be set up

Compilation support options
  --cxxflags    print pre-processor and compiler flags for C/C++
  --libs        print linking flags for C++
  --clibs       print linking flags for C
  --libdir      print directory where libraries are installed
  --f90static   print library linking information (static)
  --f90shared   print library linking information (shared)

  --compile     compile simple Magics Fortran programs (default single precision!)  
                  Example: magics-config --compile=wind.f
  --compileC    compile simple Magics C programs  
                  Example: magics-config --compileC=wind.c
  --suffix      set suffix of Fortran or C code files

  --double      include compiler option for fortran double precision 
                  (default single - only for interface - internally only double is used)
  --64bit       include fortran option for 64 bit

C/C++ flags use shared libraries if possible, otherwise static libraries are used. '--double' has 
NO effect on C/C++ programs.

Install directories Magics was configured to
  --prefix[=DIR]

EOF
	exit $1
}

if test -h ${prefix}; then
	name=$(readlink -q "${prefix}")
	if test -d ${name}; then
		prefix=name
	else
		prefix=$(dirname "${prefix}")
		prefix="${prefix}/${name}"
	fi
fi

ldlib="${prefix}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
if test $# -eq 0; then
	usage 1 1>&2
fi

while test $# -gt 0; do
	case "$1" in
		-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
		*) ;;
	esac

	case $1 in
	--prefix=*)
		prefix=$optarg
		;;
	--prefix)
		echo_prefix=yes
		;;
	--version)
		echo "2.22.7"
		;;
	--with-cairo)
		echo "yes"
		;;
	--with-python)
		echo ""
		;;
	--with-odb)
		echo "no"
		;;
	--with-netcdf)
		echo "no"
		;;
	--with-metview)
		echo "yes"
		;;
	--with-qt)
		echo "yes"
		;;
	--with-qtlib)
		echo "no"
		;;
	--with-bufr)
		echo "yes"
		;;
	--with-gd)
		echo "no"
		;;
	--with-spot)
		echo "no"
		;;
	--help)
		usage 0
		;;
	--print-setup)
		echo ""
		echo " For sh, ksh, dash and bash:"
		echo ""
		echo "   export MAGPLUS_HOME=${prefix}"
		echo "   export PATH=${prefix}/bin:\$PATH"
                echo "   export LD_LIBRARY_PATH=\"$ldlib\""
		echo "   export PYTHONPATH=\"${py_dir}:\${PYTHONPATH:-/usr/lib}\""
		echo ""
		echo " You might want add these lines to your login scripts (.profile, .kshrc or .bashrc)."
		echo ""
		;;
	--cxxflags)
		echo_cxxflags=yes
		;;
	--libs)
		echo_libs=yes
		;;
	--libdir)
		echo "${libdir}"
		;;
	--ld-lib)
		echo "setup to use for lD_LIBRARY_PATH"
		;;
	--python)
		echo "/usr/lib/python2.7/dist-packages"
		;;
	--clibs)
		echo_libs=yes
		echo_clibs=yes
		;;
	--f90static)
		echo_static=yes
		echo_shared=no
		;;
	--f90shared)
		echo_shared=yes
		echo_static=no
		;;
	--suffix=*)
		suffix=$optarg
		;;
	--compile=*)
		compile=yes
		f77_file=$optarg
		;;
	--compileC=*)
		compileC=yes
		c_file=$optarg
		;;
	--double)
		double=yes
		case "${F77}" in
			gfortran )
				FXX="-fdefault-real-8 ${FXX}"
				;;
			g77 )
				echo ""#"NO DOUBLE FLAG in g77"
				;;
			# Intel compiler
			# Portland pgf90
			# IBM fortran compiler
			ifc | ifort | pgf90 | pgf77 | xlf | xlf90 | xlf_r | xlf90_r )
				FXX="-r8 ${FXX}"
				;;
		esac
		;;
	--odb)
		odb=no
		;;
	--64bit)
		amd64=yes
		case "${F77}" in
			ifc | ifort | gfortran )
				FXX="-m64 ${FXX}"
				;;
			g77 )
				echo ""#"NO DOUBLE FLAG in g77"
				;;
			# Portland pgf90
			pgf90 | pgf77 )
				FXX="-tp amd64 ${FXX}"
				;;
		esac

		case "${CC}" in
			icc | icpc | gcc | g++ )
				CXX="-m64 ${CXX}"
				;;
			pgc | pgcpp )
				CXX="-tp amd64 ${CXX}"
				;;
		esac
		;; 
	*)
		usage 1 1>&2
		;;
	esac
	shift
done

if test "$echo_prefix" = "yes"; then
	echo $prefix
fi

if test "$echo_cxxflags" = "yes"; then
	if test "$includedir" != "/usr/include" ; then
		my_cxxflags="-I${includedir}"
	fi
	echo "${AXX} ${my_cxxflags} "
fi

if test "$echo_libs" = "yes"; then
if test -f ${libdir}/libMagPlus.so; then
		my_libs="-L${libdir} -lMagPlus"
	else
		my_libs="${libdir}/libMagPlus.a"
	fi

 
	my_libs="${my_libs} $MAGICS_EXTRA_LIBS"

	if test "$echo_clibs" = "yes"; then
		my_libs="${my_libs} $CPPLIBS"
	fi

	echo "${my_libs}"
fi

if test "$double" = "yes"; then
	precision="${FXX} ${libdir}/libMagPlusDouble.a"
else
	precision="${FXX} ${libdir}/libMagPlusSingle.a"
fi


if test "$echo_static" = "yes"; then
	if test -f ${libdir}/libMagPlus.a ; then
	  static="${precision} ${libdir}/libMagPlus.a -L${libdir} $LDFLAGS $MAGICS_EXTRA_LIBS $CPPLIBS"
	  echo ${static}
	else
	  echo "magics-config: NO STATIC LIBRARY available"
	fi
fi



if test "$echo_shared" = "yes"; then
	if test -f ${libdir}/libMagPlus.so ; then
	  shared=" ${precision} -L${libdir} -lMagPlus $LDFLAGS $MAGICS_EXTRA_LIBS $CPPLIBS"
	  echo ${shared}
	else
	  echo "magics-config: NO SHARED LIBRARY"
	fi
fi

if test "$echo_flibs" = "yes"; then
	echo $FLIBS
fi

if test "$compile" = "yes"; then
	out=""
	if test "${suffix}x" = "x"; then
	   suffix="f"
	fi
	name="`basename $f77_file .${suffix}`"

	if test ${name} != ${f77_file} ; then
	      out="-o $name "              ### avoid overriding source file
	fi
	echo "$F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -lMagPlus $LDFLAGS $MAGICS_EXTRA_LIBS $CPPLIBS"
	$F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus $LDFLAGS $MAGICS_EXTRA_LIBS $CPPLIBS
fi

if test "$compileC" = "yes"; then
	out=""
	if test "${suffix}x" = "x"; then
	   suffix="c"
	fi

	name="`basename $c_file .${suffix}`"

	if test ${name} != ${c_file} ; then
	      out="-o $name "              ### avoid overriding source file
	fi
	echo "$CC ${out}$c_file ${CFLAGS} -L${libdir} -lMagPlus $LDFLAGS $MAGICS_EXTRA_LIBS $CPPLIBS $FLIBS"
	$CC ${out}$c_file ${CFLAGS} -I${includedir} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus $LDFLAGS $MAGICS_EXTRA_LIBS $CPPLIBS $FLIBS
fi