help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Compatibility with old and new inline functions in GSL


From: Joseph Wakeling
Subject: Re: [Help-gsl] Compatibility with old and new inline functions in GSL
Date: Fri, 28 May 2010 16:57:21 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4

On 05/28/2010 04:50 AM, Peter Johansson wrote:
> 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.

I did wonder about that before.  It's easy to use,

    AC_CHECK_HEADER([gsl/gsl_inline.h],[AC_DEFINE([HAVE_GSL_INLINE],
     [1],[Define if gsl/gsl_inline.h header exists])])

... but a question: what about the actual header file (not source file)
that includes the above,

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

... since the above only makes sense for code that will be compiled, not
a header that may be included by others -- no?

I guess that I chould actually create a my_header.h.in file, rather than
the preprocessor macro?

Thanks & best wishes,

    -- Joe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]