1*a67afe4dSAndroid Build Coastguard Worker#! /bin/sh 2*a67afe4dSAndroid Build Coastguard Worker 3*a67afe4dSAndroid Build Coastguard Worker# libpng-config 4*a67afe4dSAndroid Build Coastguard Worker# provides configuration info for libpng. 5*a67afe4dSAndroid Build Coastguard Worker 6*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson 7*a67afe4dSAndroid Build Coastguard Worker 8*a67afe4dSAndroid Build Coastguard Worker# This code is released under the libpng license. 9*a67afe4dSAndroid Build Coastguard Worker# For conditions of distribution and use, see the disclaimer 10*a67afe4dSAndroid Build Coastguard Worker# and license in png.h 11*a67afe4dSAndroid Build Coastguard Worker 12*a67afe4dSAndroid Build Coastguard Worker# Modeled after libxml-config. 13*a67afe4dSAndroid Build Coastguard Worker 14*a67afe4dSAndroid Build Coastguard Workerversion="@PNGLIB_VERSION@" 15*a67afe4dSAndroid Build Coastguard Workerprefix="@prefix@" 16*a67afe4dSAndroid Build Coastguard Workerexec_prefix="@exec_prefix@" 17*a67afe4dSAndroid Build Coastguard Workerlibdir="@libdir@" 18*a67afe4dSAndroid Build Coastguard Workerincludedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" 19*a67afe4dSAndroid Build Coastguard Workerlibs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" 20*a67afe4dSAndroid Build Coastguard Workerall_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@" 21*a67afe4dSAndroid Build Coastguard WorkerI_opts="-I${includedir}" 22*a67afe4dSAndroid Build Coastguard WorkerL_opts="-L${libdir}" 23*a67afe4dSAndroid Build Coastguard WorkerR_opts="" 24*a67afe4dSAndroid Build Coastguard Workercppflags="" 25*a67afe4dSAndroid Build Coastguard Workerccopts="" 26*a67afe4dSAndroid Build Coastguard Workerldopts="" 27*a67afe4dSAndroid Build Coastguard Worker 28*a67afe4dSAndroid Build Coastguard Workerusage() 29*a67afe4dSAndroid Build Coastguard Worker{ 30*a67afe4dSAndroid Build Coastguard Worker cat <<EOF 31*a67afe4dSAndroid Build Coastguard WorkerUsage: $0 [OPTION] ... 32*a67afe4dSAndroid Build Coastguard Worker 33*a67afe4dSAndroid Build Coastguard WorkerKnown values for OPTION are: 34*a67afe4dSAndroid Build Coastguard Worker 35*a67afe4dSAndroid Build Coastguard Worker --prefix print libpng prefix 36*a67afe4dSAndroid Build Coastguard Worker --libdir print path to directory containing library 37*a67afe4dSAndroid Build Coastguard Worker --libs print library linking information 38*a67afe4dSAndroid Build Coastguard Worker --ccopts print compiler options 39*a67afe4dSAndroid Build Coastguard Worker --cppflags print pre-processor flags 40*a67afe4dSAndroid Build Coastguard Worker --cflags print preprocessor flags, I_opts, and compiler options 41*a67afe4dSAndroid Build Coastguard Worker --I_opts print "-I" include options 42*a67afe4dSAndroid Build Coastguard Worker --L_opts print linker "-L" flags for dynamic linking 43*a67afe4dSAndroid Build Coastguard Worker --R_opts print dynamic linker "-R" or "-rpath" flags 44*a67afe4dSAndroid Build Coastguard Worker --ldopts print linker options 45*a67afe4dSAndroid Build Coastguard Worker --ldflags print linker flags (ldopts, L_opts, R_opts, and libs) 46*a67afe4dSAndroid Build Coastguard Worker --static revise subsequent outputs for static linking 47*a67afe4dSAndroid Build Coastguard Worker --help print this help and exit 48*a67afe4dSAndroid Build Coastguard Worker --version print version information 49*a67afe4dSAndroid Build Coastguard WorkerEOF 50*a67afe4dSAndroid Build Coastguard Worker 51*a67afe4dSAndroid Build Coastguard Worker exit $1 52*a67afe4dSAndroid Build Coastguard Worker} 53*a67afe4dSAndroid Build Coastguard Worker 54*a67afe4dSAndroid Build Coastguard Workerif test $# -eq 0; then 55*a67afe4dSAndroid Build Coastguard Worker usage 1 56*a67afe4dSAndroid Build Coastguard Workerfi 57*a67afe4dSAndroid Build Coastguard Worker 58*a67afe4dSAndroid Build Coastguard Workerwhile test $# -gt 0; do 59*a67afe4dSAndroid Build Coastguard Worker case "$1" in 60*a67afe4dSAndroid Build Coastguard Worker 61*a67afe4dSAndroid Build Coastguard Worker --prefix) 62*a67afe4dSAndroid Build Coastguard Worker echo ${prefix} 63*a67afe4dSAndroid Build Coastguard Worker ;; 64*a67afe4dSAndroid Build Coastguard Worker 65*a67afe4dSAndroid Build Coastguard Worker --version) 66*a67afe4dSAndroid Build Coastguard Worker echo ${version} 67*a67afe4dSAndroid Build Coastguard Worker exit 0 68*a67afe4dSAndroid Build Coastguard Worker ;; 69*a67afe4dSAndroid Build Coastguard Worker 70*a67afe4dSAndroid Build Coastguard Worker --help) 71*a67afe4dSAndroid Build Coastguard Worker usage 0 72*a67afe4dSAndroid Build Coastguard Worker ;; 73*a67afe4dSAndroid Build Coastguard Worker 74*a67afe4dSAndroid Build Coastguard Worker --ccopts) 75*a67afe4dSAndroid Build Coastguard Worker echo ${ccopts} 76*a67afe4dSAndroid Build Coastguard Worker ;; 77*a67afe4dSAndroid Build Coastguard Worker 78*a67afe4dSAndroid Build Coastguard Worker --cppflags) 79*a67afe4dSAndroid Build Coastguard Worker echo ${cppflags} 80*a67afe4dSAndroid Build Coastguard Worker ;; 81*a67afe4dSAndroid Build Coastguard Worker 82*a67afe4dSAndroid Build Coastguard Worker --cflags) 83*a67afe4dSAndroid Build Coastguard Worker echo ${I_opts} ${cppflags} ${ccopts} 84*a67afe4dSAndroid Build Coastguard Worker ;; 85*a67afe4dSAndroid Build Coastguard Worker 86*a67afe4dSAndroid Build Coastguard Worker --libdir) 87*a67afe4dSAndroid Build Coastguard Worker echo ${libdir} 88*a67afe4dSAndroid Build Coastguard Worker ;; 89*a67afe4dSAndroid Build Coastguard Worker 90*a67afe4dSAndroid Build Coastguard Worker --libs) 91*a67afe4dSAndroid Build Coastguard Worker echo ${libs} 92*a67afe4dSAndroid Build Coastguard Worker ;; 93*a67afe4dSAndroid Build Coastguard Worker 94*a67afe4dSAndroid Build Coastguard Worker --I_opts) 95*a67afe4dSAndroid Build Coastguard Worker echo ${I_opts} 96*a67afe4dSAndroid Build Coastguard Worker ;; 97*a67afe4dSAndroid Build Coastguard Worker 98*a67afe4dSAndroid Build Coastguard Worker --L_opts) 99*a67afe4dSAndroid Build Coastguard Worker echo ${L_opts} 100*a67afe4dSAndroid Build Coastguard Worker ;; 101*a67afe4dSAndroid Build Coastguard Worker 102*a67afe4dSAndroid Build Coastguard Worker --R_opts) 103*a67afe4dSAndroid Build Coastguard Worker echo ${R_opts} 104*a67afe4dSAndroid Build Coastguard Worker ;; 105*a67afe4dSAndroid Build Coastguard Worker 106*a67afe4dSAndroid Build Coastguard Worker --ldopts) 107*a67afe4dSAndroid Build Coastguard Worker echo ${ldopts} 108*a67afe4dSAndroid Build Coastguard Worker ;; 109*a67afe4dSAndroid Build Coastguard Worker 110*a67afe4dSAndroid Build Coastguard Worker --ldflags) 111*a67afe4dSAndroid Build Coastguard Worker echo ${ldopts} ${L_opts} ${R_opts} ${libs} 112*a67afe4dSAndroid Build Coastguard Worker ;; 113*a67afe4dSAndroid Build Coastguard Worker 114*a67afe4dSAndroid Build Coastguard Worker --static) 115*a67afe4dSAndroid Build Coastguard Worker R_opts="" 116*a67afe4dSAndroid Build Coastguard Worker libs=${all_libs} 117*a67afe4dSAndroid Build Coastguard Worker ;; 118*a67afe4dSAndroid Build Coastguard Worker 119*a67afe4dSAndroid Build Coastguard Worker *) 120*a67afe4dSAndroid Build Coastguard Worker usage 121*a67afe4dSAndroid Build Coastguard Worker exit 1 122*a67afe4dSAndroid Build Coastguard Worker ;; 123*a67afe4dSAndroid Build Coastguard Worker esac 124*a67afe4dSAndroid Build Coastguard Worker shift 125*a67afe4dSAndroid Build Coastguard Workerdone 126*a67afe4dSAndroid Build Coastguard Worker 127*a67afe4dSAndroid Build Coastguard Workerexit 0 128