|
Last change
on this file since 788 was 747, checked in by dmik, 10 years ago |
|
spec: nss: Release version 3.23.0-3.
|
|
File size:
2.0 KB
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | prefix=@prefix@
|
|---|
| 4 |
|
|---|
| 5 | major_version=@MOD_MAJOR_VERSION@
|
|---|
| 6 | minor_version=@MOD_MINOR_VERSION@
|
|---|
| 7 | patch_version=@MOD_PATCH_VERSION@
|
|---|
| 8 |
|
|---|
| 9 | usage()
|
|---|
| 10 | {
|
|---|
| 11 | cat <<EOF
|
|---|
| 12 | Usage: nss-util-config [OPTIONS] [LIBRARIES]
|
|---|
| 13 | Options:
|
|---|
| 14 | [--prefix[=DIR]]
|
|---|
| 15 | [--exec-prefix[=DIR]]
|
|---|
| 16 | [--includedir[=DIR]]
|
|---|
| 17 | [--libdir[=DIR]]
|
|---|
| 18 | [--version]
|
|---|
| 19 | [--libs]
|
|---|
| 20 | [--cflags]
|
|---|
| 21 | Dynamic Libraries:
|
|---|
| 22 | nssutil
|
|---|
| 23 | EOF
|
|---|
| 24 | exit $1
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | if test $# -eq 0; then
|
|---|
| 28 | usage 1 1>&2
|
|---|
| 29 | fi
|
|---|
| 30 |
|
|---|
| 31 | lib_nssutil=yes
|
|---|
| 32 |
|
|---|
| 33 | while test $# -gt 0; do
|
|---|
| 34 | case "$1" in
|
|---|
| 35 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
|---|
| 36 | *) optarg= ;;
|
|---|
| 37 | esac
|
|---|
| 38 |
|
|---|
| 39 | case $1 in
|
|---|
| 40 | --prefix=*)
|
|---|
| 41 | prefix=$optarg
|
|---|
| 42 | ;;
|
|---|
| 43 | --prefix)
|
|---|
| 44 | echo_prefix=yes
|
|---|
| 45 | ;;
|
|---|
| 46 | --exec-prefix=*)
|
|---|
| 47 | exec_prefix=$optarg
|
|---|
| 48 | ;;
|
|---|
| 49 | --exec-prefix)
|
|---|
| 50 | echo_exec_prefix=yes
|
|---|
| 51 | ;;
|
|---|
| 52 | --includedir=*)
|
|---|
| 53 | includedir=$optarg
|
|---|
| 54 | ;;
|
|---|
| 55 | --includedir)
|
|---|
| 56 | echo_includedir=yes
|
|---|
| 57 | ;;
|
|---|
| 58 | --libdir=*)
|
|---|
| 59 | libdir=$optarg
|
|---|
| 60 | ;;
|
|---|
| 61 | --libdir)
|
|---|
| 62 | echo_libdir=yes
|
|---|
| 63 | ;;
|
|---|
| 64 | --version)
|
|---|
| 65 | echo ${major_version}.${minor_version}.${patch_version}
|
|---|
| 66 | ;;
|
|---|
| 67 | --cflags)
|
|---|
| 68 | echo_cflags=yes
|
|---|
| 69 | ;;
|
|---|
| 70 | --libs)
|
|---|
| 71 | echo_libs=yes
|
|---|
| 72 | ;;
|
|---|
| 73 | *)
|
|---|
| 74 | usage 1 1>&2
|
|---|
| 75 | ;;
|
|---|
| 76 | esac
|
|---|
| 77 | shift
|
|---|
| 78 | done
|
|---|
| 79 |
|
|---|
| 80 | # Set variables that may be dependent upon other variables
|
|---|
| 81 | if test -z "$exec_prefix"; then
|
|---|
| 82 | exec_prefix=`pkg-config --variable=exec_prefix nss-util`
|
|---|
| 83 | fi
|
|---|
| 84 | if test -z "$includedir"; then
|
|---|
| 85 | includedir=`pkg-config --variable=includedir nss-util`
|
|---|
| 86 | fi
|
|---|
| 87 | if test -z "$libdir"; then
|
|---|
| 88 | libdir=`pkg-config --variable=libdir nss-util`
|
|---|
| 89 | fi
|
|---|
| 90 |
|
|---|
| 91 | if test "$echo_prefix" = "yes"; then
|
|---|
| 92 | echo $prefix
|
|---|
| 93 | fi
|
|---|
| 94 |
|
|---|
| 95 | if test "$echo_exec_prefix" = "yes"; then
|
|---|
| 96 | echo $exec_prefix
|
|---|
| 97 | fi
|
|---|
| 98 |
|
|---|
| 99 | if test "$echo_includedir" = "yes"; then
|
|---|
| 100 | echo $includedir
|
|---|
| 101 | fi
|
|---|
| 102 |
|
|---|
| 103 | if test "$echo_libdir" = "yes"; then
|
|---|
| 104 | echo $libdir
|
|---|
| 105 | fi
|
|---|
| 106 |
|
|---|
| 107 | if test "$echo_cflags" = "yes"; then
|
|---|
| 108 | echo -I$includedir
|
|---|
| 109 | fi
|
|---|
| 110 |
|
|---|
| 111 | if test "$echo_libs" = "yes"; then
|
|---|
| 112 | libdirs="-L$libdir"
|
|---|
| 113 | if test -n "$lib_nssutil"; then
|
|---|
| 114 | libdirs="$libdirs -lnssutil${major_version}"
|
|---|
| 115 | fi
|
|---|
| 116 | echo $libdirs
|
|---|
| 117 | fi
|
|---|
| 118 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.