WCSLIB is written and maintained by one of the authors of the World Coordinate System (WCS) definition in the FITS standard49, Mark Calabretta. It might be already built and ready in your distribution’s package management system. However, here the installation from source is explained, for the advantages of installation from source please see Mandatory dependencies. To install WCSLIB you will need to have CFITSIO already installed, see CFITSIO.
WCSLIB also has plotting capabilities which use PGPLOT (a plotting library for C). If you wan to use those capabilities in WCSLIB, PGPLOT provides the PGPLOT installation instructions. However PGPLOT is old50, so its installation is not easy, there are also many great modern WCS plotting tools (mostly in written in Python). Hence, if you will not be using those plotting functions in WCSLIB, you can configure it with the --without-pgplot option as shown below.
If you have the cURL library 51 on your system and you installed CFITSIO version 3.42 or later, you will need to also link with the cURL library at configure time (through the
-lcurl option as shown below).
CFITSIO uses the cURL library for its HTTPS (or HTTP Secure52) support and if it is present on your system, CFITSIO will depend on it.
./configure command below fails (you don’t have the cURL library), then remove this option and rerun it.
Let’s assume you have downloaded wcslib.tar.bz2 and are in the same directory, to configure, build, check and install WCSLIB follow the steps below.
$ tar xf wcslib.tar.bz2 ## In the `cd' command, replace `X.X' with version number. $ cd wcslib-X.X ## If `./configure' fails, remove `-lcurl' and run again. $ ./configure LIBS="-pthread -lcurl -lm" --without-pgplot \ --disable-fortran $ make $ make check $ sudo make install
Greisen E.W., Calabretta M.R. (2002) Representation of world coordinates in FITS. Astronomy and Astrophysics, 395, 1061-1075.
As of early June 2016, its most recent version was uploaded in February 2001.