public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
To: gsl-discuss@sources.redhat.com
Subject: Conditional compilation based on GSL version
Date: Thu, 19 Feb 2009 21:04:00 -0000	[thread overview]
Message-ID: <Pine.OSF.4.61.0902192210470.510753@sirppi.helsinki.fi> (raw)


Hi,

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.

My current workaround is to grab the GSL version string using 
pkg-config, split it into major and minor version numbers, and pass 
those in as preprocessor defines.  It's rather ugly, possibly error 
prone, and of course there's also the pkg-config requirement, so it's 
not really ideal.  I did look in the manual, but if I'm missing the 
obvious solution please whack me with your stout clue stick.  :)

Cheers,

Joonas

             reply	other threads:[~2009-02-19 21:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19 21:04 M Joonas Pihlaja [this message]
2009-02-20  9:54 ` Brian Gough
2009-02-20 12:10   ` M Joonas Pihlaja
2009-02-20 12:23     ` Ed Smith-Rowland
2009-02-23 19:54     ` Brian Gough

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.OSF.4.61.0902192210470.510753@sirppi.helsinki.fi \
    --to=jpihlaja@cc.helsinki.fi \
    --cc=gsl-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).