On 11/15/2009 01:30 AM, Bruce Simpson wrote:
> Bruce Simpson wrote:

> The only other change to date I've made in my private Boost branch is to
> replace the use of pcreposix for regular expressions, with Boost's C
> regex API.
> It has a C++ API, although when I quickly hacked in its use, it didn't
> function as expected, so I reverted to the C API.

Sorry to dredge up an old email, but today I started looking closely
at boost in xorp.

Several things:

1)  SConstruct calls api to check boost existence, but it then
just ignores the return values.  Just as well since it seems to require
an ultra-modern version of boost.  I relaxed that and older versions seem
to work just fine.

2)  As far as I can tell, there is no need for pcreposix.  It seems that at
least on Linux, all you need to do is include <regex.h> and link with standard
libraries.  I left the pcreposix logic in but commented out in case other
platforms need it.

3)  The boost::noncopyable is nice, but not worth requiring boost.

So, I made boost optional in my tree.  Unless the user specifically does 
enable_boost=yes
and also has boost properly installed, my tree will build w/out boost.  It uses 
the
standard regex, and I made a small xorp_noncopyable class to replace 
boost::noncopyable.
#ifdef logic determines which noncopyable logic is used.

This will make it easier for me to deploy Xorp since boost doesn't come 
standard in Fedora
(though it's easy enough to install if the user knows to do that).  It also 
makes my
live-cd smaller (no libboost), and might help others who are also constrained 
by space.

Thanks,
Ben


-- 
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to