[Pkg-voip-commits] [pjproject] 07/14: Reduce number of libraries linked with pjlib
tzafrir at debian.org
tzafrir at debian.org
Mon Aug 17 10:41:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch master-broken
in repository pjproject.
commit 0498e9e2daf6f160258b13de4ee13eb94b747195
Author: Jeremy Lainé <jeremy.laine at m4x.org>
Date: Thu Oct 30 08:09:42 2014 +0200
Reduce number of libraries linked with pjlib
All libraries and applications were gratuitously linked against
libcrypto, libssl and libuuid, but only libpj needs them.
---
aconfigure | 7 ++++---
aconfigure.ac | 7 ++++---
build.mak.in | 2 ++
pjlib/build/Makefile | 2 +-
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/aconfigure b/aconfigure
index 42c5da6..eb50910 100755
--- a/aconfigure
+++ b/aconfigure
@@ -620,6 +620,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
+PJLIB_EXT
ac_main_obj
ac_host
ac_linux_poll
@@ -4213,7 +4214,7 @@ if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
#define HAVE_LIBUUID 1
_ACEOF
- LIBS="-luuid $LIBS"
+ PJLIB_EXT="-luuid $PJLIB_EXT"
fi
@@ -7705,7 +7706,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_load_BIO_strings" >&5
$as_echo "$ac_cv_lib_crypto_ERR_load_BIO_strings" >&6; }
if test "x$ac_cv_lib_crypto_ERR_load_BIO_strings" = xyes; then :
- libcrypto_present=1 && LIBS="-lcrypto $LIBS"
+ libcrypto_present=1 && PJLIB_EXT="-lcrypto $PJLIB_EXT"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
@@ -7745,7 +7746,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
- libssl_present=1 && LIBS="-lssl $LIBS"
+ libssl_present=1 && PJLIB_EXT="-lssl $PJLIB_EXT"
fi
if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
diff --git a/aconfigure.ac b/aconfigure.ac
index e86e27c..72446dd 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -114,7 +114,8 @@ AC_CHECK_LIB(winmm,puts)
AC_CHECK_LIB(socket,puts)
AC_CHECK_LIB(rt,puts)
AC_CHECK_LIB(m,sin)
-AC_CHECK_LIB(uuid,uuid_generate)
+AC_SUBST(PJLIB_EXT)
+AC_CHECK_LIB(uuid,uuid_generate,[PJLIB_EXT="-luuid $PJLIB_EXT"])
AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1])
AC_SEARCH_LIBS(gethostbyname,nsl)
@@ -1532,8 +1533,8 @@ AC_ARG_ENABLE(ssl,
AC_SUBST(libssl_present)
AC_SUBST(libcrypto_present)
AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
- AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])
- AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="-lssl $LIBS"])
+ AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && PJLIB_EXT="-lcrypto $PJLIB_EXT"])
+ AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && PJLIB_EXT="-lssl $PJLIB_EXT"])
if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
# PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
diff --git a/build.mak.in b/build.mak.in
index 074977d..1add583 100644
--- a/build.mak.in
+++ b/build.mak.in
@@ -28,6 +28,8 @@ export APP_THIRD_PARTY_EXT :=
export APP_THIRD_PARTY_LIBS :=
export APP_THIRD_PARTY_LIB_FILES :=
+PJLIB_EXT = @PJLIB_EXT@
+
ifeq (@ac_external_srtp@,1)
# External SRTP library
APP_THIRD_PARTY_EXT += -lsrtp
diff --git a/pjlib/build/Makefile b/pjlib/build/Makefile
index 1e64950..2bd2b90 100644
--- a/pjlib/build/Makefile
+++ b/pjlib/build/Makefile
@@ -39,7 +39,7 @@ export PJLIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
string.o timer.o types.o
export PJLIB_CFLAGS += $(_CFLAGS)
export PJLIB_CXXFLAGS += $(_CXXFLAGS)
-export PJLIB_LDFLAGS += $(_LDFLAGS)
+export PJLIB_LDFLAGS += $(PJLIB_EXT) $(_LDFLAGS)
###############################################################################
# Defines for building test application
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/pjproject.git
More information about the Pkg-voip-commits
mailing list