OBJS= krcp.o krlogin.o krsh.o kcmd.o forward.o logutil.o $(SETENVOBJ) \
login.o krshd.o krlogind.o $(LIBOBJS)
+UCB_RLOGIN = @UCB_RLOGIN@
+UCB_RSH = @UCB_RSH@
+UCB_RCP = @UCB_RCP@
+
RSH= -DKRB_RLOGIN=\"$(PROGDIR)/rlogin\"
+BSD= -DUCB_RLOGIN=\"$(UCB_RLOGIN)\" \
+ -DUCB_RSH=\"$(UCB_RSH)\" -DUCB_RCP=\"$(UCB_RCP)\"
-DEFINES= $(RSH) $(RPROGS) \
+DEFINES= $(RSH) $(BSD) $(RPROGS) \
-DLOGIN_PROGRAM=\"$(SERVER_BINDIR)/login.krb5\" -DKPROGDIR=\"$(CLIENT_BINDIR)\"
all:: rsh rcp rlogin krshd krlogind login.krb5
clean::
$(RM) rsh rcp rlogin krshd krlogind login.krb5
-rsh: krsh.o kcmd.o forward.o $(SETENVOBJ) $(DEPKLIB)
- $(CC) $(CFLAGS) -o rsh krsh.o kcmd.o forward.o $(SETENVOBJ) $(KLIB) $(LIBS)
+rsh: krsh.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(DEPKLIB)
+ $(CC) $(CFLAGS) -o rsh krsh.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(KLIB) $(LIBS)
install::
$(INSTALL_PROGRAM) rsh $(DESTDIR)$(CLIENT_BINDIR)/rsh
$(INSTALL_PROGRAM) rcp $(DESTDIR)$(CLIENT_BINDIR)/rcp
$(INSTALL_DATA) rcp.M ${DESTDIR}$(CLIENT_MANDIR)/rcp.1
-rlogin: krlogin.o kcmd.o forward.o $(SETENVOBJ) $(DEPKLIB)
- $(CC) $(CFLAGS) -o rlogin krlogin.o kcmd.o forward.o $(SETENVOBJ) $(KLIB) $(LIBS)
+rlogin: krlogin.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(DEPKLIB)
+ $(CC) $(CFLAGS) -o rlogin krlogin.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(KLIB) $(LIBS)
install::
$(INSTALL_PROGRAM) rlogin $(DESTDIR)$(CLIENT_BINDIR)/rlogin
$(INSTALL_DATA) rlogin.M ${DESTDIR}$(CLIENT_MANDIR)/rlogin.1
-krshd: krshd.o kcmd.o logutil.o forward.o $(SETENVOBJ) $(DEPKLIB)
- $(CC) $(CFLAGS) -o krshd krshd.o kcmd.o logutil.o forward.o $(SETENVOBJ) $(KLIB) $(K4LIB) $(LIBS)
+krshd: krshd.o kcmd.o logutil.o forward.o $(SETENVOBJ) $(LIBOBJS) $(DEPKLIB)
+ $(CC) $(CFLAGS) -o krshd krshd.o kcmd.o logutil.o forward.o $(SETENVOBJ) $(LIBOBJS) $(KLIB) $(K4LIB) $(LIBS)
install::
$(INSTALL_PROGRAM) krshd $(DESTDIR)$(SERVER_BINDIR)/krshd
$(INSTALL_DATA) krshd.M ${DESTDIR}$(SERVER_MANDIR)/krshd.8
-krlogind: krlogind.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(DEPKLIB)
- $(CC) $(CFLAGS) -o krlogind krlogind.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(KLIB) $(K4LIB) $(LIBS)
+krlogind: krlogind.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(DEPKLIB)
+ $(CC) $(CFLAGS) -o krlogind krlogind.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(LIBOBJS) $(KLIB) $(K4LIB) $(LIBS)
install::
$(INSTALL_PROGRAM) krlogind $(DESTDIR)$(SERVER_BINDIR)/krlogind
CONFIG_RULES
AC_SET_BUILDTOP
AC_PROG_INSTALL
+dnl
+dnl Check for where the BSD rlogin, rcp, and rsh programs live.
+dnl
+save_path=$PATH
+PATH=/usr/bsd:/usr/ucb:/bin:/usr/bin
+AC_PATH_PROG(UCB_RLOGIN,rlogin,/usr/ucb/rlogin)
+AC_PATH_PROG(UCB_RSH,rsh,/usr/ucb/rsh)
+AC_PATH_PROG(UCB_RCP,rcp,/usr/ucb/rcp)
+PATH=$save_path
+dnl
AC_CHECK_LIB(socket,main)
AC_CHECK_LIB(nsl,main)
dnl dbm libs for use of an_to_ln