GNU Astronomy Utilities


Next: , Previous: , Up: Gnuastro library   [Contents][Index]


10.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 literal129 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_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_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_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_BIN_OP_UINT8
Macro: GAL_CONFIG_BIN_OP_INT8
Macro: GAL_CONFIG_BIN_OP_UINT16
Macro: GAL_CONFIG_BIN_OP_INT16
Macro: GAL_CONFIG_BIN_OP_UINT32
Macro: GAL_CONFIG_BIN_OP_INT32
Macro: GAL_CONFIG_BIN_OP_UINT64
Macro: GAL_CONFIG_BIN_OP_INT64
Macro: GAL_CONFIG_BIN_OP_FLOAT32
Macro: GAL_CONFIG_BIN_OP_FLOAT64

If binary arithmetic operators were configured for any type, the respective macro will have a value of 1 (one), otherwise its value will be 0 (zero). Please see the similar configure-time options in Gnuastro configure options for a thorough explanation. These are only relevant for you if you intend to use the binary operators of Arithmetic on datasets (arithmetic.h)

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.


Footnotes

(129)

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


Next: , Previous: , Up: Gnuastro library   [Contents][Index]