Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a6244a8faa0d33b9c36f060461b07bb6 > files > 47

libhylafax4.1.1-devel-4.1.5-1mdk.ppc.rpm

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>
Building HylaFAX From Source Code
</TITLE>
</HEAD>

<BODY>

<BASEFONT SIZE=4>
<B><FONT SIZE=+3>B</FONT>UILDING <FONT SIZE=+2>H</FONT>YLA<FONT SIZE=+1>FAX</FONT> FROM <FONT SIZE=+2>S</FONT>OURCE <FONT SIZE=+2>C</FONT>ODE</B>
<BASEFONT SIZE=3>

<HR SIZE=4>

This chapter contains the information needed to configure
and build HylaFAX from the source distribution.  The following sections
are available here:
<UL>
<LI><A HREF="#Before">Before You Start</A>
<LI><A HREF="#Building">The Build Procedure</A>
<LI><A HREF="#BuildTrees">Build Trees</A>
<LI><A HREF="#ConfigFiles">Configuration Files</A>
<LI><A HREF="#Packages">Configuring Packages</A>
<LI><A HREF="#HTML">Configuring the HTML Documentation</A>
<LI><A HREF="#Upgrading">Upgrading From FlexFAX</A>
<LI><A HREF="#Sample">A Sample Configuration Session</A>
<LI><A HREF="#Parameters">Configuration Parameters</A>
<LI><A HREF="#Troubleshooting">Troubleshooting Build Problems</A>
</UL>

<P>
There are some build-related issues that are
dependent on the operating system present on the machine.
Some system-specific guidance is sprinkled throughout these
materials; the remainder is in a section on
<A HREF=#Guidance>system-specific guidance</A>
that is found at the end of this chapter.

<P>
<A NAME="Before"><HR WIDTH=65% ALIGN=right><H2>Before You Start</H2></A>

Before you build the software you <STRONG>may
need to obtain certain other
software distributions</STRONG>.  All the software packages described here
are available by public FTP from a variety of Internet hosts;
consult the
<A HREF="http://www.lerc.nasa.gov/archieplex/">archie</A>
resource location service to find copies
close to your system.


<A NAME="Before.TIFF"><H4>TIFF</H4></A>

HylaFAX requires version 3.4 or later of the freely available
TIFF software distribution.
The master FTP site for this distribution is
<A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp://ftp.sgi.com/graphics/tiff</A>.
Note that the TIFF distribution must be installed before building
HylaFAX from source code or HylaFAX must be specially configured
to search for TIFF include files and libraries in non-standard locations.


<A NAME="Before.gcc"><H4>gcc</H4></A>

You need a contemporary C++ compiler to build this system.
<EM>gcc version 2.6.3 is the current recommended version to use;
though later versions are also known to work.</EM>
Versions of gcc prior to 2.6.1 will not work.
When installing gcc beware of the make install step.  On some systems and/or
with some versions of gcc, the fax software may not compile properly if
the include files are wrong (function prototypes that would normally
cause type casts to be done may be missing).

<A NAME="Before.libg++"><H4>C++ runtime libraries</H4></A>

HylaFAX requires only minimal C++ runtime support; basic dynamic
memory allocation facilities and support for creating global static
objects;
it does not use any of the newer C++ runtime facilities such as
exception handling.
Most C++ compiler packages include everything that you need in the
way of a runtime library. 
When using GNU gcc you may also need the libg++ distribution
which is packaged separately from gcc. 
On some systems where gcc is used these facilities can be satisfied
without linking against <TT>-lg++</TT> or <TT>-liberty</TT>,
but on others one or both of these libraries are needed
for certain library routines that are normally found in the
C runtime library.
The configuration procedure will abort if libg++
is needed but is not present on the build system.
If libg++ is required you should use the version that is
appropriate for the compiler.
<EM>When using gcc version 2.6.3, libg++2.6.2 is the
recommended version to use.</EM>

<A NAME="Before.gs"><H4>ghostscript</H4></A>

If you are not on a Silicon Graphics machine (and maybe even if you are),
then you will need the
Ghostscript PostScript interpreter software to build a PostScript
imaging engine to be used by the facsimile server.
(This imaging engine is frequently referred to as a
Raster Image Processor or RIP.)
Ghostscript comes in three flavors, two of which are
important to us: GNU PostScript,
a version governed by the GNU Public License (GPL),
and
<A HREF=http://www.cs.wisc.edu/~ghost/>Aladdin Ghostscript</A>,
a version covered by the Aladdin Free Public License.
Both versions are copyrighted work and are not shareware or
in the public domain.
Aladdin Ghostscript is free for use by end users but
does not allow commercial distribution; to do this
you must arrange for a commercial license.
Versions of GNU Ghostscript are distributed approximately
a year following the corresponding Aladdin Ghostscript version.
For more information on these and other issues consult the 
information located at <A HREF=http://www.cs.wisc.edu/~ghost/ghostscript/>http://www.cs.wisc.edu/~ghost/ghostscript/</A>.

<P>
Ghostscript Version 2.6.1 and later are known to work. 
<EM>If you use version 2.6.1 however, be certain to apply patches 1-4.</EM>
If you do not apply the patches you will encounter a bug in the clipping
code that is triggered by the default cover page distributed with this
software.
Also beware that if you use a version of Ghostscript
prior to 3.12 (inclusive) that
there is a tiffg32d driver that writes incorrect 2D-encoded facsimile
data; either do not configure this driver for use or disable its
use by setting <B>Use2D</B> in the HylaFAX scheduler configuration
file so it does not try to generate 2D-encoded facsimile data for
outbound jobs.

<A NAME="Before.gmake"><H4>gmake</H4></A>

The make files are extensive and work untouched with the system make
under many systems.  If your make does not understand them, then you
should be able to use the GNU make (gmake) instead.  If you decide to
use gmake, be sure to get version 3.63 or newer; otherwise you may
encounter problems (especially with the rules that automatically generate
source code dependency information).

<A NAME="Before.gawk"><H4>gawk</H4></A>

Several of the shell scripts included in this software make use of
awk.  These uses are reasonably simple, but will not work if your
awk is old enough that it does not support functions or the <TT>-v</TT>
command line option for setting variable values before the <TT>BEGIN</TT>
action is executed.
If you encounter problems using the standard awk on your system,
try the GNU awk: gawk.

<P>
<TABLE BORDER=0>
<TR>
<TD><IMG SRC=icons/warning_icon.gif HSPACE=8 ALT="NOTE:"></TD>
<TD><EM>When using gawk be sure to use version 2.15 or later;
HylaFAX is unable to detect versions of gawk that do not work
correctly.</EM></TD>
</TR>
</TABLE>

<A NAME="Before.sed"><H4>sed</H4></A>

Many of the shell scripts included in this software make use of
sed.  Certain systems are known to have versions of sed that do not
handle the shell scripts.
If you encounter problems, the latest GNU sed should be substituted.

<H4>/bin/test</H4>

The software configuration shell script (configure) and the modem
configuration shell script (faxaddmodem) make heavy use of
the
<A HREF="@CGIPATH@/manpage?test">test</A>
program.  On some systems the <B>/bin/test</B>
program does not support options such as <TT>-c</TT>
(test if a file is a character special
device).  Source for a contemporary, public domain, test program
is available by public FTP from
<A HREF="ftp://ftp.uu.net/">ftp.uu.net</A>.
<P>

<A NAME="Before.ps2fax"><H4>ps2fax binary for IRIX systems</H4></A>

The Display PostScript-based imager for Silicon Graphics
systems is included in the
binary distribution images provided on ftp.sgi.com.
If you choose to work
from the source code on an IRIX system you may want a copy of the
ps2fax program: it is available separately on ftp.sgi.com in the
HylaFAX source distribution area:
<A HREF="ftp://ftp.sgi.com/sgi/fax/source">ftp://ftp.sgi.com/sgi/fax/source</A>.
<EM>Note that this is a COFF executable for IRIX 4.x and 5.x systems
and requires that the IRIX <B>dps_eoe</B> package be installed for proper use.</EM>

<P><HR>

<A NAME="Building"><H2>The Build Procedure</H2></A>

To build the software you need to first run the configure shell script
that is located in the top level of the source directory.
This script probes the target system for necessary tools and functions
and constructs a build environment in which the software may be
compiled.
Once configuration is done, you simply run <TT>make</TT>
 to build the software
and then <TT>make install</TT> to do the installation; for example:

<UL><LISTING>
hyla% <B>cd hylafax-v3.0beta099</B>
hyla% <B>./configure</B>
    <I>...lots of messages...</I>
hyla% <B>make</B>
    <I>...lots of messages...</I>
hyla% <B>su</B>		# NB: installation must be done by the super-user
hyla# <B>make install</B>
</LISTING></UL>

In general, the software is designed such that the following should
be ``<I>make-able</I>'' in each directory:

<UL>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=80%>

<TR>
<TD><U><B>Target</B></U></TD>
<TD><U><B>Purpose</B></U></TD>
</TR>

<TR>
<TD><TT>all</TT></TD>
<TD>build everything that is to be installed (default)</TD>
</TR>

<TR>
<TD><TT>depend</TT></TD>
<TD>build dependency information</TD>
</TR>

<TR>
<TD><TT>install</TT></TD>
<TD>build and install everything normally installed</TD>
</TR>

<TR>
<TD><TT>clean</TT></TD>
<TD>remove .o files and cruft, but not executables</TD>
</TR>

<TR>
<TD><TT>clobber</TT></TD>
<TD>remove everything that can be recreated</TD>
</TR>

<TR>
<TD><TT>distclean</TT></TD>
<TD>remove <EM>absolutely everything</EM> that can be recreated</TD>
</TR>

</TABLE>
</UL>

Note that after running "<TT>make clobber</TT>" or
"<TT>make distclean</TT>" the configure script must
be run again to create the Makefiles and other build-related files.

<A NAME="BuildTrees"><P><HR WIDTH=65% ALIGN=right><H3>Build Trees</H3></A>

There are two schemes for configuring and building the software.
If you intend to build the software for only one target system, you
can configure the software so that it is built in the same directories
as the source code. 

<UL><LISTING>
hyla% <B>cd hylafax-v4.0beta011</B>
hyla% <B>ls</B>
COPYRIGHT      config         dist           faxrm          sendfax
Makefile.in    config.guess   distrules      faxstat        sendpage
README         config.h.in    etc            hfaxd          sgi2fax
README.ultrix  config.site    faxalter       html           util
TODO           config.sub     faxcover       man
VERSION        configure      faxd           port
afm            defs.in        faxmail        rules.in
hyla% <B>./configure</B>
</LISTING></UL>

<P>
Otherwise, you can configure a build tree that 
is parallel to the source tree hierarchy but which contains only
configured files and files created during the build procedure.

