			  INSTALLING FTNCHEK

To build and install ftnchek, follow the instructions below for your
operating system.


(1) UNIX and UNIX-like systems

   Configure a Makefile for your system with the command:

        $ ./configure

   This uses the file Makefile.in as a template.  If you want to change
   some options, edit the file Makefile.in, not Makefile, and re-run
   configure.

   Next, build ftnchek with the command:

	$ make

   If you wish the ftnpp preprocessor to be built, say

        $ make ftnpp

   NOTE: ftnpp is NOT SUPPORTED.  If it does not work on your system,
   I will NOT fix it!

   To verify correct operation of the newly created ftnchek, you can
   now issue the command

	$ make check

   This will run ftnchek on the suite of test programs in the
   subdirectory ``test'' and report on any discrepancies.

   Once ftnchek is working properly, issue the command (requiring
   super-user authority):

	$ make install

   This will install the executable in /usr/local/bin and the manpage in
   /usr/local/man by default.  (The dcl2inc program will also be
   installed as well as ftnpp if it was built.)

   If you see a warning about "catman": on IRIX the manpage gets
   specialized treatment, since man pages are pre-formatted and packed,
   and nroff is not bundled with the OS.  If nroff is available, then it
   is used to create the formatted man pages, and all is well.
   Otherwise, the user should obtain the ftnchek "catman" file,
   distributed separately.  (It is available from ftp.dsm.fordham.edu in
   the pub/ftnchek directory).  Unpack this in the source directory and
   proceed with "make install".  If the "catman" files are not found, a
   notice will be issued, and the flat ascii ("doc") versions will be
   used.


(2a) VMS on DEC ALPHA

   Give the command

        $ @BUILD

   After the program has been compiled, you must turn it into a
   so-called "DCL foreign command" so that it can be invoked by
   giving its name on a command line, instead of using the RUN
   command.  Do this with the command

        $ FTNCHEK :== $disk:[directory]FTNCHEK

   where you substitute the disk and directory names where the file
   FTNCHEK.EXE resides.  This command must be executed once per
   login.  It is suggested you put this command into your LOGIN.COM
   file.

   The BUILD procedure also creates a VMS help library named
   FTNCHEK.HLB.  To access it from the VMS HELP command, you must
   give the command

        $ DEFINE HLP$LIBRARY disk:[directory]FTNCHEK.HLB"

   Again, this command must be executed once per login to have effect.

   Note that BUILD.COM uses the files CC.COM and LINK.COM
   which are conditional compilation and link scripts that allow
   re-making ftnchek by compiling only what has changed.

   Also note that SHELL_MUNG.C, which provides expansion of
   command-line wildcards, is no longer bundled with the ftnchek
   distribution, but is obtainable separately at the ftnchek home page
   and elsewhere.  You should obtain this file before building
   ftnchek.  The build will succeed without it, but the resulting
   executable will not expand wildcards.

   To verify correct operation of the newly created ftnchek, you can
   now issue the command

	$ @CHECK

   This will run ftnchek on the suite of test programs in the
   subdirectory [.TEST] and report on any discrepancies.  Note: thanks
   to Bob Wells for yeoman service in providing CHECK.COM.


(2b) VMS on DEC VAX

   Same as (2a) except use BUILD-VAX.COM instead.  It has been found
   that some compilers require the /VAXC qualifier in order to compile
   this code properly.  If this is the case with your compiler, edit
   CC.COM, changing cc to cc/vaxc at line 44.



(3a) MS-DOS/Win with Borland BCC32

   Rename the file "makefile.bcc32" to "makefile" and then give the
   command:

        C> MAKE

(3b) MS-DOS/Win with Microsoft Visual C/C++

   Use the project and workspace files ftnchek2_12.dsp ftnchek2_12.dsw

(3c) Other MS-DOS/Win

   See the instructions at (6) below.  You should define the macro
   MSDOS manually, if your compiler does not automatically define one
   of the macros _WIN32, _MSDOS or __TURBOC__.  (If it does define one
   of these, then MSDOS is defined automatically.)  The macro MSDOS is
   needed in order to configure ftnchek's behavior to suit the
   DOS/Windows environment.

   You can verify correct operation of the MS-DOS/Win version of
   ftnchek as follows.  Go to the TEST subdirectory and unzip the
   file CHECKBAT.ZIP.  Execute the CHECK.BAT batch file.  Note: this
   batch file requires a program named CMP.EXE on your path.  (This
   program compares the contents of two files.)  If your system does
   not have such a program, compile the file cmp.c contained in
   CHECKBAT.ZIP.

   Note: Thanks to Gunnar Duus for providing  makefile.bcc32 and the
   MSVC project files, as well as CHECK.BAT and its companion scripts.


(4) Macintosh Programmer's Workshop (MPW)

   Rename the file "makefile.mpw" to "makefile".  Edit the file,
   changing character '+' to CHAR(182), option-d on the Macintosh
   keyboard; and the character '/' to CHAR(196), option-f.  Then
   use the "make" command to create Ftnchek.

   Note for Version 2.12: makefile.mpw has not been updated to reflect
   the new divisions of the source code.   I invite anyone who is
   interested to fix it up (consult makefile.generic for objs and
   dependency lists) and contribute it to the distribution.


