mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-105323: Update readline module to detect apple editline variant (gh-108665)
This commit is contained in:
parent
db0a258e79
commit
501939c9c1
5 changed files with 38 additions and 3 deletions
10
configure.ac
10
configure.ac
|
|
@ -5832,6 +5832,7 @@ dnl library (tinfo ncursesw ncurses termcap). We now assume that libreadline
|
|||
dnl or readline.pc provide correct linker information.
|
||||
|
||||
AH_TEMPLATE([WITH_EDITLINE], [Define to build the readline module against libedit.])
|
||||
AH_TEMPLATE([WITH_APPLE_EDITLINE], [Define to build the readline module against Apple BSD editline.])
|
||||
|
||||
AC_ARG_WITH(
|
||||
[readline],
|
||||
|
|
@ -5848,6 +5849,15 @@ AC_ARG_WITH(
|
|||
[with_readline=readline]
|
||||
)
|
||||
|
||||
# gh-105323: Need to handle the macOS editline as an alias of readline.
|
||||
AS_CASE([$ac_sys_system/$ac_sys_release],
|
||||
[Darwin/*], [AC_CHECK_TYPE([Function],
|
||||
[AC_DEFINE([WITH_APPLE_EDITLINE])],
|
||||
[],
|
||||
[@%:@include <readline/readline.h>])],
|
||||
[]
|
||||
)
|
||||
|
||||
AS_VAR_IF([with_readline], [readline], [
|
||||
PKG_CHECK_MODULES([LIBREADLINE], [readline], [
|
||||
LIBREADLINE=readline
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue