]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - nss-util/nss-util-config.in
autoconf: updated to 2.69.
[people/arne_f/ipfire-3.x.git] / nss-util / nss-util-config.in
CommitLineData
e0c4818d
MT
1#!/bin/sh
2
3prefix=@prefix@
4
5major_version=@MOD_MAJOR_VERSION@
6minor_version=@MOD_MINOR_VERSION@
7patch_version=@MOD_PATCH_VERSION@
8
9usage()
10{
11 cat <<EOF
12Usage: nss-util-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 nssutil
23EOF
24 exit $1
25}
26
27if test $# -eq 0; then
28 usage 1 1>&2
29fi
30
31lib_nssutil=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)
65 echo ${major_version}.${minor_version}.${patch_version}
66 ;;
67 --cflags)
68 echo_cflags=yes
69 ;;
70 --libs)
71 echo_libs=yes
72 ;;
73 *)
74 usage 1 1>&2
75 ;;
76 esac
77 shift
78done
79
80# Set variables that may be dependent upon other variables
81if test -z "$exec_prefix"; then
82 exec_prefix=`pkg-config --variable=exec_prefix nss-util`
83fi
84if test -z "$includedir"; then
85 includedir=`pkg-config --variable=includedir nss-util`
86fi
87if test -z "$libdir"; then
88 libdir=`pkg-config --variable=libdir nss-util`
89fi
90
91if test "$echo_prefix" = "yes"; then
92 echo $prefix
93fi
94
95if test "$echo_exec_prefix" = "yes"; then
96 echo $exec_prefix
97fi
98
99if test "$echo_includedir" = "yes"; then
100 echo $includedir
101fi
102
103if test "$echo_libdir" = "yes"; then
104 echo $libdir
105fi
106
107if test "$echo_cflags" = "yes"; then
108 echo -I$includedir
109fi
110
111if test "$echo_libs" = "yes"; then
112 libdirs="-Wl,-rpath-link,$libdir -L$libdir"
113 if test -n "$lib_nssutil"; then
114 libdirs="$libdirs -lnssutil${major_version}"
115 fi
116 echo $libdirs
117fi
118