This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

autoconf usage : -DHAVE_GSL ?


I'd like to have a macro HAVE_GSL, so i can #ifdef my code. I followed some of
the instructions in section 2.4 on automake, and added the gsl.m4 to my
aclocal.m4 and did something like the following in configure.in :

AM_PATH_GSL(0.9.2, ok=yes, ok=no)
if test "$ok" = "yes"; then
    AC_MSG_RESULT(ok, i found GSL)
    NEMO_CFLAGS="$NEMO_CFLAGS $GSL_CFLAGS -DHAVE_GSL"
    NEMO_LIBS="$NEMO_LIBS $GSL_LIBS"
else
    AC_MSG_WARN(could not find GSL library)
fi

My question is about the kludgie looking -DHAVE_GSL. I wanted to use
something like


AC_CHECK_LIB(gsl,gsl_version)

but that fails, gsl_version seems to needs -lgslcblas! (which is actually odd,
if I look at the output of nm..... -static will fix that dependancy, but
AC_CHECK_LIB does not do that) I'd like to know which function/static would be
the one that doesn't need another library. Can that be done with AC_CHECK_LIB?
If so, perhaps this should be added to section 2.4 on the automake macros. Or
perhaps is there a better way to get the HAVE_GSL macro?

- peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]