Skip to content
Snippets Groups Projects
Commit c779bf56 authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Check for and include libtermcap or libncurses only when needed.

Rev: src/modules/readline/configure.in:1.5
Rev: src/modules/readline/readlinemod.c:1.11
parent 708bab2d
No related branches found
No related tags found
No related merge requests found
# $Id: configure.in,v 1.4 1998/09/20 08:33:42 hubbe Exp $ # $Id: configure.in,v 1.5 1999/02/08 04:57:27 mast Exp $
AC_INIT(readlinemod.c) AC_INIT(readlinemod.c)
AC_CONFIG_HEADER(readline_machine.h) AC_CONFIG_HEADER(readline_machine.h)
AC_ARG_WITH(readline,[ --with(out)-readline support command line editing],[],[with_readline=yes]) AC_ARG_WITH(readline,[ --with(out)-readline support command line editing],[],[with_readline=yes])
...@@ -34,11 +34,19 @@ if test x$with_readline = xyes ; then ...@@ -34,11 +34,19 @@ if test x$with_readline = xyes ; then
if test $ac_cv_header_readline_h = yes -o $ac_cv_header_readline_readline_h = yes ; then if test $ac_cv_header_readline_h = yes -o $ac_cv_header_readline_readline_h = yes ; then
if test $ac_cv_header_history_h = yes -o $ac_cv_header_history_history_h = yes -o $ac_cv_header_readline_history_h = yes ; then if test $ac_cv_header_history_h = yes -o $ac_cv_header_history_history_h = yes -o $ac_cv_header_readline_history_h = yes ; then
AC_CHECK_LIB(readline, tputs, : , : )
if test $ac_cv_lib_readline_tputs = no ; then
AC_CHECK_LIB(termcap, tputs) AC_CHECK_LIB(termcap, tputs)
if test $ac_cv_lib_termcap_tputs = no ; then
AC_CHECK_LIB(ncurses, tputs)
fi
fi
if test $ac_cv_lib_readline_tputs = yes -o x$ac_cv_lib_termcap_tputs = xyes -o x$ac_cv_lib_ncurses_tputs = xyes ; then
AC_CHECK_LIB(readline, readline) AC_CHECK_LIB(readline, readline)
fi fi
fi fi
fi fi
fi
AC_OUTPUT(Makefile,echo FOO >stamp-h ) AC_OUTPUT(Makefile,echo FOO >stamp-h )
......
...@@ -13,14 +13,10 @@ ...@@ -13,14 +13,10 @@
#include "pike_macros.h" #include "pike_macros.h"
#include "threads.h" #include "threads.h"
RCSID("$Id: readlinemod.c,v 1.10 1998/09/06 17:30:07 grubba Exp $"); RCSID("$Id: readlinemod.c,v 1.11 1999/02/08 04:57:28 mast Exp $");
#include <errno.h> #include <errno.h>
#ifndef HAVE_LIBTERMCAP
#undef HAVE_LIBREADLINE
#endif
#if !defined(HAVE_READLINE_H) && !defined(HAVE_READLINE_READLINE_H) #if !defined(HAVE_READLINE_H) && !defined(HAVE_READLINE_READLINE_H)
#undef HAVE_LIBREADLINE #undef HAVE_LIBREADLINE
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment