[
https://issues.apache.org/jira/browse/TS-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292572#comment-13292572
]
Leif Hedstrom commented on TS-1296:
-----------------------------------
James: what do you think of:
{code}
diff --git a/build/ax_lib_readline.m4 b/build/ax_lib_readline.m4
index 056f25c..37a02a4 100644
--- a/build/ax_lib_readline.m4
+++ b/build/ax_lib_readline.m4
@@ -89,7 +89,9 @@ AC_DEFUN([AX_LIB_READLINE], [
])
if test "$ax_cv_lib_readline" != "no"; then
+ ORIG_LIBS="$LIBS"
LIBS="$LIBS $ax_cv_lib_readline"
+ AC_SUBST(LIBREADLINE, [$ax_cv_lib_readline])
AC_DEFINE(HAVE_LIBREADLINE, 1,
[Define if you have a readline compatible library])
AC_CHECK_HEADERS(readline.h readline/readline.h)
@@ -103,5 +105,6 @@ AC_DEFUN([AX_LIB_READLINE], [
[Define if your readline library has \`add_history'])
AC_CHECK_HEADERS(history.h readline/history.h)
fi
+ LIBS="$ORIG_LIBS"
fi
])dnl
diff --git a/mgmt/cli/Makefile.am b/mgmt/cli/Makefile.am
index d0e1254..6f06cbd 100644
--- a/mgmt/cli/Makefile.am
+++ b/mgmt/cli/Makefile.am
@@ -82,7 +82,7 @@ traffic_shell_LDADD = \
$(LIBTCL) $(LIBREADLINE) \
@LIBDL@ -lm @LIBICONV@ @LIBEXPAT@ @LIBSSL@ \
@LIBTHREAD@ @LIBSOCKET@ @LIBNSL@ @LIBRESOLV@ \
- @LIBRT@ @LIBEXECINFO@ @LIBPCRE@
+ @LIBRT@ @LIBEXECINFO@ @LIBPCRE@ @LIBREADLINE@
traffic_line_LDFLAGS = @EXTRA_CXX_LDFLAGS@ @LIBTOOL_LINK_FLAGS@
traffic_line_LDADD = \
{code}
I think there might be a few other places where we've added library
dependencies globally, when we really ought to do these as needed (like we used
to do).
> Why are all binaries linking in libreadline?
> --------------------------------------------
>
> Key: TS-1296
> URL: https://issues.apache.org/jira/browse/TS-1296
> Project: Traffic Server
> Issue Type: Bug
> Components: Build
> Reporter: Leif Hedstrom
> Priority: Trivial
> Fix For: 3.3.0
>
>
> Minor annoyance, but I'd prefer that e.g. traffic_server etc. do not link in
> libraries that they do not need.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira