2011-08-13 19:07:05 +02:00
|
|
|
|
|
|
|
## program below
|
|
|
|
|
2010-07-18 23:34:08 +02:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
cat <<EOF
|
|
|
|
Usage: mapnik-config [OPTION]
|
|
|
|
|
|
|
|
Known values for OPTION are:
|
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
-h --help display this help and exit
|
|
|
|
-v --version version information
|
|
|
|
--git-revision git hash from "git rev-list --max-count=1 HEAD"
|
|
|
|
--git-describe git decribe output (new in 2.2.x)
|
|
|
|
--fonts default fonts directory
|
|
|
|
--input-plugins default input plugins directory
|
|
|
|
--defines pre-processor defines for Mapnik build (new in 2.2.x)
|
|
|
|
--prefix Mapnik prefix [default $CONFIG_PREFIX]
|
|
|
|
--lib-name Mapnik library name
|
|
|
|
--libs library linking information
|
|
|
|
--dep-libs library linking information for Mapnik dependencies
|
|
|
|
--ldflags library paths (-L) information
|
|
|
|
--includes include paths (-I) for Mapnik headers (new in 2.2.x)
|
|
|
|
--dep-includes include paths (-I) for Mapnik dependencies (new in 2.2.x)
|
|
|
|
--cxxflags c++ compiler flags and pre-processor defines (new in 2.2.x)
|
|
|
|
--cflags c++ compiler flags and pre-processor defines (same as cxxflags, for back-compatibility)
|
2010-07-18 23:34:08 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
exit $1
|
|
|
|
}
|
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
echoerr() { echo "$@" 1>&2; }
|
|
|
|
|
2010-07-18 23:34:08 +02:00
|
|
|
if test $# -eq 0; then
|
|
|
|
usage 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
while test $# -gt 0; do
|
|
|
|
case "$1" in
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$1" in
|
2011-10-19 00:22:47 +02:00
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
--help)
|
|
|
|
usage 0
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
-h)
|
|
|
|
usage 0
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
-v)
|
2013-03-14 03:49:59 +01:00
|
|
|
echo ${CONFIG_MAPNIK_VERSION}
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
--version)
|
2011-10-19 00:13:38 +02:00
|
|
|
echo $CONFIG_MAPNIK_VERSION
|
2011-08-13 19:07:05 +02:00
|
|
|
;;
|
|
|
|
|
2011-10-19 00:22:47 +02:00
|
|
|
--git-revision)
|
|
|
|
echo ${CONFIG_GIT_REVISION}
|
|
|
|
;;
|
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
--git-describe)
|
|
|
|
echo ${CONFIG_GIT_DESCRIBE}
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
--fonts)
|
2011-10-19 00:22:47 +02:00
|
|
|
echo ${CONFIG_FONTS}
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
|
|
|
|
2010-11-15 23:14:43 +01:00
|
|
|
--input-plugins)
|
2011-10-19 00:22:47 +02:00
|
|
|
echo ${CONFIG_INPUT_PLUGINS}
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
2011-10-19 00:22:47 +02:00
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
--defines)
|
|
|
|
echo ${CONFIG_MAPNIK_DEFINES}
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
--prefix)
|
|
|
|
echo ${CONFIG_PREFIX}
|
|
|
|
;;
|
|
|
|
|
|
|
|
--lib-name)
|
|
|
|
echo ${CONFIG_MAPNIK_LIBNAME}
|
2013-03-03 05:17:03 +01:00
|
|
|
;;
|
|
|
|
|
2010-07-18 23:34:08 +02:00
|
|
|
--libs)
|
2013-03-15 21:31:10 +01:00
|
|
|
echo -L${CONFIG_MAPNIK_LIBPATH} -l${CONFIG_MAPNIK_LIBNAME}
|
2011-08-13 19:07:05 +02:00
|
|
|
;;
|
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
--dep-libs)
|
|
|
|
echo ${CONFIG_DEP_LIBS}
|
|
|
|
;;
|
|
|
|
|
2011-08-13 19:07:05 +02:00
|
|
|
--ldflags)
|
|
|
|
echo ${CONFIG_MAPNIK_LDFLAGS}
|
|
|
|
;;
|
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
--includes)
|
|
|
|
echo -I${CONFIG_MAPNIK_INCLUDE}
|
2011-08-13 19:07:05 +02:00
|
|
|
;;
|
|
|
|
|
2013-03-14 03:49:59 +01:00
|
|
|
--dep-includes)
|
|
|
|
echo ${CONFIG_DEP_INCLUDES}
|
|
|
|
;;
|
|
|
|
|
|
|
|
--cxxflags)
|
|
|
|
echo ${CONFIG_CXXFLAGS}
|
|
|
|
;;
|
|
|
|
|
|
|
|
--cflags)
|
|
|
|
echo -I${CONFIG_MAPNIK_INCLUDE} ${CONFIG_DEP_INCLUDES} ${CONFIG_MAPNIK_DEFINES}
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2013-03-14 03:49:59 +01:00
|
|
|
# push to stderr any invalid options
|
|
|
|
echo "unknown option $1" 1>&2;
|
2010-07-18 23:34:08 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|