4 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5 # Use is subject to license terms.
8 # Copyright 2001, 2002, 2003 by the Massachusetts Institute of Technology.
11 # Export of this software from the United States of America may
12 # require a specific license from the United States Government.
13 # It is the responsibility of any person or organization contemplating
14 # export to obtain such a license before exporting.
16 # WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
17 # distribute this software and its documentation for any purpose and
18 # without fee is hereby granted, provided that the above copyright
19 # notice appear in all copies and that both that copyright notice and
20 # this permission notice appear in supporting documentation, and that
21 # the name of M.I.T. not be used in advertising or publicity pertaining
22 # to distribution of the software without specific, written prior
23 # permission. Furthermore if you modify this software you must label
24 # your software as modified software and not distribute it in such a
25 # fashion that it might be confused with the original M.I.T. software.
26 # M.I.T. makes no representations about the suitability of
27 # this software for any purpose. It is provided "as is" without express
28 # or implied warranty.
32 # Configurable parameters set by autoconf
33 version_string
="Solaris Kerberos (based on MIT Kerberos 5 release 1.6.3)"
37 includedir
=${prefix}/include
/kerberosv5
38 libdir
=${exec_prefix}/lib
39 CC_LINK
='$(PURE) $(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
45 PTHREAD_CFLAGS
='-D_REENTRANT '
47 #LIBS='-lresolv -lsocket -lnsl '
50 # Defaults for program
54 vendor_string
="Sun Microsystems, Inc."
57 # Yes, we are sloppy, library specifications can come before options
58 while test $# != 0; do
94 echo "$0: Unknown option \`$1' -- use \`--help' for usage"
100 # If required options - provide help
101 if test -z "$do_all" -a -z "$do_version" -a -z "$do_vendor" -a -z "$do_prefix" -a -z "$do_vendor" -a -z "$do_exec_prefix" -a -z "$do_cflags" -a -z "$do_libs"; then
106 if test -n "$do_help"; then
107 echo "Usage: $0 [OPTIONS] [LIBRARIES]"
109 echo " [--help] Help"
110 echo " [--all] Display version, vendor, and various values"
111 echo " [--version] Version information"
112 echo " [--vendor] Vendor information"
113 echo " [--prefix] Kerberos installed prefix"
114 echo " [--exec-prefix] Kerberos installed exec_prefix"
115 echo " [--cflags] Compile time CFLAGS"
116 echo " [--libs] List libraries required to link [LIBRARIES]"
118 echo " krb5 Kerberos 5 application"
123 if test -n "$do_all"; then
129 title_version
="Version: "
130 title_prefix
="Prefix: "
131 title_exec_prefix
="Exec_prefix: "
132 title_vendor
="Vendor: "
137 if test -n "$do_version"; then
138 echo "$title_version$version_string"
142 if test -n "$do_vendor"; then
143 echo "$title_vendor$vendor_string"
147 if test -n "$do_prefix"; then
148 echo "$title_prefix$prefix"
152 if test -n "$do_exec_prefix"; then
153 echo "$title_exec_prefix$exec_prefix"
157 if test -n "$do_cflags"; then
158 echo "-I${includedir}"
162 if test -n "$do_libs"; then
163 # Ugly gross hack for our build tree
164 lib_flags
=`echo $CC_LINK | sed -e 's/\$(CC)//' \
166 -e 's#\$(PROG_RPATH)#'$libdir'#' \
167 -e 's#\$(PROG_LIBPATH)#-L'$libdir'#' \
168 -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \
169 -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \
170 -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
171 -e 's#\$(CFLAGS)#'"$CFLAGS"'#'`
173 if test $library = 'kdb'; then
174 lib_flags
="$lib_flags -lkdb5 $KDB5_DB_LIB"
178 if test $library = 'kadm_server'; then
179 lib_flags
="$lib_flags -lkadm5srv -lkdb5 $KDB5_DB_LIB"
183 if test $library = 'kadm_client'; then
184 lib_flags
="$lib_flags -lkadm5clnt"
188 if test $library = 'kadm_common'; then
189 lib_flags
="$lib_flags -lgssrpc"
193 if test $library = 'gssapi'; then
194 lib_flags
="$lib_flags -lgssapi_krb5"
198 if test $library = 'gss'; then
199 lib_flags
="$lib_flags -lgss"
203 if test $library = 'krb4'; then
204 lib_flags
="$lib_flags $KRB4_LIB $DES425_LIB"
208 if test $library = 'krb5'; then
209 lib_flags
="$lib_flags -lkrb5 $LIBS $GEN_LIB"