From: Carl Hetherington Date: Wed, 27 Nov 2013 10:53:49 +0000 (+0000) Subject: We only need boost locale on Windows. X-Git-Tag: v2.0.48~1108^2~16 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=52c7a765b76efbba439411a78ca31b72ef17fe6e;p=dcpomatic.git We only need boost locale on Windows. --- diff --git a/src/lib/util.cc b/src/lib/util.cc index e70440271..9dffffa98 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -39,7 +39,9 @@ #include #include #include +#ifdef DCPOMATIC_WINDOWS #include +#endif #include #include #include diff --git a/src/lib/wscript b/src/lib/wscript index e317026f3..5098d4069 100644 --- a/src/lib/wscript +++ b/src/lib/wscript @@ -74,7 +74,7 @@ def build(bld): obj.export_includes = ['..'] obj.uselib = """ AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE - BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_LOCALE + BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 SNDFILE OPENJPEG POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++ CURL ZIP QUICKMAIL """ @@ -82,7 +82,7 @@ def build(bld): obj.source = sources + ' version.cc' if bld.env.TARGET_WINDOWS: - obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK' + obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI MSWSOCK BOOST_LOCALE' obj.source += ' stack.cpp' if bld.env.STATIC: obj.uselib += ' XML++' diff --git a/wscript b/wscript index 138f947e4..54a1a3eb0 100644 --- a/wscript +++ b/wscript @@ -185,13 +185,16 @@ def configure(conf): lib=['boost_date_time%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], uselib_store='BOOST_DATETIME') - conf.check_cxx(fragment=""" - #include \n - int main() { std::locale::global (boost::locale::generator().generate ("")); }\n - """, msg='Checking for boost locale library', - libpath='/usr/local/lib', - lib=['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], - uselib_store='BOOST_LOCALE') + # Only Windows versions require boost::locale, which is handy, as it was only introduced in + # boost 1.48 and so isn't (easily) available on old Ubuntus. + if conf.env.TARGET_WINDOWS: + conf.check_cxx(fragment=""" + #include \n + int main() { std::locale::global (boost::locale::generator().generate ("")); }\n + """, msg='Checking for boost locale library', + libpath='/usr/local/lib', + lib=['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], + uselib_store='BOOST_LOCALE') conf.check_cxx(fragment=""" #include \n