CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
keyutils: updated to 1.6.1
[ports/opt-arm.git] / nss / nss-config.in
CommitLineData
987fdba5
JB
1#!/bin/sh
2
3prefix=/usr
4version=@VERSION@
5
6usage()
7{
8 cat <<EOF
9Usage: nss-config [OPTIONS] [LIBRARIES]
10Options:
11 [--prefix[=DIR]]
12 [--exec-prefix[=DIR]]
13 [--includedir[=DIR]]
14 [--libdir[=DIR]]
15 [--version]
16 [--libs]
17 [--cflags]
18Dynamic Libraries:
19 nss
20 nssutil
21 ssl
22 smime
23EOF
24 exit $1
25}
26
27if test $# -eq 0; then
28 usage 1 1>&2
29fi
30
31lib_ssl=yes
32lib_smime=yes
33lib_nss=yes
34lib_nssutil=yes
35
36while test $# -gt 0; do
37 case "$1" in
38 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
39 *) optarg= ;;
40 esac
41
42 case $1 in
43 --prefix=*)
44 prefix=$optarg
45 ;;
46 --prefix)
47 echo_prefix=yes
48 ;;
49 --exec-prefix=*)
50 exec_prefix=$optarg
51 ;;
52 --exec-prefix)
53 echo_exec_prefix=yes
54 ;;
55 --includedir=*)
56 includedir=$optarg
57 ;;
58 --includedir)
59 echo_includedir=yes
60 ;;
61 --libdir=*)
62 libdir=$optarg
63 ;;
64 --libdir)
65 echo_libdir=yes
66 ;;
67 --version)
68 echo $version
69 ;;
70 --cflags)
71 echo_cflags=yes
72 ;;
73 --libs)
74 echo_libs=yes
75 ;;
76 ssl)
77 lib_ssl=yes
78 ;;
79 smime)
80 lib_smime=yes
81 ;;
82 nss)
83 lib_nss=yes
84 ;;
85 nssutil)
86 lib_nssutil=yes
87 ;;
88 *)
89 usage 1 1>&2
90 ;;
91 esac
92 shift
93done
94
95# Set variables that may be dependent upon other variables
96if test -z "$exec_prefix"; then
97 exec_prefix=${prefix}
98fi
99if test -z "$includedir"; then
100 includedir=${prefix}/include/nss
101fi
102if test -z "$libdir"; then
103 libdir=${exec_prefix}/lib
104fi
105
106if test "$echo_prefix" = "yes"; then
107 echo $prefix
108fi
109
110if test "$echo_exec_prefix" = "yes"; then
111 echo $exec_prefix
112fi
113
114if test "$echo_includedir" = "yes"; then
115 echo $includedir
116fi
117
118if test "$echo_libdir" = "yes"; then
119 echo $libdir
120fi
121
122if test "$echo_cflags" = "yes"; then
123 echo -I$includedir
124fi
125
126if test "$echo_libs" = "yes"; then
127 libdirs="-L$libdir"
128 if test -n "$lib_ssl"; then
129 libdirs="$libdirs -lssl3"
130 fi
131 if test -n "$lib_smime"; then
132 libdirs="$libdirs -lsmime3"
133 fi
134 if test -n "$lib_nss"; then
135 libdirs="$libdirs -lnss3"
136 fi
137 if test -n "$lib_nssutil"; then
138 libdirs="$libdirs -lnssutil3"
139 fi
140 echo $libdirs
141fi
142