[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro reuse
From: |
Thomas Porschberg |
Subject: |
Re: macro reuse |
Date: |
Wed, 24 May 2006 14:35:40 +0200 |
Hi,
for my problem with the m4 macros for boost I think I can go the
following way:
I provide ac_boost_base.m4 which does the version check and defines
BOOST_CPPFLAGS, BOOST_LDFLAGS.
Boost users who only want use the template libs from boost have only to
include this macro.
Boost users who want use the compiled libraries like date_time,
program_options, thread... have to call AX_BOOST_BASE first and
afterward the special macros like AX_BOOST_DATE_TIME,
AX_BOOST_PROGRAM_OPTIONS...
At that time the include/linker flags are already known and we can try
to compile and link a small program with the special library.
configure.ac could look like:
AX_BOOST_BASE([1.33.1])
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_DATE_TIME
configure --help
gives now
...
--with-boost[=DIR]
use boost (default is No) , specify the root
directory for boost library (optional)
--with-boost-program-options
use the program options library from boost,
requires
a preceding call to AX_BOOST_BASE
--with-boost-date-time use the Date_Time library from boost,
requires a
preceding call to AX_BOOST_BASE
The user can call configure for example:
./configure --with-boost=/opt/boost --with-boost-program-options
I uploaded http://randspringer.de/boost/shared_ptr-0.2.tar.gz as tiny
example.
Any thoughts ?
Thomas
Am Mon, 22 May 2006 16:28:21+0200 schrieb Stepan Kasal <address@hidden>:
> Hello,
>
> On Sun, May 21, 2006 at 07:42:46AM +0200, Familie Porschberg wrote:
> > The macro which already exist(say M1) checks the existence of the
> > library and the version number.
> > The new macro which wants reuse the M1 macro will do something more
> > but it has also first to check existence and version number of the
> > lib.
> >
> > My idea was to call AC_REQUIRE([M1([$version_number])]) but it does
> > not work.
>
> it would help if you posted some example code. Preferably a pointer
> to a small self-contained example, but simple pointer to a tarball of
> your project might be enough.
>
> Have a nice day,
> Stepan
>
>
>
> _______________________________________________
> Autoconf mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/autoconf
>
>
--
Re: macro reuse, Familie Porschberg, 2006/05/22
Re: macro reuse,
Thomas Porschberg <=