This file is indexed.

/usr/bin/magics-config is in libmagics++-dev 2.14.5-2build1.

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

prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=/usr/include/magics
F77="gfortran"
CC="gcc"
CXX="g++"
CXXFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -m64 -fPIC -fno-gnu-keywords -ansi -std=c++98 -Wno-deprecated -Wno-write-strings" 
AXX="-m64 -fPIC"
SHLIB_EXT="so"
FFLAGS="-g -O2 -m64 -fPIC"
CPPLIBS=" -lstdc++"
py_dir="/usr/lib/python2.7/dist-packages"
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 2.14.5 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 Magics 2.14.5 15-February-2012
		;;
	--with-cairo)
		echo "yes"
		;;
	--with-python)
		echo "yes"
		;;
	--with-odb)
		echo "no"
		;;
	--with-netcdf)
		echo "@netcdf@"
		;;
	--with-metview)
		echo "no"
		;;
	--with-qt)
		echo ""
		;;
	--with-gd)
		echo "yes"
		;;
	--with-bufr)
		echo "yes"
		;;
	--with-spot)
		echo ""
		;;
	--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}"
		;;
	--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} -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -D_FORTIFY_SOURCE=2 -I/usr/lib/python2.7/dist-packages/numpy/core/include/ -I/usr/include/freetype2 -I/usr/include -I/usr/X11R6/include -I/usr/local/include"
fi

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

	my_libs="${my_libs}   -L/usr/lib -L/build/buildd/magics++-2.14.5/src/.libs -Wl,--as-needed -L/usr/local/lib64 -L/usr/X11R6/lib64 -Wl,--as-needed -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lgd  -lgrib_api  -lX11 -lpng12 -lz -lm -lm -ljasper -lopenjpeg -lemosR64 -lgrib_api -lterralib -lstdc++ -lm   -lemosR64  -lnetcdf_c++ -lnetcdf  -lterralib -lgfortran"

	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}   -L/usr/lib -L/build/buildd/magics++-2.14.5/src/.libs -Wl,--as-needed -L/usr/local/lib64 -L/usr/X11R6/lib64 -Wl,--as-needed -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lgd  -lgrib_api  -lX11 -lpng12 -lz -lm -lm -ljasper -lopenjpeg -lemosR64 -lgrib_api -lterralib -lstdc++ -lm   -lemosR64  -lnetcdf_c++ -lnetcdf  -lterralib $CPPLIBS"
	  echo ${static}
	else
	  echo "magics-config: NO STATIC LIBRARY available"
	fi
fi

if test "$echo_shared" = "yes"; then
	if test -f ${libdir}/libMagPlus.${SHLIB_EXT} ; then
	  shared="${precision} -L${libdir} -lMagPlus   -L/usr/lib -L/build/buildd/magics++-2.14.5/src/.libs -Wl,--as-needed -L/usr/local/lib64 -L/usr/X11R6/lib64 -Wl,--as-needed -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lgd  -lgrib_api  -lX11 -lpng12 -lz -lm -lm -ljasper -lopenjpeg -lemosR64 -lgrib_api -lterralib -lstdc++ -lm   -lemosR64  -lnetcdf_c++ -lnetcdf  -lterralib $CPPLIBS"
	  echo ${shared}
	else
	  echo "magics-config: NO SHARED LIBRARY"
	fi
fi

if test "$echo_flibs" = "yes"; then
	echo -lgfortran
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   -L/usr/lib -L/build/buildd/magics++-2.14.5/src/.libs -Wl,--as-needed -L/usr/local/lib64 -L/usr/X11R6/lib64 -Wl,--as-needed -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lgd  -lgrib_api  -lX11 -lpng12 -lz -lm -lm -ljasper -lopenjpeg -lemosR64 -lgrib_api -lterralib -lstdc++ -lm   -lemosR64  -lnetcdf_c++ -lnetcdf  -lterralib $CPPLIBS"
	$F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus   -L/usr/lib -L/build/buildd/magics++-2.14.5/src/.libs -Wl,--as-needed -L/usr/local/lib64 -L/usr/X11R6/lib64 -Wl,--as-needed -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lgd  -lgrib_api  -lX11 -lpng12 -lz -lm -lm -ljasper -lopenjpeg -lemosR64 -lgrib_api -lterralib -lstdc++ -lm   -lemosR64  -lnetcdf_c++ -lnetcdf  -lterralib $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   -L/usr/lib -L/build/buildd/magics++-2.14.5/src/.libs -Wl,--as-needed -L/usr/local/lib64 -L/usr/X11R6/lib64 -Wl,--as-needed -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lgd  -lgrib_api  -lX11 -lpng12 -lz -lm -lm -ljasper -lopenjpeg -lemosR64 -lgrib_api -lterralib -lstdc++ -lm   -lemosR64  -lnetcdf_c++ -lnetcdf  -lterralib $CPPLIBS -lgfortran"
	$CC ${out}$c_file ${CFLAGS} -I${includedir} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus   -L/usr/lib -L/build/buildd/magics++-2.14.5/src/.libs -Wl,--as-needed -L/usr/local/lib64 -L/usr/X11R6/lib64 -Wl,--as-needed -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lgd  -lgrib_api  -lX11 -lpng12 -lz -lm -lm -ljasper -lopenjpeg -lemosR64 -lgrib_api -lterralib -lstdc++ -lm   -lemosR64  -lnetcdf_c++ -lnetcdf  -lterralib $CPPLIBS -lgfortran
fi