                                                         -*- Indented-Text -*-
This is CNCL $Revision: 0.22 $ of $Date: 1994/07/22 09:22:15 $.


  |_|_|_  |_|_    |_    |_|_|_  |_		     C O M M U N I C A T I O N
|_        |_  |_  |_  |_        |_		               N E T W O R K S
|_        |_  |_  |_  |_        |_		                     C L A S S
  |_|_|_  |_    |_|_    |_|_|_  |_|_|_|_	                 L I B R A R Y


Copyright (C) 1992/1994   Communication Networks
                          Aachen University of Technology
                          D-52056 Aachen
                          Germany
                          Email: mj@dfv.rwth-aachen.de (Martin Junius)

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.  This library 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 Library General Public
License for more details.  You should have received a copy of the GNU
Library General Public License along with this library; if not, write
to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
USA.



Software requirements:

	- C++ compiler with IOstreams library
	- perl
	- GNU bison
	- GNU flex



CNCL is a C++ library with the following features:

Universal classes:

	* Tree structured class hierarchy, similar to NIHCL.

	* Classes for general purposes such as arrays, linked lists,
	  strings.

	* Interface classes for UNIX system calls: pipes, select, sockets.

Simulation:

	* Event driven simulation classes.

	* Statistical evaluation classes.

	* Random number generator and distribution classes.

	* SDL-oriented simulation classes.

Fuzzy logic:

      	* Fuzzy sets, fuzzy variables, fuzzy rules and inference
	  engine for building fuzzy controllers and expert systems.

	* Fuzzy rules to C++ class compiler.

Graphics:

	* Interface classes for DEC's ezd graphics server.

	* Interface classes for Communication Networks' gist graphics
	  server.


See directory doc/ for more documentation on CNCL.


------------------------------------------------------------------------------


Compiling and installing CNCL:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! You MUST have perl (Larry Wall's script language) installed in order   !!
!! to use the CNgenclass and CNarray scripts (which are written in perl). !!
!! Having perl is a good idea anyway, so install perl now!!! ;-)          !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

(Compiling CNCL without perl using this distribution should work
nevertheless.)

You'll also need GNU bison and flex to compile the CNfrc fuzzy rule
compiler. At least on SUNOS 4.1.3 it's not possible to compile
fuzzlex.c and fuzzyparse.c with GNU g++, if these are generated by
lex and yacc. If you don't have bison and flex, it may be possible to
compile the yacc and lex generated C code with an Standard-C compiler
like gcc. See bin/fuzzy/Makefile. If you don't want to compile this
program, comment out `FUZZYDIR= fuzzy' in bin/Makefile.


Here we go:

	* Edit the file `make.conf' in this directory:

	  prefix	the prefix for all directories
	  bindir	directory for installing binaries and scripts
	  libdir	directory for installing libraries
	  includedir	directory for installing header files
			(the header files are actually installed in
			$(includedir)/CNCL)
	  infodir	directory for installing info files

	  CC		C++ compiler
	  LEX           Lexical scanner generator
	  YACC		Parser generator
	  AR		Archiver
	  RANLIB	Archive ranlib, if needed

	  DEBUG		Default flags for compiling CNCL
	  EXTRA		Extra flags for compiling CNCL

	  The other definitions should be left as is.


	* If you have perl installed, compile to whole thing by
	  entering:

		make NewWorld

	  If you don't, install perl first! ;-) If you still aren't
	  convinced to do this, you may compile CNCL by typing:

		make World

	  But in this case the CNxxxxx scripts won't be updated
	  according to your configuration. Well, you can't use them
	  anyway, without perl! ;-)


	* Compiling CNCL takes a while, so either get a very fast
	  machine or a cup of coffee now. If everything worked well
	  so far, there should be a file

		libcncl.a

	  in the lib directory, size approximately 5MB.


	* You should now compile the CNCL test programs by entering:

		make tests

	  If this succeeded you may execute some of the test programs
	  in lib/test and lib/*/test. None of these, with the
	  exception of lib/test/tbasic, should dump core. Sorry, no
	  verification files to compare output to, because most of the
	  output is somewhat system dependent.


	* Finally install CNCL by entering:

		make install

	  This will install the libraries, header files, support
	  binaries, and scripts in the appropiate directories.


	* There are special targets for compiling different version of
	  the library:

		cd lib; make lib_o

	  compiles an optimized (-O6) version of the library

		cd lib; make lib_g

	  compiles a debugging (-g) version of the library

		cd lib; make lib_p

	  compiles a profiling (-pg, gprof) version of the library
	  `make install' will install these libraries as well.

	  Don't forget to run `make clean' before compiling a new
	  version of the library. For real usage it is recommended to
	  install an optimized version of the library.



------------------------------------------------------------------------------

This version of CNCL is known to compile and run on the following
systems:

	* SUN SPARCstation, SUNOS 4.1.3,
	  GNU g++ 2.5.8,
	  libg++ 2.5.3

	* LINUX 1.1.30
	  GNU g++ 2.5.8,
	  libc 4.5.24 / libg++ 2.5.3l.2


There is a bug in g++ 2.5.8 manifesting for the function

    void EZD::draw_text(int x, int y, int w, int h, CNStringR align,
			CNStringR text, CNStringR col, CNStringR font);

if you pass temporary CNString objects to this function. Some of them
will be deleted twice. Hopefully this will be fixed in g++ 2.6.x. See
also comment in lib/ezd/EZD.h.