<UL><LISTING>
hyla% <B>cd hylafax-v4.0beta011</B>
hyla% <B>mkdir obj obj/mycpu</B>
hyla% <B>cd obj/mycpu</B>
hyla% <B>../../configure</B>
</LISTING></UL>

This second scheme is useful for:

<UL>
<LI>building multiple targets from a single source tree
<LI>building from a read-only source tree (e.g. if you receive
  the distribution on CD-ROM)
</UL>

Beware that if you choose to use the second scheme for configuring
the software you must not use an absolute pathname when you run configure
(i.e. a pathname that begins with ``/'') and the make that you use
to build the software must correctly support the VPATH facility.

<P>
<TABLE>
<TR>
<TD VALIGN=top><IMG SRC="icons/warning_icon.gif" ALT="NOTE: " HSPACE=4></TD>
<TD><B>HP-UX 9.05</B>:
   <EM>The standard make incorrectly processes VPATH; either use gmake
   or configure builds in the source tree.</EM></TD>
</TR>
</TABLE>

<TABLE>
<TR>
<TD VALIGN=top><IMG SRC="icons/warning_icon.gif" ALT="NOTE: " HSPACE=4></TD>
<TD><B>Solaris 2.3</B>:
   <EM>The standard make does VPATH processing incorrectly for files
   passed to the make dependency generator script
    (the last file in the list is not converted to
   a pathname relative to the source directory); this causes lots of
   messages that can be ignored.</EM></TD>
</TR>
</TABLE>

<A NAME="ConfigFiles"><P><HR WIDTH=65% ALIGN=right><H3>Configuration Files</H3></A>

The configuration process is critical to the proper compilation,
installation, and operation of the software.
The configure script runs a series of tests to
decide whether or not the target system
supports required functionality and, if it does not, whether it
can emulate or workaround the missing functions.
This procedure is fairly complicated and, due to the nonstandard
nature of most UNIX systems, prone to error.
The first time that you configure the software for use you should
check the output from the configure script and look for anything
that does not make sense for your system.
A sample configure run is shown below together with an explanation
of the work that is done.

<P>
A second function of the configure script is to set
configuration parameters for the software.
Many of these values are just default settings that
can be changed after configuration through
files that programs read at runtime, but some settings cannot
be changed without rerunning the configure script.
For example, by default the software is configured for installation
in the <B>/usr/local</B> hierarchy; this cannot be changed without
rerunning the configure script.

<P>
The configure script reads two <I>configuration files</I> to
get configuration parameters: a <I>site-wide configuration file</I>
that has settings that are to be applied to all systems at a
particular site, and a <I>target-specific configuration file</I>
that has settings for a specific system.
Site-wide configuration files are named
<B>config.site</B> and are automatically searched for first
in any directory specified on the command line to configure
with the <TT>-site</TT> option, or if that fails, in
the directory in in which the configure script is located.
Target-specific configuration files are named <B>config.local</B>
and are looked for first in the top-level build directory,
or, if that fails, in the directory in which the configure script
is located.

<P>
<TABLE BORDER=0>
<TR>
<TD><IMG SRC=icons/info_icon.gif HSPACE=8 ALT="NOTE:"></TD>
<TD><EM>configure reads any <B>config.site</B> file first, and
then any <B>config.local</B> file.
This permits target-specific definitions to override
site-wide definitions.</EM></TD>
</TR>
</TABLE>

<P>
Configuration files are actually just shell scripts (written
in the Bourne shell syntax) that define well-known
shell variables that are used in the configuration process.
For example, the following file might be used on a BSD/OS system to
configure the software for installation in the <B>/usr/contrib</B>
 area and to make use of the Adobe Font Metric files that are already
distributed as part of the BSD/OS 1.1 distribution:

<UL><LISTING>
#
# Parameters suitable for BSD/OS 1.1
#
DIR_AFM="/usr/contrib/lib/flexfax/afm"	# reuse existing files
DIR_BIN="/usr/contrib/bin"		# directory for client apps
DIR_SBIN="/usr/contrib/bin"		# directory for system apps
DIR_LIBEXEC="/usr/contrib/bin"		# directory for libraries&hidden apps
DIR_LIBDATA="/usr/contrib/lib/hylafax"	# directory for client data
DIR_MAN="/usr/contrib/man"		# directory for manual pages
DIR_SPOOL="/var/spool/hylafax"		# directory for spooling area
DIR_HTML="/usr/contrib/html/hylafax"	# directory for HTML documentation
DIR_CGI="/usr/contrib/html/cgi-bin"	# directory for CGI scripts
</LISTING></UL>

<P>
The complete list of configuration parameters is given in the
sample <B>config.site</B> file provided in the source distribution.
Also, the sections below on
``<A HREF=#Packages>Configuring Packages</A>'' and
``<A HREF=#Parameters>Configuration Parameters</A>''
have information on the most important or obscure parameters.

<P>
Finally, take note that there are two other configuration-related
files that may be useful.
The file named <B>config.cache</B> has all
the configuration parameter settings that were selected the last time 
configure was run.
This file is automatically read in by configure when it starts up
to speed the configuration process.
<B>config.cache</B> may be safely removed at any time.
Cached settings are also automatically ignored if new settings are
set through command line arguments to <B>configure</B> or through
a <B>config.local</B> or <B>config.site</B> file.

<P>
The other file of interest is <B>config.log</B>.
This file contains information and messages related to the various
tests that configure does when constructing a build environment.
If the configuration process fails for some reason or configure
does something unexpected this file should be used to debug
the problem.

<P>
<TABLE BORDER=0>
<TR>
<TD><IMG SRC=icons/warning_icon.gif HSPACE=8 ALT="NOTE:"></TD>
<TD><EM>Beware that the configure script is designed to be 
similar to scripts generated by the GNU autoconf facility but
it is not 100% compatible.  Use the <TT>-help</TT> option to
configure for a list of the available options.</EM></TD>
</TR>
</TABLE>

<A NAME="Packages"><P><HR WIDTH=65% ALIGN=right><H3>Configuring Packages</H3></A>

HylaFAX uses the notion of a <I>package</I> to control
which pieces of software are included in a build.
Some packages are optional and are installed only
as needed, or only if specifically requested at the time
the configure script is run.
Other packages may select one of several incompatible choices
that must be made when the software is built.
Packages can be specified in a
<B>config.site</B> or <B>config.local</B> file, or by using a
<TT>-with-<I>package</I></TT> option when invoking configure;
e.g. <TT>configure -with-AFM</TT> to request the AFM package.
Most packages are automatically configured
according to the characteristics
of the system where HylaFAX is being built; this may not be
appropriate when preparing binary distributions for multiple
systems in which case they can be explicitly enabled or disabled.

<P>
<TABLE BORDER CELLPADDING=3>

<TR>
<TH ALIGN=left>Name</TH>
<TH ALIGN=left>Default</TH>
<TH ALIGN=left>Description</TH>
</TR>

<TR>
<TD VALIGN=top><I>Adobe Font Metrics</I></TD>
<TD VALIGN=top><TT>AFM=auto</TT></TD>
<TD>
This package contains Adobe Font Metric files that
came from the public dvips distribution.
AFM files are required by the
<A HREF="@CGIPATH@/manpage?textfmt">textfmt</A>
and
<A HREF="@CGIPATH@/manpage?faxmail">faxmail</A>
programs for converting ASCII text to PostScript.
The AFM files should reflect the characteristics of the
fonts that are used for imaging PostScript on the fax server.
However if the PostScript RIP used to image text does not
come with AFM files for its fonts, then
this package can be substituted with only minimal
degradation in the formatting of the imaged text.
By default this package is configured for installation only if
font metric files do not appear to be present on the build machine.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>Display PostScript RIP</I></TD>
<TD VALIGN=top><TT>DPS=no</TT></TD>
<TD>
Whether or not to build and install a DPS-based PostScript
imager for IRIX 4.x and 5.x systems from sources present in
the HylaFAX build tree.
This option is intended for people building binary distributions.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>Dynamic Shared Object Support</I></TD>
<TD VALIGN=top><TT>DSO=auto</TT></TD>
<TD>
This package controls whether or not to
configure the building of <I>Dynamic Shared Objects</I> (DSOs) for
utility routines used by both client and server applications,
and for a nucleus of common code used by server applications.
Use of DSOs can significantly reduce the disk space needed for the
HylaFAX software.
If DSOs are not used then the code is statically linked into
each application that requires it.
By default this package is configured only if the build 
system appears to suport DSOs in a way that fits into the normal
build scheme.
If DSO support is <EM>explicitly enabled</EM> and there is no
support for using DSOs in the expected way then DSOs are not used.
Beware that DSOs can only be used when the compiler and runtime
system support the runtime instantiation of global C++ objects that
have constructors; something that few systems support.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>Getty Support</I></TD>
<TD VALIGN=top><TT>GETTY=auto</TT></TD>
<TD>
This package controls whether or not to configure BSD-
or System V-style getty support for handling incoming data
connections.
By default this package is configured according to the
requirements of the target system.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>Ghostscript RIP</I></TD>
<TD VALIGN=top><TT>GS=no</TT></TD>
<TD>
Whether or not to build and install a PostScript imager from
Ghostscript sources present in the HylaFAX build tree.
This option is intended for people building binary distributions.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>Impressario RIP</I></TD>
<TD VALIGN=top><TT>IMP=no</TT></TD>
<TD>
Whether or not to build and install an Impressario 2.1
plug-in DSO from sources present in the HylaFAX build tree.
This option is intended for people building binary distributions.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>HTML Documentation</I></TD>
<TD VALIGN=top><TT>HTML=no</TT></TD>
<TD>
This package contains this HTML documentation about HylaFAX.
By default this package is not configured for installation.
HTML documentation can be viewed directly from the source directory;
otherwise all the documentation can be viewed from the main WWW site
at <A HREF="http://www.hylafax.org/">http://www.hylafax.org/</A>.
This option is intended for people building binary distributions.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>PostScript RIP</I></TD>
<TD VALIGN=top><TT>PS=auto</TT></TD>
<TD>
This package selects which RIP to
use for imaging PostScript on the server.
Possible values are: <TT>gs</TT> for Ghostscript,
<TT>dps</TT> for the Display PostScript-based RIP provided
for IRIX 4.x and 5.x systems, or <TT>imp</TT> for a plug-in
DSO for Impressario 2.1 under IRIX.
By default the DPS support is selected for IRIX systems; otherwise
Ghostscript is used.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>Regular Expression Support</I></TD>
<TD VALIGN=top><TT>REGEX=yes</TT></TD>
<TD>
This package controls whether or not to use the
regular expression package included with the software.
On systems where there is POSIX regular expression
support in the standard system library use of this package
may be disabled.
Note that if this package is disabled the location of the
include files and library containing the regular expression
support must be specified; see the <TT>REGEXINC</TT> and
<TT>LIBREGEX</TT> configuration parameters.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>SGI RGB Image Converter Support</I></TD>
<TD VALIGN=top><TT>SGI2FAX=auto</TT></TD>
<TD>
This package controls whether or not to configure the
sgi2fax program that converts SGI RGB images to TIFF/F (for direct
transmission as facsimile).
By default this package is configured for installation only if the
build system appears to have support for the SGI Image library that
sgi2fax uses to read RGB images.  If this package
is not installed then SGI RGB images must be converted to a form
suitable for transmission using some other mechanism.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>System V Init Support</I></TD>
<TD VALIGN=top><TT>SYSVINIT=auto</TT></TD>
<TD>
This package controls whether or not to configure the
System V-style support for automatically starting the HylaFAX
queuer process from
<A HREF="@CGIPATH@/manpage?init">init</A>.
By default this support is configured for installation only if
the target system appears to use a System V-style init (<TT>auto</TT>);
i.e. the <B>/etc/rc0.d</B> and <B>/etc/rc2.d</B> directories exist.
</TD>
</TR>

