diff options
Diffstat (limited to 'scripts/libpng-config')
-rwxr-xr-x | scripts/libpng-config | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/scripts/libpng-config b/scripts/libpng-config new file mode 100755 index 000000000..8d34e5bfd --- /dev/null +++ b/scripts/libpng-config @@ -0,0 +1,92 @@ +#! /bin/sh + +# libpng12-config +# provides configuration info for libpng12. + +# 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=/usr/local +exec_prefix=${prefix} +includedir=${prefix}/include + +usage() +{ + cat <<EOF +Usage: libpng12-config [OPTION] ... + +Known values for OPTION are: + + --prefix=DIR change libpng12 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 + +cflags=false +cppflags=false +ldflags=false +libs=false + +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.3rc4 + exit 0 + ;; + + --help) + usage 0 + ;; + + --cflags) + ;; + + --cppflags) + echo -I${includedir}/libpng12 + ;; + + --libs) + echo -lpng12 + ;; + + --ldflags) + echo -L${exec_prefix}/lib + ;; + + *) + usage + exit 1 + ;; + esac + shift +done + +exit 0 |