diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-25 04:28:49 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-25 04:28:49 -0400 |
commit | 48d24e2a4ce911214a83492fcf5cd89bb4a3bda5 (patch) | |
tree | 2aec8a08888999d085ad08d221ef4f17d8ed3372 /configure.ac | |
parent | f35bc939c96c3a3bf09c5881d638b5ba60449c03 (diff) | |
download | ledger-48d24e2a4ce911214a83492fcf5cd89bb4a3bda5.tar.gz ledger-48d24e2a4ce911214a83492fcf5cd89bb4a3bda5.tar.bz2 ledger-48d24e2a4ce911214a83492fcf5cd89bb4a3bda5.zip |
Use boost::iostreams::file_descriptor_sink
This is instead of the custom fdstream.hpp file I was distributing.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c45ff636..8b3b791e 100644 --- a/configure.ac +++ b/configure.ac @@ -255,6 +255,31 @@ else AC_MSG_FAILURE("Could not find boost_filesystem library (set CPPFLAGS and LDFLAGS?)") fi +# check for boost_iostreams +AC_CACHE_CHECK( + [if boost_iostreams is available], + [boost_iostreams_cpplib_avail_cv_], + [boost_iostreams_save_libs=$LIBS + LIBS="-lboost_iostreams$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS" + AC_LANG_PUSH(C++) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <boost/iostreams/device/file_descriptor.hpp> + #include <boost/iostreams/stream.hpp>]], + [[namespace io = boost::iostreams; + typedef io::stream<io::file_descriptor_sink> ofdstream; + ofdstream outstream(1);]])], + [boost_iostreams_cpplib_avail_cv_=true], + [boost_iostreams_cpplib_avail_cv_=false]) + AC_LANG_POP + LIBS=$boost_iostreams_save_libs]) + +if [test x$boost_iostreams_cpplib_avail_cv_ = xtrue ]; then + LIBS="-lboost_iostreams$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS" +else + AC_MSG_FAILURE("Could not find boost_iostreams library (set CPPFLAGS and LDFLAGS?)") +fi + # check for Python AM_PATH_PYTHON(2.4,, :) if [test "$PYTHON" != :]; then |