<TR>
<TD VALIGN=top><I>UTMP/WTMP Support</I></TD>
<TD VALIGN=top><TT>UTMP=auto</TT></TD>
<TD>
This package controls whether or not system accounting work should
be done using the normal <B>utmp</B> files and data structures or
the extended <B>utmpx</B> facilities.
By default the appropriate support is chosen based on whether
or not the build system has the <B>&lt;utmpx.h&gt;</B> file (<TT>auto</TT>).
Explicit support can also be chosen by setting this parameter to
<TT>utmp</TT> (normal accounting) or <TT>utmpx</TT> (extended accounting).
</TD>
</TR>

<TR>
<TD VALIGN=top><I>zlib Support</I></TD>
<TD VALIGN=top><TT>ZLIB=yes</TT></TD>
<TD>
This package controls whether or not to use the
zlib compression package included with the software.
On systems where the zlib distribution has already been installed
this package may be disabled.
Note however that if this package is disabled the location of the
include files and library for the zlib distribution
must be specified; see the <TT>ZLIBINC</TT> and
<TT>LIBZ</TT> configuration parameters.
</TD>
</TR>

</TABLE>

<A NAME="HTML"><P><HR WIDTH=65% ALIGN=right><H3>Configuring the HTML Documentation</H3></A>

HylaFAX comes with extensive documentation written in HTML, the language
used to author many documents found on the World Wide Web (WWW).
These materials can be viewed at the main WWW site
<A HREF="http://www.hylafax.org/">http://www.hylafax.org/</A>,
they can be installed on a local WWW server, or they can be viewed
directly from the source area.
Viewing the documentation through a WWW server is preferred because
the materials include links to reference manual pages that are accessed
through CGI scripts, and these links will not be available when the
documentation is accessed directly from the source distribution.

<P>
To configure the build environment so that it will
 install the HTML documentation,
you need to request the ``HTML package''
when running the configure script.
This is done by specifying <TT>-with-HTML</TT> as a command-line
option to <B>configure</B> or by setting <TT>HTML=yes</TT>
in a <B>config.site</B> or <B>config.local</B> file.
When the HTML package is setup for installation there are
four other parameters that should be defined according to local
conventions:

<P>
<TABLE BORDER CELLPADDING=3>

<TR>
<TD ALIGN=left><B>Parameter</B></TD>
<TD ALIGN=left><B>Default</B></TD>
<TD ALIGN=left><B>Description</B></TD>
</TR>

</TT></PRE></UL>
<TR>
<TD VALIGN=top><TT>DIR_HTML</TT></TD>
<TD VALIGN=top><B>/var/httpd/hylafax</B></TD>
<TD>The directory where HTML materials should be installed.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_CGI</TT></TD>
<TD VALIGN=top><B>/var/httpd/cgi-bin</B></TD>
<TD>The directory where CGI scripts should be installed.
</TR>

<TR>
<TD VALIGN=top><TT>CGIPATH</TT></TD>
<TD VALIGN=top><B>/cgi-bin</B></TD>
<TD>The pathname to use in HTML documents
   to reference scripts installed in <TT>DIR_CGI</TT>.
</TR>

<TR>
<TD VALIGN=top><TT>HTMLPATH</TT></TD>
<TD VALIGN=top><B>/hylafax</B></TD>
<TD>The pathname to use in HTML documents to
   reference materials installed in <TT>DIR_HTML</TT>.
</TR>

</TABLE>

<P>
(NB: the default values are suitable for the NCSA HTTP server).

<P>
Finally, to complete the installation the HTML documents must be
edited to <I>fix pathnames</I> that are found in the HTML files.
All instances of <TT>@</TT><TT>HTMLPATH@</TT> and <TT>@</TT><TT>CGIPATH@</TT>
must be replaced with the values of <TT>DIR_HTML</TT> and <TT>DIR_CGI</TT>,
respectively.
(This was done automatically
in previous versions of HylaFAX but must now
be done manually.)
A shell script to do this is:

<UL><LISTING>
#! /bin/sh
ROOT=${1-/hylafax}
CGI=${2-/cgi-bin}
PATTERN="@[a-zA-Z][a-zA-Z]*@"

patch()
{
   chmod +w $1
   ed - $1&lt;&lt;EOF
g;@<B>HTMLPATH</B>@;s;;$ROOT;g
g;@<B>CGIPATH@</B>;s;;$CGI;g
w
q
EOF
    chmod -w $1
}

FILES=`grep -l "$PATTERN" *.html */*.html`
test "$FILES" && {
   for i in $FILES
   do
       echo $i; patch $i;
   done
}
</LISTING></UL>

<P>
There are a few other issues to consider when installing the CGI scripts:

<UL>
<LI>The <TT>manpage</TT> script that provides access to the UNIX
   manual pages may require some tailoring if manual pages are installed
   in non-standard locations or if the normal system
   <A HREF="@CGIPATH@/manpage?man">man</A>
   command does not support the expected options.  If you have
   problems consult the script.
<LI>If local support is to be provided, it may be worthwhile to alter
   the electronic mail addresses embedded in several of the CGI scripts.
</UL>

<A NAME="Upgrading"><P><HR WIDTH=65% ALIGN=right><H3>Upgrading From FlexFAX</H3></A>

If you were previously using FlexFAX beware that 
several things have changed in incompatible ways. 
The following is a list of things you should be aware of
when configuring the latest distribution:

<UL>
<LI>The default server operation parameters set in <B>config.h</B>
   have changed;
   for example the default kill time for a fax job is now 3 hours
   instead of 24 hours.  Verify the parameters in <B>config.h</B> are what
   you want.
<LI>Numerous pathnames may have changed.  The source-based
   installation procedure does not remove previously installed
   files unless they are to be overwritten; this can result in
   multiple versions of applications such as faxaddmodem being
   installed.  Verify the parameters used for installation; you may want to
   tailor them to your environment by creating a <B>config.local</B>
   file with local configuration parameters.
<LI>HylaFAX includes an improved <B>install.sh</B> script that is
   used to install files on non-IRIX systems.
   Certain files in the distribution are treated as
   <I>configuration-specific files</I> and are not overwritten
   if they appear to have local modifications.
   Instead the <B>install.sh</B> script will install the new
   file with a <B>.N</B> suffix and print a warning message.
   Be sure to reconcile these conflicts by comparing the old
   and new file contents with a program like 
   <A HREF="@CGIPATH@/manpage?diff">diff</A>; in most cases
   you should incorporate any local modifications into the new
   file and install it for use.
</UL>

<P>
There are other issues with upgrading from FlexFAX; they are
discussed in the chapter that describes
<A HREF="setup.html#FlexFAX">setting up the server</A>.

<A NAME="Sample"><P><HR WIDTH=65% ALIGN=right><H3>A Sample Configuration Session</H3></A>

This section shows a sample configuration session and describes
the work done.  The session on the left  in a <TT>fixed width
font</TT> with user-supplied input in a <TT><B>bold font</B></TT>.
Commenttary is shown on the right in a normal or <I>italic</I> font
or across both columns.
Blank space is present in the session output
where it is needed to fit comments on the page; in
normal operation the output from configure does not include
this white space.

<P>
This session was collected on a 486 machine running BSD/OS 1.1.

<HR>

<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>

<TR>
<TD VALIGN=top><LISTING>
wullbrandt% <B>mkdir fax</B>
wullbrandt% <B>cd fax</B>
wullbrandt% <B>ln -s /hosts/oxford/usr/people/sam/fax src</B>
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
A build tree separate from the source tree is used here.
In fact, in this case the distribution is accessed from
a read-only NFS-mounted filesystem.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
wullbrandt% <B>src/configure</B>

Configuring HylaFAX (tm) (aka FlexFAX) v3.0beta095.

If configure does the wrong thing, check the file config.log for
information that may help you understand what went wrong.

Reading site-wide parameters from src/config.site.
Fee, fie, foe, this smells like a i386-unknown-bsdi1.1 system.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
Note that the version and the
deduced target configuration (<TT>i386-unknown-bsdi1.1</TT>) are printed.
The file <B>config.log</B> should be checked if something goes
wrong during configuration; it has output from the tests that configure does.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Using /usr/local/bin/gcc for a C compiler (set CC to override).
Looks like /usr/local/bin/gcc supports the -g option.
Looks like an ANSI C preprocessor.
... but __ANSI_CPP__ is not automatically defined, will compensate.
Looks like /usr/local/bin/gcc supports the -M option for make dependencies.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
configure checks the normal shell search path for
ANSI C compilers.  A compiler is selected if it properly
compiles a small test program.  A specific compiler may be selected
by setting the <TT>CC</TT> environment variable to the appropriate
pathname, by supplying the parameter on the command line, e.g.
<TT>-with-CC=gcc</TT>, or by setting <TT>CC</TT> in a configuration
file.
</FONT></TD>
</TR>

<TR>
<TD COLSPAN=2><FONT SIZE=2>
<HR>
<IMG SRC="icons/warning_icon.gif" ALIGN=left HSPACE=8>
<EM>Note that an ANSI C compiler is required to build the software.
If a C compiler requires options to enable ANSI C compilation, these
options can be specified with the <TT>ENVOPTS</TT> parameter.</EM>
<BR CLEAR=left>
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Using /usr/local/bin/gcc for a C++ compiler (set CXX to override).
Looks like /usr/local/bin/gcc supports the -g option.
Using " -g" for C++ compiler options.
Looks like an ANSI C++ preprocessor.
... but __ANSI_CPP__ is not automatically defined, will compensate.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
A C++ compiler is selected using a scheme similar to
the one used to find a C compiler.  Likewise there is a <TT>CXX</TT>
parameter that can be set to explicitly select a C++ compiler.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Using /usr/bin/make to configure the software.
Using ".include &lt;file&gt;" syntax for Makefiles.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
The make selected must support include files.  configure can
deduce several different syntaxes for specifying include files.
Note that a large number of configuration parameters can be changed
by editing the top-level <B>defs</B> file that is included by
each Makefile in the distribution.
A <TT>MAKE</TT> parameter can be used to control which make to use.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Using /bin/bash to process command scripts.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
All the HylaFAX shell scripts are written using Bourne shell syntax.
The standard shell on many systems is incapable of processing these
scripts so configure prefers <B>bash</B> to <B>ksh</B> to <B>sh</B>.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Looks like -lutil is needed for wtmp file logging.
Looks like -lm is the library for math functions.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
Various system-specific libraries that may or may not be needed
are checked for.  If your system requires a library that is not
automatically included it can be specified by setting the
<TT>MACHDEPLIBS</TT> parameter.
</FONT></TD>
</TR>

