From cc13115f5076ecda85fc1b195ebdafce8608427b Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 5 May 2016 20:33:18 -0400 Subject: build system: properly handle user inclusion of -static in LDFLAGS. --- configure | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 8fa8472..60843ae 100755 --- a/configure +++ b/configure @@ -322,6 +322,18 @@ cross_defaults() } +config_flags() +{ + mb_ldflags_tmp=" $mb_ldflags " + mb_ldflags_libs=`echo "$mb_ldflags_tmp" | sed 's/ -static / /g'` + + if [ "$mb_ldflags_tmp" != "$mb_ldflags_libs" ]; then + mb_ldflags="$mb_ldflags_libs" + mb_ldflags_util="$mb_ldflags_util -static" + fi +} + + config_copy() { sed -e 's^@package@^'"$mb_package"'^g' \ @@ -522,6 +534,7 @@ cross_defaults # four: config +config_flags config_copy config_host config_status -- cgit v1.2.3