summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-02-16 16:30:00 +0000
committerJoshua Colp <jcolp@digium.com>2017-02-21 05:25:08 -0600
commite852d5b848de9bb55dc3363013aa18ebd736ebb9 (patch)
tree2790c68f68a1e2d8835fd1acc24b5d8ad5ad02fe /main
parentf390498a17681882ca6f5b89c8791c1e2b1fe269 (diff)
build: Execute ldconfig to build cache.
On some platforms a multiarch approach is used for libraries. The build system does not take this into account and still places libraries into the lib directory if no --libdir is specified to configure. On initial startup this results in libasteriskssl.so not being found, as it is not in the multiarch lib directory. This change does the minimally invasive thing and executes ldconfig so that the libraries in the lib directory are found and their location cached. By doing so Asterisk starts up fine. If DESTDIR is specified, however, the old logic is executed as the install process may not have permission to alter the ldconfig cache. ASTERISK-26705 Change-Id: If4eca46ac510c6fea5568256280ffdb3888d7bb4
Diffstat (limited to 'main')
-rw-r--r--main/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/Makefile b/main/Makefile
index 4d1b2c41b..3c371c668 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -355,7 +355,11 @@ else # Darwin
endif
endif
ifneq ($(LDCONFIG),)
+ifneq ($(DESTDIR),)
$(LDCONFIG) $(LDCONFIG_FLAGS) "$(DESTDIR)$(ASTLIBDIR)/"
+else
+ $(LDCONFIG)
+endif
endif
$(LN) -sf asterisk "$(DESTDIR)$(ASTSBINDIR)/rasterisk"
@@ -373,7 +377,11 @@ ifneq ($(ASTPJ_LIB).$(ASTPJ_SO_VERSION),.)
rm -f "$(DESTDIR)$(ASTLIBDIR)/$(ASTPJ_LIB)"
endif
ifneq ($(LDCONFIG),)
+ifneq ($(DESTDIR),)
$(LDCONFIG) $(LDCONFIG_FLAGS) "$(DESTDIR)$(ASTLIBDIR)/"
+else
+ $(LDCONFIG)
+endif
endif
clean::