[Asterisk-code-review] Build: Fix issues building without SSL. (asterisk[13])
Joshua Colp
asteriskteam at digium.com
Tue Nov 21 05:23:29 CST 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/7294 )
Change subject: Build: Fix issues building without SSL.
......................................................................
Build: Fix issues building without SSL.
* Fix conditional in libasteriskssl.
* Use variables produced by configure to link the SSL and uuid libraries
into libasteriskpj.so instead of hard-coding them.
ASTERISK-27431
Change-Id: I3977931fd3ef8c4e4376349ccddb354eb839b58d
---
M main/Makefile
M main/libasteriskssl.c
2 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/main/Makefile b/main/Makefile
index efb0caf..4646c1b 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -273,7 +273,7 @@
$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): _ASTLDFLAGS+=-Wl,-soname=$(ASTPJ_LIB).$(ASTPJ_SO_VERSION) $(PJ_LDFLAGS)
$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): _ASTCFLAGS+=-fPIC -DAST_MODULE=\"asteriskpj\" $(PJ_CFLAGS)
-$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): LIBS+=$(PJPROJECT_LDLIBS) -lssl -lcrypto -luuid -lm -lpthread $(RT_LIB)
+$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): LIBS+=$(PJPROJECT_LDLIBS) $(OPENSSL_LIB) $(UUID_LIB) -lm -lpthread $(RT_LIB)
ifeq ($(GNU_LD),1)
$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): SO_SUPPRESS_SYMBOLS=-Wl,--version-script,libasteriskpj.exports,--warn-common
endif
@@ -298,7 +298,7 @@
# /lib or /usr/lib
$(ASTPJ_LIB): _ASTLDFLAGS+=-dynamiclib -install_name $(ASTLIBDIR)/$(ASTPJ_LIB) $(PJ_LDFLAGS)
$(ASTPJ_LIB): _ASTCFLAGS+=-fPIC -DAST_MODULE=\"asteriskpj\" $(PJ_CFLAGS)
-$(ASTPJ_LIB): LIBS+=$(PJPROJECT_LIBS) -lssl -lcrypto -luuid -lm -lpthread $(RT_LIB)
+$(ASTPJ_LIB): LIBS+=$(PJPROJECT_LIBS) $(OPENSSL_LIB) $(UUID_LIB) -lm -lpthread $(RT_LIB)
$(ASTPJ_LIB): SOLINK=$(DYLINK)
# Special rules for building a shared library (not a dynamically loadable module)
diff --git a/main/libasteriskssl.c b/main/libasteriskssl.c
index a89f191..41c6bcb 100644
--- a/main/libasteriskssl.c
+++ b/main/libasteriskssl.c
@@ -39,7 +39,7 @@
#endif
#if defined(HAVE_OPENSSL) && \
- !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ (!defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
#include <dlfcn.h>
--
To view, visit https://gerrit.asterisk.org/7294
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I3977931fd3ef8c4e4376349ccddb354eb839b58d
Gerrit-Change-Number: 7294
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171121/f9360198/attachment.html>
More information about the asterisk-code-review
mailing list