autoconf m4 macro for boost

(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
participants (1)
-
Rodolfo Schulz de Lima