
========================================================================

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

   Copyright (c) : Lionel Fournigault, Bruno Pages and Dominique Leveque.

========================================================================

FIRST:
-----
	-Read this file (down to the end).
	-Try to build and install Xcoral.

	DOC:
	-Send Doc/xcoral-3.14.ps to your favorite printer
	  and also Doc/xcoral-card.ps.
        -Try the HTML Xcoral User's Manual with your favorite Net browser.
        (i.e. cd Doc/HTML; Netscape xcoral.html). These HTML documents have
        been produced from xcoral-3.1.tex with the translator LateX2html.
	(thanks to Nikos Drakos).

Contents:
---------
	-Some information about building Xcoral.
	-How to built Xcoral for each of the following systems:
	 
		Solaris 1.X, 2.X
		Linux/FresBSD/NetBSD
		HP-UX,
		IRIX,
		AIX,
		Digital Unix,

Preamble:
---------
	Xcoral has been developped on SunOS 4.1.x (BSD) with
	MIT X11 R[4|5] Window System and GNU cc compiler.
	Now we compile and test it on Solaris-2.5.1/CDE.

	We have compiled and tested xcoral (a little) on other systems.

	To build Xcoral, you need only the X11 library
	(libX11.a). It's better if you have the MIT X Window System 
	distribution rather than a proprietary X Window System.

	You can use your native cc compiler (if it exists...), but it's 
	better to use gcc (GNU compiler).
	
Warning:
--------
	BR_Parser.c BR_Parser.h and BR_Lexer.c are built with flex
	and bison (see Imakefile).
	These files are present in this distribution and are not
	produced by make.

Build:
------	
	There are two ways to build and install xcoral :

	. One uses the "xmkmf" command and needs the write
	  permission in the X11 binaries installation tree.

	. The other one uses special makefiles (Makefile_XXX)
	  and let you install xcoral where you want.
	
	A/ Set XC_LIBDIR (default /usr/local/lib/xcoral)
	in Imakefile if the command xmkmf is available,
	else in one of the other Makefile corresponding
	to your system or in Makefile_std. 
	XC_LIBDIR defines the directory which contains
	SmacLib files and manual (man.dtex).
	Set also X_BINDIR in Imakefile or Makefiles*
	X_BINDIR defines the directory where xcoral binary
	will be copied.

	B/ In Smac directory, the word.h file must be the one
	of your system (char,int and pointer alignment).
	On SunOS4.1.x, HP-UX, IRIX, ULTRIX43, LINUX, FreeBSD,
	IRIX, AIX, SOLARIS2 and OSF1, the file word.h is 
	generated correctly by make.

	In the other cases, try to build word.h (See target
	word.h in Smac/Imakefile).

	C/ If you don't run MIT X11 R[4|5|6], edit xc_conf.h
	to set fontnames and colornames for your X Window System.
	See also X_INCLUDE and X_LIBPATH.

	D/ At the top level type :

		xmkmf
		make All
		make install

		or make -f Makefile_SYSNAME
		and make install -f Makefile_SYSNAME
		
		The 'make install' command also copies SmacLib/* 
		in XC_LIBDIR directory.
		
		IMPORTANT : copy SmacLib/xcoralrc.lf in your
		homedir as .xcoralrc
		(if you have already a .xcoralrc, save it and
		use the new .xcoralrc)

		Install: check the install directories permissions.
		or 'make install' as root or change XC_LIBDIR and
		X_BINDIR in Makefiles*.		

	E/ SEE ALSO :

		SmacLib directory presents a clever use of
		Smac user functions (color, asynchronous make
		and RCS interface, mouse and file header functions,
		comments generation, etc)

	D/ Keyboard and 8 bits keys.

		Use LANG environment variable (fr, de etc)
		

Build on SunOS.4.1.X and Solaris-2.[56]
---------------------------------
	All Sun Work Station, SunOS 4.1.x or Solaris-2.x,
		MIT X11 R[4|5|6], OpenWindows2/3 or CDE.
	
	Compiler : GCC, Standard K&R cc, acc.

	A/ SunOS 4.1.x and MIT X11 R[4|5]

		Set XC_LIBDIR in Imakefile

		xmkmf
		make All
		make install

	B/ SunOS 4.1.x and OpenWindows.
   
		Set XC_LIBDIR and X_BINDIR in Makefile_SUN_OS
		if necessary.

		make -f Makefile_SUN_OS
		make -f Makefile_SUN_OS install

	C/ Solaris 2.5/2.6 and CDE

		setenv OPENWINHOME /usr/openwin
		xmkmf
		make All
		make install

		or

		make -f Makefile_SOLARIS
		make -f Makefile_SOLARIS install
		
Build on LINUX/FreeBSD/NetBSD
-----------------------------

	xmkmf
	make All
	make install

	If you have some problems with the link, try this:
	gcc -o xcoral *.o Smac/*.o -L/usr/X11R6/lib -lX11

	WARNING
		Xcoral may crash if it runs with an old low
		resolution display (640x480).
		With the old filesystem (filename len <= 14),
		you must rename some Smac files (.sc).

Build on HPUX
-------------
 	HP 9000/712 B.10.20 A and B.10.10 A.
	HP cc Compiler (brrr...)

	Edit Makefile_HPUX to set X_INCLUDE, X_LIBPATH, XC_LIBDIR
	and X_BINDIR.

	make -f Makefile_HPUX
	make -f Makefile_HPUX install

Build on IRIX
-------------
	Indigo2 IRIX64 Release 6.2
	SGI cc Compiler

	Edit Makefile_IRIX to set X_INCLUDE, X_LIBPATH, XC_LIBDIR
	and X_BINDIR.

	make -f Makefile_IRIX
	make -f Makefile_IRIX install

	Warning: install uses bsdinst.sh from (/usr/bin/X11).
	check your path.

Build on AIX 
------------
	RS-6000 AIX 3.2.
	IBM cc Compiler.

	Edit Makefile_AIX to set X_INCLUDE, X_LIBPATH, XC_LIBDIR
	and X_BINDIR.

	make -f Makefile_AIX
	make -f Makefile_AIX install

Build on DIGITAL UNIX
---------------------
	Alpha OSF1 V4.0 386 alpha
	Digital cc compiler.

	Edit Makefile_OSF1 to set X_INCLUDE, X_LIBPATH, XC_LIBDIR
	and X_BINDIR.

	make -f Makefile_OSF1
	make -f Makefile_OSF1 install 

	Warning: install doesn't work like you think.
	Good luck.	


You can send bugs or suggestions to xcoral@aar.alcatel-alsthom.fr

	[Lionel, Bruno, Dominique]
