readline problems
Zoltan Somogyi
zs at cs.mu.OZ.AU
Thu Apr 8 16:29:49 AEST 1999
If you have problems with bootstrapping due to one of the many problems
with readline, try applying the following diff, and touching .noreadline
in your mercury directory. I haven't finished testing it yet, so I make
no claim that it fixes the problem :-(
Zoltan.
Index: aclocal.m4
===================================================================
RCS file: /home/mercury1/repository/mercury/aclocal.m4,v
retrieving revision 1.2
diff -u -b -u -r1.2 aclocal.m4
--- aclocal.m4 1999/04/03 17:06:41 1.2
+++ aclocal.m4 1999/04/08 07:56:39
@@ -17,39 +17,47 @@
#
AC_DEFUN(MERCURY_CHECK_READLINE,
[
+if test -f .noreadline
+then
+ mercury_cv_termcap_lib=''
+ TERMCAP_LIBRARY=""
+ READLINE_LIBRARIES=""
+ AC_DEFINE(MR_NO_USE_READLINE)
+else
-# check for the readline header files
-AC_CHECK_HEADER(readline/readline.h, HAVE_READLINE_READLINE_H=1)
-if test "$HAVE_READLINE_READLINE_H" = 1; then
+ # check for the readline header files
+ AC_CHECK_HEADER(readline/readline.h, HAVE_READLINE_READLINE_H=1)
+ if test "$HAVE_READLINE_READLINE_H" = 1; then
AC_DEFINE(HAVE_READLINE_READLINE)
-fi
-AC_CHECK_HEADER(readline/history.h, HAVE_READLINE_HISTORY_H=1)
-if test "$HAVE_READLINE_HISTORY_H" = 1; then
+ fi
+ AC_CHECK_HEADER(readline/history.h, HAVE_READLINE_HISTORY_H=1)
+ if test "$HAVE_READLINE_HISTORY_H" = 1; then
AC_DEFINE(HAVE_READLINE_HISTORY)
-fi
+ fi
-# check for the libraries that readline depends on
-MERCURY_MSG('looking for termcap or curses (needed by readline)...')
-AC_CHECK_LIB(termcap, tgetent, mercury_cv_termcap_lib=-ltermcap,
+ # check for the libraries that readline depends on
+ MERCURY_MSG('looking for termcap or curses (needed by readline)...')
+ AC_CHECK_LIB(termcap, tgetent, mercury_cv_termcap_lib=-ltermcap,
[AC_CHECK_LIB(curses, tgetent, mercury_cv_termcap_lib=-lcurses,
[AC_CHECK_LIB(ncurses, tgetent, mercury_cv_termcap_lib=-lncurses,
mercury_cv_termcap_lib='')])])
-# check for the readline library
-AC_CHECK_LIB(readline, readline, mercury_cv_have_readline=yes,
+ # check for the readline library
+ AC_CHECK_LIB(readline, readline, mercury_cv_have_readline=yes,
mercury_cv_have_readline=no, $mercury_cv_termcap_lib)
-# Now figure out whether we can use readline, and define variables according.
-# Note that on most systems, we don't actually need the header files in
-# order to use readline. (Ain't C grand? ;-).
+ # Now figure out whether we can use readline, and define variables
+ # accordingly. Note that on most systems, we don't actually need
+ # the header files in order to use readline. (Ain't C grand? ;-).
-if test $mercury_cv_have_readline = no; then
+ if test $mercury_cv_have_readline = no; then
TERMCAP_LIBRARY=""
READLINE_LIBRARIES=""
AC_DEFINE(MR_NO_USE_READLINE)
-else
+ else
TERMCAP_LIBRARY="$mercury_cv_termcap_lib"
READLINE_LIBRARIES="-lreadline $TERMCAP_LIBRARY"
+ fi
fi
AC_SUBST(TERMCAP_LIBRARY)
AC_SUBST(READLINE_LIBRARIES)
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.73
diff -u -b -u -r1.73 bootcheck
--- bootcheck 1999/03/31 08:03:37 1.73
+++ bootcheck 1999/04/08 08:26:12
@@ -323,6 +323,7 @@
ln -s $root/aclocal.m4 .
ln -s $root/VERSION .
ln -s $root/.*.in .
+ ln -s $root/.no* .
rm -f config*.log
cp $root/Mmake* .
if test -f $root/Mmake.stage.params
@@ -470,6 +471,7 @@
ln -s $root/aclocal.m4 .
ln -s $root/VERSION .
ln -s $root/.*.in .
+ ln -s $root/.no* .
rm -f config*.log
cp $root/Mmake* .
if test -f $root/Mmake.stage.params
More information about the developers
mailing list