This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
Re: Conditional compilation based on GSL version
- From: Brian Gough <bjg at gnu dot org>
- To: M Joonas Pihlaja <jpihlaja at cc dot helsinki dot fi>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Fri, 20 Feb 2009 09:28:58 +0000
- Subject: Re: Conditional compilation based on GSL version
- References: <Pine.OSF.4.61.0902192210470.510753@sirppi.helsinki.fi>
At Thu, 19 Feb 2009 23:04:40 +0200 (EET),
M Joonas Pihlaja wrote:
> Could GSL expose some facility in gsl_version.h to compare the version
> of GSL at compile time for dumb clients which don't want to impose
> special build system requirements? The current GSL_VERSION define
> exports a string like "1.12", but that's not so useful for testing
> against versions using the C preprocessor at compile time. Something
> simple like GSL_VERSION_MAJOR and GSL_VERSION_MINOR defines would go a
> long way. Or perhaps a more complex macro like
> GSL_VERSION_IS_COMPATIBLE(major,minor) would be preferable.
I'd say the GNU approach to compatibility is to test for the presence
of individual functions or features with autoconf, rather than package
versions--it is more reliable in the long-term. So if you can use
autoconf, I would recommend that. If not, maybe you could describe
the details of the situation a bit more.
--
Brian Gough