110db1377Sgtb#!/bin/sh 210db1377Sgtb 310db1377Sgtb# 4159d09a2SMark Phalan# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 510db1377Sgtb# Use is subject to license terms. 610db1377Sgtb# 710db1377Sgtb# 810db1377Sgtb# Copyright 2001, 2002, 2003 by the Massachusetts Institute of Technology. 910db1377Sgtb# All Rights Reserved. 1010db1377Sgtb# 1110db1377Sgtb# Export of this software from the United States of America may 1210db1377Sgtb# require a specific license from the United States Government. 1310db1377Sgtb# It is the responsibility of any person or organization contemplating 1410db1377Sgtb# export to obtain such a license before exporting. 1510db1377Sgtb# 1610db1377Sgtb# WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 1710db1377Sgtb# distribute this software and its documentation for any purpose and 1810db1377Sgtb# without fee is hereby granted, provided that the above copyright 1910db1377Sgtb# notice appear in all copies and that both that copyright notice and 2010db1377Sgtb# this permission notice appear in supporting documentation, and that 2110db1377Sgtb# the name of M.I.T. not be used in advertising or publicity pertaining 2210db1377Sgtb# to distribution of the software without specific, written prior 2310db1377Sgtb# permission. Furthermore if you modify this software you must label 2410db1377Sgtb# your software as modified software and not distribute it in such a 2510db1377Sgtb# fashion that it might be confused with the original M.I.T. software. 2610db1377Sgtb# M.I.T. makes no representations about the suitability of 2710db1377Sgtb# this software for any purpose. It is provided "as is" without express 2810db1377Sgtb# or implied warranty. 2910db1377Sgtb# 3010db1377Sgtb# 3110db1377Sgtb 3210db1377Sgtb# Configurable parameters set by autoconf 33159d09a2SMark Phalanversion_string="Solaris Kerberos (based on MIT Kerberos 5 release 1.6.3)" 3410db1377Sgtb 3510db1377Sgtbprefix=/usr 3610db1377Sgtbexec_prefix=${prefix} 3710db1377Sgtbincludedir=${prefix}/include/kerberosv5 3810db1377Sgtblibdir=${exec_prefix}/lib 3910db1377Sgtb 4010db1377Sgtb# Defaults for program 4110db1377Sgtblibrary=krb5 4210db1377Sgtb 4310db1377Sgtb# Some constants 4410db1377Sgtbvendor_string="Sun Microsystems, Inc." 4510db1377Sgtb 4610db1377Sgtb# Process arguments 4710db1377Sgtb# Yes, we are sloppy, library specifications can come before options 4810db1377Sgtbwhile test $# != 0; do 4910db1377Sgtb case $1 in 5010db1377Sgtb --all) 5110db1377Sgtb do_all=1 5210db1377Sgtb ;; 5310db1377Sgtb --cflags) 5410db1377Sgtb do_cflags=1 5510db1377Sgtb ;; 5610db1377Sgtb --deps) 5710db1377Sgtb do_deps=1 5810db1377Sgtb ;; 5910db1377Sgtb --exec-prefix) 6010db1377Sgtb do_exec_prefix=1 6110db1377Sgtb ;; 6210db1377Sgtb --help) 6310db1377Sgtb do_help=1 6410db1377Sgtb ;; 6510db1377Sgtb --libs) 6610db1377Sgtb do_libs=1 6710db1377Sgtb ;; 6810db1377Sgtb --prefix) 6910db1377Sgtb do_prefix=1 7010db1377Sgtb ;; 7110db1377Sgtb --vendor) 7210db1377Sgtb do_vendor=1 7310db1377Sgtb ;; 7410db1377Sgtb --version) 7510db1377Sgtb do_version=1 7610db1377Sgtb ;; 7710db1377Sgtb krb5) 7810db1377Sgtb library=krb5 7910db1377Sgtb ;; 80*efdc1e2bSAlexander Pyhalov gssapi) 81*efdc1e2bSAlexander Pyhalov library=gssapi 82*efdc1e2bSAlexander Pyhalov ;; 8310db1377Sgtb *) 8410db1377Sgtb echo "$0: Unknown option \`$1' -- use \`--help' for usage" 8510db1377Sgtb exit 1 8610db1377Sgtb esac 8710db1377Sgtb shift 8810db1377Sgtbdone 8910db1377Sgtb 9010db1377Sgtb# If required options - provide help 9110db1377Sgtbif 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 9210db1377Sgtb do_help=1 9310db1377Sgtbfi 9410db1377Sgtb 9510db1377Sgtb 9610db1377Sgtbif test -n "$do_help"; then 9710db1377Sgtb echo "Usage: $0 [OPTIONS] [LIBRARIES]" 9810db1377Sgtb echo "Options:" 9910db1377Sgtb echo " [--help] Help" 10010db1377Sgtb echo " [--all] Display version, vendor, and various values" 10110db1377Sgtb echo " [--version] Version information" 10210db1377Sgtb echo " [--vendor] Vendor information" 10310db1377Sgtb echo " [--prefix] Kerberos installed prefix" 10410db1377Sgtb echo " [--exec-prefix] Kerberos installed exec_prefix" 10510db1377Sgtb echo " [--cflags] Compile time CFLAGS" 10610db1377Sgtb echo " [--libs] List libraries required to link [LIBRARIES]" 10710db1377Sgtb echo "Libraries:" 10810db1377Sgtb echo " krb5 Kerberos 5 application" 109*efdc1e2bSAlexander Pyhalov echo " gssapi GSSAPI application" 11010db1377Sgtb 11110db1377Sgtb exit 0 11210db1377Sgtbfi 11310db1377Sgtb 11410db1377Sgtbif test -n "$do_all"; then 11510db1377Sgtb all_exit= 11610db1377Sgtb do_version=1 11710db1377Sgtb do_prefix=1 11810db1377Sgtb do_exec_prefix=1 11910db1377Sgtb do_vendor=1 12010db1377Sgtb title_version="Version: " 12110db1377Sgtb title_prefix="Prefix: " 12210db1377Sgtb title_exec_prefix="Exec_prefix: " 12310db1377Sgtb title_vendor="Vendor: " 12410db1377Sgtbelse 12510db1377Sgtb all_exit="exit 0" 12610db1377Sgtbfi 12710db1377Sgtb 12810db1377Sgtbif test -n "$do_version"; then 12910db1377Sgtb echo "$title_version$version_string" 13010db1377Sgtb $all_exit 13110db1377Sgtbfi 13210db1377Sgtb 13310db1377Sgtbif test -n "$do_vendor"; then 13410db1377Sgtb echo "$title_vendor$vendor_string" 13510db1377Sgtb $all_exit 13610db1377Sgtbfi 13710db1377Sgtb 13810db1377Sgtbif test -n "$do_prefix"; then 13910db1377Sgtb echo "$title_prefix$prefix" 14010db1377Sgtb $all_exit 14110db1377Sgtbfi 14210db1377Sgtb 14310db1377Sgtbif test -n "$do_exec_prefix"; then 14410db1377Sgtb echo "$title_exec_prefix$exec_prefix" 14510db1377Sgtb $all_exit 14610db1377Sgtbfi 14710db1377Sgtb 14810db1377Sgtbif test -n "$do_cflags"; then 14910db1377Sgtb echo "-I${includedir}" 15010db1377Sgtbfi 15110db1377Sgtb 15210db1377Sgtbif test -n "$do_libs"; then 153*efdc1e2bSAlexander Pyhalov lib_flags="-L$libdir" 15410db1377Sgtb 15510db1377Sgtb if test $library = 'gssapi'; then 156*efdc1e2bSAlexander Pyhalov lib_flags="$lib_flags -lgss" 15710db1377Sgtb library=krb5 15810db1377Sgtb fi 15910db1377Sgtb 16010db1377Sgtb if test $library = 'krb5'; then 161*efdc1e2bSAlexander Pyhalov lib_flags="$lib_flags -lkrb5" 16210db1377Sgtb fi 16310db1377Sgtb 164*efdc1e2bSAlexander Pyhalov echo "$lib_flags" 16510db1377Sgtbfi 16610db1377Sgtb 16710db1377Sgtbexit 0 168