The information in this file is from A. Scottedward Hodel
<A.S.Hodel@Eng.Auburn.EDU>.

I've installed and run Octave 2.0.12 on Power MachTen 4.1.  This note
contains instructions on how to port octave to MT 4.1 and on further work
that remains to be done for dynamic linking.

Contents: 
(1) Definitions
(2) Future work
(3) Instructions for installation; this should be put in:
    - octave-2.0.12 top level directory
    - tenon ftp site

Definitions:
============
Power MachTen: Unix that runs simultaneously with MacOS on Mac computers.
               see http://tenon.com for more information.

Octave:        a Matlab-like programming language that is freely distributable
               under the terms of the gnu copyright rules.  Octave is NOT
               (and will not) be a MATLAB(tm) clone; however, the functionality
               of the program is similar.

               see: http://bevo.che.wisc.edu/octave for more information.
               a control systems toolbox is available at 
               ftp://ftp.eng.auburn.edu/pub/hodel/OCST*

Further work:
=============
Both Octave and Power MachTen support dynamic linking, but I haven't yet 
tried using dynamic linking.  A cursory reading of the MT4.1 manual (pp. 
226-228, Sec 11.3) indicates that shared libraries need to be put in an 
HFS (i.e., MacOS) directory due to required setting of resources by the 
MacOS resource manager.  Additionally, some flags need to be added to the 
LDFLAGS variable in the configure script.  I'll post those items when
I get there.

To install Octave on MachTen:
Short instructions:  MachTen automatically defines __MACHTEN_PPC__ on
power MachTen.  The octave configure script sets most everything up properly.
Here's a few details that also need done:

(1) Put libncurses into the Tenon Application Library Folder
(2) Replace the MT /usr/bin/sed with gnu sed (I used 2-0.5).
(3) Patch <sys/signal.h>
(4) Set virtual memory to a huge number (I used 120Mb)
(5) make all; it will fail on toplev.cc due to a problem with src/oct-conf.h
(6) Fix src/oct-conf.h and make all again.
(7) make install

That should do it.  Dynamic linking is not done yet; I'm working on that.

Here are the details for the above items:

(1) Be sure that libncurses is in the Tenon Application Library in
    the Extensions folder:

    (a) use resedit.  
    (b) Open the libncurses file in folder:
          Extensions/Tenon Applications Library/disabled
    (c) Open the cfrag resource.  Scroll down a bit and you will find the 
        string libcurses.  Change it to libncurses. Save.
    (d) Change (File Menu/File Information) the file creator to MUMM. Save.
    (e) now move libncurses out of the disabled folder to 
          Extensions/Tenon Applications Library
    (f) Reboot.  

(2) Replace the MT /usr/bin/sed with gnu sed (I used 2-0.5).  
    This fixes a problem with the kpathsea/klibtool script.

(3) Login as root and apply the following patch to /usr/include/sys/signal.h:
    Otherwise src/sighandlers.cc will not compile properly.  (The change
    is consistent with <sys/signal.h> headers on our sun network as well.)

*** signal.h.old        Thu May  7 13:16:11 1998
--- signal.h    Thu May  7 13:34:27 1998
***************
*** 253,260 ****
  /*
   * Signal vector "template" used in sigaction call.
   */
! #struct       sigaction {
        void    (*sa_handler)();        /* signal handler */
        sigset_t sa_mask;               /* signal mask to apply */
        int     sa_flags;               /* see signal options below */
  };
--- 253,264 ----
  /*
   * Signal vector "template" used in sigaction call.
   */
! struct        sigaction {
! #ifdef __cplusplus
!       void    (*sa_handler)(int);     /* signal handler */
! #else
        void    (*sa_handler)();        /* signal handler */
+ #endif
        sigset_t sa_mask;               /* signal mask to apply */
        int     sa_flags;               /* see signal options below */
  };


(4) Set virtual memory to a huge number (I used 120Mb).  Otherwise compiles
    will fail.

(5) make all; it will fail on toplev.cc due to a problem with src/oct-conf.h
    The problem is that when DEFS is defined in building oct-conf.h, somehow
    the quote strings areound SEPCHAR_STR are not escaped. 

(6) Fix src/oct-conf.h and make all again.

    You'll need to change the line

	#define DEFS "-DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=":" 
    to
	#define DEFS "-DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=\":\" 

    It should have been done automatically (take a look at UGLY_DEFS in
    the toplevel Makeconf), but for some reason it doesn't go.

(7) make install
