|
Packit |
0986c0 |
Table of contents:
|
|
Packit |
0986c0 |
==================
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
* Installation from sources
|
|
Packit |
0986c0 |
* More details about ./configure --with-PACKAGE[=OPTION]
|
|
Packit |
0986c0 |
* Platform compiler problems
|
|
Packit |
0986c0 |
* Environment variables
|
|
Packit |
0986c0 |
* How to test gnuplot
|
|
Packit |
0986c0 |
* Installing WPS object for gnuplot on OS/2
|
|
Packit |
0986c0 |
* Compiling Gnuplot with the wxt (wxWidgets) terminal
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
If you are installing a binary package, you may still want to check out
|
|
Packit |
0986c0 |
some sections of this document, particularly the one discussing
|
|
Packit |
0986c0 |
environment variables.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Installation from sources
|
|
Packit |
0986c0 |
=========================
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
For the impatient
|
|
Packit |
0986c0 |
-----------------
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Configuration options are in the Makefile and in src/term.h, which
|
|
Packit |
0986c0 |
selects the set of terminal drivers to be compiled in.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The recommended way to configure both of these is the GNU-style
|
|
Packit |
0986c0 |
"./configure" script described below and described further in INSTALL.gnu.
|
|
Packit |
0986c0 |
This script is provided as part of the distributed source package, but if you
|
|
Packit |
0986c0 |
are using sources downloaded directly from a git snapshot you may need to
|
|
Packit |
0986c0 |
regenerate it using the preliminary script "./prepare".
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The ./configure script inspects your system to see what support libraries
|
|
Packit |
0986c0 |
are available, then modifies the gnuplot Makefile and header file config.h
|
|
Packit |
0986c0 |
to use them. Assuming you have already installed the necessary support
|
|
Packit |
0986c0 |
libraries, the process is:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
./configure # prepare Makefile and config.h
|
|
Packit |
0986c0 |
make # build the program and documentation
|
|
Packit |
0986c0 |
make check # run unit tests to confirm successful build
|
|
Packit |
0986c0 |
make install # install the program and documentation
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
File location defaults
|
|
Packit |
0986c0 |
----------------------
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
PREFIX /usr/local
|
|
Packit |
0986c0 |
gnuplot PREFIX/bin
|
|
Packit |
0986c0 |
gnuplot_x11 PREFIX/libexec/gnuplot/$VERSION
|
|
Packit |
0986c0 |
gnuplot_qt PREFIX/libexec/gnuplot/$VERSION
|
|
Packit |
0986c0 |
gnuplot.1 PREFIX/man/man1
|
|
Packit |
0986c0 |
gnuplot.gih PREFIX/share/gnuplot/$VERSION
|
|
Packit |
0986c0 |
terminal support files PREFIX/share/gnuplot/$VERSION/js
|
|
Packit |
0986c0 |
PREFIX/share/gnuplot/$VERSION/PostScript
|
|
Packit |
0986c0 |
PREFIX/share/gnuplot/$VERSION/lua
|
|
Packit |
0986c0 |
PREFIX/share/gnuplot/$VERSION/qt
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The only files where the runtime location is defined at compile time are
|
|
Packit |
0986c0 |
gnuplot.gih and show.c. This is important if gnuplot is not installed
|
|
Packit |
0986c0 |
by running 'make install'.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The default path for the help library, gnuplot.gih, can be controlled in
|
|
Packit |
0986c0 |
several different ways:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o use configure's --with-gihdir option to specify the full path to the
|
|
Packit |
0986c0 |
directory where gnuplot.gih is to be installed, e.g.
|
|
Packit |
0986c0 |
./configure --with-gihdir=/opt/docs
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o use configure's --datadir= option to specify a version and package
|
|
Packit |
0986c0 |
independent data dir prefix, e.g.
|
|
Packit |
0986c0 |
./configure --datadir='/opt/docs'
|
|
Packit |
0986c0 |
gnuplot will look for the online help file, gnuplot.gih, in
|
|
Packit |
0986c0 |
/opt/docs/gnuplot/$VERSION.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o with configure's --prefix= option, eg.
|
|
Packit |
0986c0 |
./configure --prefix=/gnuplot
|
|
Packit |
0986c0 |
gnuplot will look for the online help file, gnuplot.gih, in
|
|
Packit |
0986c0 |
/gnuplot/share/gnuplot/$VERSION.
|
|
Packit |
0986c0 |
Attention: This option affects the location of *all* installed files!
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o at make time, eg.
|
|
Packit |
0986c0 |
make HELPFILE='/gnuplot/docs/gnuplot.gih'
|
|
Packit |
0986c0 |
gnuplot will look for the online help file /gnuplot/docs/gnuplot.gih.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o at execution time by specifying the helpfile with the environment
|
|
Packit |
0986c0 |
variable GNUHELP (see "Environment Variables" below).
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The default location of the main executable can be controlled in
|
|
Packit |
0986c0 |
different ways:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o with configure's --prefix= option, eg.
|
|
Packit |
0986c0 |
./configure --prefix=/gnuplot
|
|
Packit |
0986c0 |
gnuplot will be installed as /gnuplot/bin/gnuplot.
|
|
Packit |
0986c0 |
Attention: This affects the location of *all* installed files!
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o with configure's --bindir= option, eg.
|
|
Packit |
0986c0 |
./configure --bindir='/gnuplot/bin'
|
|
Packit |
0986c0 |
gnuplot will be installed as /gnuplot/bin/gnuplot.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o at make time, eg.
|
|
Packit |
0986c0 |
make bindir='/gnuplot/bin'
|
|
Packit |
0986c0 |
gnuplot will be installed as /gnuplot/bin/gnuplot.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The default location of the additional executable, like gnuplot_x11,
|
|
Packit |
0986c0 |
can be controlled in different ways:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o with configure's --prefix= option, eg.
|
|
Packit |
0986c0 |
./configure --prefix=/gnuplot
|
|
Packit |
0986c0 |
gnuplot_x11 will be installed as /gnuplot/libexec/gnuplot/4.0/gnuplot_x11.
|
|
Packit |
0986c0 |
Attention: This affects the location of *all* installed files!
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o with configure's --libexecdir= option, eg.
|
|
Packit |
0986c0 |
./configure --libexecdir='/gnuplot/lib'
|
|
Packit |
0986c0 |
gnuplot_x11 will be installed as /gnuplot/lib/gnuplot/4.0/gnuplot_x11
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o at make time, eg.
|
|
Packit |
0986c0 |
make X11_DRIVER_DIR='/gnuplot/lib/4.0'
|
|
Packit |
0986c0 |
gnuplot_x11 will be installed as /gnuplot/lib/4.0/gnuplot_x11
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
If you don't install the program at the place chosen by ./configure,
|
|
Packit |
0986c0 |
e.g. by overriding the "prefix" at "make install" time, files written
|
|
Packit |
0986c0 |
by the `save' command cannot be used as scripts on Un*x platforms, so
|
|
Packit |
0986c0 |
this should be avoided. There is no way to specify the location of
|
|
Packit |
0986c0 |
the executables during runtime. Other platforms are not affected by
|
|
Packit |
0986c0 |
this.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The gnuplot demo files are not installed by default, mainly because
|
|
Packit |
0986c0 |
there is no universally agreed place where such files should go.
|
|
Packit |
0986c0 |
If desired, they should be copied manually to a location of choice.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Unix, configure
|
|
Packit |
0986c0 |
---------------
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
On Unix, use
|
|
Packit |
0986c0 |
$ ./configure
|
|
Packit |
0986c0 |
$ make
|
|
Packit |
0986c0 |
[ Optionally run demos--see "How to test gnuplot" below. ]
|
|
Packit |
0986c0 |
$ make install
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
If gcc is installed, it is used by default. A different compiler can be
|
|
Packit |
0986c0 |
used by passing its name to configure:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
$ ./configure CC=c99
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Any environment settings for CFLAGS are included into the Makefile,
|
|
Packit |
0986c0 |
so please make sure that these are really needed.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
There are several options available for configure that you may want
|
|
Packit |
0986c0 |
to change. A complete list of options is available through
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
$ ./configure --help
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Some options relevant to gnuplot are listed below:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--prefix=PREFIX Install architecture-independent files in PREFIX
|
|
Packit |
0986c0 |
[/usr/local]
|
|
Packit |
0986c0 |
--exec-prefix=EPREFIX Install architecture-specific file in EPREFIX
|
|
Packit |
0986c0 |
[PREFIX]
|
|
Packit |
0986c0 |
--bindir=DIR user executables in DIR [EPREFIX/bin]
|
|
Packit |
0986c0 |
The gnuplot binary is installed this directory
|
|
Packit |
0986c0 |
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
|
|
Packit |
0986c0 |
gnuplot_x11 goes into $libexecdir/gnuplot/<version>.
|
|
Packit |
0986c0 |
--datadir=DIR Read-only architecture-independent data in DIR
|
|
Packit |
0986c0 |
[PREFIX/share]. The gnuplot help file is installed
|
|
Packit |
0986c0 |
in this directory.
|
|
Packit |
0986c0 |
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
|
|
Packit |
0986c0 |
--includedir=DIR C header files in DIR [PREFIX/include]
|
|
Packit |
0986c0 |
--mandir=DIR Man documentation in DIR [PREFIX/man]
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--disable-history-file do not use history file
|
|
Packit |
0986c0 |
--disable-mouse disable mouse for interactive terminals
|
|
Packit |
0986c0 |
--disable-x11-mbfonts disable multi-byte font support for x11
|
|
Packit |
0986c0 |
--disable-x11-external disable drawing to windows belonging to external apps
|
|
Packit |
0986c0 |
--disable-raise-console spacebar in plot window does not raise console
|
|
Packit |
0986c0 |
--disable-wxwidgets wxWidgets terminal (default enabled)
|
|
Packit |
0986c0 |
--enable-backwards-compatibility enable deprecated syntax
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--with-bitmap-terminals enable support for HP deskjet era dot matrix printers
|
|
Packit |
0986c0 |
and *.pbm files
|
|
Packit |
0986c0 |
--with-readline={gnu|bsd|builtin}
|
|
Packit |
0986c0 |
Override the automatic choice of terminal input modes.
|
|
Packit |
0986c0 |
See below for more detail.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Options marked with (*) are enabled by default, ie. these features or
|
|
Packit |
0986c0 |
packages are used if configure detects them even if the corresponding
|
|
Packit |
0986c0 |
option is not specified. Please note that the `--with-PACKAGE'
|
|
Packit |
0986c0 |
options can have additional arguments:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
o `--with-PACKAGE' is equivalent to `--with-PACKAGE=yes'
|
|
Packit |
0986c0 |
o `--with-PACKAGE=no' disables checking for PACKAGE. It has the same
|
|
Packit |
0986c0 |
effect as `--without-PACKAGE'.
|
|
Packit |
0986c0 |
o `--with-PACKAGE=DIR' checks for PACKAGE in DIR
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Linux
|
|
Packit |
0986c0 |
-----
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
./configure may fail to find lua support if the package configuration tool is
|
|
Packit |
0986c0 |
installed as "lua5.1" or "lua5.3" rather than "lua". If necessary, you can fix
|
|
Packit |
0986c0 |
this by adding a symlink prior to running ./configure as shown below:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
ln -s /usr/lib/pkgconfig/lua5.3.pc /usr/lib/pkgconfig/lua.pc
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Mac OSX
|
|
Packit |
0986c0 |
-------
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Readline issues:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
As I understand the situation, Apple ships OSX with a "fake" libreadline
|
|
Packit |
0986c0 |
shared library. The file /usr/lib/libreadline.dylib is really a symlink to a
|
|
Packit |
0986c0 |
compatibility layer over the BSD libedit library. But the compatibility isn't
|
|
Packit |
0986c0 |
complete, and in particular it is missing some routines used for readline
|
|
Packit |
0986c0 |
support by gnuplot. The ./configure script should be able to cope with this.
|
|
Packit |
0986c0 |
But you will still be left without some of the functionality of the "real"
|
|
Packit |
0986c0 |
libreadline. For one thing, libedit doesn't handle UTF-8 input.
|
|
Packit |
0986c0 |
You have several options:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
1) Delete the fake libreadline libraries from OSX and install
|
|
Packit |
0986c0 |
the real gnu libreadline as a system library.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
2) Install the real gnu libreadline into your personal account and
|
|
Packit |
0986c0 |
tell gnuplot to use it:
|
|
Packit |
0986c0 |
./configure --with-readline=/my/private/readline/installdir
|
|
Packit |
0986c0 |
This may require some playing around with additional -L and -I
|
|
Packit |
0986c0 |
definitions in CFLAGS, and is probably harder than replacing the
|
|
Packit |
0986c0 |
system copy of the library.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
3) Use gnuplot's built-in readline routines. These now support UTF-8
|
|
Packit |
0986c0 |
input and tab-completion of file names.
|
|
Packit |
0986c0 |
./configure --with-readline=builtin
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
wxt terminal:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Cairo & pango need to be installed first on Mac,
|
|
Packit |
0986c0 |
I recommend using MacPorts building universal (i386 libraries):
|
|
Packit |
0986c0 |
sudo port install cairo +no_x11 +quartz +universal
|
|
Packit |
0986c0 |
sudo port install pango +no_x11 +quartz +universal
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Next gnuplot may be compiled with shipped with Mac OS X 10.6 SL wxWidgets using:
|
|
Packit |
0986c0 |
./configure CPPFLAGS='-arch i386' LDFLAGS='-arch i386'
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
NOTE: 10.6 SL by default generates x86_64 code, but wxWidgets stable is using
|
|
Packit |
0986c0 |
Carbon API on Mac which is 32-bit only, that makes compiling gnuplot,
|
|
Packit |
0986c0 |
cairo and pango to i386 necessary.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
linux: Some wxWidgets configurations require linking to the X11 library but
|
|
Packit |
0986c0 |
fail to include "-lX11" in the string provided for auto-configuration.
|
|
Packit |
0986c0 |
You may have to add this manually when configuring gnuplot:
|
|
Packit |
0986c0 |
TERMLIBS="-lX11" ./configure
|
|
Packit |
0986c0 |
Note that some people have reported runtime problems with wxgtk 3.0.
|
|
Packit |
0986c0 |
If you have the option of linking to libraries for wxgtk 2.8 instead,
|
|
Packit |
0986c0 |
this may be preferable. The -lX11 flag is not need in this case.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
VMS
|
|
Packit |
0986c0 |
---
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
We used to test-build gnuplot pre-releases on VMS, but this has not been
|
|
Packit |
0986c0 |
the case since about version 4.6. The old guidelines are included below but
|
|
Packit |
0986c0 |
may be of only historical interest. If you have successfully built version 5
|
|
Packit |
0986c0 |
on VMS please drop us a note, particularly if there were any changes you
|
|
Packit |
0986c0 |
needed to make it work.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
John Hasstedt <John.Hasstedt@sunysb.edu> has written configure.vms,
|
|
Packit |
0986c0 |
a command file that creates the necessary make and option files to build
|
|
Packit |
0986c0 |
gnuplot. See the file for instructions on using it. If you have problems
|
|
Packit |
0986c0 |
with it, the old build files are still included; instructions for using
|
|
Packit |
0986c0 |
them follow.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
On VMS, you can use MMS, MMK, or another make utility, or you can
|
|
Packit |
0986c0 |
use BUILDVMS.COM. The supplied files work with Alpha/VMS V6.2 and
|
|
Packit |
0986c0 |
DECC V5.7; you may get warnings or more serious errors depending on
|
|
Packit |
0986c0 |
the versions of the C compiler, the C run-time libraries, and VMS on
|
|
Packit |
0986c0 |
your system.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
To compile using MMK:
|
|
Packit |
0986c0 |
MMK/DESCRIPTION=MAKEFILE.VMS
|
|
Packit |
0986c0 |
To compile using MMS on VAX:
|
|
Packit |
0986c0 |
MMS/DESCRIPTION=MAKEFILE.VMS
|
|
Packit |
0986c0 |
To compile using MMS on Alpha:
|
|
Packit |
0986c0 |
MMS/DESCRIPTION=MAKEFILE.VMS/MACRO=__ALPHA__=1
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Alternatively, you can use MAKE_VMS.COM. This command file will run
|
|
Packit |
0986c0 |
MMK or MMS to build gnuplot. If you don't have either one installed, it
|
|
Packit |
0986c0 |
will use the command file. The first parameter on the command line is
|
|
Packit |
0986c0 |
the compiler you want to use (default DECC).
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
It may sometimes be useful to add `/IGNORE=WARNING' to the `MMS' call.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
To compile using GNUC or VAXC:
|
|
Packit |
0986c0 |
add /MACRO=GNUC or /MACRO=VAXC to the above command
|
|
Packit |
0986c0 |
To compile with another make utility:
|
|
Packit |
0986c0 |
check the documentation of your utility to specify the description
|
|
Packit |
0986c0 |
file and any necessary macros (__ALPHA__, GNUC, or VAXC)
|
|
Packit |
0986c0 |
Or if you don't have a suitable make:
|
|
Packit |
0986c0 |
@BUILDVMS
|
|
Packit |
0986c0 |
To tell gnuplot where to find the help library:
|
|
Packit |
0986c0 |
$ define gnuplot$help disk:[directory]gnuplot.hlb
|
|
Packit |
0986c0 |
Alternatively, put the help in the main system help library.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
MS-Windows
|
|
Packit |
0986c0 |
----------
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
We provide binary packages with an installer or as "portable" versions packed
|
|
Packit |
0986c0 |
in zip / 7z format on SourceForge.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
We currently support and test building with the following compilers and
|
|
Packit |
0986c0 |
Makefiles:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Mingw-w64/MSYS2: config/mingw/Makefile
|
|
Packit |
0986c0 |
Microsoft Visual C++: config/msvc/Makefile
|
|
Packit |
0986c0 |
OpenWatcom: config/watcom/Makefile
|
|
Packit |
0986c0 |
Cygwin: config/cygwin/Makefile
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
These Makefiles contain a configuration section which you have to
|
|
Packit |
0986c0 |
adopt to your actual setup. Further building instructions are given in Makefiles.
|
|
Packit |
0986c0 |
For MSYS2/Mingw-w64 you can find detailed instructions at
|
|
Packit |
0986c0 |
https://sourceforge.net/p/gnuplot/support-requests/199/
|
|
Packit |
0986c0 |
Some of the Makefiles include an "install" target (e.g. config/mingw/Makefile).
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
In order to build the help file you require the "Microsoft HTML Help 1.4
|
|
Packit |
0986c0 |
SDK", which is freely downloadable here:
|
|
Packit |
0986c0 |
http://go.microsoft.com/fwlink/?LinkId=154968
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
MSDOS
|
|
Packit |
0986c0 |
-----
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Using DJGPP (32-bit DOS port of GNU CC)
|
|
Packit |
0986c0 |
Basically the same as Unix+configure. Andris Pavenis <pavenis@lanet.lv>
|
|
Packit |
0986c0 |
has contributed a shell script which makes the whole process even easier:
|
|
Packit |
0986c0 |
just run djconfig.sh, and then make.
|
|
Packit |
0986c0 |
Only if you don't have a complete Unix toolset installed with your
|
|
Packit |
0986c0 |
DJGPP, it is recommended to use makefile.dj2 instead:
|
|
Packit |
0986c0 |
copy makefile.dj2 makefile
|
|
Packit |
0986c0 |
make
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
[NOTE: the 16-bit DOS versions of gnuplot no longer work. gnuplot has
|
|
Packit |
0986c0 |
outgrown this platform.]
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
OS/2
|
|
Packit |
0986c0 |
----
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
To compile under OS/2 (2.x and above) you need the development suite EMX 0.9
|
|
Packit |
0986c0 |
(including gcc). You should also have GNU Make and IBM's IPFC (Information
|
|
Packit |
0986c0 |
Presentation Facility Compiler, available from the Developer's Toolkit;
|
|
Packit |
0986c0 |
nowadays it's accessible through an IBM website for free!).
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
At the beginning of makefile.os2 you will find a configuration section where
|
|
Packit |
0986c0 |
you have to adjust all settings which control the build process. Most important
|
|
Packit |
0986c0 |
is probably to select the terminal devices which should be supported. You can
|
|
Packit |
0986c0 |
create a version offering PM graphics as well as X11 support (to use with
|
|
Packit |
0986c0 |
XFree86). Support for these two terminals is provided by additional
|
|
Packit |
0986c0 |
executables.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Be sure to enable only those devices for which you have the necessary software
|
|
Packit |
0986c0 |
already installed. Also ensure that the libraries and the sources are all
|
|
Packit |
0986c0 |
compiled (not) using the '-Zmt' flags.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Executing
|
|
Packit |
0986c0 |
make -f makefile.os2
|
|
Packit |
0986c0 |
should create a default build while
|
|
Packit |
0986c0 |
make -f makefile.os2 help
|
|
Packit |
0986c0 |
will show you all pre-defined targets.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
See other sections of the manuals for more information about installing/using
|
|
Packit |
0986c0 |
gnuplot on OS/2.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
More details about ./configure --with-PACKAGE[=OPTION]
|
|
Packit |
0986c0 |
======================================================
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Every `--with-PACKAGE' option sets a `with_package' variable in configure.
|
|
Packit |
0986c0 |
Depending on how `--with-PACKAGE' was invoked, there are only three different
|
|
Packit |
0986c0 |
possible values for the `with_package' variable:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Option $with_package
|
|
Packit |
0986c0 |
----------------------------------------
|
|
Packit |
0986c0 |
(not specified) yes or no; default set in configure
|
|
Packit |
0986c0 |
--with-package yes
|
|
Packit |
0986c0 |
--with-package=yes yes
|
|
Packit |
0986c0 |
--with-package=no no
|
|
Packit |
0986c0 |
--with-package=DIR DIR
|
|
Packit |
0986c0 |
--without-package no
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
In gnuplot, the following --with-PACKAGE options are available. The
|
|
Packit |
0986c0 |
--with-PACKAGE=DIR form is always required if a package is installed in a
|
|
Packit |
0986c0 |
non-default location that is not searched by the preprocessor or linker.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--with-readline
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Use whatever readline support is detected automatically, either an
|
|
Packit |
0986c0 |
external library or gnuplot's built-in version. This is the default.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--with-readline=builtin
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Use gnuplot's own builtin readline routines even if a GNU or BSD readline
|
|
Packit |
0986c0 |
library is detected.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--without-readline
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
(same as --with-readline=no) Do not use any readline processing.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--with-readline=gnu
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Use the GNU readline library instead of gnuplot's builtin readline.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--with-readline[=DIR]
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Use the GNU readline library instead of gnuplot's builtin readline.
|
|
Packit |
0986c0 |
This form is required if GNU readline is not installed in a default
|
|
Packit |
0986c0 |
location.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
--with-gd[=DIR]
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Thomas Boutell's gd library is needed to support jpeg and gif output.
|
|
Packit |
0986c0 |
It is also one of several options for producing png output.
|
|
Packit |
0986c0 |
This option is on by default, i.e. configure will check if the library exists,
|
|
Packit |
0986c0 |
and use it if found.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Platform compiler problems
|
|
Packit |
0986c0 |
==========================
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
This section addresses trouble shooting and testing issues. Userland questions
|
|
Packit |
0986c0 |
are answered in the FAQ.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Platform and compiler notes
|
|
Packit |
0986c0 |
---------------------------
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Generally, if you think that configure has made a mistake in detecting
|
|
Packit |
0986c0 |
platform features, you should consider that a bug either in GNU autoconf
|
|
Packit |
0986c0 |
or in gnuplot's use of it, which you should report. As a workaround
|
|
Packit |
0986c0 |
you can override such faulty tests in a site-wide collection
|
|
Packit |
0986c0 |
of preset configure test results, or manually override them after running
|
|
Packit |
0986c0 |
configure.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Example:
|
|
Packit |
0986c0 |
configure was for some reason unable to detect the memset() function, but
|
|
Packit |
0986c0 |
you are sure it is ok to use on your platform. To fix that, you'll have
|
|
Packit |
0986c0 |
to edit the generated config.h and change the line
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
/* #undef HAVE_MEMSET */
|
|
Packit |
0986c0 |
to
|
|
Packit |
0986c0 |
#define HAVE_MEMSET 1
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Note that changing such defines from outside config.h, eg. via
|
|
Packit |
0986c0 |
'make DEFS=-DHAVE_MEMSET' is wrong, because config.h will usually
|
|
Packit |
0986c0 |
override such changes. Also note that this change will be lost
|
|
Packit |
0986c0 |
whenever you re-run configure.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
- gcc -ansi
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
If you wish to compile with gcc -ansi (CC='gcc -ansi -pedantic'
|
|
Packit |
0986c0 |
./configure), additional platform specific defines may be necessary
|
|
Packit |
0986c0 |
to include non-ANSI function prototypes. E.g. on Solaris,
|
|
Packit |
0986c0 |
-D__EXTENSIONS__ is needed. Otherwise, non-declared functions not
|
|
Packit |
0986c0 |
returning int will be assumed to return int, with possibly
|
|
Packit |
0986c0 |
dangerous consequences. Especially scpecfun.c is vulnerable here.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
- SunOS / Solaris
|
|
Packit |
0986c0 |
There are known issues with regard to compiler support for Booleans.
|
|
Packit |
0986c0 |
You may have to tweak gnuplot's definition of TBOOLEAN.
|
|
Packit |
0986c0 |
The plugin demo Makefile may also require editing as noted in comments.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Environment variables
|
|
Packit |
0986c0 |
=====================
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
See 'help environment'.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
If the environment variable GNUTERM is found, it is used as the
|
|
Packit |
0986c0 |
terminal type. Otherwise, in some cases the variable TERM will be
|
|
Packit |
0986c0 |
used, or the hardware may be detected automatically. If all else
|
|
Packit |
0986c0 |
fails, a compile-time default will be used.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The PC version looks for the environment variable GNUPLOT to contain
|
|
Packit |
0986c0 |
the name of the directory from which to load the initialization file
|
|
Packit |
0986c0 |
GNUPLOT.INI and also to be used as the home directory in ~
|
|
Packit |
0986c0 |
substitution. See the help on 'start_up' for more information.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
If defined, the environment variable GNUHELP is used for the name of
|
|
Packit |
0986c0 |
the .gih help file, otherwise HELPFILE (defined in makefile or
|
|
Packit |
0986c0 |
command.c) is used.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The VMS version looks for the logical name GNUPLOT$HELP to locate the
|
|
Packit |
0986c0 |
help library.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The usual system-wide environment variable is used to locate a command
|
|
Packit |
0986c0 |
line shell to be used for executing commands and starting sub-shells.
|
|
Packit |
0986c0 |
On all versions of Windows and OS/2 the variable looked at is COMSPEC.
|
|
Packit |
0986c0 |
Other platforms will consult SHELL.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The x11 and qt terminals each require an auxilliary program (gnuplot_x11
|
|
Packit |
0986c0 |
gnuplot_qt) to manage the displayed plots. These are installed by
|
|
Packit |
0986c0 |
default in /usr/local/libexec/gnuplot/<version>/ but this default can be
|
|
Packit |
0986c0 |
overridden by the environmental variable GNUPLOT_DRIVER_DIR.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
GDFONTPATH is the directory where the libgd terminals (jpeg png gif)
|
|
Packit |
0986c0 |
search for fonts. You should set it to directory where files like
|
|
Packit |
0986c0 |
arial.ttf and Symbol.pfa exist.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
GNUPLOT_DEFAULT_GDFONT is the default font to be used by the png and
|
|
Packit |
0986c0 |
jpeg terminal types. This must either be a full path to the font file
|
|
Packit |
0986c0 |
or the face name of a font found in the GDFONTPATH search path.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
GNUPLOT_FONTPATH is used by the postscript driver as search path for
|
|
Packit |
0986c0 |
postscript (Adobe Type 1 and Type 2) fonts.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
GNUPLOT_PS_DIR is used by the postscript driver to use external prologue
|
|
Packit |
0986c0 |
files. Depending on the build process, gnuplot contains either a builtin
|
|
Packit |
0986c0 |
copy of those files or simply a default hardcoded path. Use this variable
|
|
Packit |
0986c0 |
to test the postscript terminal with custom prologue files.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
GNUPLOT_LIB may be used to define additional search directories for
|
|
Packit |
0986c0 |
data and command files. The variable may contain a single directory
|
|
Packit |
0986c0 |
name, or a list of directories separated by a platform-specific path
|
|
Packit |
0986c0 |
separator, eg. ':' on Unix, or ';' on DOS/Windows/OS2 platforms.
|
|
Packit |
0986c0 |
The contents of GNUPLOT_LIB are appended to the `loadpath`
|
|
Packit |
0986c0 |
variable but are not saved with the `save` and `save set` commands.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
GNUFITLOG holds the name of a file that saves fit results. The default
|
|
Packit |
0986c0 |
is fit.log. If the name ends with a "/" or "\", it is treated as a
|
|
Packit |
0986c0 |
directory name, and "fit.log" will be created as a file in that directory.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The CGI drivers need the CGIPATH environment variable to set the path
|
|
Packit |
0986c0 |
to the CGI agents, and the CGIDISP and/or CGIPRNT environment variables
|
|
Packit |
0986c0 |
to the CGI agents, and the CGIDISP and/or CGIPRNT environment variables
|
|
Packit |
0986c0 |
to set the output devices.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
If creating dynamically linked executables, it may be necessary to add
|
|
Packit |
0986c0 |
flags to the LIBS variable in Makefile to make sure gnuplot finds all
|
|
Packit |
0986c0 |
required libraries at runtime. Systems like SunOS and Solaris use -R
|
|
Packit |
0986c0 |
to specify the runtime library search path, whereas OSF/Dec Unix, Irix
|
|
Packit |
0986c0 |
and Linux use -rpath. If this is not possible, the LD_LIBRARY_PATH
|
|
Packit |
0986c0 |
environment variable should be set. Generally it's recommended to
|
|
Packit |
0986c0 |
install shared libraries only in places that are already searched by
|
|
Packit |
0986c0 |
the linker without such options. LD_LIBRARY_PATH is the second-best
|
|
Packit |
0986c0 |
choice.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
How to test gnuplot
|
|
Packit |
0986c0 |
===================
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The demo files distributed with the program source act also as unit
|
|
Packit |
0986c0 |
tests for various gnuplot syntax, plotting, and terminal features.
|
|
Packit |
0986c0 |
Output can be compared to the on-line demo output collection on the
|
|
Packit |
0986c0 |
gnuplot web site.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
All command line examples below assume Unix Bourne shell syntax.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Individual demo files can be run interactively by eg.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
$ cd gnuplot/demo
|
|
Packit |
0986c0 |
$ gnuplot simple.dem
|
|
Packit |
0986c0 |
or
|
|
Packit |
0986c0 |
$ GNUPLOT_DRIVER_DIR=../src ../src/gnuplot simple.dem
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
and gnuplot prompts the user to "Hit return to continue" to cycle through
|
|
Packit |
0986c0 |
all the plots (the GNUPLOT_DRIVER_DIR= part is only required if you are
|
|
Packit |
0986c0 |
using the X11 or BeOS plotting device and the gnuplot_x11/gnuplot_be binary
|
|
Packit |
0986c0 |
has not been installed yet, or if you want to test the external binaries you
|
|
Packit |
0986c0 |
just compiled at the same time).
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
To run the demos in a specified file without interaction, one can use
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
$ gnuplot simple.dem
|
|
Packit |
0986c0 |
$ GNUPLOT_DRIVER_DIR=../src ../src/gnuplot simple.dem
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
To run all demos non-interactively, use
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
$ gnuplot all.dem
|
|
Packit |
0986c0 |
$ GNUPLOT_DRIVER_DIR=../src ../src/gnuplot all.dem
|
|
Packit |
0986c0 |
For convenience, the special make target 'check' will run the above
|
|
Packit |
0986c0 |
if you run it from the demo directory of the source tree:
|
|
Packit |
0986c0 |
$ make check
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
To use a different plotting device than the default, use eg.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
$ GNUTERM=dumb make check
|
|
Packit |
0986c0 |
or
|
|
Packit |
0986c0 |
gnuplot> set term dumb
|
|
Packit |
0986c0 |
gnuplot> load 'all.dem'
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
To test the capabilities of the terminal you are using, there is the
|
|
Packit |
0986c0 |
'test' command:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
gnuplot> test
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
`test` creates a display of line and point styles and other useful things
|
|
Packit |
0986c0 |
appropriate for the terminal you are using.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Installing WPS object for gnuplot on OS/2
|
|
Packit |
0986c0 |
=========================================
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
GNUPLOT can be run from the command line of an OS/2 session, or can be set up
|
|
Packit |
0986c0 |
as a program object in the WPS.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
GNUPLOT starts up as a command line session which accepts the usual GNUPLOT
|
|
Packit |
0986c0 |
input. The Presentation Manager (PM) window for graphics display is only opened
|
|
Packit |
0986c0 |
when the first 'plot' or 'splot' command is entered.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
If GNUPLOT is set up as a program object, it can be configured for 'drag and
|
|
Packit |
0986c0 |
drop' in the usual way, by specifying '%*' as the program parameter.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The PM window has facilities for printing the plot, for changing the fonts
|
|
Packit |
0986c0 |
used in the plot, and so on. These of course are handled through the usual
|
|
Packit |
0986c0 |
PM interface. In addition, you can 'drop' a font onto the window to change
|
|
Packit |
0986c0 |
the font.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The usual GNUPLOT commands can also be used to produce output on supported
|
|
Packit |
0986c0 |
devices.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Settings and the positions and sizes of the windows can be saved in the file
|
|
Packit |
0986c0 |
gnushell.ini. This file is saved in the program's working directory; several
|
|
Packit |
0986c0 |
different directories can be set up (as program objects) with different
|
|
Packit |
0986c0 |
options, if you wish.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
PM terminal is fully mouse-capable. Type 'm' to switch the mouse on/off (see
|
|
Packit |
0986c0 |
'help mouse' for more details), or 'h' for the full list of current hotkeys
|
|
Packit |
0986c0 |
(see also 'help bind').
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Compiling Gnuplot with the wxWidgets terminal
|
|
Packit |
0986c0 |
==============================================
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
The `wxt` terminal provides an interactive windowed output. The code is
|
|
Packit |
0986c0 |
cross-platform and can be compiled as soon as the following requirements are
|
|
Packit |
0986c0 |
met:
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
First, this terminal is based on the wxWidgets library. This library can be
|
|
Packit |
0986c0 |
found on http://www.wxwidgets.org. It comes in different flavours corresponding
|
|
Packit |
0986c0 |
to the underlying API : Microsoft Windows ("wxMSW"), GTK+ ("wxGTK"), X11
|
|
Packit |
0986c0 |
("wxX11"), MacOS ("wxMAC"), etc.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
Then, the terminal needs the Cairo library (no specific backend is required)
|
|
Packit |
0986c0 |
which can be found on http://www.cairographics.org, and the Pango library,
|
|
Packit |
0986c0 |
which can be found on http://www.pango.org and need to be compiled with its
|
|
Packit |
0986c0 |
Cairo backend.
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
On Unix, use the usual `./configure; make; make install' build process to
|
|
Packit |
0986c0 |
compile this terminal. On Windows, please use the MinGW/MSYS makefile, namely
|
|
Packit |
0986c0 |
config/makefile.mgw. MinGW and MSYS can be found on http://www.mingw.org.
|
|
Packit |
0986c0 |
|