#!/bin/csh 

# Use system-wide one identified by $1

set pkg_config = 'pkg-config'

if ("$1" == '-local') then				    # quotes protect the "-" in -local
  set local_path = $2
  shift ; shift
  set pkg_config = $local_path/bin/$pkg_config
  setenv PKG_CONFIG_PATH $local_path/lib/pkgconfig
endif


setenv PKG_CONFIG_PATH $1/lib/pkgconfig
$pkg_config --libs $1 $2

exit 0
