From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 924 invoked by alias); 20 Feb 2009 12:23:02 -0000 Received: (qmail 915 invoked by uid 22791); 20 Feb 2009 12:23:01 -0000 X-SWARE-Spam-Status: No, hits=2.2 required=5.0 tests=AWL,BAYES_00,BOTNET,SPF_PASS X-Spam-Check-By: sourceware.org Received: from vms173019pub.verizon.net (HELO vms173019pub.verizon.net) (206.46.173.19) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Feb 2009 12:22:56 +0000 Received: from MacOSX.home ([72.81.218.16]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KFD003OC6E2TY5P@vms173019.mailsrvcs.net> for gsl-discuss@sources.redhat.com; Fri, 20 Feb 2009 06:22:50 -0600 (CST) Message-id: <499EA099.7050100@verizon.net> Date: Fri, 20 Feb 2009 12:23:00 -0000 From: Ed Smith-Rowland <3dw4rd@verizon.net> User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-version: 1.0 To: M Joonas Pihlaja Cc: Brian Gough , gsl-discuss@sources.redhat.com Subject: Re: Conditional compilation based on GSL version References: In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit 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/msg00013.txt.bz2 M Joonas Pihlaja wrote: > On Fri, 20 Feb 2009, Brian Gough wrote: > > >> 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? >>> > > >> 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. >> > > Where to draw the line though? Should I check for the availability of > every single symbol I'm using from GSL? Just the ones which I know > are volatile or new? *shudder* Versioning the API is a perfectly > valid solution to the problem and since GSL does have API stability, > why not make the version conveniently available to client programs as > well? > > >> So if you can use autoconf, I would recommend that. If not, maybe >> you could describe the details of the situation a bit more. >> > > Of course. I won't go into details on why I don't use autoconf for my > code, but suffice to say that it's about as portable as a pile of > bricks; doable with enough effort, but really inconvenient and not fun > at all. #ifs work everywhere and have a minimal burden when kept > in check. > > The specific situation I'm looking at is simply that GSL implemented > missing complex vector operations in 1.12 which I'd like to export in > my GSL <-> Lua minibinding. Autoconf doesn't even know what Lua is, > never mind what to do with it. :) > > Cheers, > > Joonas > > Autoconf might not know what Lua is but CMake might. I played around with CMake ans it seemed easier than Autoconf and it was loaded with pre-built things for recognizing tons of stuff, Good Luck, Ed