📄 install
字号:
Table of contents:
==================
* Installation from sources
- For the impatient provides a quick overview of configuration and
compilation instructions.
- Lists those options to the configure shell script which are
unique to gnuplot.
- Compiling by config/makefile.* for specific platforms.
* More details about ./configure --with-PACKAGE[=OPTION]
* Platform compiler problems
* Environment variables
- The environment variables used by running gnuplot.
* How to test gnuplot
* Installing WPS object for gnuplot on OS/2
- How to install WPS icon for drag&drop.
* Front-ends for gnuplot
- Few notes about graphical front-ends for gnuplot.
The description of preprocessor options previously found here has
been moved to a new file called PORTING. Generic installation
instructions for `configure', such as distributed with FSF/GNU
packages, are in INSTALL.gnu.
If you're installing a binary package, you may still want to check out
some sections of this document, particularly the one discussing
environment variables.
Installation from sources
=========================
For the impatient
-----------------
Configuration options are in the Makefile and in src/term.h, which
selects the set of terminal drivers to be compiled in.
The recommended way to configure both of these is the GNU-style
"./configure" script described below, and also in INSTALL.gnu.
A complete overview of configure options is below in the Basic
Installation section. On platforms which do not support GNU
autoconf/configure, ie. most non-Unix platforms, look for a makefile
that looks suitable in the "config" directory. Check "config/README"
to see which of them to use for which platform.
File location defaults
----------------------
PREFIX /usr/local
gnuplot PREFIX/bin
gnuplot_x11 PREFIX/libexec/gnuplot/$VERSION
gnuplot.1 PREFIX/man/man1
gnuplot.gih PREFIX/share/gnuplot/$VERSION
The only files where the runtime location is defined at compile time are
gnuplot.gih and show.c. This is important if gnuplot is not installed
by running 'make install'.
The default path for the help library, gnuplot.gih, can be controlled in
several different ways:
o use configure's --with-gihdir option to specify the full path to the
directory where gnuplot.gih is to be installed, e.g.
./configure --with-gihdir=/opt/docs
o use configure's --datadir= option to specify a version and package
independent data dir prefix, e.g.
./configure --datadir='/opt/docs'
gnuplot will look for the online help file, gnuplot.gih, in
/opt/docs/gnuplot/$VERSION.
o with configure's --prefix= option, eg.
./configure --prefix=/gnuplot
gnuplot will look for the online help file, gnuplot.gih, in
/gnuplot/share/gnuplot/$VERSION.
Attention: This option affects the location of *all* installed files!
o at make time, eg.
make HELPFILE='/gnuplot/docs/gnuplot.gih'
gnuplot will look for the online help file /gnuplot/docs/gnupot.gih.
o at execution time by specifying the helpfile with the environment
variable GNUHELP (see "Environment Variables" below).
The default location of the main executable can be controlled in
different ways:
o with configure's --prefix= option, eg.
./configure --prefix=/gnuplot
gnuplot will be installed as /gnuplot/bin/gnuplot.
Attention: This affects the location of *all* installed files!
o with configure's --bindir= option, eg.
./configure --bindir='/gnuplot/bin'
gnuplot will be installed as /gnuplot/bin/gnuplot.
o at make time, eg.
make bindir='/gnuplot/bin'
gnuplot will be installed as /gnuplot/bin/gnuplot.
The default location of the additional executable, like gnuplot_x11,
can be controlled in different ways:
o with configure's --prefix= option, eg.
./configure --prefix=/gnuplot
gnuplot_x11 will be installed as /gnuplot/libexec/gnuplot/4.0/gnuplot_x11.
Attention: This affects the location of *all* installed files!
o with configure's --libexecdir= option, eg.
./configure --libexecdir='/gnuplot/lib'
gnuplot_x11 will be installed as /gnuplot/lib/gnuplot/4.0/gnuplot_x11
o at make time, eg.
make X11_DRIVER_DIR='/gnuplot/lib/4.0'
gnuplot_x11 will be installed as /gnuplot/lib/4.0/gnuplot_x11
If you don't install the program at the place chosen by ./configure,
e.g. by overriding the "prefix" at "make install" time, files written
by the `save' command cannot be used as scripts on Un*x platforms, so
this should be avoided. There is no way to specify the location of
the executables during runtime. Other platforms are not affected by
this.
The gnuplot demo files are not installed by default, mainly because
there is no universally agreed place where such files should go.
If desired, they should be copied manually to a location of choice.
Unix, configure
---------------
On Unix, use
$ ./configure
$ make
[ Optionally run demos--see "How to test gnuplot" below. ]
$ make install
If gcc is installed, it is used by default. A different compiler can be
used by passing its name to configure:
$ ./configure CC=c89
Any environment settings for CFLAGS are included into the Makefile,
so please make sure that these are really needed.
There are several options available for configure that you may want
to change. A complete list of options is available through
$ ./configure --help
The options relevant to gnuplot are listed below:
--prefix=PREFIX Install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX Install architecture-specific file in EPREFIX
[PREFIX]
--bindir=DIR user executables in DIR [EPREFIX/bin]
The gnuplot binary is installed this directory
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
gnuplot_x11 goes into $libexecdir/gnuplot/<version>.
--datadir=DIR Read-only architecture-independent data in DIR
[PREFIX/share]. The gnuplot help file is installed
in this directory.
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--mandir=DIR Man documentation in DIR [PREFIX/man]
--with-x (*) use the X Window System
--with-lasergnu install lasergnu printer script
--with-linux-vga use the Linux SVGA console driver
(requires /usr/lib/libvga)
--with-ggi[=DIR] enable the ggi driver (EXPERIMENTAL)
--with-xmi[=DIR] ggi's xmi support for pm3d (EXPERIMENTAL)
--with-readline (*) use the builtin minimal readline function (default)
--without-readline do not use the builtin readline function
--with-readline=gnu use the GNU readline library (4.2 or newer required)
--with-readline=DIR Specify the location of GNU readline
--enable-history-file use history file (requires GNU readline)
--with-plot[=DIR] use the Unix plot library
--with-png[=DIR] (*) where to find the png library
--with-gd[=DIR] (*) where to find Tom Boutell's gd library
--with-gif=png 'set term gif' produces png images instead
(libgd version >= 1.8)
--with-pdf[=DIR] (*) enable pdf terminal
(requires PDFLib)
--with-cwdrc check current directory for .gnuplot file,
normally disabled for security reasons
--with-row-help format help and subtopic tables by row (default)
--without-row-help (*) format help and subtopic tables by column
--without-tutorial do not build LaTeX tutorial
--disable-mouse disable mouse for the x11 terminal
--disable-pm3d disable pm3d
--disable-filledboxes disable filledboxes style
--disable-relative-boxwidth disable relative_boxwidths
--enable-thin-splines enable thin plate splines
--enable-iris enable IRIS terminal (IRIS4D only)
--enable-mgr enable MGR terminal
--enable-rgip enable Redwood Graphics Interface Protocol
Options marked with (*) are enabled by default, ie. these features or
packages are used if configure detects them even if the corresponding
option is not specified. Please note that the `--with-PACKAGE'
options can have additional arguments:
o `--with-PACKAGE' is equivalent to `--with-PACKAGE=yes'
o `--with-PACKAGE=no' disables checking for PACKAGE. It has the same
effect as `--without-PACKAGE'.
o `--with-PACKAGE=DIR' checks for PACKAGE in DIR
Unix, no configure
------------------
The older, now strongly disfavoured way is to copy config/makefile.unx
to Makefile, then look through the Makefile to see if you need to make
any changes. See especially the HELPDEST and TERMFLAGS variables. Edit
if needed. Alternatively, all these variables may be set as command
line arguments to 'make'. For example:
Next tune term.h to choose which terminal drivers you wish to
enable. If you want to support gif output, you need to download,
compile and install the gd library : see term/gif.trm for details.
If you want to support png output (free gif alternative), you need
png and z libraries : see term/png.trm for details. Note that the
png library will probably not compile without an ANSI/ISO C compiler.
make <MACHINE> HELPDEST='/usr/um/misc/lib' \
DEST='/usr/um/misc/bin' READLINE=
Type
make
If that works, try
make install
VMS
---
John Hasstedt <John.Hasstedt@sunysb.edu> has written configure.vms,
a command file that creates the necessary make and option files to build
gnuplot. See the file for instructions on using it. If you have problems
with it, the old build files are still included; instructions for using
them follow.
On VMS, you can use MMS, MMK, or another make utility, or you can
use BUILDVMS.COM. The supplied files work with Alpha/VMS V6.2 and
DECC V5.7; you may get warnings or more serious errors depending on
the versions of the C compiler, the C run-time libraries, and VMS on
your system.
To compile using MMK:
MMK/DESCRIPTION=MAKEFILE.VMS
To compile using MMS on VAX:
MMS/DESCRIPTION=MAKEFILE.VMS
To compile using MMS on Alpha:
MMS/DESCRIPTION=MAKEFILE.VMS/MACRO=__ALPHA__=1
Alternatively, you can use MAKE_VMS.COM. This command file will run
MMK or MMS to build gnuplot. If you don't have either one installed, it
will use the command file. The first parameter on the command line is
the compiler you want to use (default DECC).
It may sometimes be useful to add `/IGNORE=WARNING' to the `MMS' call.
To compile using GNUC or VAXC:
add /MACRO=GNUC or /MACRO=VAXC to the above command
To compile with another make utility:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -