]> eyrie.org Git - kerberos/kftgt.git/commitdiff
Fix builds outside of the source directory.
authorRuss Allbery <rra@stanford.edu>
Thu, 22 Dec 2005 00:29:26 +0000 (00:29 +0000)
committerRuss Allbery <rra@stanford.edu>
Mon, 15 Mar 2010 06:05:56 +0000 (23:05 -0700)
Fix configure breakage when detecting the Kerberos v4 libraries when
--enable-reduced-depends is not used.

Makefile.in
NEWS
configure.ac
kftgt.c
kftgt.h
kftgtd.c
mkversion [deleted file]

index e139dc8fc470c57fe4f218a7144d9a91b31e1d9a..03f01b3671987b978ddb90d4789fdc47153e65b7 100644 (file)
@@ -35,13 +35,13 @@ COMMON_OBJS = encrypt.o marsh.o $(LIBOBJS)
 SERVER_OBJS    = kftgtd.o $(COMMON_OBJS)
 CLIENT_OBJS    = kftgt.o $(COMMON_OBJS)
 
+MANPAGES       = $(srcdir)/kftgt.1 $(srcdir)/kftgtd.8 $(srcdir)/klogin.1 \
+                 $(srcdir)/krsh.1
+
 .c.o:
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
 
-all: kftgtd kftgt kftgt.1 kftgtd.8 klogin.1 krsh.1
-
-version.h: mkversion Makefile
-       ./mkversion '$(VERSION)'
+all: kftgtd kftgt $(MANPAGES)
 
 kftgtd: $(SERVER_OBJS)
        $(CC) $(SERVER_OBJS) $(LDFLAGS) $(LIBS) -o $@
@@ -49,7 +49,7 @@ kftgtd: $(SERVER_OBJS)
 kftgt: $(CLIENT_OBJS)
        $(CC) $(CLIENT_OBJS) $(LDFLAGS) $(LIBS) -o $@
 
-install: kftgtd kftgt kftgt.1 kftgtd.8 klogin.1 krsh.1
+install: kftgtd kftgt $(MANPAGES)
        $(INSTALL) -d $(DESTDIR)$(bindir)
        $(INSTALL) -d $(DESTDIR)$(sbindir)
        $(INSTALL_PROGRAM) kftgt $(DESTDIR)$(bindir)/kftgt
@@ -91,7 +91,7 @@ $(srcdir)/krsh.1: $(srcdir)/krsh
        pod2man --release=`$(srcdir)/krsh -v | awk '{ print $$2 }'` \
            --center="User commands" $(srcdir)/krsh > $@
 
-dist: $(srcdir)/kftgt.1 $(srcdir)/kftgtd.8 $(srcdir)/klogin.1 $(srcdir)/krsh.1
+dist: $(MANPAGES)
        rm -rf $(TARNAME).gz $(TARNAME).gz.md5 $(TARDIR)
        mkdir $(TARDIR)
        rsync -C --exclude /debian/ -a $(srcdir)/ $(TARDIR)/
@@ -101,8 +101,8 @@ dist: $(srcdir)/kftgt.1 $(srcdir)/kftgtd.8 $(srcdir)/klogin.1 $(srcdir)/krsh.1
        md5sum $(TARNAME).gz > $(TARNAME).gz.md5
 
 # Dependencies.
-encrypt.o: encrypt.c kftgt.h version.h
-kftgt.o: kftgt.c kftgt.h version.h encrypt.h marsh.h
-kftgtd.o: kftgtd.c kftgt.h version.h encrypt.h marsh.h
-marsh.o: marsh.c kftgt.h version.h
+encrypt.o: encrypt.c kftgt.h
+kftgt.o: kftgt.c kftgt.h encrypt.h marsh.h
+kftgtd.o: kftgtd.c kftgt.h encrypt.h marsh.h
+marsh.o: marsh.c kftgt.h
 unsetenv.o: unsetenv.c
