2011-08-13 17:07:05 +00:00
|
|
|
|
|
|
|
## program below
|
|
|
|
|
2010-07-18 21:34:08 +00:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
cat <<EOF
|
|
|
|
Usage: mapnik-config [OPTION]
|
|
|
|
|
|
|
|
Known values for OPTION are:
|
|
|
|
|
2011-08-13 17:07:05 +00:00
|
|
|
--prefix display mapnik prefix [default $CONFIG_PREFIX]
|
|
|
|
--prefix=DIR change mapnik prefix [default $CONFIG_PREFIX]
|
2010-07-18 21:34:08 +00:00
|
|
|
--libs print library linking information
|
2011-08-13 17:07:05 +00:00
|
|
|
--dep-libs print library linking information for mapnik depedencies
|
|
|
|
--ldflags print library paths (-L) information
|
2010-07-18 21:34:08 +00:00
|
|
|
--cflags print pre-processor and compiler flags
|
|
|
|
--fonts print default fonts directory
|
2010-11-15 22:14:43 +00:00
|
|
|
--input-plugins print default input plugins directory
|
2011-08-13 17:07:05 +00:00
|
|
|
--json print all config options as json object
|
2010-07-18 21:34:08 +00:00
|
|
|
--help display this help and exit
|
2010-11-17 19:43:03 +00:00
|
|
|
-v --version output version information
|
|
|
|
--svn-revision output svn revision information
|
2010-07-18 21:34:08 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
exit $1
|
|
|
|
}
|
|
|
|
|
|
|
|
if test $# -eq 0; then
|
|
|
|
usage 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
while test $# -gt 0; do
|
|
|
|
case "$1" in
|
|
|
|
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
|
|
|
*) optarg= ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
|
|
|
|
--prefix=*)
|
|
|
|
prefix=$optarg
|
2011-08-13 17:07:05 +00:00
|
|
|
includedir=$CONFIG_PREFIX/include
|
|
|
|
CONFIG_MAPNIK_LIB=$CONFIG_PREFIX/lib
|
2010-07-18 21:34:08 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
--prefix)
|
2011-08-13 17:07:05 +00:00
|
|
|
echo $CONFIG_PREFIX
|
2010-07-18 21:34:08 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
-v)
|
2011-08-13 17:07:05 +00:00
|
|
|
echo $CONFIG_VERSION
|
2010-07-18 21:34:08 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
--version)
|
2011-08-13 17:07:05 +00:00
|
|
|
echo $CONFIG_VERSION
|
|
|
|
;;
|
|
|
|
|
|
|
|
--json)
|
|
|
|
echo $CONFIG_JSON
|
2010-07-18 21:34:08 +00:00
|
|
|
;;
|
|
|
|
|
2010-11-17 19:43:03 +00:00
|
|
|
--svn-revision)
|
2011-08-13 17:07:05 +00:00
|
|
|
echo ${CONFIG_SVN_REVISION}
|
2010-11-17 19:43:03 +00:00
|
|
|
;;
|
|
|
|
|
2010-07-18 21:34:08 +00:00
|
|
|
--help)
|
|
|
|
usage 0
|
|
|
|
;;
|
|
|
|
|
|
|
|
--fonts)
|
2011-08-13 17:07:05 +00:00
|
|
|
echo ${CONFIG_FONTS}
|
2010-07-18 21:34:08 +00:00
|
|
|
;;
|
|
|
|
|
2010-11-15 22:14:43 +00:00
|
|
|
--input-plugins)
|
2011-08-13 17:07:05 +00:00
|
|
|
echo ${CONFIG_INPUT_PLUGINS}
|
2010-07-18 21:34:08 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
--cflags)
|
2011-08-13 17:07:05 +00:00
|
|
|
echo -I${CONFIG_MAPNIK_INCLUDE} ${CONFIG_OTHER_INCLUDES}
|
2010-07-18 21:34:08 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
--libs)
|
2011-08-13 17:07:05 +00:00
|
|
|
echo -L${CONFIG_MAPNIK_LIB} -l${CONFIG_MAPNIK_LIBNAME}
|
|
|
|
;;
|
|
|
|
|
|
|
|
--ldflags)
|
|
|
|
echo ${CONFIG_MAPNIK_LDFLAGS}
|
|
|
|
;;
|
|
|
|
|
|
|
|
--lib-name)
|
|
|
|
echo ${CONFIG_MAPNIK_LIBNAME}
|
|
|
|
;;
|
|
|
|
|
|
|
|
--dep-libs)
|
|
|
|
echo ${CONFIG_DEP_LIBS}
|
2010-07-18 21:34:08 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2011-01-05 20:52:08 +00:00
|
|
|
# if no matches, return 'usage 1' meaning usage + 1 (error return type)
|
|
|
|
usage 1
|
2010-07-18 21:34:08 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|