summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-05-05 20:33:18 -0400
committermidipix <writeonce@midipix.org>2016-05-05 20:56:37 -0400
commitb89c8dafb8b4a4315f083451d6b05c7bdc460527 (patch)
treef20b70a44ec2b168dbbb970355a8ccc1bf837599
parentfbb1cf0c45071fcd95ba749386790da0317be0ca (diff)
downloadslibtool-b89c8dafb8b4a4315f083451d6b05c7bdc460527.tar.bz2
slibtool-b89c8dafb8b4a4315f083451d6b05c7bdc460527.tar.xz
build system: properly handle user inclusion of -static in LDFLAGS.
-rwxr-xr-xconfigure13
1 files changed, 13 insertions, 0 deletions
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