<TR>
<TD COLSPAN=2><FONT SIZE=2>
<HR>
<I>Creating port.h.</I>
The <B>port.h</B> file is included by all the C and C++ code
in the system.  It includes definitions for functions and types
that are missing from system include files, <TT>#defines</TT>
to enable or disable system-specific functionality, and other
odds and ends.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Creating port.h with necessary definitions.
... open FIFO files read-only
... use (sig_t) for signal handler type
... use (sig_t) for sigvec handler type
... use (sig_t) for sigaction handler type
... configure use of mmap for memory-mapped files
... configure use of fchown
... add function prototype for cuserid
... configure use of fchmod
... add function prototype for setutent
... add function prototype for endutent
... add function prototype for pututline
... configure use of &ltlocale.h&gt; (internationalization support)
... configure use of &ltpaths.h&gt;
... configure use of &ltsys/select.h&gt;
... configure use of logwtmp (BSD-style wtmp logging)
... add function prototype for logwtmp
... configure use of logout (BSD-style utmp support)
... add function prototype for logout
Done creating port.h.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
This file can take a long time to generate so configure
creates the file only when it is needed, either because the
file does not exist or because a different target or compiler
is to be used.
Note that running "<TT>make distclean</TT>" in the top-level directory
of the build tree will remove the <B>port.h</B> file (along
with all the other files generated by configure).
</FONT></TD>
</TR>

<TR>
<TD COLSPAN=2><FONT SIZE=2>
<HR>
<I>Selecting emulated library functions.</I>
Certain functions used by HylaFAX are not present on all systems
but can be emulated using other system functionality.
configure checks for the presence of required functions and if they are
missing, will configure emulation code from the <B>port</B> directory
to use instead.  Building HylaFAX on unsupported systems may require
adding to the code to the <B>port</B> directory.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Checking system libraries for functionality to emulate.
... emulate cuserid
Done checking system libraries.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
If a routine must be emulated and configure does not automatically
check for it, the routine name can be specified using the <TT>PORTFUNCS</TT>
parameter.  To add emulation support for a new function <TT>foo</TT>,
create a file <B>port/foo.c</B> that contains the emulation code
and then set <TT>PORTFUNCS=foo</TT> in a configuration file or modify
the configure script to automatically check for the missing function.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Checking for TIFF support.
Using TIFF include files from /usr/local/include
Using pre-built TIFF library -L/usr/local/lib -ltiff
Done checking for TIFF support.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
HylaFAX uses the TIFF library extensively.  By default
the TIFF library and tools are assumed to be instaled
in the default location used by the TIFF distribution.
</FONT></TD>
</TR>

<TR>
<TD COLSPAN=2><FONT SIZE=2>
<HR>
<IMG SRC="icons/warning_icon.gif" ALT="NOTE: " ALIGN=left HSPACE=4>
<EM>If the TIFF library is installed as a DSO
then the test done by configure will fail unless the
DSO is in a well-know location or is explicitly searched for;
e.g. with the <TT>LD_LIBRARY_PATH</TT> environment variable.</EM>
<BR CLEAR=left>
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Checking for Dynamic Shared Object (DSO) support.
Done checking for DSO support.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
If the <TT>DSO</TT> package is enabled (<TT>DSO=auto</TT> or
<TT>DSO=IRIX</TT>), then
configure will verify the system and compiler are capable of
constructing DSO's in the expected way.  Note that
while a system may support DSO's the compiler may not be
capable of generating the required position-independent
code and/or the compiler may not pass the needed options
through to the loader.
</FONT></TD>
</TR>

<TR><TD COLSPAN=2><HR></TD></TR>

<TR>
<TD COLSPAN=2><FONT SIZE=2>
<I>Selecting utility programs.</I>
configure locates various system utility programs that are
used by the software.
Note that absolute pathnames are selected because several scripts
and programs excute with super-user privileges.
</FONT></TD>
</TR>

<TR><TD COLSPAN=2><HR></TD></TR>

<TR>
<TD VALIGN=top><LISTING>
Selecting programs used during installation and operation.
Looks like /usr/bin/awk should be used to process command scripts.
Looks like /usr/sbin/sendmail should be used to deliver mail.
Looks like /usr/bin/mkfifo creates FIFO special files.
Looks like /bin/mv supports the -f option to force a move.
Looks like /bin/ln supports the -s option to create a symbolic link.
Done selecting programs.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
Several things to note:
The awk program selected for use must support functions using
the POSIX-style syntax (i.e. using <TT>function</TT> and not the
older <TT>func</TT> keyword).
configure will not select an awk program that does not support
the syntax used by the awk scripts included in the distribution.
Mail delivery is done using sendmail; a different mailer
cannot be substituted without changing certain scripts
because a number of sendmail-specific command line options are used.
</FONT></TD>
</TR>

<TR>
<TD COLSPAN=2><FONT SIZE=2>
<HR>
<I>Selecting default configuration parameters.</I>
The remainder of the work done by configure involves setting up
configuration parameters that are mainly used during the
<EM>operation</EM> of the fax software.  These parameters can be set
during configuration or, in most cases, they can be set through
runtime configuration files.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Using uid uucp and gid dialer for controlling access to fax stuff.
Using uid bin and gid bin for installing programs.
Using LSB2MSB bit order for your i386 cpu.
Looks like you need BSD getty support.
Looks like /usr/libexec/getty is the program to exec for a data call.
</LISTING></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Looks like /bin/vgetty as the program to exec for a voice call.
Looks like /bin/egetty as the program to exec for an extern call.
Looks like you use binary-style UUCP lock files.
Looks like UUCP lock files go in /var/spool/uucp.
Looks like font metric information goes in /usr/contrib/lib/flexfax/afm.
Looks like the gs imager package should be used.
Looks like /usr/contrib/bin/gs is the PostScript RIP to use.
Looks like manual pages go in /usr/local/man.
Looks like manual pages should be installed with bsd-nroff-gzip-0.gz.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
<EM>The <B>egetty</B> and <B>vgetty</B> programs are not part of HylaFAX;
they are ``hooks'' for developers to integrate
programs that implement voice-oriented capabilities.</EM>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
HylaFAX configuration parameters (part 1 of 2) are:

[ 1] Directory for applications:        /usr/local/bin
[ 2] Directory for lib data files:      /usr/local/lib/fax
[ 3] Directory for lib executables:     /usr/local/lib/fax
[ 4] Directory for system apps:         /usr/local/bin
[ 5] Directory for manual pages:        /usr/local/man
[ 6] Directory for HTML documentation:  /usr/local/doc/fax
[ 7] Directory for spooling:            /var/spool/hylafax
[ 8] Directory for uucp lock files:     /var/spool/uucp
[ 9] Uucp lock file scheme:             binary
[10] PostScript imager package:         gs
[11] PostScript imager program:         /usr/contrib/bin/gs
[12] Manual page installation scheme:   bsd-nroff-gzip-0.gz
[13] Default page size:                 North American Letter
[14] Default vertical res (lpi):        98
Are these ok [yes]? 

HylaFAX configuration parameters (part 2 of 2) are:

[15] Location of getty program:         /usr/libexec/getty
[16] Location of voice getty program:   /bin/vgetty
[17] Location of sendmail program:      /usr/sbin/sendmail
[18] Location of TIFF tools:            /usr/local/bin
[19] Location of SysV init scripts:
[20] Location of SysV start scripts:
[21] Location of SysV stop scripts:
[22] Name of SysV start script:
[23] Name of SysV stop script:
[24] Init script starts faxq:           yes
[25] Init script starts hfaxd           yes
[26] Start old protocol:                no
[27] Start paging protocol:             no

Are these ok [yes]? 
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
At this point you can interactively modify any of the 
displayed parameters.  Hitting a carriage return or typing
<TT>yes</TT> will accept the current parameters.  Typing one
of the numbers displayed along the left hand side causes
configure to prompt for a new value of the specified parameter.
Typing anything else causes configure to prompt for a new
value <EM>for each parameter</EM>.
In general hitting carriage return will accept the current
value and typing anything that is unacceptable will cause a
help message to be displayed.
See below for descriptions of the parameters.
<HR>
</FONT></TD>
</TR>

<TR>
<TD VALIGN=top><LISTING>
Creating defs from src/defs.in
Creating rules from src/rules.in
Creating Makefile from src/Makefile.in
    <I>...stuff deleted...</I>
Setting up make dependency files.
Done.
</LISTING></TD>

<TD VALIGN=top><FONT SIZE=2>
Once parameters are setup configure generates
all the files that depend on these parameters.  Note that certain
files may or may not be created based on the selection of
optional packages and/or the functions supported by target system.
</FONT></TD>
</TR>

</TABLE>

<A NAME="Parameters"><P><HR WIDTH=65% ALIGN=right><H3>Configuration Parameters</H3></A>

This section gives a brief description of the less obvious
configuration parameters.  Consult the distributed <B>config.site</B>
for a <EM>complete</EM> list of parameters.
The list here is sorted alphabetically.

<P>
<TABLE BORDER=0>
<TR>
<TD VALIGN=top><IMG SRC="icons/warning_icon.gif" ALT="NOTE: " HSPACE=4></TD>
<TD><EM>The default setting for most configurations parameters is usually
correct.  Be especially careful about enabling or overriding parameters
that control workarounds for system bugs; certain problems can cause
server processes to go into infinite loops!</EM></TD>
</TR>
</TABLE>

<P>
Note that HylaFAX is composed of <I>client</I> and <I>server</I>
applications.
Client applications are programs that normal users invoke to send
facsimile, query the status of facsimile servers, etc.
Server applications are programs that reside <EM>only on the machine
where the fax modems are present</EM>.


<P>
<TABLE BORDER CELLPADDING=3>

<TR>
<TH ALIGN=left>Parameter</TH>
<TH ALIGN=left>Description</TH>
</TR>

