Compiling and installing LyX
============================

Original document by Pascal Andre (andre@via.ecp.fr)

There are three ways to compile and install LyX on your system. You can
either use the configure script, customize your own Imakefile from the
given Imakefile.std, or (if imake is broken for your system) customize the
given Makefile.std.

The first two are the only methods that are really supported. Use the third one
at your own risk.

Note that you need the XForms library. You can get it from

    http://bragg.phys.uwm.edu/xforms
    ftp://bloch.phys.uwm.edu/pub/xforms
    ftp://ftp.cs.ruu.nl/pub/XFORMS

Also note that the current (as of 12/21/95) Xforms library is incompatible with
the most recent libXpm (at least under linux).  It should work with libXpm-4.5
and earlier.


Create the Makefile.
---------------------

LyX configure takes the following specific flags :

  o --with-two-colors=(yes/no) that forces LyX to use two colors pixmaps
    (bitmaps) instead of the full-colored standard ones. Defaults to no.

  o --with-texstydir=DIRECTORY that specifies the path where LyX will install 
    its style sheet (lyx.sty). Defaults to /usr/lib/texmf/tex/latex/sty.

  o --with-lyx-lib=DIRECTORY that gives the directory where all extra LyX 
    files (lyxrc, documentation, templates and layouts definitions) will be 
    installed. Defaults to /usr/X11/lib/lyx.

  o --with-forms-lib=DIRECTORY that specifies the path where LyX will find
    the xforms library archive. Defaults to /usr/lib.

  o --with-forms-inc=DIRECTORY taht gives the place where LyX will find
    xforms headers. Defaults to /usr/include.

  o --with-forms-bug=(yes/no) that tells LyX to try to correct a forms
    header problem with C++.  Use this if the compilation fails due to
    multiple duplicate definitions.

Just run ./configure with the flags you want to create the Makefile.

All these features can be set up in the Imakefile.std. If you plan to use
this file, first copy it to Imakefile and edit the file to suit your system. 

Compiling and installing LyX.
-----------------------------

Once you've got the Makefile created, you just have to type:

  make
  make install

All should be OK ;)


If configure fails for some strange reason:
------------------------------------------

Just use the Imakefile.std. Copy it to Imakefile, modify it to your
own wishes and type:

  xmkmf -a
  make 
  make install
  make install.man


Stripping LyX
-------------

A LyX binary for linux is about 252k.  (That may be true for ELF, with dynamic 
Xforms library, but those with linux a.out systems and static Xforms libraries
see about 470K instead -- DLJ).  If yours is much bigger you probably 
compiled it with debug-informations (-g).  If you don't want to debug LyX just 
enter 
          strip lyx

before installing.


BTW: in the images subdirectory there is also a small icon "lyx.xpm", that 
can be used to display lyx-documents in filemanagers.
