blob: 617b3f0d3f92dc5f0a530e8c9715fe8f1f8a3182 [file] [log] [blame]
#! /bin/sh
# libpng-config
# provides configuration info for libpng.
# Copyright (C) 2002 Glenn Randers-Pehrson
# For conditions of distribution and use, see copyright notice in png.h
# Modeled after libxml-config, fixed to handle --prefix properly.
prefix=@PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/include
usage()
{
cat <<EOF
Usage: libpng-config [OPTION] ...
Known values for OPTION are:
--prefix=DIR change libpng prefix [default $prefix]
--libs print library linking information
--cflags print compiler flags
--cppflags print pre-processor flags
--ldflags print loader flags
--help display this help and exit
--version output version information
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
exec_prefix=${prefix}
includedir=${prefix}/include
;;
--prefix)
echo $prefix
;;
--version)
echo 1.2.3rc5
exit 0
;;
--help)
usage 0
;;
--cflags)
echo #CFLAGS
;;
--cppflags)
echo -I${includedir}/libpng12 #CPPFLAGS
;;
--libs)
echo -lpng12 -lz #LIBS
;;
--ldflags)
echo -L${exec_prefix}/lib #LDFLAGS
;;
*)
usage
exit 1
;;
esac
shift
done
exit 0