summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Watson <davejwatson@fb.com>2017-08-16 11:12:56 -0700
committerDave Watson <davejwatson@fb.com>2017-08-16 11:12:56 -0700
commit4e8b7a595e144e905fd9c8aed053d7529afb78a4 (patch)
tree82bb3fcbcb17e0fcf1970931c8e7c8750665766c
parent2acc55815c60a15723cbbb4db5ede9c3c77b3cad (diff)
downloadlibunwind-4e8b7a595e144e905fd9c8aed053d7529afb78a4.tar.gz
configure: Fix dangling link when --disable-static is specified
If I configure with ./configure --prefix= --enable-shared --disable-static, a broken symlink lib/libunwind-generic.a is installed that points to a missing architecture-specific version of that library (e.g. lib/libunwind-x86_64.a). I suppose that not installing that library is the intended behavior with these configuration settings, so the symlink should not be there in the first place. Reported-by: MarcoKoch
-rw-r--r--src/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2ba59105..948f747c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -471,7 +471,9 @@ else
# to be there if the user configured with --disable-shared.
#
install-exec-hook:
- cd $(DESTDIR)$(libdir) && $(LN_S) -f libunwind-$(arch).a libunwind-generic.a
+ if test -f $(DESTDIR)$(libdir)/libunwind-$(arch).a; then \
+ cd $(DESTDIR)$(libdir) && $(LN_S) -f libunwind-$(arch).a libunwind-generic.a; \
+ fi
if test -f $(DESTDIR)$(libdir)/libunwind-$(arch).so; then \
cd $(DESTDIR)$(libdir) && $(LN_S) -f libunwind-$(arch).so \
libunwind-generic.so; \