update credits
[LibreOffice.git] / nss / nss-config.in
blob141d4833c5fb41b0ed561b66399330c9da96a377
1 #!/bin/sh
3 prefix=@prefix@
5 major_version=@MOD_MAJOR_VERSION@
6 minor_version=@MOD_MINOR_VERSION@
7 patch_version=@MOD_PATCH_VERSION@
9 usage()
11 cat <<EOF
12 Usage: nss-config [OPTIONS] [LIBRARIES]
13 Options:
14 [--prefix[=DIR]]
15 [--exec-prefix[=DIR]]
16 [--includedir[=DIR]]
17 [--libdir[=DIR]]
18 [--version]
19 [--libs]
20 [--cflags]
21 Dynamic Libraries:
22 nss
23 ssl
24 smime
25 EOF
26 exit $1
29 if test $# -eq 0; then
30 usage 1 1>&2
33 lib_ssl=yes
34 lib_smime=yes
35 lib_nss=yes
36 lib_nssutil=yes
38 while test $# -gt 0; do
39 case "$1" in
40 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
41 *) optarg= ;;
42 esac
44 case $1 in
45 --prefix=*)
46 prefix=$optarg
48 --prefix)
49 echo_prefix=yes
51 --exec-prefix=*)
52 exec_prefix=$optarg
54 --exec-prefix)
55 echo_exec_prefix=yes
57 --includedir=*)
58 includedir=$optarg
60 --includedir)
61 echo_includedir=yes
63 --libdir=*)
64 libdir=$optarg
66 --libdir)
67 echo_libdir=yes
69 --version)
70 echo ${major_version}.${minor_version}.${patch_version}
72 --cflags)
73 echo_cflags=yes
75 --libs)
76 echo_libs=yes
78 ssl)
79 lib_ssl=yes
81 smime)
82 lib_smime=yes
84 nss)
85 lib_nss=yes
87 nssutil)
88 lib_nssutil=yes
91 usage 1 1>&2
93 esac
94 shift
95 done
97 # Set variables that may be dependent upon other variables
98 if test -z "$exec_prefix"; then
99 exec_prefix=${prefix}
101 if test -z "$includedir"; then
102 includedir=@includedir@
104 if test -z "$libdir"; then
105 libdir=${exec_prefix}/lib
108 if test "$echo_prefix" = "yes"; then
109 echo $prefix
112 if test "$echo_exec_prefix" = "yes"; then
113 echo $exec_prefix
116 if test "$echo_includedir" = "yes"; then
117 echo $includedir
120 if test "$echo_libdir" = "yes"; then
121 echo $libdir
124 if test "$echo_cflags" = "yes"; then
125 echo -I$includedir
128 if test "$echo_libs" = "yes"; then
129 libdirs="-L$libdir"
130 if test `uname` != Darwin; then
131 libdirs="-Wl,-rpath-link,$libdir $libdirs"
133 if test -n "$lib_ssl"; then
134 libdirs="$libdirs -lssl${major_version}"
136 if test -n "$lib_smime"; then
137 libdirs="$libdirs -lsmime${major_version}"
139 if test -n "$lib_nss"; then
140 libdirs="$libdirs -lnss${major_version}"
142 if test -n "$lib_nssutil"; then
143 libdirs="$libdirs -lnssutil${major_version}"
145 echo $libdirs