(5) OS/2 with gcc

   If you have installed the GNU utility "sed", you can customize the
   makefile for your system.  Give the command:

         configure_os2

   This will create makefile.os2 with appropriate values for your
   system.  You should rename it "makefile" and then run make.
   Configure_os2 also builds an OS/2 version of the dcl2inc script
   that is configured for your system.  Many thanks to Jan Ftacnik,
   Stefan A. Deutscher and Christian Bartels for producing and
   improving this configuration script.

   Note for Version 2.12: configure_os2.cmd has not been updated to
   reflect some new substitutions.  Probably this will not matter much
   since the new substitutions mostly pertain to config.h and other
   files that are not created by configure_os2. I invite anyone who is
   interested to fix it up (consult configure.in) and contribute it to
   the distribution.  (Does anyone still use OS/2?)


(6a) Other systems having "make" utility

   Rename the file "makefile.generic" to "makefile", edit it
   appropriately for your system, and run make.

(6b) Other systems not having "make" utility

   It should suffice simply to compile all the ".c" files and link
   them.  The only differences among the versions for different
   operating systems have to do with:

         -- the use of "/" vs. "-" as a command-line option prefix.
            Define the macro name OPTION_PREFIX_SLASH if "/" is to be
            accepted as an alternate to "-".  (No particular value
            need be assigned to this macro, just define it.)  The "-"
            prefix is always accepted.  NOTE: do not define this macro
            if your system uses the "/" character as a separator in
            path names.  Doing so will introduce ambiguities in the
            command-line arguments.
         -- the default filename extension ".for" vs. ".f".  Define
            the macro name DEF_SRC_EXTENSION to the string value
            corresponding to Fortran source files on your system.
         -- the default home directory in which to search for
            .ftnchekrc or ftnchek.ini.  Define SPECIAL_HOMEDIR to the
            string value appropriate for your system.
         -- the default systemwide directory in which to search for
            include-files.  Define the macro DEFAULT_INCLUDE_DIR to
            the string value of this directory.
   These macros are all defined automatically to appropriate values
   for Unix, VMS, and MSDOS systems.  You only need to define them by
   hand if compiling ftnchek on other systems.

   If your compiler does not accept modern C syntax for function
   prototypes, define the macro NO_PROTOTYPES.


Once ftnchek is working, you can test it by giving the command:

        $ ftnchek -list -sym average

Then compare the output against the file ``average.out''.  A more
thorough checkout is possible on Unix systems by giving the ``make
check'' command described above.


			   Associated files

There are several auxiliary files included in the distribution.  Most
of them are automatically installed by ``make install'' on a Unix
system.  On non-Unix systems, you may not be able to use them.  If you
can use them, you will need to install them in an appropriate place
manually.

dcl2inc is a script to convert the .dcl files produced by ftnchek with
    the -makedcls option, into files suitable for inclusion in your
    source code.  This script requires a modern version of awk.  The
    dcl2inc script itself is a Bourne shell script that simply invokes
    awk with suitable arguments.  On Unix systems, the dcl2inc script
    is generated from dcl2inc.in by the configure script, which
    substitutes apropriate values for the library where dcl2inc.awk is
    installed and for the local version of awk (e.g. gawk or nawk).
    If you wish to use this script on a non-Unix system, you can make
    the substitutions by hand, since they are few and obvious
    (assuming you have a suitable awk available).

ftnchek.el is an Emacs lisp package that provides an ftnchek mode.
    Using ``make install'' installs this in the system site-lisp
    directory if there is one.  Read the comments at the head of the
    file for details.  Each user should add a line like:
      (add-hook 'fortran-mode-hook (require 'ftnchek-mode "ftnchek"))
    to his or her personal .emacs file.  The author has said that this
    package is still undergoing improvements, so the version included
    in this distribution may well be out of date by now.  The most
    recent version of ftnchek.el can be found at the URL given in that
    file.

ftnchek.1 and dcl2inc.1 are Unix man pages.  They are automatically
    installed in the man directory by ``make install.''  They are not
    much use on non-Unix systems.

ftnchek.hlp is a VMS help document.  It is automatically converted to
    a help library by BUILD.COM.  That script gives instructions for
    making the help library available to VMS HELP.  You may wish to
    install this in a suitable system-wide help directory.

html is a directory containing a hypertext version of the
    documentation.  This is NOT installed automatically by ``make
    install.''  If you wish to make this documentation available on
    your local system, install these files someplace where a browser
    can access them.  A typical way to do this would be to create a
    directory named "ftnchek" in a suitable place in the web server
    directory, then copy all the files from the html directory to that
    directory.  Be aware that two files in this directory, namely
    index.html and sect1.html, are symbolic links to sect0.html.  On
    operating systems that do not support symbolic links, you will
    need to copy the file sect0.html to these file names.  Also, the
    html documents contain some URL's to other man pages.  If you have
    a cgi program that converts man pages to html on the fly, you may
    want to edit these links to invoke that cgi program correctly.  As
    distributed, the html files contain URL's of the form:
    "http://localhost/cgi-bin/man2html?prog&n" for prog(n).


				Notes

The suffix .prj for project files is also used by the program revision
control system prcs (see http://scam.xcf.berkeley.edu/~jmacd/prcs.html) so
that conflicts might occur.  Use the macro DEF_PROJ_EXTENSION to change the
default suffix.  For Unix systems, you can specify the alternative
extension on the make command line.  For example, to change the extension
to .foo you would say:
    make OPTIONS='-DDEF_PROJ_EXTENSION=\".foo\"'
Alternatively, edit the Makefile to set the OPTIONS variable as above,
or edit the file ftnchek.h to change the definition of DEF_PROJ_EXTENSION
to the desired string.

More details about customizing ftnchek are given in the README file.
