summaryrefslogtreecommitdiffstats
path: root/src/auto/configure
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-11-03 22:32:24 +0100
committerBram Moolenaar <Bram@vim.org>2010-11-03 22:32:24 +0100
commit22e193ddd551cf67635e73231c259415bd70c135 (patch)
tree25ff2571555022cd358b128f614d75e72c934843 /src/auto/configure
parent2d0860d06c29f73ef42c01e2f4284e471d8023b4 (diff)
updated for version 7.3.050v7.3.050
Problem: The link script is clumsy. Solution: Use the --as-needed linker option if available. (Kirill A. Shutemov)
Diffstat (limited to 'src/auto/configure')
-rwxr-xr-xsrc/auto/configure18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/auto/configure b/src/auto/configure
index f18f5e5ae0..3367441836 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -593,6 +593,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
+LINK_AS_NEEDED
DEPEND_CFLAGS_FILTER
MAKEMO
MSGFMT
@@ -12404,6 +12405,23 @@ $as_echo "no" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
+$as_echo_n "checking linker --as-needed support... " >&6; }
+LINK_AS_NEEDED=
+# Check if linker supports --as-needed and --no-as-needed options
+if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
+ LDFLAGS="$LDFLAGS -Wl,--as-needed"
+ LINK_AS_NEEDED=yes
+fi
+if test "$LINK_AS_NEEDED" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
cat >confcache <<\_ACEOF