diff --git a/NEWS b/NEWS
index 50d8739b80a683264c4e0e6158d8a888f784190e..fa52ca2b977ac24bebfc76cb70b15a7ddc231b6b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,11 @@ kftgt 1.11 (unreleased)
     Disable IP address checking in the Kerberos v4 library when building
     with MIT Kerberos to allow ticket forwarding through NAT.
 
+    Fix builds outside of the source directory.
+
+    Fix configure breakage when detecting the Kerberos v4 libraries when
+    --enable-reduced-depends is not used.
+
 kftgt 1.10 (2005-12-03)
 
     Add the --enable-reduced-depends configure option to try to minimize
index dfca1f7a3f850b1b33072a0cf6d07ed97184a38c..400e88aa6c6d3b3eb8a50e030f5b271aa1e49656 100644 (file)
@@ -26,9 +26,9 @@ AC_ARG_ENABLE([reduced-depends],
          KRBLIBS="-lkrb4 -ldes425"
          reduce_depends=true
      else
-         KRBLIBS="-lkrb5 -ldes425 -lkrb5 -lk5crypto -lcom_err"
+         KRBLIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
      fi],
-    [KRBLIBS="-lkrb5 -ldes425 -lkrb5 -lk5crypto -lcom_err"])
+    [KRBLIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"])
 
 AC_SEARCH_LIBS([gethostbyname], [nsl])
 AC_SEARCH_LIBS([socket], [socket], ,
diff --git a/kftgt.c b/kftgt.c
index c213436f27d4c1d5987cd499b2286ab5e3acc58f..77933c7e6a699801cef9392f295b8b16271e797d 100644 (file)
--- a/kftgt.c
+++ b/kftgt.c
@@ -423,8 +423,7 @@ warn (char *fmt, ...)
 int
 print_version(void)
 {
-  fprintf(stderr,"%s version %d.%d\n", prog, 
-         KFTGT_MAJOR_VERSION, KFTGT_MINOR_VERSION);
+  fprintf(stderr,"%s version %s\n", prog, PACKAGE_VERSION);
   exit(0);
 }
 
diff --git a/kftgt.h b/kftgt.h
index 5d66821d4b208c2e584fc36fc2e53b0b6fc5ba12..e3b24c73cfe3c14c7f230a94347d1627b0003987 100644 (file)
--- a/kftgt.h
+++ b/kftgt.h
@@ -6,8 +6,6 @@
 #ifndef KFTGT_H
 #define KFTGT_H 1
 
-#include "version.h"
-
 /* These are normally defined in des.h when using the Cygnus stuff. */
 #ifndef KRB_INT32
 # ifndef __alpha 
index cebdd8060cf83a6756e2ab35f01f6f47f4157ef1..cc66e4547a9e56bdbe7c849d02efa615dcfee55f 100644 (file)
--- a/kftgtd.c
+++ b/kftgtd.c
@@ -93,8 +93,7 @@ main(argc,argv)
   if (t_val <0) usage();
 
   if (v_flag) {
-    fprintf(stderr,"%s version %d.%d\n", prog, 
-                        KFTGT_MAJOR_VERSION, KFTGT_MINOR_VERSION);
+    fprintf(stderr,"%s version %s\n", prog, PACKAGE_VERSION);
     exit(0);
   }
 
diff --git a/mkversion b/mkversion
deleted file mode 100755 (executable)
index ed559a5..0000000
--- a/mkversion
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh
-# $Id$
-#
-# mkversion -- Generate version.h from the version given on the command line.
-
-version="$1"
-major=`echo $version | sed 's/\..*//'`
-minor=`echo $version | sed 's/.*\.//'`
-
-cat <<EOF > version.h
-/* Automatically generated from VERSION by mkversion. */
-
-#ifndef VERSION_H
-#define VERSION_H 1
-
-#define KFTGT_MAJOR_VERSION $major
-#define KFTGT_MINOR_VERSION $minor
-
-#endif /* VERSION_H */
-EOF