
    Version 1.605 of AKCL (Austin Kyoto Common Lisp) for NeXT is now
    available from rascal.ics.utexas.edu (128.83.138.20) as:
    
            * pub/NeXT-akcl-1-605.tar.Z  (or whatever the highest number is)
            * pub/kcl.tar.Z
            * pub/akcl-1-605.tar.Z  

Last I looked it was up to version 623 -- I've also used 615 and 619.

On NeXT 3.n systems, you'll need to get the dsp library from ccrma --
it's on the pub/Lisp directory at ccrma-ftp.stanford.edu as libdsp.a.

The file akcl.README contains short directions on how to build kcl.
Before running add-defs do the following: in the file
<kcl-home-directory>/akcl/h/NeXT.defs change the line:

    LIBS = -lsys_s -lm -lg

to (NeXT 2.0 and 2.1)

    LIBS = -u libdsp_s -ldsp_s -lsys_s -lm -lg -L/Local/Lisp/clm -lmus

or to (NeXT 3.n)

LIBS=       -u _fmod -u _log10 -u _clm_full_file_reset -u _clm_file_reset -u _c_init_sine -u _c_sin_lookup -u _c_frandom -u _c_newline -u _c_fft_window -u _c_clear_block -u _c_gcd -u _c_lcm -u _c_table_lookup -u _c_table_interp  -u _c_direct_flt  -u _c_lattice_flt  -u _c_ladder_flt  -u _c_y_or_n_p  -u _c_yes_or_no_p  -u _c_fft  -u _c_convolve  -u _c_run_block  -u _c_src -u _c_spd  -u _c_fft_filter  -u _c_base_run_block -u _jv_exp -u _mmap -u _SNDReadSoundfile -u _SNDStartPlaying -u _SNDWait -u _SNDFree -u _SNDStop -u _SNDSetHost -u _SNDAcquire -u _snddriver_get_device_parms -u _SNDRelease -u _snddriver_set_device_parms -u _snddriver_get_volume -u _snddriver_set_volume -u _snddriver_set_ramp -u _valloc -u _mutex_try_lock -u _mutex_wait_lock -u _cthread_detach -u _port_set_allocate -u _port_set_add -u _port_set_deallocate -u _name_server_port -u _mach_error_string -u _port_allocate -u _port_deallocate -u _mig_get_reply_port -u _msg_rpc -u _msg_send -u _mig_dealloc_reply_port -u _sscanf -lsys_s -lm -L/dist/lisp/kcl/clm -lmus

  (all one line)
  (change the -L/Local/Lisp/clm to point to the directory that has (or will have) libmus.a)

This gets the dsp/dac/clm library loaded.  I also change the process size
(BIG_HEAP_SIZE in akcl/h/NeXT.h) to #x2000000, but this may not be
needed. And it will make lispers happier if you change:

#define ADDITIONAL_FEATURES \
	ADD_FEATURE("MACH"); \
	ADD_FEATURE("NeXT"); \
	ADD_FEATURE("MC68040")

to

#define ADDITIONAL_FEATURES \
	ADD_FEATURE("MACH"); \
	ADD_FEATURE("NeXT"); \
	ADD_FEATURE("NEXT"); \
	ADD_FEATURE("MC68040")

or (NeXT 3.n)

#define ADDITIONAL_FEATURES \
	ADD_FEATURE("MACH"); \
	ADD_FEATURE("NeXT"); \
	ADD_FEATURE("NEXT-3.0"); \
	ADD_FEATURE("NEXT"); \
	ADD_FEATURE("MC68040")

(in NeXT.h).

Now run the shell script libm -- it creates the library that kcl needs to run
CLM at a reasonable speed. Then build kcl (i.e go to the akcl directory and
add-defs NeXT kcl-directory, followed by make -fSmakefile).

If you want to run CLM and Rick Taube's Common Music from kcl, 
change the LIBS line to (I have not tested this)

(NeXT 3.n):

LIBS=       -u _fmod -u _log10 -u _clm_full_file_reset -u _clm_file_reset -u _c_init_sine -u _c_sin_lookup -u _c_frandom -u _c_newline -u _c_fft_window -u _c_clear_block -u _c_gcd -u _c_lcm -u _c_table_lookup -u _c_table_interp  -u _c_direct_flt  -u _c_lattice_flt  -u _c_ladder_flt  -u _c_y_or_n_p  -u _c_yes_or_no_p  -u _c_fft  -u _c_convolve  -u _c_run_block  -u _c_src -u _c_spd  -u _c_fft_filter  -u _c_base_run_block -u _jv_exp -u _mmap -u _SNDReadSoundfile -u _SNDStartPlaying -u _SNDWait -u _SNDFree -u _SNDStop -u _SNDSetHost -u _SNDAcquire -u _snddriver_get_device_parms -u _SNDRelease -u _snddriver_set_device_parms -u _snddriver_get_volume -u _snddriver_set_volume -u _snddriver_set_ramp -u _valloc -u _mutex_try_lock -u _mutex_wait_lock -u _MIDIBecomeOwner -u _MIDIClaimUnit -u _MIDISetClockMode -u _MIDISetClockQuantum -u _MIDISetSystemIgnores -u _MIDIRequestExceptions -u _MIDIGetAvailableQueueSize -u _MIDISetClockTime -u _MIDIStartClock -u _MIDIReleaseOwnership -u _MIDIStopClock -u _MIDIGetClockTime -u _MIDISendData -u _MIDIRequestData -u _MIDIHandleReply -u _MIDIClearQueue -u _cthread_detach -u _port_set_allocate -u _port_set_add -u _port_set_deallocate -u _name_server_port -u _mach_error_string -u _port_allocate -u _port_deallocate -u _mig_get_reply_port -u _msg_rpc -u _msg_send -u _mig_dealloc_reply_port -u _sscanf -lsys_s -lm -L/dist/lisp/kcl/clm -lmus



Currently, there is one further bug in kcl when using NeXT 3.n --
In akcl/c/NeXTunixsave.c, the declaration:

  extern struct section *getsectbyname(char *, char *);

causes a fatal compiler error.  The new declaration
(in /NextDeveloper/Headers/bsd/lib.h) is:

  extern const struct section *getsectbyname(
	 const char *segname, 
	 const char *sectname);

Later versions of akcl apparently have incorporated this change.

One thing in the akcl instructions that always trips me is the
step

add-defs NeXT <kcl-directory>

by <kcl-directory> they mean the inner kcl directory, not
the outer one.  That is, if you started on /dist/lisp/kcl, and
executed as the first step mkdir kcl, it's the latter directory
they are calling the <kcl-directory>.
