[GRASS-user] GRASS compile and --with-readline option

Glynn Clements glynn at gclements.plus.com
Thu Oct 4 07:35:46 EDT 2007


Venkatesh Raghavan wrote:

> The old problem of the configure script not being able
> to find the readline library seems to continue in the
> new version og GRASS 6.2.2 and 6.3.
> 
> I am using Mandriva 2007. Is there a workaround for
> compiling with readline or the only choice I have is
> to not use the --with-readline option.

First, note that the only place where readline is used is when
r.mapcalc (or r3.mapcalc) read expressions from the terminal.

If you're entering simple expressions, you can just pass them as a
command-line argument. For complex expressions, it's probably better
to enter them into a file with a text editor, then use r.mapcalc on
the file.

If you decide that you need this functionality, you can omit the
--with-readline switch then hack the configuration files manually once
configure has completed.

Specifically, you need to:

1. Define the following variables in include/Make/Platform.make:

	READLINEINCPATH     = 
	READLINELIBPATH     = 
	READLINELIB         =  -lreadline -lncurses
	HISTORYLIB          =  -lhistory 

[Note that -lncurses could be replaced with -lcurses, -ltermcap or
-ltinfo if you have those libraries rather than libncurses.]

2. Define the following macro in include/config.h:

	/* define if readline exists */
	#define HAVE_READLINE_READLINE_H 1

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list