- Autodetect perl, patch from David Rankin
   <drankin@bohemians.lexington.ky.us>
diff --git a/ChangeLog b/ChangeLog
index a61a18c..680462f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
  - Applied another NetBSD portability patch from David Rankin 
    <drankin@bohemians.lexington.ky.us>
  - Fix --with-default-path option.
+ - Autodetect perl, patch from David Rankin 
+   <drankin@bohemians.lexington.ky.us>
 
 19991228
  - Replacement for getpagesize() for systems which lack it
diff --git a/Makefile.in b/Makefile.in
index 2f2e31e..72ac0a8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -25,6 +25,7 @@
 AR=@AR@
 RANLIB=@RANLIB@
 INSTALL=@INSTALL@
+PERL=@PERL@
 LDFLAGS=-L. @LDFLAGS@
 
 GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
@@ -89,7 +90,7 @@
 		*.1 *.8 sshd_config ssh_config
 
 manpages:
-	$(FIXPATHS) -Dsysconfdir=${sysconfdir} $(srcdir)/*.1.in $(srcdir)/*.8.in \
+	$(PERL) $(FIXPATHS) -Dsysconfdir=${sysconfdir} $(srcdir)/*.1.in $(srcdir)/*.8.in \
 		$(srcdir)/ssh_config.in $(srcdir)/sshd_config.in
 
 install: all
diff --git a/configure.in b/configure.in
index 6d03bec..ae8afdf 100644
--- a/configure.in
+++ b/configure.in
@@ -9,6 +9,8 @@
 AC_PROG_RANLIB
 AC_PROG_INSTALL
 AC_CHECK_PROG(AR, ar, ar)
+AC_PATH_PROG(PERL, perl)
+AC_SUBST(PERL)
 AC_PATH_PROG(xauth_path, xauth)
 
 dnl Use ip address instead of hostname in $DISPLAY