This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
autoconf usage : -DHAVE_GSL ?
- To: gsl-discuss at sourceware dot cygnus dot com
- Subject: autoconf usage : -DHAVE_GSL ?
- From: Peter Teuben <teuben at astro dot umd dot edu>
- Date: Fri, 7 Sep 2001 21:01:31 -0400 (EDT)
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