Blame SOURCES/nss-softokn-config.in

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