From 7d43108f9c41a2ccbe0adc8713523ad60469e026 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Wed, 15 Jun 2011 20:07:10 -0400 Subject: [PATCH] No libunwind-generic.so if configured with --disable-shared Installing a libunwind that was configured with --disable-shared results in a broken libunwind-generic.so link. This patch avoids this broken link. --- src/Makefile.am | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index e889235b..f0e9a055 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -326,12 +326,16 @@ install-exec-hook: else # # This is not ideal, but I know of no other way to install an -# alias for a library. +# alias for a library. For the shared version, we have to do +# a file check before creating the link, because it isn't going +# to be there if the user configured with --disable-shared. # install-exec-hook: $(LN_S) -f libunwind-$(arch).a $(DESTDIR)$(libdir)/libunwind-generic.a - $(LN_S) -f libunwind-$(arch).so \ - $(DESTDIR)$(libdir)/libunwind-generic.so + if test -f $(DESTDIR)$(libdir)/libunwind-generic.so; then \ + $(LN_S) -f libunwind-$(arch).so \ + $(DESTDIR)$(libdir)/libunwind-generic.so; \ + fi endif if OS_LINUX