diff --git a/sc2/build/unix/build.config b/sc2/build/unix/build.config index 878d93a5a..50b1de134 100644 --- a/sc2/build/unix/build.config +++ b/sc2/build/unix/build.config @@ -45,11 +45,19 @@ uqm_requirements() define_have_symbol strcasecmp define_have_symbol stricmp + # Check to see whether math functions are available for free. + define_have_symbol acos + # Require either strcasecmp or stricmp. if not have_symbol strcasecmp && not have_symbol stricmp; then echo "Fatal: Your system defines neither strcasecmp() nor stricmp()." exit 1 fi + + # If we don't have math for free, add -lm to LDFLAGS. + if not have_symbol acos; then + LDFLAGS="$LDFLAGS -lm" + fi # Add defines for HAVE_ISWGRAPH, HAVE_WCHAR_T, and HAVE_WINT_T define_have_symbol iswgraph diff --git a/sc2/build/unix/config_proginfo_build b/sc2/build/unix/config_proginfo_build index 64df5b756..2bc25dbc0 100644 --- a/sc2/build/unix/config_proginfo_build +++ b/sc2/build/unix/config_proginfo_build @@ -143,7 +143,6 @@ case "$HOST_SYSTEM" in BUILDTOOL_LINK_DEPEND='gcce' ;; *) - EXTRA_PLATFORM_GCC_FLAGS_LINK='-lm' useGccBuildTools ;; esac