mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.3rc5.tar
This commit is contained in:
88
scripts/libpng-config.in
Normal file
88
scripts/libpng-config.in
Normal file
@@ -0,0 +1,88 @@
|
||||
#! /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
|
||||
Reference in New Issue
Block a user