Skip to content

Commit

Permalink
Bug 1639815 - Move --enable-readline to python configure. r=froydnj
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed May 21, 2020
1 parent 3feaca3 commit 7ebe2d6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 36 deletions.
1 change: 0 additions & 1 deletion build/moz.configure/old.configure
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
23 changes: 23 additions & 0 deletions js/moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -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)
35 changes: 0 additions & 35 deletions js/src/old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ebe2d6

Please sign in to comment.