The software is distributed as source code which has to be compiled.
The source code is supplied in the form of a gzipped tar file, which
unpacks to a subdirectory identifying the name and version of the
program.

After unpacking the source code, change directory into it, and type

     ./configure

This is a shell script that automatically determines the system type.
There is a single optional parameter, '--prefix' which indicates the
directory tree where the software should be installed.  For example,

     ./configure --prefix=/opt/free

will install the 'chronyd' daemon into /opt/free/sbin and the 'chronyc'
control program into /opt/free/bin.  The default value for the prefix is
/usr/local.

The configure script assumes you want to use gcc as your compiler.  If
you want to use a different compiler, you can configure this way:

     CC=cc CFLAGS=-O ./configure --prefix=/opt/free

for Bourne-family shells, or

     setenv CC cc
     setenv CFLAGS -O
     ./configure --prefix=/opt/free

for C-family shells.

If the software cannot (yet) be built on your system, an error message
will be shown.  Otherwise, 'Makefile' will be generated.

On Linux, if development files for the libcap library are available,
'chronyd' will be built with support for dropping root privileges.  On
other systems no extra library is needed.  The default user which
'chronyd' should run as can be specified with the '--with-user' option
of the configure script.

If development files for the editline or readline library are available,
'chronyc' will be built with line editing support.  If you don't want
this, specify the -disable-readline flag to configure.  Please refer to
*note line editing support:: for more information.

If a 'timepps.h' header is available (e.g.  from the LinuxPPS project
(http://linuxpps.org/)), 'chronyd' will be built with PPS API reference
clock driver.  If the header is installed in a location that isn't
normally searched by the compiler, you can add it to the searched
locations by setting 'CPPFLAGS' variable to '-I/path/to/timepps'.

Now type

     make

to build the programs.

If you want to build the manual in plain text, HTML and info versions,
type

     make docs

Once the programs have been successfully compiled, they need to be
installed in their target locations.  This step normally needs to be
performed by the superuser, and requires the following command to be
entered.

     make install

This will install the binaries and manpages.

To install the plain text, HTML and info versions of the manual, enter
the command

     make install-docs

If you want chrony to appear in the top level info directory listing,
you need to run the 'install-info' command manually after this step.
'install-info' takes 2 arguments.  The first is the path to the
'chrony.info' file you have just installed.  This will be the argument
you gave to -prefix when you configured ('/usr/local' by default), with
'/share/info/chrony.info' on the end.  The second argument is the
location of the file called 'dir'.  This will typically be
'/usr/share/info/dir'.  So the typical command line would be

     install-info /usr/local/share/info/chrony.info /usr/share/info/dir

Now that the software is successfully installed, the next step is to set
up a configuration file.  The default location of the file is
'/etc/chrony.conf'.  Several examples of configuration with comments are
included in the examples directory.  Suppose you want to use public NTP
servers from the pool.ntp.org project as your time reference.  A minimal
useful configuration file could be

     pool pool.ntp.org iburst
     makestep 1.0 3
     rtcsync

Then, 'chronyd' can be run.  For security reasons, it's recommended to
create an unprivileged user for 'chronyd' and specify it with the '-u'
command-line option or the 'user' directive in the configuration file,
or set the default user with the '--with-user' configure option before
building.
