[m-dev.] diff: work-around readline problem on taifun

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jun 1 17:54:28 AEST 1999


Estimated hours taken: 1

Work around a problem with infinite loops on taifun.
The version of readline on taifun has a bug which causes
it to go into an infinite loop if input is redirected from
a file.  The work-around is to disable readline support.

aclocal.m4:
	Add new option `--without-readline' to disable readline support.

tools/test_mercury:
	On taifun, pass `--without-readline' to configure.

Workspace: /home/mercury0/fjh/mercury-other
Index: aclocal.m4
===================================================================
RCS file: /home/mercury1/repository/mercury/aclocal.m4,v
retrieving revision 1.2
diff -u -w -r1.2 aclocal.m4
--- aclocal.m4	1999/04/03 17:06:41	1.2
+++ aclocal.m4	1999/06/01 07:45:15
@@ -17,6 +17,11 @@
 #
 AC_DEFUN(MERCURY_CHECK_READLINE,
 [
+AC_ARG_WITH(readline,
+[  --without-readline      Don't use the GPL'd GNU readline library],
+mercury_cv_with_readline="$withval", mercury_cv_with_readline=yes)
+
+if test "$mercury_cv_with_readline" = yes; then
 
 # check for the readline header files
 AC_CHECK_HEADER(readline/readline.h, HAVE_READLINE_READLINE_H=1)
@@ -38,6 +43,9 @@
 # check for the readline library
 AC_CHECK_LIB(readline, readline, mercury_cv_have_readline=yes,
 	mercury_cv_have_readline=no, $mercury_cv_termcap_lib)
+else
+	mercury_cv_have_readline=no
+fi
 
 # 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
Index: tools/test_mercury
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.96
diff -u -w -r1.96 test_mercury
--- test_mercury	1999/05/27 10:20:23	1.96
+++ test_mercury	1999/06/01 07:17:04
@@ -154,6 +154,11 @@
 		CONFIG_OPTS=--enable-all-grades ;;
 	kryten)		
 		CONFIG_OPTS=--enable-all-grades ;;
+	taifun)		
+		# On taifun, there is a bug in readline which causes
+		# it to go into an infinite loop when reading from
+		# a file.
+		CONFIG_OPTS=--without-readline ;;
 	munta)		
 		# On munta, we need to disable the external debugger,
 		# because it uses sockets, and munta doesn't have
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list