dcddc0
#!/bin/sh
dcddc0
dcddc0
prefix=@prefix@
dcddc0
dcddc0
major_version=@MOD_MAJOR_VERSION@
dcddc0
minor_version=@MOD_MINOR_VERSION@
dcddc0
patch_version=@MOD_PATCH_VERSION@
dcddc0
dcddc0
usage()
dcddc0
{
dcddc0
	cat <
dcddc0
Usage: nss-softokn-config [OPTIONS] [LIBRARIES]
dcddc0
Options:
dcddc0
	[--prefix[=DIR]]
dcddc0
	[--exec-prefix[=DIR]]
dcddc0
	[--includedir[=DIR]]
dcddc0
	[--libdir[=DIR]]
dcddc0
	[--version]
dcddc0
	[--libs]
dcddc0
	[--cflags]
dcddc0
Dynamic Libraries:
dcddc0
	softokn3 - Requires full dynamic linking
dcddc0
	freebl3  - for internal use only (and glibc for self-integrity check)
dcddc0
	nssdbm3  - for internal use only
dcddc0
Dymamically linked
dcddc0
EOF
dcddc0
	exit $1
dcddc0
}
dcddc0
dcddc0
if test $# -eq 0; then
dcddc0
	usage 1 1>&2
dcddc0
fi
dcddc0
dcddc0
while test $# -gt 0; do
dcddc0
  case "$1" in
dcddc0
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
dcddc0
  *) optarg= ;;
dcddc0
  esac
dcddc0
dcddc0
  case $1 in
dcddc0
    --prefix=*)
dcddc0
      prefix=$optarg
dcddc0
      ;;
dcddc0
    --prefix)
dcddc0
      echo_prefix=yes
dcddc0
      ;;
dcddc0
    --exec-prefix=*)
dcddc0
      exec_prefix=$optarg
dcddc0
      ;;
dcddc0
    --exec-prefix)
dcddc0
      echo_exec_prefix=yes
dcddc0
      ;;
dcddc0
    --includedir=*)
dcddc0
      includedir=$optarg
dcddc0
      ;;
dcddc0
    --includedir)
dcddc0
      echo_includedir=yes
dcddc0
      ;;
dcddc0
    --libdir=*)
dcddc0
      libdir=$optarg
dcddc0
      ;;
dcddc0
    --libdir)
dcddc0
      echo_libdir=yes
dcddc0
      ;;
dcddc0
    --version)
dcddc0
      echo ${major_version}.${minor_version}.${patch_version}
dcddc0
      ;;
dcddc0
    --cflags)
dcddc0
      echo_cflags=yes
dcddc0
      ;;
dcddc0
    --libs)
dcddc0
      echo_libs=yes
dcddc0
      ;;
dcddc0
    *)
dcddc0
      usage 1 1>&2
dcddc0
      ;;
dcddc0
  esac
dcddc0
  shift
dcddc0
done
dcddc0
dcddc0
# Set variables that may be dependent upon other variables
dcddc0
if test -z "$exec_prefix"; then
dcddc0
    exec_prefix=`pkg-config --variable=exec_prefix nss-softokn`
dcddc0
fi
dcddc0
if test -z "$includedir"; then
dcddc0
    includedir=`pkg-config --variable=includedir nss-softokn`
dcddc0
fi
dcddc0
if test -z "$libdir"; then
dcddc0
    libdir=`pkg-config --variable=libdir nss-softokn`
dcddc0
fi
dcddc0
dcddc0
if test "$echo_prefix" = "yes"; then
dcddc0
    echo $prefix
dcddc0
fi
dcddc0
dcddc0
if test "$echo_exec_prefix" = "yes"; then
dcddc0
    echo $exec_prefix
dcddc0
fi
dcddc0
dcddc0
if test "$echo_includedir" = "yes"; then
dcddc0
    echo $includedir
dcddc0
fi
dcddc0
dcddc0
if test "$echo_libdir" = "yes"; then
dcddc0
    echo $libdir
dcddc0
fi
dcddc0
dcddc0
if test "$echo_cflags" = "yes"; then
dcddc0
    echo -I$includedir
dcddc0
fi
dcddc0
dcddc0
if test "$echo_libs" = "yes"; then
dcddc0
      libdirs="-Wl,-rpath-link,$libdir -L$libdir"
dcddc0
      echo $libdirs
dcddc0
fi      
dcddc0