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
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl