/usr/bin/gnuplot symlinks packageing problems were fixed gor gnuplot-x11
[gnuplot] / PORTING
1
2  The following information is mainly geared towards people who want
3 to port gnuplot to new platforms not covered by the installation
4 instructions in 0INSTALL and INSTALL.gnu. Please do also read the
5 file CodeStyle.
6
7  We have tried to isolate most operating system dependent definitions
8 in the file syscfg.h. If you add a new platform, some definitions must
9 probably be added to syscfg.h as well.
10
11 Preprocessor Defines
12 ********************
13
14  These #defines should be checked before compilation. There are many
15 makefiles provided as templates. You probably need these only if porting
16 to a new machine. The HAVE_XXX defines should be taken care of by configure
17 if your platform supports GNU autoconf generated configure shell scripts.
18 If your platform/environment does not support configure, see Codestyle and
19 syscfg.h.
20
21 THIS LIST IS SOMEWHAT OUT OF DATE NOW - CHECK configure.in and
22 acconfig.h.
23
24 define      file            note
25 ------      ----            --------
26 HAVE_BCOPY  Makefile        define if you have bcopy() and no memcpy()
27 HAVE_LGAMMA Makefile        define if you've got lgamma(3)
28 HAVE_GAMMA  Makefile        define if you've got gamma(3)
29 PC          Makefile        define if compiling on a PClone
30 MSDOS       Makefile        define if compiling under MSDOS;
31                               automatically defined by Microsoft C 5.10
32 DOS32       Makefile        define for a 32-bit DOS extender (djgpp/emx)
33 WIN32       Makefile        define for a 32-bit MS-Windows version
34 HELPFILE    Makefile        name including path of gnuplot.gih file.
35 VERYLARGE   plot.h          define to be largest coordinate number.
36 SHELL       plot.h          default shell to spawn if SHELL environment
37                               variable not found at run-time
38 NOCWDRC     Makefile        define to inhibit check of ./.gnuplot
39 READLINE    Makefile        define if you want command-line editing
40 HAVE_LIBREADLINE Makefile   define if you are linking with GNU readline
41
42 Header File Availability
43 ========================
44
45  It is generally assumed that standard ANSI/ISO header files are available.
46
47 Function Availability
48 =====================
49
50  It is generally assumed that standard ANSI/ISO functions are available.
51
52  If certain standard ANSI/ISO C functions are not available, two alternatives
53 come to mind: either try to achieve the same functionality without the
54 missing function, or provide a portable implementation. Examples for this
55 are in stdfn.c. See also stdfn.h. 
56
57  The following defines are used to ensure availability of certain
58 non-standard functions.
59
60  #define          function       see file        comments
61 -------------------------------------------------------------------
62 HAVE_ERF          erf()          specfun.c
63 HAVE_GAMMA        gamma()        specfun.c
64 HAVE_GETCWD       getcwd()       stdfn.h
65 HAVE_GETWD        getwd()        stdfn.h
66 HAVE_INDEX        index()        stdfn.h         pre-ANSI version of strchr()
67 HAVE_LGAMMA       lgamma()       specfun.c       prefered over gamma()
68 HAVE_ON_EXIT      on_exit()      term/x11.trm    atexit() substitute on SunOS
69 HAVE_RINDEX       rindex()       stdfn.h         pre-ANSI version of strrchr()
70 HAVE_SLEEP        sleep()        command.c
71 HAVE_SYSINFO      sysinfo()      gplt_x11.c      SysV function to get and set
72                                                  system information. Used
73                                                  instead of gethostname().
74 HAVE_STRNCASECMP  strncasecmp()  stdfn.c         non-case sensitive string
75                                                  comparison
76 HAVE_STRNICMP     strnicmp()     stdfn.c         dto.
77 HAVE_TCGETATTR    tcgetattr()    readline.c
78
79 Terminal Selection Options
80 ==========================
81
82    These defines are used to include the drivers for various plotting 
83 terminals, printers, and protocols that a given version of gnuplot can 
84 access and the description of such for the help file.
85
86
87 define      file               note
88 ------      ----               --------
89 TERMFLAGS   Various makefiles  (obsolete under Unix; use configure instead)
90                                the set of terminals you want, from below or
91                                term.h
92 SHORT_TERMLIST  term.h         edit term.h to specify desired devices at
93                                the beginning (instead of commenting out, 
94                                throughout the file, devices not desired.) 
95
96 ALL_TERM_DOC   docs/termdoc.c  on-line help documentation for all devices
97                                rather than only for the drivers selected
98                                in term.h.
99
100
101    The following, non-authoritative, list serves as a guide to the range 
102 of devices that may be selected/deselected by editing term.h.
103
104    AED         AED 512 and AED 767
105    AIFM        Adobe Illustrator Format
106    AMIGA       Amiga custom screen
107    APOLLO      Apollo Graphics Primitive Resource (resizable window)
108    ATARI       AES, VDI, MultoTOS
109    ATT6300     PC with AT&T 6300 graphics
110    BITGRAPH    BBN BitGraph
111    CGI         SCO CGI, hcgi
112    COREL       COREL! Draw Format
113    CORONA      PC with Corona graphics 325
114    DEBUG       Voluminous output for debugging to terminal
115    DJSVGA      MSDOS SVGA with DJGPP compiler
116    DXY800A     Roland DXY800A plotter
117    DUMB        Printer or glass dumb terminal
118    DXF         AutoCad (Release 10.x) dxf file format
119    EEPIC       EEPIC-extended LaTeX driver, for EEPIC users
120    EGALIB      PC with EGA/VGA graphics.
121    EMTEX       LaTeX picture environment with emTeX specials
122    EMXVGA      PC with VGA running DOS or OS/2
123    EPS180      Epson-LQ style 24-pin 180-dot per inch printers
124    EPS60       Epson-style 60-dot per inch printers
125    EPSONP      Epson LX-800, Star NL-10, NX-1000 and lots of others
126    EXCL        Talaris EXCL laser printer format
127    FIG         Fig graphics language (requires object.h from TransFig)
128    GIF         Gif output, requires special library
129    GPIC        Gpic for groff
130    GPR         Apollo Graphics Primitive Resource (fixed-size window)
131    HERCULES    IBM PC/Clone with Hercules graphics board
132    HP2648      HP2648, HP2647
133    HP26        HP2623A and maybe others
134    HP500C      HP Deskjet 500 C and maybe other Color Deskjets
135    HP75        HP7580, and probably other HPs
136    HPGL        HP7475 and (hopefully) lots of others
137    HPLJII      HP Laserjet II
138    HPPJ        HP PaintJet
139    IMAGEN      Imagen laser printers (300dpi) (requires -Iterm also)
140    IRIS        IRIS4D series computer
141    KERMIT      MS-DOS Kermit Tektronix 4010 emulator
142    LATEX       LaTeX picture environment
143    LINUXVGA    Linux PC with (s)vgalib
144    MF          Metafont Format
145    MGR         MGR window manager
146    MIF         FrameMaker MIF 3.00 Format
147    MTOS        Atari MiNT/MULTITOS/Magic Terminal
148    NEC         NEC CP6 pinwriter printer
149    NEXT        NeXTStep Window System (only grey scale)
150    OS2PM       OS/2 Presentation Manager
151    PBM         PBMPLUS pbm, pgm, ppm formats
152    PCL         HP PCL5 (actually  HPGL/2)
153    PNG         Portable Network Graphics, requires separate library
154    POSTSCRIPT  PostScript
155    PRESCRIBE   Kyocera Laser printer
156    PSLATEX     Postscript graphics, LaTeX labels and titles
157    PSTRICKS    PSTRICKS 0.91 format
158    QMS         QMS/QUIC laserprinter (Talaris 1200 and others)
159    REGIS       ReGis graphics (vt125, vt220, vt240, Gigis...)
160    RGIP        Redwood Graphics Interface Protocol
161    SELANAR     Selanar
162    STARC       Star Color Printer
163    SUN         Sun Microsystems Workstation
164    T410X       Tektronix 4106, 4107, 4109 and 420x terminals
165    TABLE       Text output
166    TANDY60     Tandy DMP-130 series 60-dot per inch graphics
167    TEK         Tektronix 4010, and probably others
168    TEXDRAW     TeXDraw format (for LaTeX)
169    TGIF        TGIF X11 Drawing Tool
170    TPIC        Tpic specials for TeX
171    UNIXPC      unixpc (ATT 3b1 or ATT 7300)
172    UNIXPLOT    unixplot
173    V384        Vectrix 384 and tandy color printer
174    VTTEK       VT like Tektronix 4010 emulator
175    VWS         VAX Windowing System  (UIS libraries)
176    X11         X11R4 window system
177
178
179 Platform Related Defines
180 ========================
181
182  These #defines are defined automatically by various compilers or
183 makefiles, some gnuplot routines check these defines to implement
184 features found in the various environments. This list is certainly
185 incomplete.
186
187 define        note
188 ------        --------
189 AMIGA_AC_5    defined for Manx Aztec C 5.2a on the Amiga.
190 AMIGA_SC_6_1  defined for SAS/C 6.1 or later versions on the Amiga.
191 __amigaos__   defined by gcc on AmigaOS.
192 AMIGA         defined for all Amiga compilers.
193 apollo        defined by Apollo's C compilers.
194 _CRAY         defined by CRAY's C compiler.
195 __DECC        defined by DEC C compiler under VMS (?)
196 __TURBOC__    defined automatically by  Borland C++ 3.x.
197 unix          defined by most unix C compilers.
198 vms           (and VMS) defined by VMS C compilers.
199 __ZTC__       Zortech C compiler under MSDOS.
200 _Windows      defined by Borland C++ 3.0 compiling for MS-Windows.
201 __WATCOMC__   defined automatically by  Watcom C
202 __EMX__       defined by EMX gcc (available on DOS & OS/2).
203 OS2           to be defined by compilers under OS/2.
204
205 Defines Used in Gnuplot
206 =======================
207
208  The following defines are used to achieve better portability. Most of
209 them are wrappers.
210
211  #define          wraps/redefines            see file    comments
212 ------------------------------------------------------------------
213 GP_GETCWD         getwd()/getcwd() alikes    stdfn.h
214 GP_FARMALLOC      faralloc()/malloc()        alloc.c     Windows environment
215 GP_FARREALLOC     farrealloc()/realloc()     alloc.c     Windows environment
216 GP_SLEEP          sleep()                    command.c
217 GP_SYSTEMINFO     sysinfo()/gethostname()    gplt_x11.c
218 GPFAR             `far' compiler directive   plot.h      MSDOS and Win16
219 GPHUGE            `huge' compiler directive  plot.h      MSDOS and Win16
220 GP_INLINE         `__inline' directive       plot.h
221 GPMAX             max (a,b)                  plot.h
222 GPMIN             min (a,b)                  plot.h
223
224  The following symbols are defined when using DEBUG:
225
226 DEBUG_WHERE       prints filename and line number to stderr *without* linefeed
227 FPRINTF(a)        uses DEBUG_WHERE, passes a to fprintf
228
229  Usage example: FPRINTF((stderr, "function foo returned %d\n", bar));
230  Result:        readline.c:620 function foo returned -1
231