Drop required Boost version from 1.37 to 1.34

Use boost/tr1 to bring in std::tr1::unordered_map instead of the Boost
version.
This commit is contained in:
Tim Moore 2009-11-22 22:55:56 +01:00
parent 539ced191b
commit 40533f50df
3 changed files with 6 additions and 5 deletions

View File

@ -671,7 +671,7 @@ if test "x$want_boost" = "xyes"; then
if test "$_version" = "0" ; then
AC_MSG_ERROR([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
else
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
AC_MSG_ERROR([Your boost libraries seems to old (version $_version).])
fi
else
AC_SUBST(BOOST_CPPFLAGS)

View File

@ -37,7 +37,7 @@ AC_PROG_CXX
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LN_S
AX_BOOST_BASE([1.37.0])
AX_BOOST_BASE([1.34.0])
if test "x$BOOST_CPPFLAGS" != "x-I/usr/include" ; then
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"

View File

@ -19,8 +19,9 @@
#include <vector>
#include <string>
#include <boost/tr1/unordered_map.hpp>
#include <boost/unordered_map.hpp>
#include <boost/functional/hash.hpp>
#include <osg/Object>
#include <osgDB/ReaderWriter>
@ -132,8 +133,8 @@ protected:
bool operator()(const Key& lhs, const Key& rhs) const;
};
};
typedef boost::unordered_map<Key, osg::ref_ptr<Effect>, boost::hash<Key>,
Key::EqualTo> Cache;
typedef std::tr1::unordered_map<Key, osg::ref_ptr<Effect>,
boost::hash<Key>, Key::EqualTo> Cache;
Cache* getCache()
{
if (!_cache)