Skip to content

Commit 04a2d09

Browse files
committed
Fix the readline history test
bk: 4716a70b_vp6F57EvlCPx0kIW_bQ_w
1 parent 4bd4d64 commit 04a2d09

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Fix the readline history test.
12
* [Bug 931] Require -lreadline to be asked for explicitly.
23
* [Bug 764] When looking for -lreadline support, also try using -lncurses.
34
* [Bug 909] Fix int32_t errors for ntohl().

m4/ntp_lineeditlibs.m4

+4-1
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ AC_DEFUN([NTP_LINEEDITLIBS], [
7070
[Define if you have a readline compatible library])
7171
AC_CHECK_HEADERS(readline.h readline/readline.h)
7272
AC_CACHE_CHECK([whether readline supports history],
73-
ntp_cv_lib_lineedit_history, [
73+
ntp_cv_lib_lineedit_history, [
7474
ntp_cv_lib_lineedit_history="no"
75+
ORIG_LIBS="$LIBS"
76+
LIBS="$ORIG_LIBS $ntp_cv_lib_lineedit"
7577
AC_TRY_LINK_FUNC(add_history, ntp_cv_lib_lineedit_history="yes")
78+
LIBS="$ORIG_LIBS"
7679
])
7780
case "$ntp_cv_lib_lineedit_history" in
7881
yes)

0 commit comments

Comments
 (0)