16554N/A#!/bin/sh
16554N/A
16554N/A# This is a wrapper of pkg-config to simulate nspr-config/nss-config.
16554N/A# Usage: nspr-nss-config nspr [--version] [--libs] [--cflags]
16554N/A# or nspr-nss-config nss [--version] [--libs] [--cflags]
16554N/A
16554N/Aif test $# -eq 0; then
16554N/A exit 1
16554N/Afi
16554N/A
16554N/Aprogram_name=$1
16554N/Ashift
16554N/A
16554N/Aif test "$program_name" != "nspr" && test "$program_name" != "nss"; then
16554N/A exit 1
16554N/Afi
16554N/A
16554N/Awhile test $# -gt 0; do
16554N/A case $1 in
16554N/A --version)
16554N/A echo_version=yes
16554N/A ;;
16554N/A --cflags)
16554N/A echo_cflags=yes
16554N/A ;;
16554N/A --libs)
16554N/A echo_libs=yes
16554N/A ;;
16554N/A esac
16554N/A shift
16554N/Adone
16554N/A
16554N/Aif test "$echo_version" = "yes"; then
17450N/A # use sed to append .0 if it doesn't have micro version
17633N/A pkg-config $program_name --modversion | sed 's/^\([0-9]*\)\.\([0-9]*\)$/\1.\2.0/'
17450N/A
16554N/Afi
16554N/A
16554N/Aif test "$echo_cflags" = "yes"; then
16554N/A pkg-config $program_name --cflags
16554N/Afi
16554N/A
16554N/Aif test "$echo_libs" = "yes"; then
16554N/A echo -R/usr/lib/mps `pkg-config $program_name --libs`
16554N/Afi