GNU Astronomy Utilities



12.3.1 Configuration information (config.h)

The gnuastro/config.h header contains information about the full Gnuastro installation on your system. Gnuastro developers should note that this is the only header that is not available within Gnuastro, it is only available to a Gnuastro library user after installation. Within Gnuastro, config.h (which is included in every Gnuastro .c file, see Coding conventions) has more than enough information about the overall Gnuastro installation.

Macro: GAL_CONFIG_VERSION

This macro can be used as a string literal254 containing the version of Gnuastro that is being used. See Version numbering for the version formats. For example:

printf("Gnuastro version: %s\n", GAL_CONFIG_VERSION);

or

char *gnuastro_version=GAL_CONFIG_VERSION;
Macro: GAL_CONFIG_HAVE_GSL_INTERP_STEFFEN

GNU Scientific Library (GSL) is a mandatory dependency of Gnuastro (see GNU Scientific Library). The Steffen interpolation function that can be used in Gnuastro was introduced in GSL version 2.0 (released in October 2015). This macro will have a value of 1 if the host GSL contains this feature at configure time, and 0 otherwise.

Macro: GAL_CONFIG_HAVE_FITS_IS_REENTRANT

This macro will have a value of 1 when the CFITSIO of the host system has the fits_is_reentrant function (available from CFITSIO version 3.30). This function is used to see if CFITSIO was configured to read a FITS file simultaneously on different threads.

Macro: GAL_CONFIG_HAVE_WCSLIB_VERSION

WCSLIB is the reference library for world coordinate system transformation (see WCSLIB and World Coordinate System (wcs.h)). However, only more recent versions of WCSLIB also provide its version number. If the WCSLIB that is installed on the system provides its version (through the possibly existing wcslib_version function), this macro will have a value of one, otherwise it will have a value of zero.

Macro: GAL_CONFIG_HAVE_WCSLIB_DIS_H

This macro has a value of 1 if the host’s WCSLIB has the wcslib/dis.h header for distortion-related operations.

Macro: GAL_CONFIG_HAVE_WCSLIB_MJDREF

This macro has a value of 1 if the host’s WCSLIB reads and stores the MJDREF FITS header keyword as part of its core wcsprm structure.

Macro: GAL_CONFIG_HAVE_WCSLIB_OBSFIX

This macro has a value of 1 if the host’s WCSLIB supports the OBSFIX feature (used by wcsfix function to parse the input WCS for known errors).

Macro: GAL_CONFIG_HAVE_PTHREAD_BARRIER

The POSIX threads standard define barriers as an optional requirement. Therefore, some operating systems choose to not include it. As one of the ./configure step checks, Gnuastro we check if your system has this POSIX thread barriers. If so, this macro will have a value of 1, otherwise it will have a value of 0. see Implementation of pthread_barrier for more.

Macro: GAL_CONFIG_SIZEOF_LONG
Macro: GAL_CONFIG_SIZEOF_SIZE_T

The size of (number of bytes in) the system’s long and size_t types. Their values are commonly either 4 or 8 for 32-bit and 64-bit systems. You can also get this value with the expression ‘sizeof size_t’ for example, without having to include this header.

Macro: GAL_CONFIG_HAVE_LIBGIT2

Libgit2 is an optional dependency of Gnuastro (see Optional dependencies). When it is installed and detected at configure time, this macro will have a value of 1 (one). Otherwise, it will have a value of 0 (zero). Gnuastro also comes with some wrappers to make it easier to use libgit2 (see Git wrappers (git.h)).

Macro: GAL_CONFIG_HAVE_PYTHON

Gnuastro can optionally provide a set of basic functions to facilitate wrapper libraries in Python (see Python interface (python.h)). If a version of Python 3.X was found on the host system that has the necessary Numpy headers, this macro will be given a value of 1. Otherwise, it will be given a value of 0 and the the Python interface functions won’t be available in the host’s Gnuastro library.

Macro: GAL_CONFIG_HAVE_GNUMAKE_H

Gnuastro provides a set of GNU Make extension functions (see Makefile extensions (for GNU Make)). In order to use those, the host should have gnumake.h in its include paths. This check is done at Gnuastro’s configuration time. If it was found, this macro is given a value of 1, otherwise, it will have a value of 0.


Footnotes

(254)

https://en.wikipedia.org/wiki/String_literal