Add a configure test for heimdal and use it to build asetkey or not.
Thanks to Derek Atkins for his helpful suggestions.
SRCS= aklog.c aklog_main.c krb_util.c linked_list.c
OBJS= aklog.o aklog_main.o krb_util.o linked_list.o
-all: aklog asetkey
+all: aklog @ASETKEY@
aklog: ${OBJS} ${AFSLIBS}
${CC} -o $@ ${CFLAGS} ${OBJS} ${AKLIBS} ${AFSLIBS} ${XLIBS}
${DESTDIR}${bindir}/aklog: aklog
${INSTALL} $? $@
-${DESTDIR}${afssrvbindir}/asetkey: asetkey
- ${INSTALL} $? $@
+${DESTDIR}${afssrvbindir}/asetkey: @ASETKEY@
+ if test "x@ASETKEY@" != "x"; then ${INSTALL} $? $@; fi
dest: \
${DEST}/bin/aklog ${DEST}/root.server/usr/afs/bin/asetkey
${DEST}/bin/aklog: aklog
${INSTALL} $? $@
-${DEST}/root.server/usr/afs/bin/asetkey: asetkey
- ${INSTALL} $? $@
+${DEST}/root.server/usr/afs/bin/asetkey: @ASETKEY@
+ if test "x@ASETKEY@" != "x"; then ${INSTALL} $? $@; fi
#
# Misc. targets
"$Id$";
#endif /* lint || SABER */
+#include <afsconfig.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#else /* !WINDOWS */
#include <afs/stds.h>
-#ifndef AFS_OBSD_ENV
+#ifndef HAVE_KERBEROSV_HEIM_ERR_H
#include <afs/com_err.h>
#endif
* Updated for Kerberos 5
*/
+#include <afsconfig.h>
#include <stdio.h>
#include <sys/types.h>
#include <netinet/in.h>
int
main(int argc, char *argv[])
{
-#ifdef AFS_OBSD_ENV
- fprintf(stderr, "asetkey not implemented. Use kadmin instead.\n");
-#else
struct afsconf_dir *tdir;
register long code;
const char *confdir;
"assistance\n", argv[0], argv[1], argv[0]);
exit(1);
}
-#endif
exit(0);
}
LIBS="$LIBS $KRB5LIBS"
AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string krb5_524_convert_creds krb524_convert_creds_kdc])
AC_CHECK_HEADERS([kerberosIV/krb.h])
+ AC_CHECK_HEADERS([kerberosV/heim_err.h])
AC_MSG_CHECKING(for krb5_creds.keyblock existence)
AC_CACHE_VAL(ac_cv_krb5_creds_keyblock_exists,
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
fi
+
+if test "$ac_cv_header_kerberosV_heim_err_h" = "yes"; then
+ ASETKEY=
+else
+ ASETKEY=asetkey
+fi
+
AC_SUBST(BUILD_KRB5)
AC_SUBST(KRB5CFLAGS)
AC_SUBST(KRB5LIBS)
+AC_SUBST(ASETKEY)
+
])dnl