summaryrefslogtreecommitdiff
path: root/main/Makefile
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-01-18 21:35:09 +0000
committerDavid M. Lee <dlee@digium.com>2013-01-18 21:35:09 +0000
commit7bd50bc0c4e27adbbc619a74bd22fb6bf7333321 (patch)
tree70eade721ba432c963a443c367f211b9bb8826a4 /main/Makefile
parent0fd34b8c0a01827880555239354cca8746782c83 (diff)
Specify the -rpath linker flag when prefix != /usr.
This allows Asterisk to start without having to specify the LD_LIBRARY_PATH. This can be disabled by passing --disable-rpath to configure. (closes issue ASTERISK-20407) Reported by: David M. Lee Review: https://reviewboard.asterisk.org/r/2132/ ........ Merged revisions 379475 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/Makefile')
-rw-r--r--main/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/Makefile b/main/Makefile
index fbb885cf8..5dec42e68 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -226,6 +226,9 @@ $(ASTSSL_LIB): $(ASTSSL_LIB).$(ASTSSL_SO_VERSION)
else # Darwin
ASTSSL_LIB:=libasteriskssl.dylib
+# -install_name allows library to be found if installed somewhere other than
+# /lib or /usr/lib
+$(ASTSSL_LIB): _ASTLDFLAGS+=-dynamiclib -install_name $(ASTLIBDIR)/$(ASTSSL_LIB)
$(ASTSSL_LIB): _ASTCFLAGS+=-fPIC -DAST_MODULE=\"asteriskssl\"
$(ASTSSL_LIB): LIBS+=$(ASTSSL_LIBS)
$(ASTSSL_LIB): SOLINK=$(DYLINK)