[GRASSLIST:2454] Re: Grass5pre2. Compilation problem on RedHat 7.1
Glynn Clements
glynn.clements at virgin.net
Tue Sep 18 10:33:38 EDT 2001
Daniel Tourde wrote:
> I will try to recompile with zlib but it seems that I need fftw.h and I
> don't have this file (I have several ones that look like "cousin" of it
> but not fftw.h)
>
> [root at brest root]# locate fftw.h
> /usr/include/dfftw.h
> /usr/include/drfftw.h
> /usr/include/sfftw.h
> /usr/include/srfftw.h
The following is from the FFTW documentation:
Installing FFTW in both single and double precision
It is often useful to install both single- and double-precision
versions of the FFTW libraries on the same machine, and we provide a
convenient mechanism for achieving this on Unix systems.
When the --enable-type-prefix option of configure is used, the FFTW
libraries and header files are installed with a prefix of `d' or `s',
depending upon whether you compiled in double or single precision.
Then, instead of linking your program with -lrfftw -lfftw, for
example, you would link with -ldrfftw -ldfftw to use the
double-precision version or with -lsrfftw -lsfftw to use the
single-precision version. Also, you would #include <drfftw.h> or
<srfftw.h> instead of <rfftw.h>, and so on.
The names of FFTW functions, data types, and constants remain
unchanged! You still call, for instance, fftw_one and not dfftw_one.
Only the names of header files and libraries are modified. One
consequence of this is that you cannot use both the single- and
double-precision FFTW libraries in the same program, simultaneously,
as the function names would conflict.
By default, you only get double-precision (the --enable-float option
gives single precision instead).
I suggest making some symlinks:
fftw.h -> dfftw.h
rfftw.h -> drfftw.h
libfftw.a -> libdfftw.a
librfftw.a -> libdrfftw.a
NB: GRASS only uses the complex functions (fftw.h/libfftw.a), not the
real functions (rfftw.h/librfftw.a).
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list