]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgm2: Define missing configure macros [PR113888]
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 12 Feb 2024 13:01:41 +0000 (14:01 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 12 Feb 2024 13:01:41 +0000 (14:01 +0100)
commit0437cbdccb91da6a8c25b2c29e9f19a9585309fc
treeea18ea8306756710f5bd78a496076461fe4349a8
parent016fbd2d89972e0c44d9cd8375d2332108e447c4
libgm2: Define missing configure macros [PR113888]

As detailed in PR modula2/113888, the 32-bit libm2pim/target.c doesn't
assemble in a Linux/sparc64 multilib build.  However, the root cause is
that the HAVE_EXP10* macros are never defined.  While I was at it, I
checked for other cases where the code uses HAVE_* macros that are
missing from config.h.in.

This patch adds the missing checks, changes the configure checks where
the names don't match what's used in the code, or corrects the code to
use the right names.

So far tested on sparc64-unknown-linux-gnu by building libgm2 (32 and
64-bit) and running the gm2 tests.

2024-02-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

libgm2:
PR modula2/113888
* configure.ac (GM2_CHECK_LIB): Rename gettimeofday guard to
HAVE_GETTIMEOFDAY.
(GM_CHECK_LIB): Check for settimeofday.
(GM2_CHECK_LIB): Check for exp10, exp10f, exp10l in libm.
(AC_CHECK_DECLS): Check for getenv.
* configure, config.h.in: Regenerate.
* libm2pim/dtoa.cc: Rename <strings.h>, <string.h> guards to
HAVE_STRINGS_H, HAVE_STRING_H.
* libm2pim/ldtoa.cc: Likewise.
libgm2/config.h.in
libgm2/configure
libgm2/configure.ac
libgm2/libm2pim/dtoa.cc
libgm2/libm2pim/ldtoa.cc