From 8823c4be44de65c52055bc1fab62f6cbf9f9a89e Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Sat, 4 Apr 2020 15:33:06 -0700 Subject: [PATCH] Fix MinGW build; check for whether we must explicitly link -lregex --- sc2/build/unix/build.config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sc2/build/unix/build.config b/sc2/build/unix/build.config index d3ccaa570..a5e145703 100644 --- a/sc2/build/unix/build.config +++ b/sc2/build/unix/build.config @@ -71,6 +71,14 @@ uqm_requirements() define_have_symbol getopt_long define_have_header regex.h + # If we have the regex header, see if we need to link it specially + if have_header regex.h; then + define_have_symbol regcomp + if not have_symbol regcomp; then + LDFLAGS="$LDFLAGS -lregex" + fi + fi + # Add define for HAVE__BOOL define_have_type _Bool