Blame SOURCES/nss-util-config.in

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