Annotation of OpenXM_contrib/gnuplot/0INSTALL, Revision 1.1.1.1
1.1 maekawa 1: Installation
2: ************
3:
4: This document is divided into four parts: the first part (For the
5: impatient) provides a quick overview of configuration and compilation
6: instructions. It also lists those options to the configure shell script
7: which are unique to gnuplot. Part two describes the environment variables
8: used by gnuplot. Part three explains in detail how --with-PACKAGE=PATH
9: works, and how this option interacts with --libdir and --includedir.
10: Part four addresses some platform specific problems and testing issues.
11: There are also some hints how to build gnuplot with pre-ANSI C compilers.
12: Part five finally describes a few graphical front ends for gnuplot.
13:
14: The description of preprocessor options previously found here has been
15: moved to a new file called 0PORTING. Generic installation instructions
16: for `configure', such as distributed with FSF/GNU packages, have been
17: moved to the file INSTALL.gnu.
18:
19: For the impatient
20: =================
21:
22: First, tune term.h to choose which terminal drivers you wish to enable.
23: If you want to support gif output, you need to download, compile and
24: install the gd library : see term/gif.trm for details.
25:
26: If you want to support png output (free gif alternative), you need
27: png and z libraries : see term/png.trm for details. Note that the
28: png library will probably not compile without an ANSI/ISO C compiler.
29:
30: A complete overview of configure options is below in the Basic
31: Installation section. On platforms which do not support GNU
32: autoconf/configure, ie. most non-Unix platforms, look for a makefile
33: that looks suitable, (makefile.emx for emx on dos, makefile.nt for
34: MS VC++ 4.x on NT and probably win95, makefile.win for borland c on
35: win95/nt, makefile.wc for DOS Watcom C etc.)
36:
37: File location defaults
38: ----------------------
39:
40: PREFIX /usr/local
41: gnuplot PREFIX/bin
42: gnuplot_x11 PREFIX/bin
43: gnuplot.1 PREFIX/man/man1
44: gnuplot.gih PREFIX/share
45:
46: The only files where the runtime location is defined at compile time are
47: gnuplot.gih and show.c. This is important if gnuplot is not installed by running
48: 'make install'.
49:
50: The default path for the help library, gnuplot.gih, can be controlled in
51: several different ways:
52:
53: o with configure's --prefix= option, eg.
54: ./configure --prefix=/gnuplot
55: Attention: This affects the location of *all* installed files!
56:
57: o with configure's --datadir= option, eg.
58: ./configure --datadir='/gnuplot/docs'
59:
60: o at make time, eg.
61: make HELPFILE='/gnuplot/docs/gnuplot.gih'
62:
63: o at execution time by specifying the helpfile with the environment
64: variable GNUHELP (see "Environment Variables" below).
65:
66: The default location of the executables can be controlled in different
67: ways:
68:
69: o with configure's --prefix= option, eg.
70: ./configure --prefix=/gnuplot
71: Attention: This affects the location of *all* installed files!
72:
73: o with configure's --bindir= option, eg.
74: ./configure --bindir='/gnuplot/bin'
75:
76: o at make time, eg.
77: make GNUPLOT_BINDIR='/gnuplot/bin'
78:
79: If the executables are not installed in the default location, files
80: written by the `save' command cannot be used as scripts on Un*x platforms.
81: There is no way to specify the location of the executables during
82: runtime. Other platforms are not affected by this.
83:
84: The gnuplot demo files are not installed by default. If desired, they
85: should be copied manually to a location of choice.
86:
87: Unix, configure
88: ---------------
89:
90: On Unix, use
91: $ ./configure
92: $ make
93: [ Optionally run demos--see "How to test gnuplot" below. ]
94: $ make install
95:
96: If gcc is installed, it is used by default. A different compiler can be
97: used through the CC environment variable:
98:
99: (Bourne shell)
100: $ CC=c89 ./configure
101:
102: (C shell)
103: $ setenv CC c89
104: $ ./configure
105:
106: Any environment settings for CFLAGS are included into the Makefile,
107: so please make sure that these are really needed.
108:
109: There are several options available for configure that you may want
110: to change. A complete list of options is available through
111:
112: $ ./configure --help
113:
114: --prefix=PREFIX Install architecture-independent files in PREFIX
115: [/usr/local]. The gnuplot (and gnuplot_x11) binary
116: is installed in PREFIX/bin.
117: --bindir=DIR user executables in DIR [PREFIX/bin]
118: --datadir=DIR Read-only architecture-independent data in DIR
119: [PREFIX/share]. The gnuplot help file is installed
120: in this directory.
121: --libdir=DIR object code libraries in DIR [EPREFIX/lib]
122: --includedir=DIR C header files in DIR [PREFIX/include]
123: --mandir=DIR Man documentation in DIR [PREFIX/man]
124: --without-readline Do not use the included readline function
125: --with-gnu-readline Use the GNU readline version If you don't use this,
126: you won't have file name completion.
127: --with-gnu-readline=PATH Specify the location of libreadline.
128: Use this form if your libreadline is not installed
129: where your linker can find it.
130: --with-plot use the Unix plot library
131: --with-plot=PATH Specify the location of GNU libplot
132: --with-gd (*) Enable gif terminal with Tom Boutell's gd library
133: (requires GD library)
134: --with-gd=PATH Specify the location of libgd
135: --with-png (*) Enable png terminal
136: (requires libpng and libz)
137: --with-png=PATH Specify the location of libpng
138: --with-cwdrc Check current directory for .gnuplotrc file,
139: normally disabled for security reasons. However,
140: the home directory is always checked for a
141: .gnuplotrc file.
142: --with-lasergnu Install lasergnu printer script
143: --without-linux-vga (*) Do not use the Linux console driver
144: (requires Linux SVGAlib /usr/lib/libvga)
145: --enable-apollo Apollo Graphics Primitive Resource
146: --enable-gpr Apollo Graphics Primitive Resource (fixed-size window)
147: --enable-cgi enable CGI terminal (SCO only)
148: --enable-iris enable IRIS terminal (IRIS4D only)
149: --enable-sun enable sunview terminal (Sun only)
150: --enable-unixpc enable unixpc terminal (ATT 3b1 or ATT 7300)
151: --enable-system-time use the system time routines in time.c
152: --with-x (*) Use the X Window System
153:
154: Options marked with (*) are on by default, ie. these features or packages
155: will be used if configure can detect them, even if the corresponding option
156: is not specified. Please note that the `--with-PACKAGE' options can have
157: additional arguments:
158:
159: o `--with-PACKAGE' is equivalent to `--with-PACKAGE=yes'
160: o `--with-PACKAGE=no' will disable checking for PACKAGE. It has the same
161: effect as `--without-PACKAGE'.
162: o `--with-PACKAGE=PATH' will check for PACKAGE in PATH
163:
164: Unix, no configure
165: ------------------
166:
167: The older, no-longer-preferred, way is to copy makefile.unx to Makefile
168: cp makefile.unx Makefile
169: Look through the Makefile to see if you need to make any changes.
170: See especially the HELPDEST and TERMFLAGS variables. Edit if needed.
171: Alternatively, all these variables may be set as command line arguments to
172: 'make'. For example:
173:
174: make <MACHINE> HELPDEST='/usr/um/misc/lib' \
175: DEST='/usr/um/misc/bin' READLINE=
176:
177: Type
178: make
179: For further instructions.
180: If that works, try
181: make install
182: For further instructions.
183:
184: VMS
185: ---
186:
187: On VMS, invoke MAKE_VMS.COM (or BUILDVMS.COM if you have MMS or MMK
188: but don't want to use the supplied DESCRIP.MMS). You may get warnings
189: or more serious errors depending on the versions of the C compiler, the
190: C run-time libraries, and {Open}VMS on your system.
191:
192:
193: To compile using DEC MMS or MMK (PD clone),
194: invoke MMS or MMK with the supplied descrip.mms
195: Or if you have a unix-like make utility
196: copy makefile.vms makefile
197: make
198: Or if you don't have a suitable make:
199: @buildvms
200: To tell gnuplot where to find the help library:
201: $ define gnuplot$help disk:[directory]gnuplot.hlb
202: Alternatively (and preferably) put the help in the main system help library.
203:
204: AmigaOS
205: -------
206:
207: Using Aztec C 5.2a
208: make -f makefile.ami
209: Using SAS/C 6.1 or later versions
210: smake -f makefile.amg
211: Using gcc: see Unix
212:
213: Atari/TOS
214: ---------
215:
216: Using gcc 2.x as unix cross- or native compiler
217: make -f makefile.st
218: (Edit top of makefile.st for name of crosscompiler or choose native setting)
219: Using PureC
220: use gnuplot.prj
221: Using TurboC
222: use gnuplot.prj
223: (Edit gnuplot.prj according to notes at the beginning)
224:
225: MS-Windows
226: ----------
227:
228: Using Microsoft C 7.0 and compiling for MS-Windows
229: copy makefile.msw makefile
230: nmake
231: Put wgnuplot.exe, wgnuplot.dll, wgnuplot.hlp and wgnuplot.mnu
232: in the windows directory.
233:
234: Using Borland C++ 3.1 and compiling for MS-Windows
235: copy makefile.win makefile
236: Edit makefile to change TC.
237: make
238: Put wgnuplot.exe, wgnuplot.dll, wgnuplot.hlp and wgnuplot.mnu
239: in the windows directory.
240:
241: Using the MinGW32 port of egcs: you need the Micrsoft SDK for the
242: moment.
243: copy makefile.mgw makefile
244: Look through the Makefile to see if you need to make any changes.
245: make
246: make install
247:
248: Using the Cygwin port of gcc, which includes MinGW32: you need the
249: Micrsoft SDK for the moment.
250: copy makefile.cyg makefile
251: Look through the Makefile to see if you need to make any changes.
252: make
253: Put wgnuplot.exe, wgnuplot.dll, wgnuplot.hlp and wgnuplot.mnu
254: in the windows directory.
255:
256: MSDOS
257: -----
258:
259: Using DJGPP
260: Basically the same as Unix+configure. Andris Pavenis <pavenis@lanet.lv>
261: has contributed a shell script which makes the whole process even easier:
262: just run djconfig.sh, and then make.
263: For novices, it is recommended to use makefile.dj2 instead:
264: copy makefile.dj2 makefile
265: make
266:
267: Using Microsoft C 7.0.
268: copy makefile.msc makefile
269: nmake
270:
271: Using Borland C++ 3.0
272: copy makefile.tc makefile
273: Edit makefile to change TC, BIN, BGI, BGIOBJ. You may also want to turn
274: off overlays (See manual for more on overlays).
275: make
276:
277: The file gnuplot.gih is needed for help on the PC.
278: If the file gnuplot.gih is not in the default directory, then use:
279: set GNUHELP={full path name of gnuplot.gih}
280:
281: OS/2
282: ----
283:
284: To compile under OS/2 (2.x and above) you need the development
285: suite EMX 0.9 (including gcc). You should also have
286: GNU Make and IBM's IPFC (Information Presentation Facility Compiler,
287: available from the Developer's Toolkit; nowadays it's accessible
288: through an IBM website for free!).
289:
290: At the beginning of Makefile.os2 you will find a configuration
291: section where you have to adjust all settings which control the build
292: process. Most important is probably to select the terminal devices
293: which should be supported. You can create a version offering
294: PM graphics as well as X11 support (to use with XFree86).
295: Support for these two terminals is provided by additional
296: executables.
297: Be sure to enable only those devices for which you have the
298: necessary software already installed. Also ensure that the
299: libraries and the sources are all compiled (not) using
300: the '-Zmt' flags.
301:
302: Executing
303: make -f makefile.os2
304: should create a default build while
305: make -f makefile.os2 help
306: will show you all pre-defined targets.
307:
308: See other sections of the manuals for more information about
309: installing/using gnuplot on OS/2.
310:
311: Environment Variables
312: =====================
313:
314: See 'help environment'.
315:
316: If the environment variable GNUTERM is found, it is used as the terminal
317: type. Otherwise, in some cases the variable TERM will be used, or the
318: hardware may be automatically detected.
319:
320: The PC version looks for the environment variable GNUPLOT to contain
321: the name of the directory from which to load the initialization file
322: GNUPLOT.INI. See the help on 'start_up' for more information.
323:
324: HOME is examined as a directory where a .gnuplot startup file might be
325: found. See help on "start-up".
326:
327: If defined, the environment variable GNUHELP is used for the name
328: of the .gih help file, otherwise HELPFILE (defined in makefile or
329: command.c) is used.
330:
331: The VMS version looks for the logical name GNUPLOT$HELP to locate
332: the help library.
333:
334: The CGI drivers need the CGIPATH environment variable to set the path
335: to the CGI agents, and the CGIDISP and/or CGIPRNT environment variables
336: to set the output devices.
337:
338: If using dynamically linked executables with the X11 Window System, it
339: may be necessary to define LD_LIBRARY_PATH - see man ld for details.
340: It is, however, prefered to use the appropriate linker options, eg.
341: -R under Solaris, or -rpath under DEC Unix and Irix.
342:
343: About --with-PACKAGE[=PATH]
344: ***************************
345:
346: The following description applies to gnuplot only.
347:
348: Every `--with-PACKAGE' option sets a `with_package' variable in
349: configure. Depending on how `--with-PACKAGE' was invoked, there are
350: only three different possible values for the `with_package' variable:
351:
352: Option $with_package
353: ----------------------------------------
354: (not specified) yes
355: --with-package yes
356: --with-package=yes yes
357: --with-package=no no
358: --with-package=PATH PATH
359: --without-package no
360:
361: This means that configure will always (by default) try to locate PACKAGE
362: unless `--with-package=no' or `--without-package' was specified. Examples
363: for with-PACKAGE options used by gnuplot's configure are `--with-gd',
364: `--with-png'. The corresponding package variables are `with_gd',
365: and `with_png'.
366:
367: For gnuplot, configure uses the macros `gp_SEARCH_LIBDIRS' and
368: `gp_SEARCH_HEADERDIRS' to search for libraries and includes, resp. These
369: macros are different from the standard GNU autoconf macros for this purpose,
370: `AC_CHECK_LIB' and `AC_CHECK_HEADER/S' (see autoconf manual). The
371: gp_XXX macros are closely tied to gnuplot, and cannot be used for other
372: packages without modification.
373:
374: The difference between these package specific macros and standard
375: autoconf macros is that they do search more than one (the default)
376: directory to determine the location of the specified file.
377:
378: Libraries will be searched in at least three, and up to five different
379: directories, depending on the PATH specified with `--with-PACKAGE=PATH':
380:
381: o the default linker path (this is really more than one directory)
382: o /usr/local/lib, which is a fairly common place for 3rd party libs
383: o the PATH directory, trailing `/lib/libPACKAGE.a' stripped off
384: o the PATH directory, trailing `/lib/libPACKAGE.a' stripped off and
385: `/lib' added
386: o the PATH directory, trailing `/libPACKAGE.a' stripped off.
387:
388: Using the default linker path as the first search directory has one
389: big, but not so obvious advantage: if all libraries are in the same
390: directory, the path to the first library specified with --with-PACKAGE
391: is added to the linker path with a `-L' option. The library searched
392: for with the next --with-PACKAGE option will now be found faster, because
393: only one additional directory is checked. This is also true for header files.
394:
395: Example: the user has unpacked the gd library distribution into
396: /home/user/source/gd:
397:
398: $ configure --with-gd=/home/user/source/gd
399:
400: will search the following directories for libgd.a:
401:
402: o the default linker path
403: o /usr/local/lib
404: o /home/user/source/gd
405: o /home/user/source/gd/lib
406: o /home/user/source/gd
407:
408: Include files will be searched in at least two, and up to three different
409: directories, depending on the PATH specified with `--with-PACKAGE=PATH':
410:
411: o the default include path (can be more than one diretcory)
412: o /usr/local/include, a fairly common place for 3rd party headers
413: o the PATH directory, trailing `/lib/libPACKAGE.a' stripped off
414: o the PATH directory, trailing `/lib/libPACKAGE.a' stripped off and
415: `/include' added
416:
417: Caveat: the `gp_SEARCH_HEADERDIRS' macro should only be used after the
418: corresponding `gp_SEARCH_LIBDIRS' macro to take full advantage of the
419: search algorithm. This is a reasonable assumption nevertheless, because
420: it allows for structuring configure.in so that the test for a header file
421: is skipped if the corresponding library is not found.
422:
423: Here are some more examples:
424:
425: o the gd and png libraries are in /usr/local/gnu/lib, which is
426: automatically searched by gcc. The corresponding header files are
427: in /usr/local/gnu/include, which is not in gcc's include search path.
428: Solution:
429:
430: $ ./configure --with-gd=/usr/local/gnu
431:
432: o the gd and png libraries are in /opt/gnu/lib, the header files are
433: in /opt/gnu/include. Solution:
434:
435: $ ./configure --with-gd=/opt/gnu
436:
437: o the gd and png libraries and headers are all in different directories,
438: none of which is in the compilers search path:
439:
440: $ ./configure --with-gd=/tmp/gd --with-png=/tmp/libpng
441:
442: [I would like to implement the more generic `--site-includes' and
443: `--site-libraries' options for additional flexibility, but this is
444: painfully difficult with the current autoconf. It also seems that such
445: a feature would not comply with GNU coding standards.]
446:
447: Platform problems and testing
448: *****************************
449:
450: This section addresses trouble shooting and testing issues. Userland
451: questions are answered in the FAQ.
452:
453: Platform notes
454: ==============
455:
456: Generally, if you think that configure has made a mistake in detecting
457: platform features, there are two ways to switch these off.
458:
459: Example:
460: configure was for some reason unable to detect the memset() function, but
461: you are sure it is ok to use on your platform. Now you can either edit
462: config.cache and change
463:
464: ac_cv_func_memset=${ac_cv_func_memset='no'} to
465: ac_cv_func_memset=${ac_cv_func_memset='yes'}
466:
467: and rerun configure, or, edit config.h and change
468:
469: /* #undef HAVE_MEMSET */ to
470: #define HAVE_MEMSET 1
471:
472: Note that changing such defines at compile time, eg. via
473: 'make DEFS=-DHAVE_MEMSET' is wrong, because the DEFS variable in Makefile
474: may contain other defines (make DEFS='-DHAVE_CONFIG_H -DHAVE_MEMSET'
475: should work, though).
476:
477: - HP-UX 9.x
478: It is recommended to use gcc, although the native compiler cc may
479: work with warnings.
480:
481: - HP-UX 10.x
482: It is recommended to use the native compiler cc, as problems
483: have been reported when using gcc. In the cases reported, we have
484: yet to establish whether the compiler is at fault, or the compiler
485: setup/configuration is broken.
486:
487: - IRIX 6.x
488: If you want to use the png terminal, you must install your own
489: versions of libpng and zlib. The versions supplied with the OS
490: are too old. Note that you need be very careful to select the
491: correct compiler options/ABI's.
492:
493: - MS-DOS
494: If ports of common Unix utilities (bash, sed etc) are available,
495: gnuplot can be built with DJGPP. Install instructions are the same
496: as for Unix (with configure).
497:
498: - SunOS 4.x
499: An ANSI/ISO C compiler should be used to compile gnuplot. It is
500: recommended to install gcc. If this is not an option, the system
501: compiler cc can be made to work with Wietse Venema's unproto tool.
502: See entry below for instructions.
503:
504: As of 1998-11-18, gnuplot compiles again with the native compiler cc.
505:
506: - System V.2/Ultrix 4.x/M88 SysV.3
507: An ANSI/ISO C compiler should be used to compile gnuplot. It is
508: recommended to install gcc. If this is not an option, the system
509: compiler cc can be made to work with Wietse Venema's unproto tool.
510:
511: unproto is available from
512: ftp://ftp.win.tue.nl/pub/unix/unproto5.shar.Z
513: ftp://ftp.porcupine.org/pub/lang/unproto5.shar.Z
514:
515: After installing unproto, configure gnuplot with
516:
517: (Bourne shell syntax)
518:
519: $ cd gnuplot
520: $ CC='cc -B/full/path/to/unproto/dir/ -tp' ./configure <options>
521:
522: or (C shell syntax)
523:
524: prompt (41) cd gnuplot
525: prompt (42) setenv CC 'cc -B/full/path/to/unproto/dir/ -tp'
526: prompt (43) ./configure <options>
527:
528: The required compiler options shown here are for System V.2. For other
529: platforms, consult the unproto documentation. `/full/path/to/unproto/dir'
530: is the full path name of the directory where unproto is installed. It is
531: not necessary to "install" unproto, one can just create a subdirectory
532: in gnuplot's source directory and use it from there.
533:
534: How to test gnuplot
535: ===================
536:
537: No comprehensive test suite for gnuplot's features has been written
538: to date. However, the supplied demo files provide a good method of
539: testing commonly used features. All command line examples below assume
540: Unix Bourne shell syntax.
541:
542: The demo files can be run interactively by eg.
543:
544: $ cd gnuplot/demo
545: $ PATH=..:$PATH ../gnuplot simple.dem
546:
547: and gnuplot prompts the user to "Hit return to continue" to cycle
548: through all the plots. (The PATH= statement is only required if you are
549: using the X11 plotting device and the gnuplot_x11 binary has not been
550: installed yet.)
551:
552: To run the demos in a specified file without interaction, one
553: can use
554:
555: $ PATH=..:$PATH ../gnuplot simple.dem </dev/null
556:
557: To run all demos non-interactively, use
558:
559: $ PATH=..:$PATH ../gnuplot all.dem </dev/null
560:
561: To use a different plotting device than the default (usually X11
562: under Unix), use eg.
563:
564: $ GNUTERM=dumb ../gnuplot all.dem </dev/null
565:
566: To test the capabilities of the terminal you are using, there is
567: the 'test' command:
568:
569: $ gnuplot
570:
571: G N U P L O T
572: Unix version 3.7
573: patchlevel 0
574: last modified Tue Jan 12 13:48:06 BST 1999
575:
576: Copyright(C) 1986 - 1993, 1998
577: Thomas Williams, Colin Kelley and many others
578:
579: Send comments and requests for help to info-gnuplot@dartmouth.edu
580: Send bugs, suggestions and mods to bug-gnuplot@dartmouth.edu
581:
582: Terminal type set to 'x11'
583: gnuplot> test
584:
585: `test` creates a display of line and point styles and other useful things
586: appropriate for the terminal you are using.
587:
588: Front Ends for gnuplot
589: ======================
590:
591: o Xgfe by David Ishee <dmishee@jasper.he.net>, available from
592: http://von-mises.home.ml.org/xgfe/xgfe.html
593: If you download the source, you need Qt library from
594: http://www.troll.no/
595:
596: o Bruce Ravel <ravel@phys.washington.edu> has written a new version of
597: gnuplot-mode for GNU emacs and XEmacs. This version is based on
598: the gnuplot.el file by Gershon Elber which is included with this
599: distribution. The package is available from
600: http://feff.phys.washington.edu/~ravel/gnuplot/
601:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>