/[MITgcm]/MITgcm_contrib/mpack_src/mpack-1.6-4/cmulocal/kerberos_v5.m4
ViewVC logotype

Annotation of /MITgcm_contrib/mpack_src/mpack-1.6-4/cmulocal/kerberos_v5.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Feb 23 20:13:31 2008 UTC (17 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
- get new version from: http://packages.qa.debian.org/m/mpack.html
  (files: mpack_1.6.orig.tar.gz, mpack_1.6-4.diff.gz, mpack_1.6-4.dsc)
  and apply patch 'mpack_1.6-4.diff' to original dir: mpack_1.6/
- this fix the MD5 coding on 64.bit platforms (well, seems to).
- added in Contrib to allow separate test (since building mpack seems fishy)

1 jmc 1.1 dnl kerberos_v5.m4--Kerberos 5 libraries and includes
2     dnl Derrick Brashear
3     dnl from KTH krb and Arla
4     dnl $Id: kerberos_v5.m4,v 1.6 2002/12/21 18:44:24 cg2v Exp $
5    
6     AC_DEFUN(CMU_KRB5_INC_WHERE1, [
7     saved_CPPFLAGS=$CPPFLAGS
8     CPPFLAGS="$saved_CPPFLAGS -I$1"
9     AC_TRY_COMPILE([#include <krb5.h>],
10     [krb5_keyblock foo;],
11     ac_cv_found_krb5_inc=yes,
12     ac_cv_found_krb5_inc=no)
13     CPPFLAGS=$saved_CPPFLAGS
14     ])
15    
16     AC_DEFUN(CMU_KRB5_INC_WHERE, [
17     for i in $1; do
18     AC_MSG_CHECKING(for krb5 headers in $i)
19     CMU_KRB5_INC_WHERE1($i)
20     CMU_TEST_INCPATH($i, krb5)
21     if test "$ac_cv_found_krb5_inc" = "yes"; then
22     ac_cv_krb5_where_inc=$i
23     AC_MSG_RESULT(found)
24     break
25     else
26     AC_MSG_RESULT(not found)
27     fi
28     done
29     ])
30    
31     #
32     # Test for kerberos lib files
33     #
34    
35     AC_DEFUN(CMU_KRB5_LIB_WHERE1, [
36     saved_LIBS=$LIBS
37     LIBS="$saved_LIBS -L$1 -lkrb5 -lk5crypto"
38     AC_TRY_LINK(,
39     [krb5_get_in_tkt();],
40     [ac_cv_found_krb5_lib=yes],
41     ac_cv_found_krb5_lib=no)
42     LIBS=$saved_LIBS
43     ])
44    
45     AC_DEFUN(CMU_KRB5_HLIB_WHERE1, [
46     saved_LIBS=$LIBS
47     LIBS="$saved_LIBS -L$1 -lkrb5 -ldes -lasn1"
48     AC_TRY_LINK(,
49     [krb5_get_in_tkt();],
50     [ac_cv_found_krb5_lib=yes],
51     ac_cv_found_krb5_lib=no)
52     LIBS=$saved_LIBS
53     ])
54    
55     AC_DEFUN(CMU_KRB5_LIB_WHERE, [
56     for i in $1; do
57     AC_MSG_CHECKING(for krb5 libraries in $i)
58     CMU_KRB5_LIB_WHERE1($i)
59     CMU_TEST_LIBPATH($i, krb5)
60     if test "$ac_cv_found_krb5_lib" = "yes" ; then
61     ac_cv_krb5_where_lib=$i
62     AC_MSG_RESULT(found)
63     break
64     else
65     AC_MSG_RESULT(not found)
66     fi
67     done
68     ])
69    
70     AC_DEFUN(CMU_KRB5_HLIB_WHERE, [
71     for i in $1; do
72     AC_MSG_CHECKING(for heimdal krb5 libraries in $i)
73     CMU_KRB5_HLIB_WHERE1($i)
74     CMU_TEST_LIBPATH($i, krb5)
75     if test "$ac_cv_found_krb5_lib" = "yes" ; then
76     ac_cv_krb5_where_hlib=$i
77     AC_MSG_RESULT(found)
78     break
79     else
80     AC_MSG_RESULT(not found)
81     fi
82     done
83     ])
84    
85     AC_DEFUN(CMU_KRB5, [
86     AC_REQUIRE([CMU_SOCKETS])
87     AC_REQUIRE([CMU_USE_COMERR])
88     AC_ARG_WITH(krb5,
89     [ --with-krb5=PREFIX Compile with Kerberos 5 support],
90     [if test "X$with_krb5" = "X"; then
91     with_krb5=yes
92     fi])
93     AC_ARG_WITH(krb5-lib,
94     [ --with-krb5-lib=dir use kerberos 5 libraries in dir],
95     [if test "$withval" = "yes" -o "$withval" = "no"; then
96     AC_MSG_ERROR([No argument for --with-krb5-lib])
97     fi])
98     AC_ARG_WITH(krb5-include,
99     [ --with-krb5-include=dir use kerberos 5 headers in dir],
100     [if test "$withval" = "yes" -o "$withval" = "no"; then
101     AC_MSG_ERROR([No argument for --with-krb5-include])
102     fi])
103    
104     if test "X$with_krb5" != "X"; then
105     if test "$with_krb5" != "yes" -a "$with_krb5" != "no"; then
106     ac_cv_krb5_where_lib=$with_krb5/lib
107     ac_cv_krb5_where_inc=$with_krb5/include
108     fi
109     fi
110    
111     if test "$with_krb5" != "no"; then
112     if test "X$with_krb5_lib" != "X"; then
113     ac_cv_krb5_where_lib=$with_krb5_lib
114     fi
115     if test "X$ac_cv_krb5_where_lib" = "X"; then
116     CMU_KRB5_LIB_WHERE(/usr/athena/lib /usr/lib /usr/local/lib)
117     fi
118     if test "X$ac_cv_krb5_where_lib" = "X"; then
119     CMU_KRB5_HLIB_WHERE(/usr/athena/lib /usr/lib /usr/local/lib)
120     fi
121    
122     if test "X$with_krb5_include" != "X"; then
123     ac_cv_krb5_where_inc=$with_krb5_include
124     fi
125     if test "X$ac_cv_krb5_where_inc" = "X"; then
126     CMU_KRB5_INC_WHERE(/usr/athena/include /usr/include/kerberos /usr/local/include /usr/include)
127     fi
128     fi
129    
130     AC_MSG_CHECKING(whether to include kerberos 5)
131     if test "X$ac_cv_krb5_where_lib" = "X" -a "X$ac_cv_krb5_where_hlib" = "X" -o "X$ac_cv_krb5_where_inc" = "X"; then
132     ac_cv_found_krb5=no
133     AC_MSG_RESULT(no)
134     else
135     ac_cv_found_krb5=yes
136     AC_MSG_RESULT(yes)
137     KRB5_INC_DIR=$ac_cv_krb5_where_inc
138     if test "X$ac_cv_krb5_where_hlib" = "X"; then
139     KRB5_LIB_DIR=$ac_cv_krb5_where_lib
140     KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkrb5 -lk5crypto"
141     else
142     KRB5_LIB_DIR=$ac_cv_krb5_where_hlib
143     KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkrb5 -ldes -lasn1"
144     AC_DEFINE(HEIMDAL,,[we found heimdal krb5 and not MIT krb5])
145     fi
146     KRB5_INC_FLAGS="-I${KRB5_INC_DIR}"
147     AC_SUBST(KRB5_INC_FLAGS)
148     AC_SUBST(KRB5_LIB_FLAGS)
149     AC_DEFINE(KRB5,,[Use Kerberos 5. (maybe find what needs this and nuke it)])
150     if test "X$RPATH" = "X"; then
151     RPATH=""
152     fi
153     case "${host}" in
154     *-*-linux*)
155     if test "X$RPATH" = "X"; then
156     RPATH="-Wl,-rpath,${KRB5_LIB_DIR}"
157     else
158     RPATH="${RPATH}:${KRB5_LIB_DIR}"
159     fi
160     ;;
161     *-*-hpux*)
162     if test "X$RPATH" = "X"; then
163     RPATH="-Wl,+b${KRB5_LIB_DIR}"
164     else
165     RPATH="${RPATH}:${KRB5_LIB_DIR}"
166     fi
167     ;;
168     *-*-irix*)
169     if test "X$RPATH" = "X"; then
170     RPATH="-Wl,-rpath,${KRB5_LIB_DIR}"
171     else
172     RPATH="${RPATH}:${KRB5_LIB_DIR}"
173     fi
174     ;;
175     *-*-solaris2*)
176     if test "$ac_cv_prog_gcc" = yes; then
177     if test "X$RPATH" = "X"; then
178     RPATH="-Wl,-R${KRB5_LIB_DIR}"
179     else
180     RPATH="${RPATH}:${KRB5_LIB_DIR}"
181     fi
182     else
183     RPATH="${RPATH} -R${KRB5_LIB_DIR}"
184     fi
185     ;;
186     esac
187     AC_SUBST(RPATH)
188     fi
189     ])

  ViewVC Help
Powered by ViewVC 1.1.22