844
844
if test x$use_boost = xyes; then
845
845
846
846
dnl Minimum required Boost version
847
- define ( MINIMUM_REQUIRED_BOOST , 1.47 .0 )
847
+ define ( MINIMUM_REQUIRED_BOOST , 1.58 .0 )
848
848
849
- dnl Check for boost libs
849
+ dnl Check for Boost libs
850
850
AX_BOOST_BASE ( [ MINIMUM_REQUIRED_BOOST] )
851
851
AX_BOOST_SYSTEM
852
852
AX_BOOST_FILESYSTEM
@@ -861,25 +861,7 @@ dnl counter implementations. In 1.63 and later the std::atomic approach is defau
861
861
m4_pattern_allow ( DBOOST_AC_USE_STD_ATOMIC ) dnl otherwise it's treated like a macro
862
862
BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS"
863
863
864
- if test x$use_reduce_exports = xyes; then
865
- AC_MSG_CHECKING ( [ for working boost reduced exports] )
866
- TEMP_CPPFLAGS="$CPPFLAGS"
867
- CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
868
- AC_PREPROC_IFELSE ( [ AC_LANG_PROGRAM ( [ [
869
- @%:@ include <boost/version.hpp>
870
- ] ] , [ [
871
- #if BOOST_VERSION >= 104900
872
- // Everything is okay
873
- #else
874
- # error Boost version is too old
875
- #endif
876
- ] ] ) ] ,[
877
- AC_MSG_RESULT ( yes )
878
- ] ,[
879
- AC_MSG_ERROR ( [ boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.] )
880
- ] )
881
- CPPFLAGS="$TEMP_CPPFLAGS"
882
- fi
864
+ BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
883
865
fi
884
866
885
867
if test x$use_reduce_exports = xyes; then
@@ -923,41 +905,6 @@ if test x$use_boost = xyes; then
923
905
924
906
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_ZLIB_LIB $BOOST_IOSTREAMS_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB $BOOST_ZLIB_LIB"
925
907
926
- dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums
927
- dnl using c++98 constructs. Unfortunately, this implementation detail leaked into
928
- dnl the abi. This was fixed in 1.57.
929
-
930
- dnl When building against that installed version using c++11, the headers pick up
931
- dnl on the native c++11 scoped enum support and enable it, however it will fail to
932
- dnl link. This can be worked around by disabling c++11 scoped enums if linking will
933
- dnl fail.
934
- dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51.
935
-
936
- TEMP_LIBS="$LIBS"
937
- LIBS="$BOOST_LIBS $LIBS"
938
- TEMP_CPPFLAGS="$CPPFLAGS"
939
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
940
- AC_MSG_CHECKING ( [ for mismatched boost c++11 scoped enums] )
941
- AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
942
- #include "boost/config.hpp"
943
- #include "boost/version.hpp"
944
- #if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700
945
- #define BOOST_NO_SCOPED_ENUMS
946
- #define BOOST_NO_CXX11_SCOPED_ENUMS
947
- #define CHECK
948
- #endif
949
- #include "boost/filesystem.hpp"
950
- ] ] ,[ [
951
- #if defined(CHECK)
952
- boost::filesystem::copy_file("foo", "bar");
953
- #else
954
- choke;
955
- #endif
956
- ] ] ) ] ,
957
- [ AC_MSG_RESULT ( mismatched ) ; BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"] , [ AC_MSG_RESULT ( ok ) ] )
958
- LIBS="$TEMP_LIBS"
959
- CPPFLAGS="$TEMP_CPPFLAGS"
960
-
961
908
dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
962
909
dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if
963
910
dnl a working version is available, else fall back to sleep. sleep was removed
0 commit comments