From: Ken Hornstein Date: Wed, 2 Jan 2013 03:06:33 +0000 (-0500) Subject: Change TLS support to only link the TLS libraries with the programs that X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/b0d4bbf39b437595c45f4bb330fe3d9edeb1d820?hp=--cc Change TLS support to only link the TLS libraries with the programs that need them. --- b0d4bbf39b437595c45f4bb330fe3d9edeb1d820 diff --git a/Makefile.am b/Makefile.am index 27ffdfbb..c9bb3ee2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -372,7 +372,7 @@ uip_mhtest_SOURCES = uip/mhtest.c uip/mhparse.c uip/mhcachesbr.c \ uip_mhtest_LDADD = $(LDADD) $(TERMLIB) uip_post_SOURCES = uip/post.c uip/aliasbr.c -uip_post_LDADD = mts/libmts.a $(LDADD) $(SASLLIB) +uip_post_LDADD = mts/libmts.a $(LDADD) $(SASLLIB) $(TLSLIB) uip_rcvdist_SOURCES = uip/rcvdist.c uip/distsbr.c uip_rcvdist_LDADD = $(LDADD) $(ICONVLIB) diff --git a/configure.ac b/configure.ac index 7887b993..dc623b97 100644 --- a/configure.ac +++ b/configure.ac @@ -588,10 +588,12 @@ dnl ----------------- AS_IF([test x"$tls_support" = x"yes"],[ AC_CHECK_HEADER([openssl/ssl.h], , [AC_MSG_ERROR([openssl/ssl.h not found])]) - AC_CHECK_LIB([crypto], [BIO_write], , + AC_CHECK_LIB([crypto], [BIO_write], [TLSLIB="-lcrypto"], [AC_MSG_ERROR([OpenSSL crypto library not found])]) - AC_CHECK_LIB([ssl], [SSL_library_init], , - [AC_MSG_ERROR([OpenSSL library not found])])]) + AC_CHECK_LIB([ssl], [SSL_library_init], [TLSLIB="-lssl $TLSLIB"], + [AC_MSG_ERROR([OpenSSL library not found])])], + [TLSLIB=]) +AC_SUBST([TLSLIB]) dnl --------------------- dnl CHECK TERMCAP LIBRARY