<TR>
<TD VALIGN=top><TT>AROPTS</TT></TD>
<TD>
The options passed to ar when creating an archive.
Note that configure will automatically check to see if ar
supports an <TT>s</TT> to create a symbol table instead of
using ranlib.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_ABORTBUG</TT></TD>
<TD>
On some systems the logic used by the server processes to poll
for messages on a FIFO special file while actively doing work can
cause the process to go into an infinite loop.
Setting this parameter to <TT>yes</TT> causes the server processes
to <STRONG>not</STRONG> poll for messages.
Enabling this workaround means that the faxgetty process will not
recognize messages to abort a facsimile while it is being received.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_BADEXECVEPROTO</TT></TD>
<TD>
On some systems the prototype function declaration for the
<TT>execve</TT> system call is wrong
(it does not list certain parameters as <TT>const</TT>).
Setting this parameter to <TT>yes</TT> causes the software to work
around this problem.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_BADEXECVPROTO</TT></TD>
<TD>
On some systems the prototype function declaration for the
<TT>execv</TT> system call is wrong
(it does not list certain parameters as <TT>const</TT>).
Setting this parameter to <TT>yes</TT> causes the software to work
around this problem.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_BADGETOPTPROTO</TT></TD>
<TD>
On some systems the prototype function declaration for
<TT>getopt</TT> is wrong
(it does not list certain parameters as <TT>const</TT>.
Setting this parameter to <TT>yes</TT> causes the software to work
around this problem.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_BADSELECTPROTO</TT></TD>
<TD>
On some systems the prototype function declaration for
<TT>select</TT> passes sets of file descriptors as <TT>int*</TT>
instead of <TT>fd_set*</TT>.
Setting this parameter to <TT>yes</TT> causes the software to assume
the <TT>int*</TT> form is required.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_FIFOBUG</TT></TD>
<TD>
Whether or not to enable a workaround for a kernel bug that causes
select system calls to return prematurely after a process
closes the ``client side'' of a FIFO special file.
Setting this parameter to <TT>yes</TT> causes server processes
to close and reopen FIFO special files after each received message.
Note that aside from the additional overhead incurred in the
server processes, this problem can
also cause client programs to be temporarily unable to reach
a server process.
To minimize this possibility, the client code tries 
to reach a server process up to 5 times before giving up; this
can introduce noticeable delays in applications such as faxstat.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_NOREOPEN</TT></TD>
<TD>
Whether or not to reopen the tty device that a modem is connected
to after raising and lowering the <TT>DTR</TT> signal (to reset
the modem).
This is done because on some systems lowering <TT>DTR</TT> causes
the device to be placed in an unusable state.
It may be desirable to disable this action however; for example
when a modem is connected to an Ethernet-based terminal server.
Setting this parameter to <TT>yes</TT> causes the modem to be
reopened after reset.
By default this parameter is set according to the target system.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_NOSTDINDUP</TT></TD>
<TD>
On some systems, if the standard output is redirected to be
the same as the standard input, then the stty program will emit
a warning message.
This is necessary for some older systems because it is the only
way to force stty to change parameters on a tty device that is
not the controlling tty.
Setting this parameter to <TT>yes</TT> causes the ondelay program
to not set stdout to stdin.
Enabling this workaround can break the faxaddmodem program; it should
be used only on systems where stty supports the <TT>-f</TT> option
to select a tty device other than the controlling tty.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_OPENFIFO</TT></TD>
<TD>
The mode to use when opening a FIFO special file in a server
process.  Normally this should be <TT>O_RDONLY</TT>, but on some
systems this must be <TT>O_RDWR</TT> to avoid kernel bugs that
cause select system calls to return prematurely after a process
closes the ``client side'' of a FIFO.
By default this parameter is set according to the target system.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_SOCKARGLENTYPE</TT></TD>
<TD>
On some systems the type of call-by-reference parameters that specify
the size of variable-length buffers in socket-related calls is wrong
(the type is something other than <TT>int*</TT>).
This parameter can be set to the C type that should be used for length
parameters; e.g. ``<TT>unsigned long</TT>''; otherwise
<TT>int</TT> is assumed.
Setting this parameter incorrectly should result in compilation errors.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_TIOCMBISBYREF</TT></TD>
<TD>
Whether to pass the argument to the TIOCMBIS ioctl
by value or by reference.  On most systems the value is passed
by reference; consult
<A HREF="@CGIPATH@/manpage?termio">termio</A>
for your system if you are unsure how your system works.
Setting this parameter to <TT>yes</TT> is the default and generates
code for passing the argument by reference.
</TR>

<TR>
<TD VALIGN=top><TT>CONFIG_WINSZHACK</TT></TD>
<TD>
On some systems the <TT>TIOCWINSZ</TT> ioctl is defined, but
its use requires the inclusion of two non-standard files.
Setting this paramter to <TT>yes</TT> causes the inclusion of these
files.
</TR>

<TR>
<TD VALIGN=top><TT>CXXFILE</TT></TD>
<TD>
The options to the C++ compiler required to get the compiler to
process a file with a <B>.c++</B> suffix as C++ source code.
configure automatically sets this parameter to
<TT>"-x c++"</TT> for gcc and to <TT>"-+"</TT> for the IBM xlC 
compiler under AIX.
</TR>

<TR>
<TD VALIGN=top><TT>DEFVRES</TT></TD>
<TD>
The default vertical resolution in lines/inch that clients should use
for submitted facsimile.  Choices are 98 and 196.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_AFM</TT></TD>
<TD>
The directory where client applications should find
Adobe Font Metric (AFM) files.
These files are used by various HylaFAX programs when
converting text to PostScript.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_BIN</TT></TD>
<TD>
The directory where client applications should be installed; by
default this is <B>/usr/local/bin</B>.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_CGI</TT></TD>
<TD>
The directory where CGI scripts used by the HTML-based
HylaFAX documentation should be installed; by default this is
<B>/var/httpd/cgi-bin</B> (usually appropriate for the
NCSA HTTP server).
</TR>

<TR>
<TD VALIGN=top><TT>DIR_HTML</TT></TD>
<TD>
The directory where HTML-based
HylaFAX documentation should be installed; by default this is
<B>/var/httpd/htdocs/hylafax</B> (usually appropriate for the
NCSA HTTP server).
</TR>

<TR>
<TD VALIGN=top><TT>DIR_LIBDATA</TT></TD>
<TD>
The directory to install data files that are required
by client applications; by default this is <B>/usr/local/lib/fax</B>.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_LIBEXEC</TT></TD>
<TD>
The directory to install executable programs that are invoked by 
other applications and not from the command line (e.g. the textfmt
program invoked by sendfax
to convert text to PostScript when submitting a fax job); by default
this is the same as <TT>DIR_SBIN</TT>.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_LOCKS</TT></TD>
<TD>
The directory in which to create UUCP lock files.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_MAN</TT></TD>
<TD>
The top-most directory of the manual area where client/server manual
pages should be installed.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_SBIN</TT></TD>
<TD>
The directory where system applications such as servers should be
installed; by default this is <B>/usr/local/sbin</B>.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_SPOOL</TT></TD>
<TD>
The directory in which the HylaFAX server spooling area should be setup;
by default this is <B>/var/spool/hylafax</B>.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_SYSVINIT</TT></TD>
<TD>
Location of SysV-style init script.
The default is for configure to search for
<B>/etc/rc.d/init.d then /etc/init.d</B>.
On sunos machines configure also searches for <B>$DIR_SBIN</B>.
On hpux machines configure first searches for <B>/sbin/init.d</B>.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_SYSVINITSTART</TT></TD>
<TD>
Location of SysV-style start script
The default is <B>../rc2.d</B>.
<br>On Linux, the default is <B>../rc2.d ../rc3.d ../rc4.d ../rc5.d</B>.
</TR>

<TR>
<TD VALIGN=top><TT>DIR_SYSVINITSTOP</TT></TD>
<TD>
Location of SysV-style stop script
The default is <B>../rc0.d</B>.
<br>On Solaris, the default is <B>../rc0.d ../rc1.d ../rcS.d</B>.
<br>On Linux, the default is <B>../rc0.d ../rc1.d ../rc6.d</B>.
<br>On UnixWare, the default is <B>../rc0.d ../rc1.d</B>.
</TR>

<TR>
<TD VALIGN=top><TT>DSODELAY</TT></TD>
<TD>
When DSO's are built, the option to specify to <TT>CC</TT>
and/or <TT>CXX</TT> to note that a library should be loaded only
as needed.
This option is used to delay the loading of the TIFF library for
applications that may use it infrequently.
</TR>

<TR>
<TD VALIGN=top><TT>DSOOPTS</TT></TD>
<TD>
When DSO's are built, the options to specify to <TT>CC</TT>
and/or <TT>CXX</TT> to create a DSO.
</TR>

<TR>
<TD VALIGN=top><TT>DSOSUF</TT></TD>
<TD>
When DSO's are built, the filename suffix for a DSO.
If this is set to <TT>"a"</TT> then  statically linked archives are used.
</TR>

<TR>
<TD VALIGN=top><TT>ENVOPTS</TT></TD>
<TD>
Options to pass to <TT>CC</TT> and <TT>CXX</TT> to force ANSI C compilation.
</TR>

<TR>
<TD VALIGN=top><TT>FAXGID</TT></TD>
<TD>
The group ID to use for the fax user; by default this is
selected according to the target system.
</TR>

<TR>
<TD VALIGN=top><TT>FAXQ_SERVER</TT></TD>
<TD>
Determines if the init script should start faxq
<br>The default is <B>yes</B>.
</TR>

<TR>
<TD VALIGN=top><TT>FAXUID</TT></TD>
<TD>
The user ID to use for the fax user; by default <TT>uucp</TT>.
</TR>

<TR>
<TD VALIGN=top><TT>FILLORDER</TT></TD>
<TD>
The order of bits in a byte on the server machine;
either LSB2MSB or MSB2LSB.
This is normally selected according to the target system.
</TR>

<TR>
<TD VALIGN=top><TT>GCOPTS</TT></TD>
<TD>
Special options to pass the C compiler.  If this parameter
is set, then configure may append other options to this list.
</TR>

<TR>
<TD VALIGN=top><TT>GCXXOPTS</TT></TD>
<TD>
Special options to pass the C++ compiler.  If this parameter
is set, then configure may append other options to this list.
</TR>

<TR>
<TD VALIGN=top><TT>HFAXD_OLD_PROTOCOL</TT></TD>
<TD>
Determines if the init script should start the old protocol.
<br>The default is <B>no</B>.
</TR>

<TR>
<TD VALIGN=top><TT>HFAXD_SERVER</TT></TD>
<TD>
Determines if the init script should start hfaxd.
<br>The default is <B>yes</B>.
</TR>

<TR>
<TD VALIGN=top><TT>HFAXD_SNPP_SERVER</TT></TD>
<TD>
Determines if the init script should start the paging protocol.
<br>The default is <B>no</B>.
</TR>

<TR>
<TD VALIGN=top><TT>INSTALL</TT></TD>
<TD>
The pathname of the install program to use.  Note that this program
must emulate the command line interface used by the IRIX install program.
</TR>

<TR>
<TD VALIGN=top><TT>LIBMALLOC</TT></TD>
<TD>
Whether or not to use <TT>-lmalloc</TT> in building the software.
By default (<TT>auto</TT>) configure will probe the system to 
see if the library is present; if it is then the software will
be configured to use it when building.
Other possible values are: <TT>yes</TT> and <TT>no</TT>
to enable and disable use, respectively.
On systems that support DSOs it may be important to disable the
use of <TT>-lmalloc</TT> to avoid conflicts with the normal
memory alocation routines present in the standard C library.
</TR>

<TR>
<TD VALIGN=top><TT>LIBPORT</TT></TD>
<TD>
The pathname of the library that holds code to emulate missing
system functionality.
Normally this parameter is set by configure based on whether or
not emulation code is required for the target.
</TR>

<TR>
<TD VALIGN=top><TT>LIBSUN</TT></TD>
<TD>
Whether or not to use <TT>-lsun</TT> in building the software.
By default (<TT>auto</TT>) configure will probe the system to 
see if the library is present; if it is then the software will
be configured to use it when building.
Other possible values are: <TT>yes</TT> and <TT>no</TT>
to enable and disable use, respectively.
</TR>

<TR>
<TD VALIGN=top><TT>LIBREGEX</TT></TD>
<TD>
The command line parameter(s) to use to link the library containing
regular expression support.
This parameter is set by default to reference the software
included in the distribution.
</TR>

<TR>
<TD VALIGN=top><TT>LIBTIFF</TT></TD>
<TD>
The command line parameter(s) to use to link against the TIFF library.
This parameter is set by default to the default installation
location used by the TIFF software distribution.
</TR>

<TR>
<TD VALIGN=top><TT>LIBZ</TT></TD>
<TD>
The command line parameter(s) to use to link against the zlib library.
This parameter is set by default to reference the software
included in the distribution.
</TR>

<TR>
<TD VALIGN=top><TT>LLDOPTS</TT></TD>
<TD>
Extra command line options passed to <TT>CC</TT> and <TT>CXX</TT>
when linking an executable.
This option is usually set only when DSO support is enabled
(to force the executable to search for the HylaFAX-specific DSO's
in non-standard locations in the filesystem.)
<br>On Solaris, it's set to <B>-L/usr/local/lib -R/usr/local/lib</B>
</TR>

<TR>
<TD VALIGN=top><TT>LOCKS</TT></TD>
<TD>
A specification of the default type of UUCP lock files to use.
This parameter is usually one of <TT>ascii</TT>, <TT>binary</TT>, 
<TT>-ascii</TT> or <TT>+ascii</TT>;
consult the
<A HREF="@CGIPATH@/manpage?hylafax-config">config</A>
manual page for a description of the <B>UUCPLockType</B>
configuration parameter.
</TR>

<TR>
<TD VALIGN=top><TT>MACHDEPLIBS</TT></TD>
<TD>
Target-dependent libraries that should be used when linking
applications.
Note that if this parameter is specified configure will append to
the list of libraries.
</TR>

<TR>
<TD VALIGN=top><TT>MAKECXXOVERRIDE</TT></TD>
<TD>
A special parameter used by configure when constructing Makefiles.
This parameter is required when compiling the software with the
SunPRO C++ compiler; it works around limitations in the SunPRO
compilation environment.
</TR>

<TR>
<TD VALIGN=top><TT>MAKEDEPINCLUDE</TT></TD>
<TD>
The keyword used to specify the inclusion of a
make dependency file when constructing Makefiles.
This parameter is set to <TT>MAKEINCLUDE</TT> if make dependendcies
are to be constructed by the software; otherwise it is set to <TT>#</TT>
so that no make dependency rules are included (and used).
</TR>

<TR>
<TD VALIGN=top><TT>MAKEDSOINCLUDE</TT></TD>
<TD>
The keyword used to specify inclusion of a file
containing rules for building DSO's.
This parameter is set to <TT>MAKEINCLUDE</TT> if DSO's are to be built;
otherwise it is set to <TT>#</TT> so that nothing is included.
</TR>

<TR>
<TD VALIGN=top><TT>MAKEINCLUDE</TT>, <TT>MAKELQUOTE</TT>, <TT>MAKERQUOTE</TT></TD>
<TD>
The syntax used to specify an include file for make; e.g.
<TT>@</TT><TT>MAKEINCLUDE@ @</TT><TT>MAKELQUOTE@</TT><I>file</I><TT>@MAKERQUOTE</TT><TT>@</TT>.
These parameters are normally deduced by configure depending on
the capabilities of the make program to use.
</TR>

<TR>
<TD VALIGN=top><TT>MANSCHEME</TT></TD>
<TD>
The scheme to use when preparing and installing manual pages.
Schemes are constructed according to:
<UL>
&lt;<I>organization</I>&gt;-&lt;<I>formatting</I>&gt;-&lt;<I>compression</I>&gt;[-&lt;<I>suffix</I>&gt;]
</UL>
where:
&lt;<I>organization</I>&gt; is either <TT>bsd</TT>
for BSD-style section organization (e.g.  file formats in
section 5) or <TT>sysv</TT> for System V-style
organization (e.g. file formats in section 4).
&lt;<I>formatting</I>&gt; is either <TT>nroff</TT> to force
installation of formatted materials (using nroff) or
<TT>source</TT> to get the nroff source installed.
&lt;<I>compression</I>&gt; is either the name of a program
to compress the manual pages (gzip, compress, pack) or
<TT>cat</TT> for uncompressed data.
&lt;<I>suffix</I>&gt; is either the file suffix to convert
installed pages to (e.g. 0.gz for gzip-compressed pages under BSD)
or <TT>strip</TT> to force the normal ".4f" suffix to be converted to ".4"
(or ".5" if using the BSD organization).  If no -&lt;suffix&gt;
is specified then filenames are not converted when they are installed.
</TR>

<TR>
<TD VALIGN=top><TT>NAME_SYSVINITSTART</TT></TD>
<TD>
The name of SysV-style start script.
<br>The default is <B>S80hylafax</B>.
<br>On Linux, the default is <B>S97hylafax</B>.
<br>On HPUX, the default is <B>S905hylafax</B>.
<br>SCO 3.2v5.x.x defaults to <B>S90hylafax</B>.
</TR>

<TR>
<TD VALIGN=top><TT>NAME_SYSVINITSTOP</TT></TD>
<TD>
The name of SysV-style stop script.
<br>The default is <B>K05hylafax</B>.
<br>On HPUX, the default is <B>K095hylafax</B>.
<br>On Solaris, the default is <B>K20hylafax</B>.
</TR>

<TR>
<TD VALIGN=top><TT>PAGESIZE</TT></TD>
<TD>
The default page size that client applications will use for submitted
facsimile.  Page sizes are specified by name and checked against the
pagesizes database installed in the <TT>DIR_LIBDATA</TT> directory.
See also <A HREF="@CGIPATH@/manpage?pagesizes">pagesizes</A>.
</TR>

<TR>
<TD VALIGN=top><TT>PATH_DPSRIP</TT></TD>
<TD>
The absolute pathname of the Display PostScript-based imager program.
</TR>

<TR>
<TD VALIGN=top><TT>PATH_EGETTY</TT></TD>
<TD>
The absolute pathname of suitable getty program to exec to deduce
the type of an inbound call.
Note that this parameter must be set correctly before the software
is built; there is no mechanism for doing this through a runtime
configuration file.
<EM>This program is not part of HylaFAX; it is provided as a ``hook''
for developers to integrate voice capabilities.</EM>
</TR>

<TR>
<TD VALIGN=top><TT>PATH_GETTY</TT></TD>
<TD>
The absolute pathname of suitable getty program to exec to handle
an inbound data call.
Note that this parameter must be set correctly before the software
is built; there is no mechanism for doing this through a runtime
configuration file.
</TR>

<TR>
<TD VALIGN=top><TT>PATH_GSRIP</TT></TD>
<TD>
The absolute pathname of the Ghostscript-based imager program.
Beware that this must be a version of the
<B>gs</B> program that includes the tiffg3 device driver.
</TR>

<TR>
<TD VALIGN=top><TT>PATH_IMPRIP</TT></TD>
<TD>
The absolute pathname of the Impressario 2.1-based imager program
available for IRIX 6.2 (and beyond) systems.
</TR>

<TR>
<TD VALIGN=top><TT>PATH_SENDMAIL</TT></TD>
<TD>
The absolute pathname of the sendmail program on the server machine;
sendmail is used by HylaFAX to post mail messages for a variety of reasons.
</TR>

<TR>
<TD VALIGN=top><TT>PATH_VGETTY</TT></TD>
<TD>
The absolute pathname of suitable getty program to exec to handle
an inbound voice call.
Note that this parameter must be set correctly before the software
is built; there is no mechanism for doing this through a runtime
configuration file.
<EM>This program is not part of HylaFAX; it is provided as a ``hook''
for developers to integrate voice capabilities.</EM>
</TR>

<TR>
<TD VALIGN=top><TT>PKG_ARCH</TT></TD>
<TD>
SVR4 packaging stuff (make package).
This gets assigned to the ARCH variable in pkginfo file.
The default is for configure to assign the value of $CPU
</TR>

<TR>
<TD VALIGN=top><TT>PKG_EMAIL</TT></TD>
<TD>
SVR4 packaging stuff (make package).
The e-mail address of the maker of the package.
Ie. PKG_EMAIL=someone@somehost.somedomain
This gets assigned to the EMAIL variable in pkginfo file.
</TR>

<TR>
<TD VALIGN=top><TT>PKG_VENDOR</TT></TD>
<TD>
SVR4 packaging stuff (make package).
The name of the maker of the package.
Ie. PKG_VENDOR="Your Name Here"
This gets assigned to the VENDOR variable in pkginfo file.
</TR>

<TR>
<TD VALIGN=top><TT>PORTFUNCS</TT></TD>
<TD>
A list of non-standard functions that should be emulated.
Normally this list is constructed by configure based on checks it does.
If this parameter is set, configure will append to the specified list.
</TR>

<TR>
<TD VALIGN=top><TT>PROTOTYPES</TT></TD>
<TD>
Options that should be passed to the C compiler to force it
to check for function prototype mismatches.
This parameter should not be needed because ANSI C compilers
should do this automatically.
</TR>

<TR>
<TD VALIGN=top><TT>REGEXINC</TT></TD>
<TD>
The pathname of the directory containing include files for the
regular expression package.
By default this parameter is set to reference the package included
with this distribution.
</TR>

<TR>
<TD VALIGN=top><TT>SCRIPT_SH</TT></TD>
<TD>
The absolute pathname of the shell program to use when building
HylaFAX and to use to execute certain command scripts.
This shell must support the Bourne shell command syntax.
Beware that many versions of bash have bugs in them that make them
unsuitable for use.
</TR>

<TR>
<TD VALIGN=top><TT>SETMAKE</TT></TD>
<TD>
If make does not automatically set <TT>$MAKE</TT> to
the name of the make program to invoke for subdirectories, then
configure will create an explicit definition.
If this parameter is set, then it will be used instead.
</TR>

<TR>
<TD VALIGN=top><TT>SHDLIBC</TT></TD>
<TD>
A special library to use in place of the standard <TT>-lc</TT>
implicitly provided by <TT>CC</TT> and/or <TT>CXX</TT>.
</TR>

<TR>
<TD VALIGN=top><TT>SIGHANDLERTYPES</TT></TD>
<TD>
The type signatures to use when checking for the correct
type for a signal handler.
If this parameter is set then configure will check these types
before it checks a builtin list of well-known values.
</TR>

<TR>
<TD VALIGN=top><TT>SYSGID</TT></TD>
<TD>
The group ID to use for installing non-setgid programs; by
default this is chosen according to the target system.
</TR>

<TR>
<TD VALIGN=top><TT>SYSUID</TT></TD>
<TD>
The group ID to use for installing non-setuid programs;
by default <TT>bin</TT> is used.
</TR>

<TR>
<TD VALIGN=top><TT>TIFFBIN</TT></TD>
<TD>
The pathname of the directory where the TIFF software
distribution tools have been installed.
</TR>

<TR>
<TD VALIGN=top><TT>TIFFINC</TT></TD>
<TD>
The pathname of the directory where the TIFF software
include files have been installed.
</TR>

<TR>
<TD VALIGN=top><TT>ZLIBINC</TT></TD>
<TD>
The pathname of the directory containing include files for the
zlib distribution.
By default this parameter is set to reference the package included
with this distribution.
</TR>

</TABLE>

<A NAME="Troubleshooting"><P><HR WIDTH=65% ALIGN=right><H2>Troubleshooting Build Problems</H2></A>

Most compilation problems are because the configure script
did not properly setup the software for building.
If you have problems compiling the software on a <I>supported system</I>
check the output from configure and
the contents of the <B>port.h</B> file generated by configure
to make sure it makes sense.
Another byproduct of the configuration procedure is the
<B>config.log</B> file that is found at the
top of the build tree.
This file contains information about the tests done
by the configure script; it should also be studied to check for problems.

<P>
The most common problem encountered during building, which is frequently
not recognized until later when a program does not work correctly, is
when the system include files are lacking proper ANSI C function prototypes.
In particular beware of compilation warnings about ``<I>passing an object
as an argument to a function</I>'', this usually means that a function
was defined without a function prototype and then a C++ object was
passed through the interface as an argument.
For example, if the C library <TT>strchr</TT> function is declared as

<UL>
<PRE>extern char* strchr();</PRE>
</UL>

instead of the expected

<UL>
<PRE>extern char* strchr(const char*, int);</PRE>
</UL>

then the C++ compiler will not know to do the implicit cast of the first
parameter to a <TT>const char*</TT>; almost certainly causing problems.
Unfortunately many older systems do not have system include files that
include ANSI C function prototype declarations;
if this is true of your system then you are unlikely to get HylaFAX
to build correctly.

<A NAME="Guidance"><P><HR WIDTH=65% ALIGN=right><H2>System-specific Guidance</H2></A>

This section contains some build-related issues that are
dependent on the operating system installed on the build machine.
The information included here is by no means exhaustive; it reflects
feedback from users accumulated over multiple HylaFAX versions
and/or operating system releases.

<A NAME="AIX"><H3>AIX Guidance</H3></A>

To use the IBM xlC C++ compiler
you must have a version that supports the <TT>-+</TT> option so that
filenames with a .c++ extension are processed properly by the compiler.

<P>
Under at least AIX 4.2 some socket-related function declarations
have been changed to use non-standard types.
To workaround compilation problems the <TT>CONFIG_SOCKARGLENTYPE</TT>
configuration parameter should be specified to reflect the appropriate
type of the call-by-reference length
parameter passed to <TT>accept</TT>, <TT>getpeername</TT>,
and <TT>getsockname</TT>.

<A NAME="BSDI"><H3>BSD/OS Guidance</H3></A>

Beware that the standard BSD/OS distributions place many files
and applications in non-standard locations.
This can cause confusion when HylaFAX is installed because the
old applications distributed with BSD/OS may be accidentally run
and do the wrong thing.
Under BSD/OS 2.1 the following <B>config.local</B> file may be
used to configure a build tree that installs over top of the
standard BSD/OS distribution of HylaFAX.

<P>
<UL><LISTING>
DIR_BIN="/usr/contrib/bin"              # client apps
DIR_MAN="/usr/contrib/man"              # manual pages
DIR_AFM="/usr/contrib/lib/hylafax/afm"  # AFM files
DIR_LIBDATA="/usr/contrib/lib/hylafax"  # client data
DIR_LIBEXEC="/usr/contrib/lib/hylafax"  # libs&hidden apps
DIR_SBIN="/usr/contrib/bin"             # system apps
DIR_SPOOL="/var/spool/hylafax"          # spooling area
PATH_GSRIP="/usr/contrib/bin/gs"        # Ghostscript RIP
</LISTING></UL>

Note that you will also need to specify the location of the TIFF
software because the version distributed with BSD/OS 2.1 is too old to use.

<A NAME="Dell"><H3>Dell SVR4 Guidance</H3></A>

On some releases <B>&lt;sys/mkdev.h&gt;</B> includes static functions with
non-ANSI C definitions; these must be manually corrected before
building the software.  (The GNU gcc installation procedure attempts
to correct this file but does not.)

<P>
The <I>ttymon</I> program is executable only by root; this may
cause the configure script to not select it as the getty program that is
started up for inbound data calls.  To work around this problem
override the default selection through the interactive prompts
or by creating a <B>config.local</B> file that explicitly sets the
<B>PATH_GETTY</B> configuration parameter.

<A NAME="FreeBSD"><H3>FreeBSD Guidance</H3></A>

FreeBSD 2.0 does not include the file <B>&lt;osfcn.h&gt;</B>.
If the software does not compile without this file
a copy can be obtained from the GNU
libg++ distribution: ftp://prep.ai.mit.edu/pub/gnu/libg++*.tar.gz,
libg++-2.6.2/libg++/src/osfcn.h.

<A NAME="HP-UX"><H3>HP-UX Guidance</H3></A>

Under HP-UX 9.05
the standard make incorrectly processes VPATH; either use gmake
or configure the software to be built directly in the source tree.

<P>
Some versions of HP-UX define the <TT>select</TT> system call with
parameters that are of type <TT>int*</TT>; if so set
<TT>CONFIG_BADSELECTPROTO=yes</TT> to work around the problem.

<P>
Some versions of HP-UX have the include file <B>&lt;utmpx.h&gt;</B> but do
not support the extended accounting facilities defined by this file.
This confuses the <B>configure</B> script; to work around the problem
set <TT>UTMP=utmp</TT> when configuring the build environment.

<A NAME="Linux"><H3>Linux Guidance</H3></A>

Under various versions of Linux;
when linking with the <TT>-g</TT> option; if the linker complains
about needing <B>libc.so.4</B>, then it is necessary to setup symbolic
links in <B>/usr/lib</B> so that: <B>libg.a</B> -> <B>libc.a</B>
and <B>libg.sa</B> -> <B>libc.sa</B>.

<P>
Some recent versions of Linux come setup so that when C++
programs are compiled the standard C functions <TT>strchr</TT> and
<TT>strrchr</TT> (and possibly others) have multiple definitions
based on the types of their arguments.
This overloading causes compilation problems because HylaFAX assumes the
ANSI C definition which specifies a single definition
for these functions.
To workaround this problem either correct the include file
<B>&lt;string.h&gt;</B> or re-install gcc and/or libg++
(the standard distributions do not cause problems).

<P>
On Caldera eServer 2.3.1 you may need to add the following line
to your <B>config.local</B> file.<br>
LIBTIFF="-ltiff -ljpeg -lz"

<A NAME="IRIX"><H3>IRIX Guidance</H3></A>

Older versions of the SGI C++ compiler do not correctly handle
nested types.
If configure complains that the compiler is unsuitable for use
or if the software does not build correctly verify that you have
an up to date version of the compiler.

<P>
When building the software to use DSOs it may be necessary to
set <TT>LIBMALLOC=no</TT> to avoid conflicts between the memory
allocation routines in the standard C library and those in
<TT>-lmalloc</TT>.

<P>
Under IRIX 5.3 <B>/bin/sh</B> has a bug that causes the faxsetup
script to run correctly but terminate with an error.
It may be preferrable to set <TT>SCRIPT_SH=/bin/ksh</TT>
though it is not necessary.

<A NAME="SCO"><H3>SCO Guidance</H3></A>

<P>
If you use the SCO Skunkware glibs package for the tiff libraries
you will need to add the following to your <B>config.local</B> file.
<br>LIBTIFF="-L/usr/local/lib -ltiff -ljpeg -lz -lm"
<br>
<br>

These notes pertain to <B>SCO 3.2 v5.0.4-v5.0.6</B>
<P>
One of SCO's system include files for the CC compiler
cause compilation to fail;
The solution is to copy <B>/usr/include/utmp.h</B> to
the top level of the HylaFAX build tree.

<P>
These notes pertain to <B>SCO 3.2 v5.0.2</B>
<P>
One of SCO's system include files has incorrect function prototypes
that cause compilation to fail;
The following diff may be applied to the problematic system include file
or one may create a patched copy of the file in a private
<B>sys</B> directory under the top level of the HylaFAX build tree.

<LISTING>
*** /usr/include/sys/syslog.h Thu Dec 26 04:42:27 1996
--- sys/syslog.h Fri Dec 27 17:05:11 1996
***************
*** 198,204 ****
  void closelog __P((void));
  void openlog __P((const char *, int, int));
  int setlogmask __P((int));
! int vsyslog __P((int, char *, va_list ));
  __END_DECLS
  
  #endif /* !INKERNEL */
--- 198,204 ----
  void closelog __P((void));
  void openlog __P((const char *, int, int));
  int setlogmask __P((int));
! int vsyslog __P((int, const char *, va_list ));
  __END_DECLS
  
  #endif /* !INKERNEL */
</LISTING>

<P>
These notes pertain to <B>SCO 3.2 v4.2</B>, they may also be relevant to other
versions.

<P>
With gcc 2.7.2.1 one gcc include file needs to be patched to
include missing function prototypes:

<LISTING>
*** /usr/local/lib/gcc-lib/i486-unknown-sco3.2v4.2/2.7.2.1/include/sys/signal.h	Thu Sep  5 18:26:45 1996
--- /usr/local/lib/gcc-lib/i486-unknown-sco3.2v4.2/2.7.2.1/include/sys/signal.h.old	Thu Sep  5 18:28:56 1996
***************
*** 214,221 ****
  #else
  	int kill(short, int);
  #endif
! 	int (*ssignal(int, int(*)(int)))(int);
! 	void (*sigset(int, SIG_TYP))(int);
  
  	int sigpause(int);	/* These 4 are SVID functions as well */
  	int sighold(int);
--- 214,221 ----
  #else
  	int kill(short, int);
  #endif
! 	int (*ssignal(int, int(*)(int)))();
! 	void (*sigset(int, SIG_TYP))();
  
  	int sigpause(int);	/* These 4 are SVID functions as well */
  	int sighold(int);
</LISTING>

<P>
When running configure disable the use of ranlib by specifying
<TT>-with-RANLIB=true</TT> on the command line or in a <B>config.local</B>
file.

<P>
Some of SCO's system include files have incorrect function prototypes
that cause compilation to fail; other include files are not properly
setup to deal with their being included multiple times.
The following diffs may be applied to the problematic system include files
or one may create patched copies of these files in a private
<B>sys</B> directory under the top level of the HylaFAX build tree.

<LISTING>
*** /usr/include/sys/stat.h	Wed Mar  9 00:00:00 1994
--- sys/stat.h	Thu Sep  5 18:45:25 1996
***************
*** 147,153 ****
  extern int  lstat(const char *, struct stat *);
  extern int  fstat(int, struct stat *);
  extern int  mkdir(const char *, mode_t);
! extern int  mkfifo(char *, mode_t);
  extern mode_t  umask(mode_t);
  #ifdef __cplusplus
  };
