|
Boost Users : |
From: Rodolfo Schulz de Lima (rodolfo_at_[hidden])
Date: 2004-09-09 15:49:53
(answering the mail from Thomas Lemaire)
I've attached to this mail the .m4 macros that I made to configure boost
automatically in my autoconf/automake projects. It's not complete, nor
optimal, but suit my needs.
Put it in your /usr/share/aclocal directory and in your configure.ac
put:
RS_BOOST([1.32.0],[],[AC_MSG_ERROR([Package requires the Boost C++
libraries!])])
RS_BOOST_REGEX
RS_BOOST_THREAD
RS_BOOST_DATE_TIME
RS_BOOST_PROGRAM_OPTIONS
it'll create acsubst'ed BOOST_CPPFLAGS, BOOST_LIBS and BOOST_LIBS_R
Since I use it to compile for ming32 (win32) and gcc (linux) targets,
it's good to have AC_CANONICAL_TARGET right before AM_INIT_AUTOMAKE if
you want the m4 to choose between mgw and gcc libraries according to the
target you're building for. And if you define something like
AC_ARG_ENABLE(debug,....), thus defining enable_debug variable, the m4
will select the debug/release libraries whether enable_debug is yes or no.
Then you should put AM_CPPFLAGS=@BOOST_CPPFLAGS@, LIBS=@BOOST_LIBS@ (or
@BOOST_LIBS_R@ if you want the recurrent (thread-safe) version of the
libraries) somewhere in a Makefile.am
That's it... I hope it'll be as useful to you as it is being to me.
Regards,
rod
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net