6 # Copyright (c) 2000 - 2008 Kungliga Tekniska Högskolan
7 # (Royal Institute of Technology, Stockholm, Sweden).
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions
14 # 1. Redistributions of source code must retain the above copyright
15 # notice, this list of conditions and the following disclaimer.
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.
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.
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
52 if test $# -eq 0; then
71 echo "@PACKAGE@ @VERSION@"
75 prefix=`echo $i | sed 's/^--prefix=//'`
81 exec_prefix=`echo $i | sed 's/^--exec-prefix=//'`
116 echo "unknown option: $i"
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"
134 echo "libraries: krb5 Kerberos 5 applications"
135 echo " gssapi GSSAPI applications"
136 echo " kadm-client libkadm5 client"
137 echo " kadm-server libkadm5 server"
142 if test X"$library" = X; then
146 if test "$prefix" = ""; then
149 if test "$exec_prefix" = ""; then
150 exec_prefix=@exec_prefix@
154 includedir=@includedir@
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"
164 if test "$print_prefix" = "yes"; then
169 if test "$print_exec_prefix" = "yes"; then
174 # The following rpath_flag setting code is distilled from MIT Kerberos'
175 # src/config/shlib.conf. Some of this seems ancient and likely to be
176 # wrong in some cases, but right for all the cases we probably care
177 # about. Also, this will very likely be wrong depending on how the
178 # caller will be doing link-edits (with what compiler-driver or
179 # link-editor)! There's no fixing this.
181 # In principle this doesn't belong here: application should instead use
182 # krb5-config --libdir to get the directory to use for the rpath, then
183 # workout the rpath flags on their own. Of course, there's no --libdir
184 # option... And MIT's krb5-config does include rpath flags.
186 # Compatibility with MIT is the winning consideration for now.
189 case "@CANONICAL_HOST@" in
191 rpath_flag
='-Wl,-rpath -Wl,';;
193 rpath_flag
='-Wl,+b,';;
194 *-*-irix* | mips-
*-netbsd*)
195 rpath_flag
='-Wl,-rpath -Wl,';;
196 *-*-netbsd* |
*-*-openbsd* |
*-*-solaris*)
198 *-*-linux* |
*-*-gnu* |
*-*-k*bsd
*-gnu |
*-*-freebsd*)
199 rpath_flag
='-Wl,--enable-new-dtags -Wl,-rpath -Wl,';;
201 rpath_flag
='-Wl,-blibpath:';;
206 echo "rpath_flag='$rpath_flag'"
210 if test "$do_libs" = "yes"; then
212 if test "$lib_gssapi" = yes; then
213 lib_flags="$lib_flags -lgssapi"
214 deplibs="$deplibs -lheimntlm"
215 if test X"$do_lib_deps" = Xyes; then
219 if test "$lib_kadm_client" = yes; then
220 lib_flags="$lib_flags -lkadm5clnt"
221 if test X"$do_lib_deps" = Xyes; then
225 if test "$lib_kadm_server" = yes; then
226 lib_flags="$lib_flags -lkadm5srv"
227 deplibs="$deplibs @LIB_dbopen@"
228 if test X"$do_lib_deps" = Xyes; then
232 if test "$lib_kafs" = yes; then
233 lib_flags="$lib_flags -lkafs"
234 if test X"$do_lib_deps" = Xyes; then
238 if test "$lib_krb5" = yes; then
239 lib_flags="$lib_flags -lkrb5"
241 deplibs="$deplibs @LIB_pkinit@ -lcom_err"
242 deplibs="$deplibs @LIB_hcrypto_appl@ -lasn1 -lwind -lheimbase -lroken"
243 deplibs="$deplibs @LIB_crypt@ @PTHREAD_LIBADD@ @LIB_dlopen@"
244 deplibs="$deplibs @LIB_door_create@ @LIBS@"
245 if test X"$do_lib_deps" = X"yes"; then
246 lib_flags="$lib_flags $deplibs"
248 if test X"$libdir" != X/usr/lib; then
249 lib_flags="-L${libdir} $lib_flags"
250 if test X"$rpath_flag" != X; then
251 lib_flags="${rpath_flag}${libdir} $lib_flags"
257 if test "$do_cflags" = "yes"; then
259 if test X"${includedir}" != X/usr/include; then
260 cflags="-I${includedir} $cflags"