identification: Add support for POSIX regular expressions

When cross-compiling for Windows on Ubuntu, we don't have POSIX regular
expressions available (there does not seem to be any alternative libraries
either), but since the tests are not executed that's OK.  On AppVeyor,
MSYS2 has libgnurx installed, which works fine but requires explicit
linking with `-lregex`.

This is loosely based on a patch by Thomas Egerer.
This commit is contained in:
Tobias Brunner
2025-05-28 09:58:17 +02:00
parent 2b1f0e8c6e
commit 7de05b918c
4 changed files with 492 additions and 55 deletions
+4
View File
@@ -604,6 +604,10 @@ AC_LINK_IFELSE(
AC_SUBST(ATOMICLIB)
LIBS=$saved_LIBS
# Some platforms require explicit linking to use POSIX regular expressions
AC_SEARCH_LIBS([regcomp], [regex], [AC_DEFINE([HAVE_REGEX], [], [have regcomp() etc.])])
# ------------------------------------------------------
AC_MSG_CHECKING(for dladdr)