]> git.pld-linux.org Git - packages/nss.git/blame - nss-config.in
- rever $version simplify, need $major in nss-config; rel 3
[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
36
37while test $# -gt 0; do
38 case "$1" in
39 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
40 *) optarg= ;;
41 esac
42
43 case $1 in
44 --prefix=*)
45 prefix=$optarg
46 ;;
47 --prefix)
48 echo_prefix=yes
49 ;;
50 --exec-prefix=*)
51 exec_prefix=$optarg
52 ;;
53 --exec-prefix)
54 echo_exec_prefix=yes
55 ;;
56 --includedir=*)
57 includedir=$optarg
58 ;;
59 --includedir)
60 echo_includedir=yes
61 ;;
62 --libdir=*)
63 libdir=$optarg
64 ;;
65 --libdir)
66 echo_libdir=yes
67 ;;
68 --version)
69aeda39 69 echo ${major_version}.${minor_version}.${patch_version}
a91d5515
ER
70 ;;
71 --cflags)
72 echo_cflags=yes
73 ;;
74 --libs)
75 echo_libs=yes
76 ;;
77 ssl)
78 lib_ssl=yes
79 ;;
80 smime)
81 lib_smime=yes
82 ;;
83 nss)
84 lib_nss=yes
85 ;;
86 *)
87 usage 1 1>&2
88 ;;
89 esac
90 shift
91done
92
93# Set variables that may be dependent upon other variables
94if test -z "$exec_prefix"; then
628fee90 95 exec_prefix=@exec_prefix@
a91d5515
ER
96fi
97if test -z "$includedir"; then
628fee90 98 includedir=@includedir@
a91d5515
ER
99fi
100if test -z "$libdir"; then
628fee90 101 libdir=@libdir@
a91d5515
ER
102fi
103
104if test "$echo_prefix" = "yes"; then
105 echo $prefix
106fi
107
108if test "$echo_exec_prefix" = "yes"; then
109 echo $exec_prefix
110fi
111
112if test "$echo_includedir" = "yes"; then
113 echo $includedir
114fi
115
116if test "$echo_libdir" = "yes"; then
117 echo $libdir
118fi
119
120if test "$echo_cflags" = "yes"; then
121 echo -I$includedir
122fi
123
124if test "$echo_libs" = "yes"; then
a91d5515
ER
125 if test -n "$lib_ssl"; then
126 libdirs="$libdirs -lssl${major_version}"
127 fi
128 if test -n "$lib_smime"; then
129 libdirs="$libdirs -lsmime${major_version}"
130 fi
131 if test -n "$lib_nss"; then
132 libdirs="$libdirs -lnss${major_version}"
133 fi
134 echo $libdirs
135fi
136
This page took 0.04867 seconds and 4 git commands to generate.