Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / security / heimdal / files / krb5-config
blob51f9c128238255f2d688848ed5e5c41bf0bd50ca
1 #!/bin/sh
2 # Heimdal: krb5-config.in,v 1.9 2002/09/09 22:29:06 joda Exp
3 # $NetBSD: krb5-config,v 1.1 2006/01/26 22:46:15 markd Exp $
5 do_libs=no
6 do_cflags=no
7 do_usage=no
8 print_prefix=no
9 print_exec_prefix=no
10 library=krb5
12 if test $# -eq 0; then
13 do_usage=yes
14 usage_exit=1
17 for i in $*; do
18 case $i in
19 --help)
20 do_usage=yes
21 usage_exit=0
23 --version)
24 echo "heimdal @HEIMDAL_VERSION@"
25 exit 0
27 --prefix=*)
28 prefix=`echo $i | sed 's/^--prefix=//'`
30 --prefix)
31 print_prefix=yes
33 --exec-prefix=*)
34 exec_prefix=`echo $i | sed 's/^--exec-prefix=//'`
36 --exec-prefix)
37 print_exec_prefix=yes
39 --libs)
40 do_libs=yes
42 --cflags)
43 do_cflags=yes
45 krb5)
46 library=krb5
48 gssapi)
49 library=gssapi
51 kadm-client)
52 library=kadm-client
54 kadm-server)
55 library=kadm-server
58 echo "unknown option: $i"
59 exit 1
61 esac
62 done
64 if 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
71 if test "$prefix" = ""; then
72 prefix=/usr
74 if test "$exec_prefix" = ""; then
75 exec_prefix=/usr
78 if test "$print_prefix" = "yes"; then
79 echo $prefix
82 if test "$print_exec_prefix" = "yes"; then
83 echo $exec_prefix
86 if test "$do_libs" = "yes"; then
87 lib_flags="-L/usr/lib"
88 case $library in
89 gssapi)
90 lib_flags="$lib_flags -lgssapi"
92 kadm-client)
93 lib_flags="$lib_flags -lkadm5clnt"
95 kadm-server)
96 lib_flags="$lib_flags -lkadm5srv"
98 esac
99 lib_flags="$lib_flags -lkrb5 -lasn1 -ldes -lroken"
100 lib_flags="$lib_flags -lcrypto -lcom_err"
101 echo $lib_flags
103 if test "$do_cflags" = "yes"; then
104 echo "-I/usr/include/gssapi -I/usr/include/krb5"
107 exit 0