Hi Joseph,

On 5/27/10 1:32 PM, Joseph Wakeling wrote:
The problem is, of course, an extension can't necessarily assume a
particular version of GSL, so if I want it to be compatible with earlier
versions I can't assume the presence of gsl_inline.h.

So, this leads to the need to check for the version of GSL, and only if
it is high enough to call #include<gsl/gsl_inline.h>; something along
the lines of,

#include<gsl_version.h>
#if GSL_VERSION>= 1.13
#include<gsl/gsl_inline.h>
#else
#define INLINE_FUN extern inline
#endif

... except that since GSL_VERSION is actually a string "1.x" I'm not
sure I can do the comparison.

Is there any recommended procedure for dealing with this kind of version
compatibility in GSL?

This is a pefect use case for autoconf. Rather than checking which GSL version your client is using, you can implement a compilation test in your configure checking if 'gsl/gsl_inline.h' exists. If it exists define HAVE_GSL_INLINE and modify you preprocessor code to

#ifdef HAVE_GSL_INLINE
#include<gsl/gsl_inline.h>
#else
#define INLINE_FUN extern inline
#endif

If you need help with the autoconf syntax, please shoot an email.

Cheers,
Peter


_______________________________________________
Help-gsl mailing list
Help-gsl@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to