mapnik/utils/mapnik-config/mapnik-config.template.sh

125 lines
2.4 KiB
Bash
Raw Normal View History

## program below
usage()
{
cat <<EOF
Usage: mapnik-config [OPTION]
Known values for OPTION are:
-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 all include paths, compiler flags, and pre-processor defines (for back-compatibility)
EOF
exit $1
}
echoerr() { echo "$@" 1>&2; }
if test $# -eq 0; then
usage 1
fi
while test $# -gt 0; do
case "$1" in
esac
case "$1" in
--help)
usage 0
;;
-h)
usage 0
;;
-v)
echo ${CONFIG_MAPNIK_VERSION}
;;
--version)
echo $CONFIG_MAPNIK_VERSION
;;
--git-revision)
echo ${CONFIG_GIT_REVISION}
;;
--git-describe)
echo ${CONFIG_GIT_DESCRIBE}
;;
--fonts)
echo ${CONFIG_FONTS}
;;
--input-plugins)
echo ${CONFIG_INPUT_PLUGINS}
;;
--defines)
echo ${CONFIG_MAPNIK_DEFINES}
;;
--prefix)
echo ${CONFIG_PREFIX}
;;
--lib-name)
echo ${CONFIG_MAPNIK_LIBNAME}
;;
--libs)
echo -L${CONFIG_MAPNIK_LIBPATH} -l${CONFIG_MAPNIK_LIBNAME}
;;
--dep-libs)
echo ${CONFIG_DEP_LIBS}
;;
--ldflags)
echo ${CONFIG_MAPNIK_LDFLAGS}
;;
--includes)
echo -I${CONFIG_MAPNIK_INCLUDE}
;;
--dep-includes)
echo ${CONFIG_DEP_INCLUDES}
;;
--cxxflags)
echo ${CONFIG_CXXFLAGS}
;;
--cflags)
echo -I${CONFIG_MAPNIK_INCLUDE} ${CONFIG_DEP_INCLUDES} ${CONFIG_MAPNIK_DEFINES} ${CONFIG_CXXFLAGS}
;;
*)
# push to stderr any invalid options
echo "unknown option $1" 1>&2;
;;
esac
shift
done
exit 0