]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - nss-softokn/nss-softokn-config.in
Move all packages to root.
[people/amarx/ipfire-3.x.git] / nss-softokn / nss-softokn-config.in
CommitLineData
98e4b7dc
MT
1#!/bin/sh
2
3prefix=@prefix@
4
5major_version=@MOD_MAJOR_VERSION@
6minor_version=@MOD_MINOR_VERSION@
7patch_version=@MOD_PATCH_VERSION@
8
9usage()
10{
11 cat <<EOF
12Usage: nss-softokn-config [OPTIONS] [LIBRARIES]
13Options:
14 [--prefix[=DIR]]
15 [--exec-prefix[=DIR]]
16 [--includedir[=DIR]]
17 [--libdir[=DIR]]
18 [--version]
19 [--libs]
20 [--cflags]
21Dynamic Libraries:
22 softokn3 - Requires full dynamic linking
23 freebl3 - for internal use only (and glibc for self-integrity check)
24 nssdbm3 - for internal use only
25Dymamically linked
26EOF
27 exit $1
28}
29
30if test $# -eq 0; then
31 usage 1 1>&2
32fi
33
34while test $# -gt 0; do
35 case "$1" in
36 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
37 *) optarg= ;;
38 esac
39
40 case $1 in
41 --prefix=*)
42 prefix=$optarg
43 ;;
44 --prefix)
45 echo_prefix=yes
46 ;;
47 --exec-prefix=*)
48 exec_prefix=$optarg
49 ;;
50 --exec-prefix)
51 echo_exec_prefix=yes
52 ;;
53 --includedir=*)
54 includedir=$optarg
55 ;;
56 --includedir)
57 echo_includedir=yes
58 ;;
59 --libdir=*)
60 libdir=$optarg
61 ;;
62 --libdir)
63 echo_libdir=yes
64 ;;
65 --version)
66 echo ${major_version}.${minor_version}.${patch_version}
67 ;;
68 --cflags)
69 echo_cflags=yes
70 ;;
71 --libs)
72 echo_libs=yes
73 ;;
74 *)
75 usage 1 1>&2
76 ;;
77 esac
78 shift
79done
80
81# Set variables that may be dependent upon other variables
82if test -z "$exec_prefix"; then
83 exec_prefix=`pkg-config --variable=exec_prefix nss-softokn`
84fi
85if test -z "$includedir"; then
86 includedir=`pkg-config --variable=includedir nss-softokn`
87fi
88if test -z "$libdir"; then
89 libdir=`pkg-config --variable=libdir nss-softokn`
90fi
91
92if test "$echo_prefix" = "yes"; then
93 echo $prefix
94fi
95
96if test "$echo_exec_prefix" = "yes"; then
97 echo $exec_prefix
98fi
99
100if test "$echo_includedir" = "yes"; then
101 echo $includedir
102fi
103
104if test "$echo_libdir" = "yes"; then
105 echo $libdir
106fi
107
108if test "$echo_cflags" = "yes"; then
109 echo -I$includedir
110fi
111
112if test "$echo_libs" = "yes"; then
113 libdirs="-Wl,-rpath-link,$libdir -L$libdir"
114 echo $libdirs
115fi
116