Installing and Using Ctalk

1. Quick Installation
2. Installation with DJGPP and MS Windows
3. Notes for Solaris
4. Learning about Ctalk
5. Bug Reports, Feedback, and Support


1. Quick Installation

This release of Ctalk builds under Linux and Solaris using GCC and 
GNU make, and platforms which support DJGPP.

To build and install ctalk under Linux or UNIX:

  # ./configure
  # ./make
  # ./make install

If you experience problems with older GCC's (< version 3), try
compiling Ctalk and its programs without optimization.  Typing,
"./configure --help" displays the relevant options, as well as
the manual pages for ctcc and ctdb.

The programs subdirectory contains example programs
for Ctalk.  To build them, use the following commands.

  $ cd programs
  $ make

The file programs/README describes the example programs.

The file test/README contains information about Ctalk
test programs.

To test Ctalk, use the following commands under Linux or
UNIX.

  $ cd test
  $ make test
  $ cd expect
  $ for i in *.exp; do echo $i; ./$i; done  # To run all tests.

The files test/README and test/expect/README describe the tests.

2. Installation with DJGPP platforms.

To build and install Ctalk on a platform which supports DJGPP.

  > make -f Makefile.djgpp
  > make -f Makefile.djgpp install

To run the DJGPP test suite:

  > cd test
  > make -f Makefile.djgpp test

DJGPP provides only about 1.5 MB of memory space in the
default heap.  Ctalk's memory requirements are far in excess
of that (about 130 MB for a 800 line source file with most
of the standard C library headers), so your results may vary.
If you want to adjust Ctalk's memory use, the heap size 
parameter is in djgpp.h, and the stack size parameters
N_MESSAGES and P_MESSAGES are in ctalk.h and ctpp.h. 

IMPORTANT - Because DJGPP only supports mixed case file names on
systems that support long file names Ctalk does not (at this time)
work on machines that use only 8+3 file names. Refer to the 
opendir () and _preserve_fncase () DJGPP info pages.

Note that on some platforms DJGPP segfaults when compiling input 
files that are already preprocessed.  In this case, you still need 
to preprocess the input with DJGPP, using the extension, ".c," for 
the Ctalk output.

  > ctalk hello.c -o hello1.c
  > gcc hello1.c -o hello.exe -lctalk
  > ./hello.exe


3. Notes for Solaris

Ctalk should build on Solaris 8-10 with almost any 3.x or 4.x series GCC
compiler using either the native Solaris build utilities (ld, ar, as,
etc.), or with the GNU binutils.  

Ctalk is compatible with the Solaris 10 SUNWgccfss421 GCC 4.2.1
compiler upgrade and its auxiliary packages, available from the
sun.com Web site.  Ctalk is not compatible with the bundled Solaris 10
GCC in /usr/sfw/bin.

GCC 2.95.2 bundled with Solaris 8 and installed in /opt/sfw/bin should
work also.  

Ctalk is compatible with the GCC 3.x packages from sunfreeware.com,
and with GCC built from most GCC source code distributions from
gnu.org.

With all of these compilers, you should set the PATH and
LD_LIBRARY_PATH for them.  You also need to add /usr/local/bin
to LD_LIBRARY_PATH, which is where Ctalk installs its own 
libraries.

Whichever compiler the system has, be certain that it is the 
same compiler that you used to build Ctalk.  Sudden, off the wall
problems are almost always due to using a compiler different
that the one you used to build Ctalk.

In order to use the Sun linker, assembler, and other build tools, you
must add /usr/ccs/bin to the directory search PATH.

Problems with earlier GCC versions (i.e., version 2.95; Ctalk is
untested with GCC versions earlier than this) can usually be worked
around by building Ctalk without optimization; for example:

$ ./configure --without-optimization
$ make
$ su
# make install
# exit
$ cd programs
$ ctdb hello.c    # Builds the app without optimization.
$ ./hello

Ctalk also needs GNU make to build - you can use either the bundled
SunFreeWare make, or one of the packages from sunfreeware.com.  Some 
of the Solaris distributions include GNU make renamed as, "gmake."


4. Learning about Ctalk

The example applications in the programs/ and programs/cgi directories
describe a few of the language's features.  To compile, install, and 
run them, follow the instructions in the source files, or in the 
files programs/utils.texi and programs/cgi/web.texi.

The Texinfo manuals, "ctalk.info," and "tutorial.info," provide a
description of the language and its application programming interface.
You can read them under Emacs with the, "M-x info," "m ctalk,"
commands, or, "info ctalk," or, "info tutorial," from the shell.  

All of the manuals are also available online in different formats at
http://www.ctalklang.org/doc/.

The UNIX configuration provides a manual page ("man ctalk").  Typing,
"ctalk -h," displays the command line options.


5. Bug Reports, Feedback, and Support

The Ctalk forums are located at: http://www.ctalklang.org/forums/.

