Debian Codegraph @

tools/krb5-config.in

raw ◀ ▶
2 Debian patches touch this file
1 #!/bin/sh
2
3 cat <<'EOM'
4 #!/bin/sh
5 #
6 # Copyright (c) 2000 - 2008 Kungliga Tekniska Högskolan
7 # (Royal Institute of Technology, Stockholm, Sweden).
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions
12 # are met:
13 #
14 # 1. Redistributions of source code must retain the above copyright
15 # notice, this list of conditions and the following disclaimer.
16 #
17 # 2. Redistributions in binary form must reproduce the above copyright
18 # notice, this list of conditions and the following disclaimer in the
19 # documentation and/or other materials provided with the distribution.
20 #
21 # 3. Neither the name of the Institute nor the names of its contributors
22 # may be used to endorse or promote products derived from this software
23 # without specific prior written permission.
24 #
25 # THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
26 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 # ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
29 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 # SUCH DAMAGE.
36 #
37
38 do_all=no
39 do_libs=no
40 do_lib_deps=no
41 do_cflags=no
42 do_usage=no
43 print_prefix=no
44 print_exec_prefix=no
45 library=
46 lib_krb5=no
47 lib_gssapi=no
48 lib_kadm_client=no
49 lib_kadm_server=no
50 lib_kafs=no
51
52 if test $# -eq 0; then
53 do_usage=yes
54 usage_exit=1
55 fi
56
57 for i in $*; do
58 case $i in
59 --help)
60 do_usage=yes
61 usage_exit=0
62 ;;
63 --all)
64 do_all=yes
65 ;;
66 --vendor)
67 echo "Heimdal"
68 exit 0;
69 ;;
70 --version)
71 echo "@PACKAGE@ @VERSION@"
72 exit 0
73 ;;
74 --prefix=*)
75 prefix=`echo $i | sed 's/^--prefix=//'`
76 ;;
77 --prefix)
78 print_prefix=yes
79 ;;
80 --exec-prefix=*)
81 exec_prefix=`echo $i | sed 's/^--exec-prefix=//'`
82 ;;
83 --exec-prefix)
84 print_exec_prefix=yes
85 ;;
86 --libs)
87 do_libs=yes
88 ;;
89 --deps)
90 do_lib_deps=yes
91 ;;
92 --cflags)
93 do_cflags=yes
94 ;;
95 krb5)
96 library=krb5
97 lib_krb5=yes
98 ;;
99 gssapi)
100 library=gssapi
101 lib_gssapi=yes
102 ;;
103 kadm-client)
104 library=kadm-client
105 lib_kadm_client=yes
106 ;;
107 kadm-server)
108 library=kadm-server
109 lib_kadm_server=yes
110 ;;
111 kafs)
112 library=kafs
113 lib_kafs=yes
114 ;;
115 *)
116 echo "unknown option: $i"
117 exit 1
118 ;;
119 esac
120 done
121
122 if test "$do_usage" = "yes"; then
123 echo "usage: $0 [options] [libraries]"
124 echo "options: [--help] show this message"
125 echo " [--all] display version, vendor, etc."
126 echo " [--version] display version information"
127 echo " [--prefix] display the prefix of Kerberos"
128 echo " [--exec-prefix] display the exec_prefix of Kerberos"
129 echo " [--cflags] display the CFLAGS required"
130 echo " [--libs] display the libraries required to link"
131 echo " [--deps] display the dependent libs required"
132 echo " for static linking"
133 echo
134 echo "libraries: krb5 Kerberos 5 applications"
135 echo " gssapi GSSAPI applications"
136 echo " kadm-client libkadm5 client"
137 echo " kadm-server libkadm5 server"
138 echo " kafs kafs"
139 exit $usage_exit
140 fi
141
142 if test X"$library" = X; then
143 lib_krb5=yes
144 fi
145
146 if test "$prefix" = ""; then
147 prefix=@prefix@
148 fi
149 if test "$exec_prefix" = ""; then
150 exec_prefix=@exec_prefix@
151 fi
152
•153 libdir=@libdir@/heimdal
154 includedir=@includedir@/heimdal
155
156 if test "$do_all" = "yes"; then
157 echo "Version: @PACKAGE@ @VERSION@"
158 echo "Vendor: Heimdal"
159 echo "Prefix: $prefix"
160 echo "Exec_prefix: $exec_prefix"
161 exit 0
162 fi
163
164 if test "$print_prefix" = "yes"; then
165 echo $prefix
166 exit 0
167 fi
168
169 if test "$print_exec_prefix" = "yes"; then
170 echo $exec_prefix
171 exit 0
172 fi
173
174 if test "$do_libs" = "yes"; then
175 deplibs=""
176 if test "$lib_gssapi" = yes; then
177 lib_flags="$lib_flags -lgssapi"
178 deplibs="$deplibs -lheimntlm"
179 if test X"$do_lib_deps" = Xyes; then
180 lib_krb5=yes
181 fi
182 fi
183 if test "$lib_kadm_client" = yes; then
184 lib_flags="$lib_flags -lkadm5clnt"
185 if test X"$do_lib_deps" = Xyes; then
186 lib_krb5=yes
187 fi
188 fi
189 if test "$lib_kadm_server" = yes; then
190 lib_flags="$lib_flags -lkadm5srv"
191 deplibs="$deplibs @LIB_dbopen@"
192 if test X"$do_lib_deps" = Xyes; then
193 lib_krb5=yes
194 fi
195 fi
196 if test "$lib_kafs" = yes; then
197 lib_flags="$lib_flags -lkafs"
198 if test X"$do_lib_deps" = Xyes; then
199 lib_krb5=yes
200 fi
201 fi
202 if test "$lib_krb5" = yes; then
203 lib_flags="$lib_flags -lkrb5"
204 fi
205 deplibs="$deplibs @LIB_pkinit@ -lcom_err"
206 deplibs="$deplibs @LIB_hcrypto_appl@ -lasn1 -lwind -lheimbase -lroken"
207 deplibs="$deplibs @LIB_crypt@ @PTHREAD_LIBADD@ @LIB_dlopen@"
208 deplibs="$deplibs @LIB_door_create@ @LIBS@"
209 if test X"$do_lib_deps" = X"yes"; then
210 lib_flags="$lib_flags $deplibs"
211 fi
212 if test X"$libdir" != X/usr/lib; then
213 lib_flags="-L${libdir} $lib_flags"
214 fi
215
216 echo ${lib_flags}
217 fi
218 if test "$do_cflags" = "yes"; then
219 cflags=""
220 if test X"${includedir}" != X/usr/include; then
221 cflags="-I${includedir} $cflags"
222 fi
223 echo $cflags
224 fi
225
226 exit 0
227 EOM