From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5739 invoked by alias); 19 Feb 2009 21:04:52 -0000 Received: (qmail 5730 invoked by uid 22791); 19 Feb 2009 21:04:51 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_50 X-Spam-Check-By: sourceware.org Received: from sirppi.helsinki.fi (HELO sirppi.helsinki.fi) (128.214.205.27) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Feb 2009 21:04:45 +0000 Received: from sirppi.helsinki.fi (localhost [127.0.0.1]) by sirppi.helsinki.fi (8.13.7/8.13.7) with ESMTP id n1JL4fnI522102 for ; Thu, 19 Feb 2009 23:04:41 +0200 (EET) Received: (from jpihlaja@localhost) by sirppi.helsinki.fi (8.13.7/8.13.7/Submit) id n1JL4fgR009751; Thu, 19 Feb 2009 23:04:41 +0200 (EET) Date: Thu, 19 Feb 2009 21:04:00 -0000 From: M Joonas Pihlaja To: gsl-discuss@sources.redhat.com Subject: Conditional compilation based on GSL version Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00010.txt.bz2 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