home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / octave-2.0.5-MI / octave.2.0.5.NeXT < prev    next >
Encoding:
Text File  |  1997-12-13  |  2.8 KB  |  112 lines

  1. octave.2.0.5.NeXT
  2. Mar 1997
  3.  
  4.  
  5. Here are some things you need to do to get octave to compile for Nextstep.
  6.  
  7.  
  8. 1.  If using g77 (ie, g77-0.5.20 and gcc-2.7.2.2.f.2), need to configure with:
  9.     configure --with-g77 (so... whenever I say run configure, you need
  10.     to include --with-g77.
  11.  
  12.  
  13. 2.  fix configure
  14.     - modify config.cache so termios.h,unistd.h,utsname.h are no
  15.           (they are posix only headers, and shouldn't be used).
  16.     - re-run configure: configure --with-g77
  17.  
  18. 3.  fix Makeconf
  19.     - modify CXXLIBS to be: -lm
  20.     - modify FLIBS to be: -lf2c
  21.  
  22. 4.  strdup
  23.  
  24. You need an implementation of the C functio strdup for info and makedoc.
  25. Either:
  26. #define strdup(x)    NXCopyStringBuffer(x)
  27. In the files that refer to strdup, or create a file named: strdup.c
  28. #include <stdlib.h>
  29.  
  30. #if defined(NeXT)
  31. /**
  32.  * strdup() - Duplicate a string.
  33.  * 
  34.  * Returns a pointer to a new string which is a duplicate of the
  35.  * string to which s1 points.  The space for the new string is
  36.  * obtained using the calloc() function (see calloc(3C)).
  37.  *
  38.  * Parameters: [1] inStr - String to duplicate.
  39.  * Returns: Pointer to duplicated string; or NULL if an error occurred.
  40.  **/
  41. char *strdup(const char *inStr)
  42. {   char *outStr;
  43.     if (NULL == inStr)
  44.     { outStr = NULL; }
  45.     else
  46.     { outStr = calloc((strlen(inStr) + 1), sizeof(char));
  47.       if (NULL != outStr)
  48.         { strcpy(outStr, inStr); }
  49.     }
  50.     return outStr;
  51. }
  52. #endif /* NeXT */
  53.  
  54. Do a 'gcc -O -c strdup.c' and then include the strdup.o object file in the
  55. makefile objects for info and makedoc.
  56.  
  57.  
  58. 5.  hypot redefinition:
  59. kpathsea/c-std.h:97: conflicting types for `hypot'
  60. Remove reference (comment it out or remove it)
  61.  
  62. 6.  liboctave/Array.h (and liboctave/Array2.h) and anywhere else that complains 
  63. about index, stick these #if's right before the reference to index.
  64.  
  65. #ifdef index
  66. #undef index
  67. #endif
  68.   Array<T> index (idx_vector& i) const;
  69.  
  70.  
  71. 7.  fix signal.h 
  72.  
  73.                        i386
  74. /usr/local/lib/gcc-lib/m68k-next-nextstep3/2.7.2.2.f.2/include/bsd/sys/
  75. so that it reads:
  76.  
  77. NOTE: the old defs of the signals are not liked by g++:
  78.  
  79. --------
  80. #ifdef __STRICT_BSD__
  81.         #define BADSIG          (int (*)(int))-1
  82.         #define SIG_DFL         (int (*)(int))0
  83.         #define SIG_IGN         (int (*)(int))1
  84.  
  85.         #ifdef KERNEL
  86.                 #define SIG_CATCH       (int (*)(int))2
  87.                 #define SIG_HOLD        (int (*)(int))3
  88.         #endif
  89.  
  90. #else /* __STRICT_BSD__ */
  91.  
  92.         #ifdef _NEXT_SOURCE
  93.                 #define BADSIG          (void (*)(int))-1
  94.         #endif /* _NEXT_SOURCE */
  95.  
  96.         #if defined(_NEXT_SOURCE) || defined(_POSIX_SOURCE)
  97.                 #define SIG_DFL         (void (*)(int))0
  98.                 #define SIG_IGN         (void (*)(int))1
  99. ...
  100.  
  101.  
  102.  
  103. CREDITS
  104.  
  105.  
  106. Rex Dieter <rdieter@math.unl.edu>
  107. Computer System Manager
  108. Department of Mathematics and Statistics
  109. University of Nebraska Lincoln
  110. http://www.math.unl.edu/~rdieter/
  111.  
  112.