another method

Dave Morrison
Sat Jan 29 15:19:00 GMT 2000

Hi Gerard,

Here's another method for implementing #include "gsl/...".  Add the

make DESTDIR=${full_top_builddir}/tmp install-data

_after_ the AC_OUTPUT in  That way, at configure time, the
header files will be temporarily installed in a directory tree hanging
off the build area.  Then, in each, change the INCLUDES (in
the case of the for 'err' you need to add the line) so it

INCLUDES = -I$(full_top_builddir)/tmp$(includedir) ...

and then change the sources so they prefix their includes with "gsl/". 
The following "script" implements all these changes: 

echo 'make DESTDIR=${full_top_builddir}/tmp install-data' >>
find . -name -exec perl -pi.bak -e 's#^(INCLUDES *=
*)#INCLUDES = -I\$(full_top_builddir)/tmp\$(includedir) #' {} \;
find . -name '*.[ch]' -exec perl -pi.bak -e
's#([<"])(gsl_.*\.h)#$1gsl/$2#' {} \;
# Add INCLUDES to beginning of err/
mv err/ err/
echo 'INCLUDES = -I$(full_top_builddir)/tmp$(includedir)' >
cat err/ >> err/
# Add missing pgkinclude_HEADER files to fft/
perl -pi.bak -e 's/(pkginclude.*)/$1 gsl_dft_complex_float.h
gsl_fft_complex_float.h gsl_fft_halfcomplex_float.h
gsl_fft_real_float.h/;' fft/

I just tried this prescription on a copy of gsl freshly checked out from
CVS and everything seemed to work fine.


David Morrison  Brookhaven National Laboratory  phone: 631-344-5840
                Physics Department, Bldg 510 C    fax: 631-344-3253
		          Upton, NY 11973-5000  email:

More information about the Gsl-discuss mailing list