autoconf-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in AX_BOOST_* macros


From: Jens Finkhäuser
Subject: Bug in AX_BOOST_* macros
Date: Wed, 19 Mar 2014 13:01:03 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi all!

I just found an annoying, but easy to fix bug in all of the AX_BOOST_*
macros.

Steps to reproduce
------------------

Run checks for more than one boost library, e.g.:

AX_BOOST_BASE([1.46.0])
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_THREAD

Make sure that the library file for boost program options is found,
but the library file for boost thread is missing.


Expected behaviour
------------------

The second macro errors out.


Actual behaviour
----------------

The second macro succeeds.


Bug description
---------------

AX_BOOST_PROGRAM_OPTIONS and AX_BOOST_THREAD (and all the other macros
I looked at briefly) all use the same variable $ax_lib to check for
the name of the library file to pass to the linker.

Running two macros after each other means that if the first macro
found a library file, the $ax_lib variable is already set before the
second macro is run. As a result, the second macro does not detect the
missing library file - instead, it assumes that the library it found
is the one from the first macro.


Proposed Fix
------------

Simply set $ax_lib to an empty value before the checks for the library
file are performed.

I've attached an example patch for AX_BOOST_THREAD.


Hope that helps,
  Jens

-- 
1.21 Jiggabytes of memory should be enough for anybody.

Attachment: ax_boost_thread.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]