3 # Copyright (c) 2000 - 2008 Kungliga Tekniska Högskolan
4 # (Royal Institute of Technology, Stockholm, Sweden).
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
11 # 1. Redistributions of source code must retain the above copyright
12 # notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in the
16 # documentation and/or other materials provided with the distribution.
18 # 3. Neither the name of the Institute nor the names of its contributors
19 # may be used to endorse or promote products derived from this software
20 # without specific prior written permission.
22 # THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
23 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 # ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
26 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
49 if test $# -eq 0; then
68 echo "@PACKAGE@ @VERSION@"
72 prefix
=`echo $i | sed 's/^--prefix=//'`
78 exec_prefix
=`echo $i | sed 's/^--exec-prefix=//'`
113 echo "unknown option: $i"
119 if test "$do_usage" = "yes"; then
120 echo "usage: $0 [options] [libraries]"
121 echo "options: [--help] show this message"
122 echo " [--all] display version, vendor, etc."
123 echo " [--version] display version information"
124 echo " [--prefix] display the prefix of Kerberos"
125 echo " [--exec-prefix] display the exec_prefix of Kerberos"
126 echo " [--cflags] display the CFLAGS required"
127 echo " [--libs] display the libraries required to link"
128 echo " [--deps] display the dependent libs required"
129 echo " for static linking"
131 echo "libraries: krb5 Kerberos 5 applications"
132 echo " gssapi GSSAPI applications"
133 echo " kadm-client libkadm5 client"
134 echo " kadm-server libkadm5 server"
139 if test X
"$library" = X
; then
143 if test "$prefix" = ""; then
146 if test "$exec_prefix" = ""; then
147 exec_prefix
=@exec_prefix@
151 includedir
=@includedir@
153 if test "$do_all" = "yes"; then
154 echo "Version: @PACKAGE@ @VERSION@"
155 echo "Vendor: Heimdal"
156 echo "Prefix: $prefix"
157 echo "Exec_prefix: $exec_prefix"
161 if test "$print_prefix" = "yes"; then
166 if test "$print_exec_prefix" = "yes"; then
171 # The following rpath_flag setting code is distilled from MIT Kerberos'
172 # src/config/shlib.conf. Some of this seems ancient and likely to be
173 # wrong in some cases, but right for all the cases we probably care
174 # about. Also, this will very likely be wrong depending on how the
175 # caller will be doing link-edits (with what compiler-driver or
176 # link-editor)! There's no fixing this.
178 # In principle this doesn't belong here: application should instead use
179 # krb5-config --libdir to get the directory to use for the rpath, then
180 # workout the rpath flags on their own. Of course, there's no --libdir
181 # option... And MIT's krb5-config does include rpath flags.
183 # Compatibility with MIT is the winning consideration for now.
184 case "@CANONICAL_HOST@" in
186 rpath_flag
='-Wl,-rpath -Wl,';;
188 rpath_flag
='-Wl,+b,';;
189 *-*-irix* | mips-
*-netbsd*)
190 rpath_flag
='-Wl,-rpath -Wl,';;
191 *-*-netbsd* |
*-*-openbsd* |
*-*-solaris*)
193 *-*-linux* |
*-*-gnu* |
*-*-k*bsd
*-gnu |
*-*-freebsd*)
194 rpath_flag
='-Wl,--enable-new-dtags -Wl,-rpath -Wl,';;
196 rpath_flag
='-Wl,-blibpath:';;
201 if test "$do_libs" = "yes"; then
203 if test "$lib_gssapi" = yes; then
204 lib_flags
="$lib_flags -lgssapi"
205 deplibs
="$deplibs -lheimntlm"
206 if test X
"$do_lib_deps" = Xyes
; then
210 if test "$lib_kadm_client" = yes; then
211 lib_flags
="$lib_flags -lkadm5clnt"
212 if test X
"$do_lib_deps" = Xyes
; then
216 if test "$lib_kadm_server" = yes; then
217 lib_flags
="$lib_flags -lkadm5srv"
218 deplibs
="$deplibs @LIB_dbopen@"
219 if test X
"$do_lib_deps" = Xyes
; then
223 if test "$lib_kafs" = yes; then
224 lib_flags
="$lib_flags -lkafs"
225 if test X
"$do_lib_deps" = Xyes
; then
229 if test "$lib_krb5" = yes; then
230 lib_flags
="$lib_flags -lkrb5"
232 deplibs
="$deplibs @LIB_pkinit@ -lcom_err"
233 deplibs
="$deplibs @LIB_hcrypto_appl@ -lasn1 -lwind -lheimbase -lroken"
234 deplibs
="$deplibs @LIB_crypt@ @PTHREAD_LIBADD@ @LIB_dlopen@"
235 deplibs
="$deplibs @LIB_door_create@ @LIBS@"
236 if test X
"$do_lib_deps" = X
"yes"; then
237 lib_flags
="$lib_flags $deplibs"
239 if test X
"$libdir" != X
/usr
/lib
; then
240 lib_flags
="-L${libdir} $lib_flags"
241 if test X
"$rpath_flag" != X
; then
242 lib_flags
="${rpath_flag}${libdir} $lib_flags"
248 if test "$do_cflags" = "yes"; then
250 if test X
"${includedir}" != X
/usr
/include
; then
251 cflags
="-I${includedir} $cflags"