]> git.puffer.fish Git - matthieu/frr.git/commit
configure: fix static linking with readline
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 2 Sep 2016 03:42:07 +0000 (06:42 +0300)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Fri, 2 Sep 2016 16:54:13 +0000 (12:54 -0400)
commit4c2f8e95a1ae558be380da0a2f42fea5a02785d3
treedd5e20fd0e9e38d98d49274672d32f481fdbe257
parent5b30316ea51a86de29450b59ea288afa858953b6
configure: fix static linking with readline

When static linking is used, the order of the libraries is important,
and the libraries using a symbol from another library should be listed
*before* the library providing that symbol (see
http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking)
for details.

When vtysh is linked statically, the command line contains "-lcurses
-lreadline", which causes a build failure due to unresolved
symbols. This is because readline is using symbols from the curses
library: the order should be the opposite.

This patch fixes that problem by putting the -lreadline at the
beginning of the LIBREADLINE variable calcualted by the configure
script.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
configure.ac