Link Algol 68 runtime library with libm
The Algol 68 runtime library now depends on the math library (`libm`) where appropriate.
This change ensures that the Algol 68 runtime library (libga68) is linked with the math library (libm) on targets that provide it. Several standard Algol 68 operators, such as floor and ceil, rely on mathematical functions implemented in libm. This change aligns libga68’s behavior with other GCC runtime libraries like libgfortran by explicitly adding the dependency using LT_LIB_M.
In Details
The libga68 runtime library's build configuration has been updated to declare a dependency on libm. This is necessary because certain Algol 68 standard operators, as defined in libga68/, require mathematical functions (e.g., floor, ceil, arctan) that are provided by the system's math library. The configure.ac file now invokes LT_LIB_M to conditionally add libm to the linker dependencies (SPEC_LIBGA68_DEPS) based on target platform capabilities.
- Algol 68
- A powerful, ALGOL-family procedural programming language known for its expressiveness and complex type system.
- runtime library
- A collection of pre-compiled code that provides essential services for a program during its execution, such as input/output, memory management, and mathematical functions.
- libm
- The standard C math library, providing functions like
sin,cos,sqrt,floor, etc. - libtool
- A generic library support script that abstracts the complexities of using shared and static libraries across different operating systems.
- LT_LIB_M
- A libtool macro used in
configure.acto detect and link against the system's math library (libm).