summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2017-11-26 15:49:31 +0100
committerGitHub <noreply@github.com>2017-11-26 15:49:31 +0100
commit852b595ff3b84788c31338053488a7ed5944b431 (patch)
tree509df164f77c0173db9737d9b84d33f13cadac11 /configure
parent04d14c019b15f8789860b8ec423f29d7cf11de16 (diff)
downloadocaml-852b595ff3b84788c31338053488a7ed5944b431.tar.gz
Remove dependencies on curses/terminfo/termcap C library (#1431)
The terminfo C library was used for displaying error messages from the toplevel. Instead, just use ANSI escape sequences to display, and a ioctl() to get the number of lines of the terminal. - Remove byterun/terminfo.c - Add primitive to query number of lines to io.c with OS-dependent code in unix.c (ioctl-based implementation) and win32.c (no implementation yet) - Add a Terminfo.num_lines function and simplify interface to Terminfo.setup - Query num_lines every time an error message needs to be highlighted, so as to react to windows resizing. - Bootstrap to enable removal of old primitives.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 3 insertions, 19 deletions
diff --git a/configure b/configure
index 2033965545..dcc885f95d 100755
--- a/configure
+++ b/configure
@@ -46,7 +46,6 @@ graph_wanted=yes
pthread_wanted=yes
dl_defs=''
verbose=false
-with_curses=yes
debugruntime=false
with_instrumented_runtime=false
with_sharedlibs=true
@@ -152,7 +151,7 @@ while : ; do
-lib*)
cclibs="$2 $cclibs"; shift;;
-no-curses|--no-curses)
- with_curses=no;;
+ ;; # Ignored for backward compatibility
-no-shared-libs|--no-shared-libs)
with_sharedlibs=false;;
-x11include*|--x11include*)
@@ -1191,19 +1190,6 @@ if sh ./hasgot -i unistd.h issetugid; then
echo "#define HAS_ISSETUGID" >> s.h
fi
-# For the terminfo module
-
-if test "$with_curses" = "yes"; then
- for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
- if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then
- inf "termcap functions found (with libraries '$libs')"
- echo "#define HAS_TERMCAP" >> s.h
- curseslibs="${libs}"
- break
- fi
- done
-fi
-
# For instrumented runtime
# (clock_gettime needs -lrt for glibc before 2.17)
if $with_instrumented_runtime; then
@@ -2057,8 +2043,7 @@ config CPPFLAGS "$common_cppflags $internal_cppflags"
config OCAMLC_CFLAGS "$common_cflags $sharedcccompopts"
config OCAMLC_CPPFLAGS "$common_cppflags"
config LDFLAGS "$ldflags"
-config BYTECCLIBS "$cclibs $dllib $curseslibs $pthread_link \
- $instrumented_runtime_libs"
+config BYTECCLIBS "$cclibs $dllib $pthread_link $instrumented_runtime_libs"
config RPATH "$rpath"
config EXE "$exe"
config EMPTY ""
@@ -2158,8 +2143,7 @@ inf " manual pages.............. $mandir (with extension .$programs_man_s
inf "Configuration for the bytecode compiler:"
inf " C compiler used........... $cc"
inf " options for compiling..... $common_cflags"
-inf " options for linking....... $ldflags $cclibs $dllib" \
- "$curseslibs $pthread_link"
+inf " options for linking....... $ldflags $cclibs $dllib $pthread_link"
if $shared_libraries_supported; then
inf " shared libraries are supported"
inf " options for compiling..... $sharedcccompopts $common_cflags"