[OpenAFS-devel] Minimum autoconf version

Troy Benjegerdes hozer@hozed.org
Mon, 4 Jul 2005 16:05:40 -0500


This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_kalmia.hozed.org-19848-1120511140-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Fri, Jul 01, 2005 at 02:28:13PM -0400, Ken Hornstein wrote:
> What's the minimum autoconf version that we are using with OpenAFS?
> 
> I ask because in the autoconf glue I did for aklog, I started getting
> complaints because I used AC_ARG_VAR and apparantly some people out
> there (you know who you are) were still using autoconf 2.13, which
> didn't have it.  I'm wondering if we can all agree on what the minimum
> autoconf version is and standardize on it with AC_PREREQ (I'm hoping it
> will be something newer than 2.13).  I also noticed that the configure
> behavior is different for some macros between 2.13 and later versions
> (specifically, the tests done when doing AC_CHECK_HEADERS seems to be
> more comprehensive in later version of autoconf), and that complicated
> things when I was writing the autoconf tests; that's why I'd like to
> get the autoconf version mess straightened out.

I did some hacking of the new aklog stuff in cvs vs the old patch I had,
and came up with the following, which at least builds against MIT Krb5
on Debian, and appears to be able to get me rxk2ab tokens sucessfully.

(FYI, this was with autoconf-2.13. Debian has autoconfig-2.59, but it's
installed as autoconf2.50)



--=_kalmia.hozed.org-19848-1120511140-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="aklog.diff"

Index: Makefile.in
===================================================================
RCS file: /cvs/openafs/Makefile.in,v
retrieving revision 1.80
diff -u -r1.80 Makefile.in
--- Makefile.in	22 Jun 2005 13:47:19 -0000	1.80
+++ Makefile.in	4 Jul 2005 20:57:09 -0000
@@ -191,6 +191,9 @@
 kauth: cmd comerr ubik cmd auth comerr ptserver audit libacl kauth_depinstall
 	${COMPILE_PART1} kauth ${COMPILE_PART2}
 
+aklog: comerr
+	${COMPILE_PART1} aklog ${COMPILE_PART2}
+
 dauth: cmd comerr ubik cmd auth kauth comerr
 	${COMPILE_PART1} dauth ${COMPILE_PART2}
 
Index: acconfig.h
===================================================================
RCS file: /cvs/openafs/acconfig.h,v
retrieving revision 1.38
diff -u -r1.38 acconfig.h
--- acconfig.h	18 Mar 2004 05:00:32 -0000	1.38
+++ acconfig.h	4 Jul 2005 20:57:09 -0000
@@ -51,6 +51,7 @@
 #undef ssize_t
 #undef HAVE_STRUCT_BUF
 #undef HAVE_ARPA_NAMESER_COMPAT_H
+#undef HAVE_KRB5_PRINCIPAL_GET_REALM
 /* glue for RedHat kernel bug */
 #undef ENABLE_REDHAT_BUILDSYS
 #if defined(ENABLE_REDHAT_BUILDSYS) && defined(KERNEL) && defined(REDHAT_FIX)
Index: acinclude.m4
===================================================================
RCS file: /cvs/openafs/acinclude.m4,v
retrieving revision 1.151
diff -u -r1.151 acinclude.m4
--- acinclude.m4	22 Jun 2005 17:35:20 -0000	1.151
+++ acinclude.m4	4 Jul 2005 20:57:09 -0000
@@ -381,40 +381,10 @@
 		powerpc-apple-darwin5.5*)
 			AFS_SYSNAME="ppc_darwin_14"
 			;;
-		powerpc-apple-darwin6.0*)
+		powerpc-apple-darwin6.*)
 			AFS_SYSNAME="ppc_darwin_60"
 			;;
-		powerpc-apple-darwin6.1*)
-			AFS_SYSNAME="ppc_darwin_60"
-			;;
-		powerpc-apple-darwin6.2*)
-			AFS_SYSNAME="ppc_darwin_60"
-			;;
-		powerpc-apple-darwin6.3*)
-			AFS_SYSNAME="ppc_darwin_60"
-			;;
-		powerpc-apple-darwin6.4*)
-			AFS_SYSNAME="ppc_darwin_60"
-			;;
-		powerpc-apple-darwin6.5*)
-			AFS_SYSNAME="ppc_darwin_60"
-			;;
-		powerpc-apple-darwin7.0*)
-			AFS_SYSNAME="ppc_darwin_70"
-			;;
-		powerpc-apple-darwin7.1*)
-			AFS_SYSNAME="ppc_darwin_70"
-			;;
-		powerpc-apple-darwin7.2*)
-			AFS_SYSNAME="ppc_darwin_70"
-			;;
-		powerpc-apple-darwin7.3*)
-			AFS_SYSNAME="ppc_darwin_70"
-			;;
-		powerpc-apple-darwin7.4*)
-			AFS_SYSNAME="ppc_darwin_70"
-			;;
-		powerpc-apple-darwin7.5*)
+		powerpc-apple-darwin7.*)
 			AFS_SYSNAME="ppc_darwin_70"
 			;;
 		powerpc-apple-darwin8.0*)
@@ -904,6 +874,21 @@
 fi
 AC_SUBST(PTHREAD_LIBS)
 
+KRB5LIBS=error
+AC_CHECK_LIB(krb5, krb5_init_context, KRB5LIBS="-lkrb5")
+AC_CHECK_LIB(krb5, krb5_principal_get_realm, AC_DEFINE(HAVE_KRB5_PRINCIPAL_GET_REALM, 1) )
+AC_CHECK_LIB(krb5, krb5_524_convert_creds, AC_DEFINE(HAVE_KRB5_524_CONVERT_CREDS))
+AC_CHECK_LIB(krb5, krb5_524_convert_creds_kdc, AC_DEFINE(HAVE_KRB5_524_CONVERT_CREDS_KDC))
+AC_CHECK_LIB(krb5, krb5_principal_get_comp_string, AC_DEFINE(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING))
+
+AC_CHECK_LIB(com_err, add_error_table, AC_DEFINE(HAVE_ADD_ERROR_TABLE))
+
+#MIT krb5...
+AC_DEFINE(HAVE_KRB5_CREDS_KEYBLOCK)
+
+
+AC_SUBST(KRB5LIBS)
+
 WITH_OBSOLETE=NO
 if test "$enable_obsolete" = "yes"; then
 	WITH_OBSOLETE=YES
Index: src/aklog/aklog_main.c
===================================================================
RCS file: /cvs/openafs/src/aklog/aklog_main.c,v
retrieving revision 1.6
diff -u -r1.6 aklog_main.c
--- src/aklog/aklog_main.c	1 Jul 2005 04:40:52 -0000	1.6
+++ src/aklog/aklog_main.c	4 Jul 2005 20:57:11 -0000
@@ -181,7 +181,8 @@
 #error "Must have either krb5_princ_size or krb5_principal_get_comp_string"
 #endif
 
-#if defined(HAVE_KRB5_CREDS_KEYBLOCK)
+//#if defined(HAVE_KRB5_CREDS_KEYBLOCK)
+#if 1
 
 #define get_cred_keydata(c) c->keyblock.contents
 #define get_cred_keylen(c) c->keyblock.length
@@ -1143,7 +1144,7 @@
     if (path[0] == DIR)
 	strcpy(pathtocheck, path);
     else {
-	if (getwd(pathtocheck) == NULL) {
+	if (getcwd(pathtocheck, MAXPATHLEN) == NULL) {
 	    fprintf(stderr, "Unable to find current working directory:\n");
 	    fprintf(stderr, "%s\n", pathtocheck);
 	    fprintf(stderr, "Try an absolute pathname.\n");

--=_kalmia.hozed.org-19848-1120511140-0001-2--