#!/bin/sh # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # # Copyright 2001, 2002, 2003 by the Massachusetts Institute of Technology. # All Rights Reserved. # # Export of this software from the United States of America may # require a specific license from the United States Government. # It is the responsibility of any person or organization contemplating # export to obtain such a license before exporting. # # WITHIN THAT CONSTRAINT, permission to use, copy, modify, and # distribute this software and its documentation for any purpose and # without fee is hereby granted, provided that the above copyright # notice appear in all copies and that both that copyright notice and # this permission notice appear in supporting documentation, and that # the name of M.I.T. not be used in advertising or publicity pertaining # to distribution of the software without specific, written prior # permission. Furthermore if you modify this software you must label # your software as modified software and not distribute it in such a # fashion that it might be confused with the original M.I.T. software. # M.I.T. makes no representations about the suitability of # this software for any purpose. It is provided "as is" without express # or implied warranty. # # # Configurable parameters set by autoconf setvar version_string = ""Solaris Kerberos (based on MIT Kerberos 5 release 1.6.3)"" setvar prefix = '/usr' setvar exec_prefix = ${prefix} setvar includedir = "${prefix}/include/kerberosv5" setvar libdir = "${exec_prefix}/lib" setvar CC_LINK = ''$(PURE) $(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'' #KRB4_LIB=-lkrb4 #DES425_LIB=-ldes425 setvar KDB5_DB_LIB = '' setvar LDFLAGS = '''' setvar RPATH_FLAG = ''-R'' setvar PTHREAD_CFLAGS = ''-D_REENTRANT '' #LIBS='-lresolv -lsocket -lnsl ' setvar GEN_LIB = '' # Defaults for program setvar library = 'krb5' # Some constants setvar vendor_string = ""Sun Microsystems, Inc."" # Process arguments # Yes, we are sloppy, library specifications can come before options while test $Argc != 0 { match $1 { with --all setvar do_all = '1' with --cflags setvar do_cflags = '1' with --deps setvar do_deps = '1' with --exec-prefix setvar do_exec_prefix = '1' with --help setvar do_help = '1' with --libs setvar do_libs = '1' with --prefix setvar do_prefix = '1' with --vendor setvar do_vendor = '1' with --version setvar do_version = '1' with krb5 setvar library = 'krb5' with * echo "$0: Unknown option \`$1' -- use \`--help' for usage" exit 1 } shift } # If required options - provide help 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 { setvar do_help = '1' } if test -n $do_help { echo "Usage: $0 [OPTIONS] [LIBRARIES]" echo "Options:" echo " [--help] Help" echo " [--all] Display version, vendor, and various values" echo " [--version] Version information" echo " [--vendor] Vendor information" echo " [--prefix] Kerberos installed prefix" echo " [--exec-prefix] Kerberos installed exec_prefix" echo " [--cflags] Compile time CFLAGS" echo " [--libs] List libraries required to link [LIBRARIES]" echo "Libraries:" echo " krb5 Kerberos 5 application" exit 0 } if test -n $do_all { setvar all_exit = '' setvar do_version = '1' setvar do_prefix = '1' setvar do_exec_prefix = '1' setvar do_vendor = '1' setvar title_version = ""Version: "" setvar title_prefix = ""Prefix: "" setvar title_exec_prefix = ""Exec_prefix: "" setvar title_vendor = ""Vendor: "" } else { setvar all_exit = ""exit 0"" } if test -n $do_version { echo "$title_version$version_string" $all_exit } if test -n $do_vendor { echo "$title_vendor$vendor_string" $all_exit } if test -n $do_prefix { echo "$title_prefix$prefix" $all_exit } if test -n $do_exec_prefix { echo "$title_exec_prefix$exec_prefix" $all_exit } if test -n $do_cflags { echo "-I${includedir}" } if test -n $do_libs { # Ugly gross hack for our build tree setvar lib_flags = $(echo $CC_LINK | sed -e 's/\$(CC)//' \ -e 's/\$(PURE)//' \ -e 's#\$(PROG_RPATH)#'$libdir'#' \ -e 's#\$(PROG_LIBPATH)#-L'$libdir'#' \ -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \ -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \ -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \ -e 's#\$(CFLAGS)#'"$CFLAGS"'#) if test $library = 'kdb' { setvar lib_flags = ""$lib_flags -lkdb5 $KDB5_DB_LIB"" setvar library = 'krb5' } if test $library = 'kadm_server' { setvar lib_flags = ""$lib_flags -lkadm5srv -lkdb5 $KDB5_DB_LIB"" setvar library = 'kadm_common' } if test $library = 'kadm_client' { setvar lib_flags = ""$lib_flags -lkadm5clnt"" setvar library = 'kadm_common' } if test $library = 'kadm_common' { setvar lib_flags = ""$lib_flags -lgssrpc"" setvar library = 'gssapi' } if test $library = 'gssapi' { setvar lib_flags = ""$lib_flags -lgssapi_krb5"" setvar library = 'krb5' } if test $library = 'krb4' { setvar lib_flags = ""$lib_flags $KRB4_LIB $DES425_LIB"" setvar library = 'krb5' } if test $library = 'krb5' { setvar lib_flags = ""$lib_flags -lkrb5 $LIBS $GEN_LIB"" } echo $lib_flags } exit 0