and the current release notes at:
        http://developer.postgresql.org/docs/postgres/release.html
 
-Users compiling from CVS will also need compatible versions of Bison and
-Flex, as discussed in the install documentation.  Bison and Flex are not
+Users compiling from CVS will also need compatible versions of Bison, Flex,
+and Perl, as discussed in the install documentation.  These programs are not
 needed when using a tarball, since the files they are needed to build are
-already present in the tarball.
+already present in the tarball.  (On Windows, however, you need Perl anyway.)
 
 WARNING: \`$1' is missing on your system. You should only need it
 if you changed the file \`$input'; these changes will not take effect.
 You can get $1 from a GNU mirror site.
-***"
+***" >&2
             echo "touch $output"
             touch "$output"
             exit 0
 file \`$output'. You can either get $1 from a GNU mirror site
 or download an official distribution of PostgreSQL, which contains
 pre-packaged $1 output.
-***"
+***" >&2
             exit 1
         fi
         ;;
+
+    perl)
+        # `missing perl'
+        echo "\
+***
+ERROR: Perl is missing on your system. It is needed unless you are building
+from an unmodified official distribution of PostgreSQL.
+***" >&2
+        exit 1
+        ;;
+
+    *)
+        # `missing something-or-other'
+        echo "\
+***
+ERROR: \`$1' is missing on your system.
+***" >&2
+        exit 1
+        ;;
 esac
 
    pull requires reasonably up-to-date versions of <application>bison</>
    and <application>flex</>, which are not needed to build from a distribution
    tarball because the files made with them are pre-built in a tarball.
+   You will need Perl as well.
    Otherwise the tool requirements are the same as building from source.
   </para>
  </sect1>
 
       </indexterm>
 
       GNU <application>Flex</> and <application>Bison</>
-      are needed to build a CVS checkout or if you changed the actual
+      are needed to build from a CVS checkout, or if you changed the actual
       scanner and parser definition files. If you need them, be sure
       to get <application>Flex</> 2.5.4 or later and
       <application>Bison</> 1.875 or later. Other <application>lex</>
       and <application>yacc</> programs cannot be used.
      </para>
     </listitem>
+    <listitem>
+     <para>
+      <indexterm>
+       <primary>perl</primary>
+      </indexterm>
+
+      <application>Perl</> is also needed to build from a CVS checkout,
+      or if you changed the input files for any of the build steps that
+      use Perl scripts.  If building on Windows you will need
+      <application>Perl</> in any case.
+     </para>
+    </listitem>
    </itemizedlist>
   </para>
 
 
 
 # Perl 
 
-# quoted for pathname with spaces
-PERL                   = "@PERL@"
+ifneq (@PERL@,)
+    # quoted to protect pathname with spaces
+    PERL               = "@PERL@"
+else
+    PERL               = $(missing) perl
+endif
 perl_archlibexp                = @perl_archlibexp@
 perl_privlibexp                = @perl_privlibexp@
 perl_useshrplib                = @perl_useshrplib@
 
 kwlookup.c: % : $(top_srcdir)/src/backend/parser/%
        rm -f $@ && $(LN_S) $< .
 
-ifdef PERL
 $(srcdir)/sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml)
        $(PERL) $< $(REFDOCDIR) $@
-else
-$(srcdir)/sql_help.h:
-       @echo "*** Perl is needed to build psql help."
-endif
 
 $(srcdir)/psqlscan.c: psqlscan.l
 ifdef FLEX