]> git.pld-linux.org Git - packages/nss.git/blame - nss-config.in
- rel 2
[packages/nss.git] / nss-config.in
CommitLineData
a91d5515
ER
1#!/bin/sh
2
3prefix=@prefix@
4
a91d5515
ER
5usage()
6{
7 cat <<EOF
8Usage: nss-config [OPTIONS] [LIBRARIES]
9Options:
10 [--prefix[=DIR]]
11 [--exec-prefix[=DIR]]
12 [--includedir[=DIR]]
13 [--libdir[=DIR]]
14 [--version]
15 [--libs]
16 [--cflags]
17Dynamic Libraries:
18 nss
19 ssl
20 smime
21EOF
22 exit $1
23}
24
25if test $# -eq 0; then
26 usage 1 1>&2
27fi
28
29lib_ssl=yes
30lib_smime=yes
31lib_nss=yes
32
33while 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)
59138c52 65 echo @version@
a91d5515
ER
66 ;;
67 --cflags)
68 echo_cflags=yes
69 ;;
70 --libs)
71 echo_libs=yes
72 ;;
73 ssl)
74 lib_ssl=yes
75 ;;
76 smime)
77 lib_smime=yes
78 ;;
79 nss)
80 lib_nss=yes
81 ;;
82 *)
83 usage 1 1>&2
84 ;;
85 esac
86 shift
87done
88
89# Set variables that may be dependent upon other variables
90if test -z "$exec_prefix"; then
628fee90 91 exec_prefix=@exec_prefix@
a91d5515
ER
92fi
93if test -z "$includedir"; then
628fee90 94 includedir=@includedir@
a91d5515
ER
95fi
96if test -z "$libdir"; then
628fee90 97 libdir=@libdir@
a91d5515
ER
98fi
99
100if test "$echo_prefix" = "yes"; then
101 echo $prefix
102fi
103
104if test "$echo_exec_prefix" = "yes"; then
105 echo $exec_prefix
106fi
107
108if test "$echo_includedir" = "yes"; then
109 echo $includedir
110fi
111
112if test "$echo_libdir" = "yes"; then
113 echo $libdir
114fi
115
116if test "$echo_cflags" = "yes"; then
117 echo -I$includedir
118fi
119
120if test "$echo_libs" = "yes"; then
a91d5515
ER
121 if test -n "$lib_ssl"; then
122 libdirs="$libdirs -lssl${major_version}"
123 fi
124 if test -n "$lib_smime"; then
125 libdirs="$libdirs -lsmime${major_version}"
126 fi
127 if test -n "$lib_nss"; then
128 libdirs="$libdirs -lnss${major_version}"
129 fi
130 echo $libdirs
131fi
132
This page took 0.036043 seconds and 4 git commands to generate.