Boost logo

Boost-Build :

Subject: Re: [Boost-build] [Locale] Help Needed with Boost-Build
From: Artyom (artyomtnk_at_[hidden])
Date: 2010-09-12 04:31:14


> > Input Options:
> >
> > - with icu - turned on by default.
> > - with iconv (turned off by default in Windows and Solaris)
> > - with posix-backend (turned on by default on Linux and Mac)
> > - with winapi-backend (turned on on windows and cygwin)
> > - with std-backend (turned off by default with SunStudio/stlport)
>
> How those options are supposed to be specified?
> Only by user, in any
> combination he might want?

Yes, any option in any combination.

User should be able to specify them to reduce
backends or dependencies he does not need or even
add backends even if they may fail some tests.

Also if ICU is not found, for example, the ICU option should
be turned off automatically.

> Also, by "on XXX and YYY" -- I suppose you
> mean target-os, not host-os?
>

Yes, right, target OS

> > Pre-Build Checks:
> >
> > - if with icu is on, but no icu found, turn it on
>
> Did you mean "off" as the last word?

Yes, you are right, oops.

>
> > Note, when building under MSVC/Debug; search for icuXXXd library
> > rather then for icuXXX library.
> > - if with iconv is on
> > if iconv is a part of standard C library, use it
> > Otherwise find libiconv, if not found, turn iconv off.
>
> Would you please either specify code that compiles and links with
> iconv and does not compile or does not link without? Alternatively,
> point me at existing checks? CMake does not appear to have such
> check in 2.6.

I have written my own in CMake with check_cxx_compiles:

  #include <iconv.h>
  int main()
  {
    iconv_t v=iconv_open((char *)0,(char *)0);
  }

And if not compiles, search for iconv and iconv.h

>
> > - if not on Windows and both iconv and icu are off rise
> > a error, no - charset conversion tool is given
> > - if building under SunStudion make sure it uses -library=stlport4
> > flag
> > - Ensure threading on
>
> I'm fairly sure you can do this last one yourself easily, no?

I guess :-)

> > Build Defines:
> >
> > - Add BOOST_ALL_NO_LIB
>
> Why? That would make Boost.Locale different from every other compiled
> library.

Very simply, latest Boost.Thread allows to use boost::mutex without
linking to the library itself. However if I do include <boost/thread.hpp>
under MSVC it would enforce it to link with library.

So I just want to reduce the dependency I don't need.

>
> > - if icu is enabled:
> > Define BOOST_LOCALE_WITH_ICU
> > - if iconv enabled and found
> > Define BOOST_LOCALE_WITH_ICONV
> > else
> > Define BOOST_LOCALE_NO_ICONV
> > - if posix backend is NOT enabled
> > Define BOOST_LOCALE_NO_POSIX_BACKEND
> > - if std backend is not enabled
> > Define BOOST_LOCALE_NO_STD_BACKEND
> > - if winapi backend is not enabled
> > Define BOOST_LOCALE_NO_WINAPI_BACKEND
>
> You have not said anything about either posix, or std, or winapi backend,
> or how they are enabled.

I've mentioned there:

> > - with icu - turned on by default.
> > - with iconv (turned off by default in Windows and Solaris)
> > - with posix-backend (turned on by default on Linux and Mac)
> > - with winapi-backend (turned on on windows and cygwin)
> > - with std-backend (turned off by default with SunStudio/stlport)

Generally defaults are:

ICU is on unless ICU library not found
POSIX is on on Mac OS X and Linux,
WINAPI is on any windows platform including Cygwin.
STD enabled anywhere unless it is SunCC with STLPort (which is broken)
ICONV turned on by default on POSIX platforms, not including Solaris.

> >
> > If using boost<= 1.43 link with thread library
>
> Why does this depend on Boost version?

Not really important, as I told above, newer versions have header only
Boost.Thread's mutex, older require link.

> I can look into this, but before -- can you give me a link to "golden"
sources
> of Boost.Locale, or better still -- to live version control system where it
> lives. Write access would be slightly better.

Sorry (I send the link only to Boost and not Boost-Build):

Sources: http://sourceforge.net/projects/cppcms/files/boost_locale/
SVN:
https://cppcms.svn.sourceforge.net/svnroot/cppcms/boost_locale/branches/rework

Please give me your sourceforge account and I'll add commit permissions
immediately to the project.

Thank you very-very-very much!

Artyom

      


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk