summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-11-26 11:40:40 +0100
committerThomas Haller <thaller@redhat.com>2014-11-26 11:43:23 +0100
commitdf2d67902d3a6b29ba4c1a80614d589b2acd4b84 (patch)
treea3a9c5f4116324bbbd6cd637776070c24ef7d938 /m4
parent6856d42797e60d5e1c9f1bc849e0bbeb8c52bf5f (diff)
build: fix wrongly linking against libreadline in all applications
Every Makefile in the subtrees would include -lreadline as part of LIBS, hence every application would link against the library. This was broken since we added 'm4/ax_lib_readline.m4'. Fixes: 29297f8531e24d4df616c5c3acace9e23a695a02
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_lib_readline.m42
1 files changed, 2 insertions, 0 deletions
diff --git a/m4/ax_lib_readline.m4 b/m4/ax_lib_readline.m4
index 8a05574f2..fe56c5bfc 100644
--- a/m4/ax_lib_readline.m4
+++ b/m4/ax_lib_readline.m4
@@ -90,6 +90,7 @@ AC_DEFUN([AX_LIB_READLINE], [
AC_MSG_ERROR([readline library with terminfo support is required (one of ncurses, curses, or termcap)])
fi
+ ORIG_LIBS="$LIBS"
LIBS="$LIBS $ax_cv_lib_readline"
AC_CHECK_HEADERS(readline.h readline/readline.h)
@@ -114,6 +115,7 @@ AC_DEFUN([AX_LIB_READLINE], [
AC_MSG_ERROR(rl_echo_signal_char() is required (install readline6?))
fi
+ LIBS="$ORIG_LIBS"
READLINE_LIBS="$ax_cv_lib_readline"
AC_SUBST(READLINE_LIBS)
])dnl