Bug 1639815 - Move --enable-readline to python configure. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D76287
This commit is contained in:
Mike Hommey 2020-05-21 10:13:24 +00:00
Родитель 3feaca35c7
Коммит 7ebe2d69fb
3 изменённых файлов: 23 добавлений и 36 удалений

Просмотреть файл

@ -228,7 +228,6 @@ def old_configure_options(*options):
'--enable-official-branding',
'--enable-parental-controls',
'--enable-pref-extensions',
'--enable-readline',
'--enable-sandbox',
'--enable-startupcache',
'--enable-strip',

Просмотреть файл

@ -683,3 +683,26 @@ def sixgill(value):
return value[0]
set_config('SIXGILL_PATH', sixgill)
# Support for readline
# =====================================================
@depends('--enable-js-shell', target_is_windows, compile_environment)
def editline(js_shell, is_windows, compile_environment):
return js_shell and not is_windows and compile_environment
js_option('--enable-readline', help='Link js shell to system readline library',
when=editline)
has_readline = check_symbol('readline', flags=['-lreadline'], when='--enable-readline',
onerror=lambda: die('No system readline library found'))
set_config('EDITLINE_LIBS', ['-lreadline'], when=has_readline)
@depends('--enable-readline', editline, when=editline)
def bundled_editline(readline, editline):
return editline and not readline
set_config('JS_BUNDLED_EDITLINE', bundled_editline)
set_define('EDITLINE', True, when=editline)

Просмотреть файл

@ -1384,41 +1384,6 @@ AC_LANG_C
MOZ_EXPAND_LIBS
dnl ========================================================
dnl = Link js shell to system readline
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(readline,
[ --enable-readline Link js shell to system readline library],
JS_WANT_READLINE=1,
JS_WANT_READLINE= )
JS_BUNDLED_EDITLINE=
EDITLINE_LIBS=
case "$target" in
*-mingw*)
NO_EDITLINE=1
;;
*)
;;
esac
if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then
if test -n "$JS_WANT_READLINE"; then
AC_CHECK_LIB(readline, readline,
EDITLINE_LIBS="-lreadline",
AC_MSG_ERROR([No system readline library found.]))
else
dnl By default, we use editline
JS_BUNDLED_EDITLINE=1
fi
dnl Either way, we want to build with line editing support.
AC_DEFINE(EDITLINE)
fi
AC_SUBST(JS_BUNDLED_EDITLINE)
AC_SUBST_LIST(EDITLINE_LIBS)
dnl ========================================================
dnl =
dnl = Standalone module options