]> git.pld-linux.org Git - packages/nss.git/blame - nss-config.in
up to 3.34.1
[packages/nss.git] / nss-config.in
CommitLineData
a91d5515
ER
1#!/bin/sh
2
3prefix=@prefix@
4
69aeda39
ER
5major_version=@MOD_MAJOR_VERSION@
6minor_version=@MOD_MINOR_VERSION@
7patch_version=@MOD_PATCH_VERSION@
8
a91d5515
ER
9usage()
10{
11 cat <<EOF
12Usage: nss-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 nss
23 ssl
24 smime
25EOF
26 exit $1
27}
28
29if test $# -eq 0; then
30 usage 1 1>&2
31fi
32
33lib_ssl=yes
34lib_smime=yes
35lib_nss=yes
6ec04d61 36lib_nssutil=yes
a91d5515
ER
37
38while test $# -gt 0; do
39 case "$1" in
40 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
41 *) optarg= ;;
42 esac
43
44 case $1 in
45 --prefix=*)
46 prefix=$optarg
47 ;;
48 --prefix)
49 echo_prefix=yes
50 ;;
51 --exec-prefix=*)
52 exec_prefix=$optarg
53 ;;
54 --exec-prefix)
55 echo_exec_prefix=yes
56 ;;
57 --includedir=*)
58 includedir=$optarg
59 ;;
60 --includedir)
61 echo_includedir=yes
62 ;;
63 --libdir=*)
64 libdir=$optarg
65 ;;
66 --libdir)
67 echo_libdir=yes
68 ;;
69 --version)
69aeda39 70 echo ${major_version}.${minor_version}.${patch_version}
a91d5515
ER
71 ;;
72 --cflags)
73 echo_cflags=yes
74 ;;
75 --libs)
76 echo_libs=yes
77 ;;
78 ssl)
79 lib_ssl=yes
80 ;;
81 smime)
82 lib_smime=yes
83 ;;
84 nss)
85 lib_nss=yes
86 ;;
6ec04d61 87 nssutil)
88 lib_nssutil=yes
89 ;;
a91d5515
ER
90 *)
91 usage 1 1>&2
92 ;;
93 esac
94 shift
95done
96
97# Set variables that may be dependent upon other variables
98if test -z "$exec_prefix"; then
628fee90 99 exec_prefix=@exec_prefix@
a91d5515
ER
100fi
101if test -z "$includedir"; then
628fee90 102 includedir=@includedir@
a91d5515
ER
103fi
104if test -z "$libdir"; then
628fee90 105 libdir=@libdir@
a91d5515
ER
106fi
107
108if test "$echo_prefix" = "yes"; then
109 echo $prefix
110fi
111
112if test "$echo_exec_prefix" = "yes"; then
113 echo $exec_prefix
114fi
115
116if test "$echo_includedir" = "yes"; then
117 echo $includedir
118fi
119
120if test "$echo_libdir" = "yes"; then
121 echo $libdir
122fi
123
124if test "$echo_cflags" = "yes"; then
125 echo -I$includedir
126fi
127
128if test "$echo_libs" = "yes"; then
a91d5515
ER
129 if test -n "$lib_ssl"; then
130 libdirs="$libdirs -lssl${major_version}"
131 fi
132 if test -n "$lib_smime"; then
133 libdirs="$libdirs -lsmime${major_version}"
134 fi
135 if test -n "$lib_nss"; then
136 libdirs="$libdirs -lnss${major_version}"
137 fi
6ec04d61 138 if test -n "$lib_nssutil"; then
139 libdirs="$libdirs -lnssutil${major_version}"
140 fi
a91d5515
ER
141 echo $libdirs
142fi
143
This page took 0.106808 seconds and 4 git commands to generate.