Commit 0e43b81c by Maarten L. Hekkelman

remove boost::regex

add boost::iostreams to libs, for test
parent eaf38e63
......@@ -30,7 +30,8 @@ firstTarget: all
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @BOOST_CPPFLAGS@ @LIBBZ2_CPPFLAGS@
LDFLAGS = @LDFLAGS@ @LIBS@ @BOOST_LDFLAGS@ @LIBBZ2_LDFLAGS@
LIBS = @LIBS@
LIBS = @LIBS@ \
@BOOST_IOSTREAMS_LIB@
prefix = @prefix@
exec_prefix = @exec_prefix@
......
......@@ -639,6 +639,7 @@ LIBBZ2_LDFLAGS
LIBBZ2_CPPFLAGS
LIBZ_LDFLAGS
LIBZ_CPPFLAGS
BOOST_IOSTREAMS_LIB
BOOST_REGEX_LIB
BOOST_LDFLAGS
BOOST_CPPFLAGS
......@@ -748,6 +749,7 @@ enable_libtool_lock
with_boost
with_boost_libdir
with_boost_regex
with_boost_iostreams
'
ac_precious_vars='build_alias
host_alias
......@@ -1423,6 +1425,11 @@ Optional Packages:
use the Regex library from boost - it is possible to
specify a certain library for the linker e.g.
--with-boost-regex=boost_regex-gcc-mt-d-1_33_1
--with-boost-iostreams[=special-lib]
use the IOStreams library from boost - it is
possible to specify a certain library for the linker
e.g.
--with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1
Some influential environment variables:
CXX C++ compiler command
......@@ -16787,6 +16794,239 @@ fi
# Check whether --with-boost-iostreams was given.
if test "${with_boost_iostreams+set}" = set; then :
withval=$with_boost_iostreams;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_iostreams_lib=""
else
want_boost="yes"
ax_boost_user_iostreams_lib="$withval"
fi
else
want_boost="yes"
fi
if test "x$want_boost" = "xyes"; then
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::IOStreams library is available" >&5
$as_echo_n "checking whether the Boost::IOStreams library is available... " >&6; }
if ${ax_cv_boost_iostreams+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/range/iterator_range.hpp>
int
main ()
{
std::string input = "Hello World!";
namespace io = boost::iostreams;
io::filtering_istream in(boost::make_iterator_range(input));
return 0;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_boost_iostreams=yes
else
ax_cv_boost_iostreams=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_iostreams" >&5
$as_echo "$ax_cv_boost_iostreams" >&6; }
if test "x$ax_cv_boost_iostreams" = "xyes"; then
$as_echo "#define HAVE_BOOST_IOSTREAMS /**/" >>confdefs.h
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_iostreams_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.so* $BOOSTLIBDIR/libboost_iostream*.dylib* $BOOSTLIBDIR/libboost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 's;^lib\(boost_iostream.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else
link_iostreams="no"
fi
done
if test "x$link_iostreams" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_iostreams*.dll* $BOOSTLIBDIR/boost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_iostreams.*\)\.dll.*$;\1;' -e 's;^\(boost_iostreams.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else
link_iostreams="no"
fi
done
fi
else
for ax_lib in $ax_boost_user_iostreams_lib boost_iostreams-$ax_boost_user_iostreams_lib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5
$as_echo_n "checking for main in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_IOSTREAMS_LIB="-l$ax_lib"; link_iostreams="yes"; break
else
link_iostreams="no"
fi
done
fi
if test "x$ax_lib" = "x"; then
as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
fi
if test "x$link_iostreams" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
......
......@@ -46,7 +46,7 @@ AC_PROG_MAKE_SET
AX_BOOST_BASE([1.71], [], [
AC_MSG_ERROR([Sorry, your boost is not found or not up-to-date.])
])
AX_BOOST_REGEX
AX_BOOST_IOSTREAMS
AX_CHECK_LIBRARY([LIBZ], [zlib.h], [z], [],
[AC_MSG_ERROR([libz not found - compressed files not supported])])
......
......@@ -27,7 +27,7 @@
#include <boost/algorithm/string.hpp>
//// since gcc's regex is crashing....
#include <boost/regex.hpp>
// #include <boost/regex.hpp>
// #include <regex>
#include "cif++/Cif++.hpp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment