~drizzle-trunk/drizzle/development

1909.5.1 by Andrew Hutchings
Re-write of linebuffer to stop buffer overrrun and hopefully improve performance
1
dnl Copyright (C) 2010 Andrew Hutchings
2
dnl This file is free software; Andrew Hutchings
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
5
6
AC_DEFUN([_PANDORA_SEARCH_BOOST_IOSTREAMS],[
7
  AC_REQUIRE([AC_LIB_PREFIX])
8
9
  dnl --------------------------------------------------------------------
1909.5.2 by Andrew Hutchings
Fix comment in pandora boost iostreams
10
  dnl  Check for Boost.Iostreams
1909.5.1 by Andrew Hutchings
Re-write of linebuffer to stop buffer overrrun and hopefully improve performance
11
  dnl --------------------------------------------------------------------
12
13
  AC_LANG_PUSH(C++)
14
  AC_LIB_HAVE_LINKFLAGS(boost_iostreams-mt,,[
15
    #include <boost/iostreams/stream.hpp>
16
    #include <boost/iostreams/device/array.hpp>
17
  ],[
18
    const char* input= "hello world";
19
    boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input));
20
  ])
21
  AS_IF([test "x${ac_cv_libboost_iostreams_mt}" = "xno"],[
22
    AC_LIB_HAVE_LINKFLAGS(boost_iostreams,,[
23
      #include <boost/iostreams/stream.hpp>
24
      #include <boost/iostreams/device/array.hpp>
25
    ],[
26
      const char* input= "hello world";
27
      boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input));
28
    ])
29
  ])
30
  AC_LANG_POP()
31
  
32
  AM_CONDITIONAL(HAVE_BOOST_IOSTREAMS,
33
    [test "x${ac_cv_libboost_iostreams}" = "xyes" -o "x${ac_cv_libboost_iostreams_mt}" = "xyes"])
34
  BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_IOSTREAMS_MT} ${LTLIBBOOST_IOSTREAMS}"
35
  AC_SUBST(BOOST_LIBS) 
36
])
37
38
AC_DEFUN([PANDORA_HAVE_BOOST_IOSTREAMS],[
39
  PANDORA_HAVE_BOOST($1)
40
  _PANDORA_SEARCH_BOOST_IOSTREAMS($1)
41
])
42
43
AC_DEFUN([PANDORA_REQUIRE_BOOST_IOSTREAMS],[
44
  PANDORA_REQUIRE_BOOST($1)
45
  _PANDORA_SEARCH_BOOST_IOSTREAMS($1)
46
  AS_IF([test "x${ac_cv_libboost_iostreams}" = "xno" -a "x${ac_cv_libboost_iostreams_mt}" = "xno"],
47
      AC_MSG_ERROR([Boost.Iostreams is required for ${PACKAGE}]))
48
])
49