Commit a806dbd9 authored by Claudio André's avatar Claudio André

maint: create a '--disable-readline' and use it

GJS has alternate code in case the library is not present.
parent 635f7691
......@@ -123,7 +123,7 @@ stages:
fedora:
<<: *build
stage: source_check
image: claudioandre/spidermonkey:job-485.9_SM52-debug-gcc.fedora-dev # pinned on purpose
image: claudioandre/spidermonkey:job-512.9_SM52-debug-gcc.fedora-dev # pinned on purpose
variables:
TASK_ID: "fedora-x86_64-gcc-debug-default-check"
TEST: "check"
......@@ -152,7 +152,7 @@ with_logging:
variables:
TASK_ID: "fedora-x86_64-clang-default-logging-check"
CC: clang
BUILD_OPTS: CPPFLAGS='-DGJS_VERBOSE_ENABLE_PROPS=1 -DGJS_VERBOSE_ENABLE_MARSHAL=1 -DGJS_VERBOSE_ENABLE_LIFECYCLE=1 -DGJS_VERBOSE_ENABLE_GI_USAGE=1 -DGJS_VERBOSE_ENABLE_CLOSURE=1 -DGJS_VERBOSE_ENABLE_GSIGNAL=1'
BUILD_OPTS: "--disable-readline CPPFLAGS='-DGJS_VERBOSE_ENABLE_PROPS=1 -DGJS_VERBOSE_ENABLE_MARSHAL=1 -DGJS_VERBOSE_ENABLE_LIFECYCLE=1 -DGJS_VERBOSE_ENABLE_GI_USAGE=1 -DGJS_VERBOSE_ENABLE_CLOSURE=1 -DGJS_VERBOSE_ENABLE_GSIGNAL=1'"
TEST: "check"
except:
- schedules
......@@ -179,6 +179,17 @@ no_profiler:
except:
- schedules
no_readline:
<<: *build
stage: test
image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
variables:
TASK_ID: "fedora-x86_64-gcc-default-disable_readline-check"
TEST: "check"
BUILD_OPTS: "--disable-readline"
except:
- schedules
# Generates
# The Code Coverage Report
coverage-automatic:
......@@ -289,7 +300,7 @@ sanitizer_clang:
variables:
TASK_ID: "fedora-x86_64-clang_ubsan_asan-default-default-check"
CC: clang
BUILD_OPTS: "--enable-asan --enable-ubsan"
BUILD_OPTS: "--enable-asan --enable-ubsan --disable-readline"
TEST: "check"
only:
variables:
......@@ -508,7 +519,7 @@ sanitizer_clang:
variables:
TASK_ID: "fedora-x86_64-clang_ubsan_asan-default-default-check"
CC: clang
BUILD_OPTS: "--enable-asan --enable-ubsan"
BUILD_OPTS: "--enable-asan --enable-ubsan --disable-readline"
TEST: "check"
when: manual
except:
......
......@@ -160,30 +160,41 @@ Configure with --disable-profiler to skip it on other platforms.])])
])
AM_CONDITIONAL([ENABLE_PROFILER], [test x$enable_profiler != xno])
# Optional redline dep (enabled by default)
AC_ARG_ENABLE([readline],
[AS_HELP_STRING([--disable-readline], [Don't build readline-related code @<:@default=no@:>@])])
PKG_CHECK_VAR([GI_DATADIR], [gobject-introspection-1.0], [gidatadir])
# readline
LIBS_no_readline=$LIBS
# On some systems we need to link readline to a termcap compatible
# library.
gjs_cv_lib_readline=no
AC_MSG_CHECKING([how to link readline libs])
for gjs_libtermcap in "" ncursesw ncurses curses termcap; do
if test -z "$gjs_libtermcap"; then
READLINE_LIBS="-lreadline"
else
READLINE_LIBS="-lreadline -l$gjs_libtermcap"
fi
LIBS="$READLINE_LIBS $LIBS_no_readline"
AC_LINK_IFELSE(
[AC_LANG_CALL([],[readline])],
[gjs_cv_lib_readline=yes])
if test $gjs_cv_lib_readline = yes; then
break
fi
done
AS_IF([test x$enable_readline != xno],[
# On some systems we need to link readline to a termcap compatible
# library.
gjs_cv_lib_readline=no
AC_MSG_CHECKING([how to link readline libs])
for gjs_libtermcap in "" ncursesw ncurses curses termcap; do
if test -z "$gjs_libtermcap"; then
READLINE_LIBS="-lreadline"
else
READLINE_LIBS="-lreadline -l$gjs_libtermcap"
fi
LIBS="$READLINE_LIBS $LIBS_no_readline"
AC_LINK_IFELSE(
[AC_LANG_CALL([],[readline])],
[gjs_cv_lib_readline=yes])
if test $gjs_cv_lib_readline = yes; then
break
fi
done
],[gjs_cv_lib_readline=no])
if test $gjs_cv_lib_readline = no; then
AS_IF([test x$enable_readline != xno],
[AC_MSG_ERROR([Readline requested but not found. Configure with --disable-readline.])]
)
AC_MSG_RESULT([none])
READLINE_LIBS=""
ac_cv_header_readline_readline_h=no
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment