1#!/bin/sh 2# $Id: krb5-config.in,v 1.9 2002/09/09 22:29:06 joda Exp $ 3 4do_libs=no 5do_cflags=no 6do_usage=no 7print_prefix=no 8print_exec_prefix=no 9library=krb5 10 11if test $# -eq 0; then 12 do_usage=yes 13 usage_exit=1 14fi 15 16for i in $*; do 17 case $i in 18 --help) 19 do_usage=yes 20 usage_exit=0 21 ;; 22 --version) 23 echo "@PACKAGE@ @VERSION@" 24 echo '$Id: krb5-config.in,v 1.9 2002/09/09 22:29:06 joda Exp $' 25 exit 0 26 ;; 27 --prefix=*) 28 prefix=`echo $i | sed 's/^--prefix=//'` 29 ;; 30 --prefix) 31 print_prefix=yes 32 ;; 33 --exec-prefix=*) 34 exec_prefix=`echo $i | sed 's/^--exec-prefix=//'` 35 ;; 36 --exec-prefix) 37 print_exec_prefix=yes 38 ;; 39 --libs) 40 do_libs=yes 41 ;; 42 --cflags) 43 do_cflags=yes 44 ;; 45 krb5) 46 library=krb5 47 ;; 48 gssapi) 49 library=gssapi 50 ;; 51 kadm-client) 52 library=kadm-client 53 ;; 54 kadm-server) 55 library=kadm-server 56 ;; 57 *) 58 echo "unknown option: $i" 59 exit 1 60 ;; 61 esac 62done 63 64if test "$do_usage" = "yes"; then 65 echo "usage: $0 [options] [libraries]" 66 echo "options: [--prefix[=dir]] [--exec-prefix[=dir]] [--libs] [--cflags]" 67 echo "libraries: krb5 gssapi kadm-client kadm-server" 68 exit $usage_exit 69fi 70 71if test "$prefix" = ""; then 72 prefix=@prefix@ 73fi 74if test "$exec_prefix" = ""; then 75 exec_prefix=@exec_prefix@ 76fi 77 78libdir=@libdir@ 79includedir=@includedir@ 80 81if test "$print_prefix" = "yes"; then 82 echo $prefix 83fi 84 85if test "$print_exec_prefix" = "yes"; then 86 echo $exec_prefix 87fi 88 89if test "$do_libs" = "yes"; then 90 lib_flags="-L${libdir}" 91 case $library in 92 gssapi) 93 lib_flags="$lib_flags -lgssapi" 94 ;; 95 kadm-client) 96 lib_flags="$lib_flags -lkadm5clnt" 97 ;; 98 kadm-server) 99 lib_flags="$lib_flags -lkadm5srv" 100 ;; 101 esac 102 lib_flags="$lib_flags -lkrb5 -lasn1 @LIB_des_appl@ -lroken" 103 lib_flags="$lib_flags @LIB_crypt@ @LIB_dbopen@ @LIBS@" 104 echo $lib_flags 105fi 106if test "$do_cflags" = "yes"; then 107 echo "-I${includedir} @INCLUDE_des@" 108fi 109 110exit 0 111