--- 147,153 ----
  extern int  lstat(const char *, struct stat *);
  extern int  fstat(int, struct stat *);
  extern int  mkdir(const char *, mode_t);
! extern int  mkfifo(const char *, mode_t);
  extern mode_t  umask(mode_t);
  #ifdef __cplusplus
  };
*** /usr/include/sys/time.h	Fri Mar 27 05:05:45 1992
--- sys/time.h	Thu Sep  5 19:42:08 1996
***************
*** 32,41 ****
--- 32,44 ----
  #ifndef __sys_time_h__
  #define __sys_time_h__
  
+ #ifndef _STRUCT_TIMEVAL_
+ #define _STRUCT_TIMEVAL_
  struct timeval {
  	long            tv_sec;	/* seconds */
  	long            tv_usec;/* and microseconds */
  };
+ #endif /* _STRUCT_TIMEVAL_ */
  
  struct timezone {
  	int             tz_minuteswest;	/* minutes west of Greenwich */
*** /usr/include/sys/select.h	Wed Mar  9 00:00:00 1994
--- sys/select.h	Thu Sep  5 19:41:13 1996
***************
*** 38,47 ****
--- 38,50 ----
  /*
   * Structure used to specify timeout in select(2) system call.
   */
+ #ifndef _STRUCT_TIMEVAL_
+ #define _STRUCT_TIMEVAL_
  struct timeval {
  	long	tv_sec;		/* seconds */
  	long	tv_usec;	/* and microseconds */
  };
+ #endif /* _STRUCT_TIMEVAL_ */
  
  #ifndef _INKERNEL
  #ifdef _NO_PROTOTYPE
</LISTING>

<H3><A NAME="Solaris">Solaris Guidance</A></H3>

Under (at least) Solaris 2.3
the standard make does VPATH processing incorrectly for files
passed to the mkdepend script (the last file in the list is not converted to
a pathname relative to the source directory); this causes lots of
msgs that can be safely ignored.

<A NAME="Ultrix"><H3>Ultrix Guidance</H3></A>

[<CITE>Ed: this information comes from Tom Lislegaard.</CITE>]

<P>
Extensive work is required to get the software built and working.
The following comments apply to at
least Ultrix 4.4.
These notes relate to building and running 
HylaFAX Version 3.0 with gcc-2.6.3 and libg++-2.6.2.

<P>
Two header files cause problems: <B>termios.h</B> and <B>sys/socket.h</B>.

<P>
<B>termios.h</B> defines tcsetattr, tcgetattr, etc in
terms of macros that map to ioctl's; this causes problems with
the configure script.
As the real functions are present in libc,
working around this problem is just a matter of bringing the
include file up to date.
(When compiling with GNU gcc the file to patch is normally
<B>/usr/local/lib/gcc-lib/mips-dec-ultrix4.4/2.6.3/include/sys</B>):

<LISTING>
123,125d122
< #if !defined(_POSIX_SOURCE)
< #define tcsetattr(fildes,action,termios_p) 	\
< 	ioctl(fildes,action,termios_p)
127,133d123
< #define tcgetattr(fildes,termios_p) 	\
< 	ioctl(fildes,TCGETP,termios_p)
< #else
< extern	int tcsetattr();
< extern	int tcgetattr();
< #endif
< 
147,152d136
< #if !defined(_POSIX_SOURCE) 
< #define tcdrain(fildes)		\
< 	ioctl(fildes,TCSBRK,-1)
< #else
< extern	int tcdrain();
< #endif
161,166d144
< #if !defined(_POSIX_SOURCE)
< #define tcflush(fildes,queue)	\
< 	ioctl(fildes,TCFLSH,queue)
< #else
< extern	int tcflush();
< #endif
176,181d153
< #if !defined(_POSIX_SOURCE)
< #define tcflow(fildes,action)	\
< 	ioctl(fildes,TCXONC,action)
< #else 
< extern 	int tcflow();
< #endif
183,189d154
< /*
<  * Get input and output baud rates.
<  */
< #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
< #define OBAUD (CBAUD << 16)
< #define cfgetospeed(termios_p)		\
< 	(((termios_p)->c_cflag & OBAUD) >> 16)
191,198c156,160
< #define cfgetispeed(termios_p)		\
< 	((termios_p)->c_cflag & CBAUD)
< #else
< extern	speed_t cfgetospeed();
< extern	speed_t cfgetispeed();
< extern 	int 	cfsetispeed();
< extern	int 	cfsetospeed();
< #endif
---
> extern int tcsetattr(int, int, const struct termios*);
> extern int tcgetattr(int, struct termios*);
> extern int tcdrain(int);
> extern int tcflush(int, int);
> extern int tcflow(int, int);
199a162
> extern  int tcsendbreak _PARAMS((int, int));
</LISTING>

<P>
<B>/usr/include/sys/socket.h</B>
needs to be protected against multiple inclusion:

<LISTING>
2a3,4
> #ifndef _SOCKET_
> #define       _SOCKET_
237a240
> #endif /* _SOCKET_ */
</LISTING>

<P>
Many of the tools provided with Ultrix are outdated, functionally crippled,
or just buggy.
Affected here are sh, make, expr, and sed.

<P>
configure must be run by ksh; e.g.

<UL><PRE><TT>
% ksh configure
</TT></PRE></UL>

There is no hope for using <B>/bin/sh</B>,
it does not support shell functions.
The good news is that the current <B>/bin/ksh</B>
handles all the scripts as well, so it is not necessary to
install bash; simply use

<UL><PRE><TT>
SCRIPT_SH=/bin/ksh
</TT></PRE></UL>

<P>
A recent version of GNU make must be used (I have used version 3.67).

<P>
A replacement expr program is found in the GNU Shell Utilities
package; it is needed in place of the default system version.
Likewise for sed; I have used GNU Version 2.05.

<P>
The syslogd and printf programs
are not available on Ultrix.
On a host running only client software (no local modem) these may be
ignored.
On a server machine these are required.

<P>
The standard syslog support can not handle the HylaFAX server processes
(or any other modern software for that matter).
It should be replaced with a newer syslogd.
Several alternatives are available, the stuff I have used can be found at
<A HREF=ftp://gatekeeper.dec.com:/pub/DEC/jtkohl-syslog-complete.tar.Z>ftp://gatekeeper.dec.com:/pub/DEC/jtkohl-syslog-complete.tar.Z</A>.

<P>
(A note here: on my system I have done a complete replacement, including
putting new syslog functions in my libc.a. This means that I
have not tried to build with the <B>port/syslog.c</B> support
included with HylaFAX; though it should be equivalent).

<H3><A NAME="UnixWare">UnixWare Guidance</A></H3>

<P>
If you use the SCO Skunkware glibs package for the tiff libraries
you will need to add the following to your <B>config.local</B> file.
<br>LIBTIFF="-L/usr/local/lib -ltiff -ljpeg -lz -lm"

<P>
On some versions the configuration parameter
<TT>CONFIG_SOCKARGLENTYPE</TT> needs to be set to <TT>size_t</TT>
to force the argument type for call-by-reference parameters
to the socket-related system calls; this should automatically be
done by <B>configure</B>.

<P>
These notes pertain to <B>UnixWare 2.03</B>
<P>
One system include file needs to be patched to correct
function prototypes: If you dont' want to patch the system include file,
copy it to the hylafax top level directory and patch it there.

<LISTING>
*** /usr/include/netdb.h	Mon Dec 11 05:25:35 1995
--- netdb.h	Wed Oct 30 14:05:35 1996
***************
*** 90,105 ****
  
  #ifdef __STDC__
  
! extern struct hostent	*gethostbyname(char *);
  extern struct hostent	*gethostbyaddr(char *, int, int);
  extern struct hostent	*gethostent(void);
  extern struct netent	*getnetbyname(char *);
  extern struct netent	*getnetbyaddr(long, int);
  extern struct netent	*getnetent(void);
! extern struct servent	*getservbyname(char *, char *);
  extern struct servent	*getservbyport(int, char *);
  extern struct servent	*getservent(void);
! extern struct protoent	*getprotobyname(char *);
  extern struct protoent	*getprotobynumber(int);
  extern struct protoent	*getprotoent(void);
  extern int		endhostent(void);
--- 90,105 ----
  
  #ifdef __STDC__
  
! extern struct hostent	*gethostbyname(const char *);
  extern struct hostent	*gethostbyaddr(char *, int, int);
  extern struct hostent	*gethostent(void);
  extern struct netent	*getnetbyname(char *);
  extern struct netent	*getnetbyaddr(long, int);
  extern struct netent	*getnetent(void);
! extern struct servent	*getservbyname(const char *, const char *);
  extern struct servent	*getservbyport(int, char *);
  extern struct servent	*getservent(void);
! extern struct protoent	*getprotobyname(const char *);
  extern struct protoent	*getprotobynumber(int);
  extern struct protoent	*getprotoent(void);
  extern int		endhostent(void);
</LISTING>

<!--FOOTER-->

<P>
<TABLE BORDER=0 WIDTH=100%>
<TR>
<TD><A HREF="setup.html"><IMG SRC="icons/next.gif">
How to setup a HylaFAX server and prepare it for use</A>.</TD>
<TD><A HREF="toc.html"><IMG SRC="icons/back.gif">
HylaFAX table of contents</A>.</TD>
</TR>
</TABLE>

<HR>

<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>.
Last updated $Date: 2002/10/01 14:05:57 $.
</ADDRESS>

</BODY>
</HTML>