[GenABEL-dev] automake boost
L.C. Karssen
lennart at karssen.org
Tue Jun 24 12:02:14 CEST 2014
Hi Alvaro,
On 24-06-14 11:51, Frank, Alvaro Jesus wrote:
> Hi Lennart,
>
> I am, having trouble with automake recognizing boost root path.
> I used AX_BOOST_BASE but the root path (/usr/local/) is still not being
> recognized. and the path $Boost_root is still not helping me, perhaps I
> am setting it wrong.
> Do you also compile it all or keep the macros as they are?
I use the Boost package provided by Ubuntu, so I haven't compiled them
myself. In that case the libraries are installed in /usr/include/boost/.
In ProbABEL's configure.ac I test for boost as follows (see the branch
at
https://r-forge.r-project.org/scm/viewvc.php/branches/ProbABEL-pvals/ProbABEL/?root=genabel):
----------------------------------------
if test "x$with_boost_math" != "xno"; then
AC_MSG_NOTICE([building using the Boost Math library enabled])
AC_ARG_WITH([boost-include-path],
[AS_HELP_STRING([--with-boost-include-path],
[location of the Boost headers, defaults to /usr/include/boost])],
[CXXFLAGS+=" -I${withval}"
CPPFLAGS+=" -I${withval}"],
[CXXFLAGS+=' -I/usr/include/boost'
CPPFLAGS+=' -I/usr/include/boost'])
# Check for the Boost Math header files
AC_CHECK_HEADERS([boost/math/distributions.hpp])
if test x$ac_cv_header_boost_math_distributions_hpp = xno; then
AC_MSG_ERROR([Could not find the Boost Math header files. Did \
you specify --with-boost-include-path correctly? Or use --without-boost \
to disable the calculation of p-values.])
fi
else
AC_MSG_NOTICE([not using the Boost Math libraries, so no p-values in
the \
output])
fi
AM_CONDITIONAL([WITH_BOOST_MATH], test "x$with_boost_math" != "xno")
----------------------------------------
This creates a variable WITH_BOOST_MATH that can be used in AutoMake's
Makefile.am files:
----------------------------------------
if WITH_BOOST_MATH
palinear_CXXFLAGS += -DWITH_BOOST_MATH
endif
----------------------------------------
And then in the .cpp files, for example:
----------------------------------------
#if WITH_BOOST_MATH
std::vector<std::ostringstream *> pval;
#endif
----------------------------------------
Hope that helps.
Lennart.
>
> Thanks!
>
>
> _______________________________________________
> genabel-devel mailing list
> genabel-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel
>
--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands
lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20140624/211f13c9/attachment.sig>
More information about the genabel-devel
mailing list