c29d479
#!/bin/sh
c29d479
c29d479
prefix=@prefix@
c29d479
c29d479
major_version=@MOD_MAJOR_VERSION@
c29d479
minor_version=@MOD_MINOR_VERSION@
c29d479
patch_version=@MOD_PATCH_VERSION@
c29d479
c29d479
usage()
c29d479
{
c29d479
	cat <
c29d479
Usage: nss-util-config [OPTIONS] [LIBRARIES]
c29d479
Options:
c29d479
	[--prefix[=DIR]]
c29d479
	[--exec-prefix[=DIR]]
c29d479
	[--includedir[=DIR]]
c29d479
	[--libdir[=DIR]]
c29d479
	[--version]
c29d479
	[--libs]
c29d479
	[--cflags]
c29d479
Dynamic Libraries:
c29d479
	nssutil
c29d479
EOF
c29d479
	exit $1
c29d479
}
c29d479
c29d479
if test $# -eq 0; then
c29d479
	usage 1 1>&2
c29d479
fi
c29d479
c29d479
lib_nssutil=yes
c29d479
c29d479
while test $# -gt 0; do
c29d479
  case "$1" in
c29d479
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
c29d479
  *) optarg= ;;
c29d479
  esac
c29d479
c29d479
  case $1 in
c29d479
    --prefix=*)
c29d479
      prefix=$optarg
c29d479
      ;;
c29d479
    --prefix)
c29d479
      echo_prefix=yes
c29d479
      ;;
c29d479
    --exec-prefix=*)
c29d479
      exec_prefix=$optarg
c29d479
      ;;
c29d479
    --exec-prefix)
c29d479
      echo_exec_prefix=yes
c29d479
      ;;
c29d479
    --includedir=*)
c29d479
      includedir=$optarg
c29d479
      ;;
c29d479
    --includedir)
c29d479
      echo_includedir=yes
c29d479
      ;;
c29d479
    --libdir=*)
c29d479
      libdir=$optarg
c29d479
      ;;
c29d479
    --libdir)
c29d479
      echo_libdir=yes
c29d479
      ;;
c29d479
    --version)
c29d479
      echo ${major_version}.${minor_version}.${patch_version}
c29d479
      ;;
c29d479
    --cflags)
c29d479
      echo_cflags=yes
c29d479
      ;;
c29d479
    --libs)
c29d479
      echo_libs=yes
c29d479
      ;;
c29d479
    *)
c29d479
      usage 1 1>&2
c29d479
      ;;
c29d479
  esac
c29d479
  shift
c29d479
done
c29d479
c29d479
# Set variables that may be dependent upon other variables
c29d479
if test -z "$exec_prefix"; then
c29d479
    exec_prefix=`pkg-config --variable=exec_prefix nss-util`
c29d479
fi
c29d479
if test -z "$includedir"; then
c29d479
    includedir=`pkg-config --variable=includedir nss-util`
c29d479
fi
c29d479
if test -z "$libdir"; then
c29d479
    libdir=`pkg-config --variable=libdir nss-util`
c29d479
fi
c29d479
c29d479
if test "$echo_prefix" = "yes"; then
c29d479
    echo $prefix
c29d479
fi
c29d479
c29d479
if test "$echo_exec_prefix" = "yes"; then
c29d479
    echo $exec_prefix
c29d479
fi
c29d479
c29d479
if test "$echo_includedir" = "yes"; then
c29d479
    echo $includedir
c29d479
fi
c29d479
c29d479
if test "$echo_libdir" = "yes"; then
c29d479
    echo $libdir
c29d479
fi
c29d479
c29d479
if test "$echo_cflags" = "yes"; then
c29d479
    echo -I$includedir
c29d479
fi
c29d479
c29d479
if test "$echo_libs" = "yes"; then
c29d479
      libdirs="-Wl,-rpath-link,$libdir -L$libdir"
c29d479
      if test -n "$lib_nssutil"; then
c29d479
	libdirs="$libdirs -lnssutil${major_version}"
c29d479
      fi
c29d479
      echo $libdirs
c29d479
fi
c29d479