When using libedit also search for curses
This commit is contained in:
parent
1ab7185fdc
commit
b64159aff7
@ -78,7 +78,7 @@ Install these packages (or *ports*):
|
|||||||
|
|
||||||
Then build:
|
Then build:
|
||||||
|
|
||||||
$ CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" LIBS="-lcurses" ./configure
|
$ CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
#### Other UNIX
|
#### Other UNIX
|
||||||
|
56
configure
vendored
56
configure
vendored
@ -3467,6 +3467,62 @@ $as_echo "#define READLINE_GNU 1" >>confdefs.h
|
|||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetnum" >&5
|
||||||
|
$as_echo_n "checking for library containing tgetnum... " >&6; }
|
||||||
|
if ${ac_cv_search_tgetnum+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
ac_func_search_save_LIBS=$LIBS
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
/* Override any GCC internal prototype to avoid an error.
|
||||||
|
Use char because int might match the return type of a GCC
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
char tgetnum ();
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return tgetnum ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
for ac_lib in '' ncursesw ncurses curses; do
|
||||||
|
if test -z "$ac_lib"; then
|
||||||
|
ac_res="none required"
|
||||||
|
else
|
||||||
|
ac_res=-l$ac_lib
|
||||||
|
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||||
|
fi
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
ac_cv_search_tgetnum=$ac_res
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext
|
||||||
|
if ${ac_cv_search_tgetnum+:} false; then :
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if ${ac_cv_search_tgetnum+:} false; then :
|
||||||
|
|
||||||
|
else
|
||||||
|
ac_cv_search_tgetnum=no
|
||||||
|
fi
|
||||||
|
rm conftest.$ac_ext
|
||||||
|
LIBS=$ac_func_search_save_LIBS
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetnum" >&5
|
||||||
|
$as_echo "$ac_cv_search_tgetnum" >&6; }
|
||||||
|
ac_res=$ac_cv_search_tgetnum
|
||||||
|
if test "$ac_res" != no; then :
|
||||||
|
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_set_prompt in -ledit" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_set_prompt in -ledit" >&5
|
||||||
$as_echo_n "checking for rl_set_prompt in -ledit... " >&6; }
|
$as_echo_n "checking for rl_set_prompt in -ledit... " >&6; }
|
||||||
if ${ac_cv_lib_edit_rl_set_prompt+:} false; then :
|
if ${ac_cv_lib_edit_rl_set_prompt+:} false; then :
|
||||||
|
@ -22,6 +22,7 @@ AC_CHECK_LIB([readline], [rl_save_prompt],
|
|||||||
[ EXTRA_LIBS="${EXTRA_LIBS} -lreadline" ; ]
|
[ EXTRA_LIBS="${EXTRA_LIBS} -lreadline" ; ]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
AC_SEARCH_LIBS([tgetnum], [ncursesw ncurses curses])
|
||||||
AC_CHECK_LIB([edit], [rl_set_prompt])
|
AC_CHECK_LIB([edit], [rl_set_prompt])
|
||||||
AC_DEFINE([READLINE_EDIT], [1], [Use libedit])
|
AC_DEFINE([READLINE_EDIT], [1], [Use libedit])
|
||||||
[ EXTRA_LIBS="${EXTRA_LIBS} -ledit" ; ]
|
[ EXTRA_LIBS="${EXTRA_LIBS} -ledit" ; ]
|
||||||
|
Loading…
Reference in New Issue
Block a user