|
fukasawa |
e60969 |
#! /bin/sh
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# libpng-config
|
|
fukasawa |
e60969 |
# provides configuration info for libpng.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# This code is released under the libpng license.
|
|
fukasawa |
e60969 |
# For conditions of distribution and use, see the disclaimer
|
|
fukasawa |
e60969 |
# and license in png.h
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# Modeled after libxml-config.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
version="@PNGLIB_VERSION@"
|
|
fukasawa |
e60969 |
prefix="@prefix@"
|
|
fukasawa |
e60969 |
exec_prefix="@exec_prefix@"
|
|
fukasawa |
e60969 |
libdir="@libdir@"
|
|
fukasawa |
e60969 |
includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
|
fukasawa |
e60969 |
libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
|
fukasawa |
e60969 |
all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
|
|
fukasawa |
e60969 |
I_opts="-I${includedir}"
|
|
fukasawa |
e60969 |
L_opts="-L${libdir}"
|
|
fukasawa |
e60969 |
R_opts=""
|
|
fukasawa |
e60969 |
cppflags=""
|
|
fukasawa |
e60969 |
ccopts=""
|
|
fukasawa |
e60969 |
ldopts=""
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
usage()
|
|
fukasawa |
e60969 |
{
|
|
fukasawa |
e60969 |
cat <
|
|
fukasawa |
e60969 |
Usage: $0 [OPTION] ...
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Known values for OPTION are:
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--prefix print libpng prefix
|
|
fukasawa |
e60969 |
--libdir print path to directory containing library
|
|
fukasawa |
e60969 |
--libs print library linking information
|
|
fukasawa |
e60969 |
--ccopts print compiler options
|
|
fukasawa |
e60969 |
--cppflags print pre-processor flags
|
|
fukasawa |
e60969 |
--cflags print preprocessor flags, I_opts, and compiler options
|
|
fukasawa |
e60969 |
--I_opts print "-I" include options
|
|
fukasawa |
e60969 |
--L_opts print linker "-L" flags for dynamic linking
|
|
fukasawa |
e60969 |
--R_opts print dynamic linker "-R" or "-rpath" flags
|
|
fukasawa |
e60969 |
--ldopts print linker options
|
|
fukasawa |
e60969 |
--ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
|
|
fukasawa |
e60969 |
--static revise subsequent outputs for static linking
|
|
fukasawa |
e60969 |
--help print this help and exit
|
|
fukasawa |
e60969 |
--version print version information
|
|
fukasawa |
e60969 |
EOF
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
exit $1
|
|
fukasawa |
e60969 |
}
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
if test $# -eq 0; then
|
|
fukasawa |
e60969 |
usage 1
|
|
fukasawa |
e60969 |
fi
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
while test $# -gt 0; do
|
|
fukasawa |
e60969 |
case "$1" in
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--prefix)
|
|
fukasawa |
e60969 |
echo ${prefix}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--version)
|
|
fukasawa |
e60969 |
echo ${version}
|
|
fukasawa |
e60969 |
exit 0
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--help)
|
|
fukasawa |
e60969 |
usage 0
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--ccopts)
|
|
fukasawa |
e60969 |
echo ${ccopts}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--cppflags)
|
|
fukasawa |
e60969 |
echo ${cppflags}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--cflags)
|
|
fukasawa |
e60969 |
echo ${I_opts} ${cppflags} ${ccopts}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--libdir)
|
|
fukasawa |
e60969 |
echo ${libdir}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--libs)
|
|
fukasawa |
e60969 |
echo ${libs}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--I_opts)
|
|
fukasawa |
e60969 |
echo ${I_opts}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--L_opts)
|
|
fukasawa |
e60969 |
echo ${L_opts}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--R_opts)
|
|
fukasawa |
e60969 |
echo ${R_opts}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--ldopts)
|
|
fukasawa |
e60969 |
echo ${ldopts}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--ldflags)
|
|
fukasawa |
e60969 |
echo ${ldopts} ${L_opts} ${R_opts} ${libs}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--static)
|
|
fukasawa |
e60969 |
R_opts=""
|
|
fukasawa |
e60969 |
libs=${all_libs}
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
*)
|
|
fukasawa |
e60969 |
usage
|
|
fukasawa |
e60969 |
exit 1
|
|
fukasawa |
e60969 |
;;
|
|
fukasawa |
e60969 |
esac
|
|
fukasawa |
e60969 |
shift
|
|
fukasawa |
e60969 |
done
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
exit 0
|