From 0f3eb362480ea9f4bbded84cc49a4cf682b12db8 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Sat, 15 Oct 2005 08:14:06 +0000 Subject: [PATCH] Don't use the system regex.h on Cygwin. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1908 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/build/unix/config_proginfo_host | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sc2/build/unix/config_proginfo_host b/sc2/build/unix/config_proginfo_host index 3602fb07a..a15ddfad6 100644 --- a/sc2/build/unix/config_proginfo_host +++ b/sc2/build/unix/config_proginfo_host @@ -177,7 +177,21 @@ LIB_zlib_DEPEND_DETECT_BIN="pkgconfig" # Describe the symbols (possibly) used: # ############################################################################## -HEADER_regex_EXTRA="#include " +# HACK: The detected regex.h on Cygwin is from Cygwin itself, but as +# the precompiled SDL for Cygwin uses -mno-cygwin in both the +# CFLAGS and LDFLAGS, the actual build would fail when SDL is used. +# The workaround below is is a hack as the detection of regex should +# not depend on SDL, and in theory the program built using these +# scripts need not use SDL. +case "$HOST_SYSTEM" in + CYGWIN*) + # Make sure Cygwin's regex.h is not detected. + HEADER_regex_EXTRA='#error "Forced Cygwin regex.h detection failure."' + ;; + *) + HEADER_regex_EXTRA="#include " + ;; +esac SYMBOL_readdir_r_EXTRA="#include "