home *** CD-ROM | disk | FTP | other *** search
-
- Porting KEF
- ===========
-
- 1.) Getting started
-
- Now that you have got KEF from somewhere you want to test and see
- what it is for, what it is like and whether it is useful for you.
-
- First unpack the routines from whatever form you got them in in
- an empty directory. Let's call this directory the "top level
- directory".
- There should be several directories with C source files in them.
- See MANIFEST for a complete list of names.
-
- The sources will eventually produces several files:
- - libkef.a : the KEF library
- - libDkef.a : a library of routines to dump and test KEF structures; not
- documented yet
- - kef.h : a headerfile for inclusion in any programs that use KEF
- - several man files for the parts of KEF in the subdirectories
- - demo programs
-
- 2.) Building KEF.
-
- If your system is a UNIX system or a UNIX-derived one, you will
- probably have no problems.
-
- a) Run Configure as "sh Configure"
-
- "Configure" is a Bourne-shell script that finds out things about
- the system it is running on, relevant to the software package for which
- "Configure" was created. It either searches header files and
- libraries or asks the user directly for information.
- "Configure" should be called only from the top level directory of
- the source tree for a software package.
- "Configure" does the following:
- - looks up each file listed in MANIFEST to see if the kit
- is complete. You can skip this step by calling "Configure"
- as "sh Configure -f"
- - finds out about the system, both automatically and by asking
- the user.
- - generates a file "config.sh"
- - offers to unpack, or "run", the files with suffix ".SH". You can
- tell "Configure" that it should do so, but you can also do it
- yourself.
-
- "config.sh" is a Bourne-shell script that assigns values to a lot
- of shell variables.
- In the package there are some files whose names have the suffix ".SH".
- These files contain shell scripts that read "config.sh" and generate
- files with the same name but ".SH" deleted.
- Typically there is a file "config.h.SH" that generates "config.h", which
- is used in the source files to get information about the system.
-
- If you make any errors in "Configure", either rerun "Configure"
- or change the values in config.h or config.sh by hand.
- Remember that any changes made to config.sh or config.h are lost
- when you rerun Configure.
-
- You can skip this step. In directory "cfg" there are several files
- for some systems on which I have built KEF previously (see below).
- Copy such a file to "config.sh" to the top level directory.
- You can now unpack the "*.SH" files by simply saying "sh file.SH"
- to create "file".
-
- b) Now you can type "make" in the top level directory.
- "libkef.a" and "libDkef.a" and "config.h" will be created in the
- top level directory.
-
- c) In the directory "demos" there are some demo programs.
- Run them to make sure, kef works as expected.
-
-
- 3.) What if something does not work?
-
- If your system is not running UNIX or a UNIX-derived OS, you may
- have problems.
-
- If you don't know how to switch your system's driver to hand characters
- to a program as soon as they are typed and none of the UNIX-like
- ways work, you might as well give up.
-
- Currently "kef" is known to work on
-
- - SIEMENS PC MX2; SINIX 2.1
- - SUN 3/260; SUN OS 3.5
- - VAX 11/780; UNIX 4.3 BSD
- - VAX 8700; ULTRIX 2.0
-
- (Not much, eh? Well I am counting on people on USENET to supply many more.)
-
- If you have such a system and still it does not work, check the
- defines in config.h.
-
- In directory "cfg" there are some prototypical "config.sh" files for
- some systems. These files are named after the system they were built on
- and reflect the decisions and results of installing KEF on a specific
- system. You may want to change some things, like file names, or you may
- wish to substitute "gcc" for the standard compiler. KEF compiles with
- gcc v 1.37.1.
-
- If you are porting to a different system, where even some of the
- UNIX system calls are not available, like VMS or MS-DOS, you can
- check the following:
- - there is one call to "read" in kef/fill.c. Check the semantics
- of your systems basic read-function.
- - the routines to wait for characters to become available are
- in kef/look_wait.c. Roll your own.
- - in demos/set_io.c there are routines to put the terminal
- driver in a mode where it passes any characters typed directly
- to the program. Write the routines necessary for your OS.
- (I have routines for VMS, but they are not working to my
- satisfaction yet : ^Y does not work anymore. I don't have the
- time to read the manuals and I lack the experience with VMS IO
- to foresee any problems. So it's up to you.)
-
- If you have questions, drop me a note.
-