3 # Copyright 2001, 2002, 2003 by the Massachusetts Institute of Technology.
6 # Export of this software from the United States of America may
7 # require a specific license from the United States Government.
8 # It is the responsibility of any person or organization contemplating
9 # export to obtain such a license before exporting.
11 # WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
12 # distribute this software and its documentation for any purpose and
13 # without fee is hereby granted, provided that the above copyright
14 # notice appear in all copies and that both that copyright notice and
15 # this permission notice appear in supporting documentation, and that
16 # the name of M.I.T. not be used in advertising or publicity pertaining
17 # to distribution of the software without specific, written prior
18 # permission. Furthermore if you modify this software you must label
19 # your software as modified software and not distribute it in such a
20 # fashion that it might be confused with the original M.I.T. software.
21 # M.I.T. makes no representations about the suitability of
22 # this software for any purpose. It is provided "as is" without express
23 # or implied warranty.
27 # Configurable parameters set by autoconf
28 version_string="Kerberos 5 release @KRB5_VERSION@"
31 exec_prefix=@exec_prefix@
32 includedir=@includedir@
35 KDB5_DB_LIB=@KDB5_DB_LIB@
37 RPATH_FLAG='@RPATH_FLAG@'
38 PROG_RPATH_FLAGS='@PROG_RPATH_FLAGS@'
39 PTHREAD_CFLAGS='@PTHREAD_CFLAGS@'
41 DEFCCNAME='@DEFCCNAME@'
42 DEFKTNAME='@DEFKTNAME@'
43 DEFCKTNAME='@DEFCKTNAME@'
48 # Defaults for program
52 vendor_string="Massachusetts Institute of Technology"
55 # Yes, we are sloppy, library specifications can come before options
56 while test $# != 0; do
73 --deps) # historically a no-op
112 echo "$0: Unknown option \`$1' -- use \`--help' for usage"
118 # If required options - provide help
119 if test -z "$do_all" -a -z "$do_version" -a -z "$do_vendor" -a \
120 -z "$do_prefix" -a -z "$do_vendor" -a -z "$do_exec_prefix" -a \
121 -z "$do_defccname" -a -z "$do_defktname" -a -z "$do_defcktname" -a \
122 -z "$do_cflags" -a -z "$do_libs"; then
127 if test -n "$do_help"; then
128 echo "Usage: $0 [OPTIONS] [LIBRARIES]"
130 echo " [--help] Help"
131 echo " [--all] Display version, vendor, and various values"
132 echo " [--version] Version information"
133 echo " [--vendor] Vendor information"
134 echo " [--prefix] Kerberos installed prefix"
135 echo " [--exec-prefix] Kerberos installed exec_prefix"
136 echo " [--defccname] Show built-in default ccache name"
137 echo " [--defktname] Show built-in default keytab name"
138 echo " [--defcktname] Show built-in default client keytab name"
139 echo " [--cflags] Compile time CFLAGS"
140 echo " [--libs] List libraries required to link [LIBRARIES]"
142 echo " krb5 Kerberos 5 application"
143 echo " gssapi GSSAPI application with Kerberos 5 bindings"
144 echo " gssrpc GSSAPI RPC application"
145 echo " kadm-client Kadmin client"
146 echo " kadm-server Kadmin server"
147 echo " kdb Application that accesses the kerberos database"
151 if test -n "$do_all"; then
157 title_version="Version: "
158 title_prefix="Prefix: "
159 title_exec_prefix="Exec_prefix: "
160 title_vendor="Vendor: "
165 if test -n "$do_version"; then
166 echo "$title_version$version_string"
170 if test -n "$do_vendor"; then
171 echo "$title_vendor$vendor_string"
175 if test -n "$do_prefix"; then
176 echo "$title_prefix$prefix"
180 if test -n "$do_exec_prefix"; then
181 echo "$title_exec_prefix$exec_prefix"
185 if test -n "$do_defccname"; then
190 if test -n "$do_defktname"; then
195 if test -n "$do_defcktname"; then
200 if test -n "$do_cflags"; then
201 if test x"$includedir" != x"/usr/include" ; then
202 echo "-I${includedir}"
209 if test -n "$do_libs"; then
210 # Assumes /usr/lib is the standard library directory everywhere...
211 if test "$libdir" = /usr/lib; then
214 libdirarg="-L$libdir"
216 # Ugly gross hack for our build tree
217 lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
219 -e 's#\$(PROG_RPATH_FLAGS)#'"$PROG_RPATH_FLAGS"'#' \
220 -e 's#\$(PROG_RPATH)#'$libdir'#' \
221 -e 's#\$(PROG_LIBPATH)#'$libdirarg'#' \
222 -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \
223 -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \
224 -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
227 if test $library = 'kdb'; then
228 lib_flags="$lib_flags -lkdb5 $KDB5_DB_LIB"
232 if test $library = 'kadm_server'; then
233 lib_flags="$lib_flags -lkadm5srv_mit -lkdb5 $KDB5_DB_LIB"
237 if test $library = 'kadm_client'; then
238 lib_flags="$lib_flags -lkadm5clnt_mit"
242 if test $library = 'gssrpc'; then
243 lib_flags="$lib_flags -lgssrpc"
247 if test $library = 'gssapi'; then
248 lib_flags="$lib_flags -lgssapi_krb5"
252 if test $library = 'krb5'; then
253 lib_flags="$lib_flags -lkrb5 -lk5crypto @COM_ERR_LIB@"
256 # If we ever support a flag to generate output suitable for static
257 # linking, we would output "-lkrb5support $GEN_LIB $LIBS $DL_LIB"