[math] long double autoconfiguration

Hi, at present, Boost.Math library always tries to compile long long versions of the function, unless explicit --disable-long-long is passed by the user. I have just checked in a patch that attempt to automatically determine if long long is available. Attached is a sample output of "bjam --with-math" build. The detection is done by compiling new file named libs/math/src/long_double_check.cpp -- if it compiles, it is assumed long double works. Unfortunately, I don't really know what kind of long double support Boost.Math needs. John, Paul, could either of you add some more content to that file? This change an SVN version of bjam as of today. If you use an older version, nothing should break, but no auto-detection will be performed. Also, if you need to look at compiler messages produced when compiling the test file, look at bin.v2/config.log Thanks, -- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build: http://boost.org/boost-build2 Building the Boost C++ Libraries. Configuration checks summary - long double support : yes Component configuration: - date_time : not building - filesystem : not building - graph : not building - graph_parallel : not building - iostreams : not building - math : building - mpi : not building - program_options : not building - python : not building - regex : not building - serialization : not building - signals : not building - system : not building - test : not building - thread : not building - wave : not building ...patience... ...found 1584 targets... The Boost C++ Libraries were successfully built! The following directory should be added to compiler include paths: /home/ghost/Work/Boost/boost-svn The following directory should be added to linker library paths: /home/ghost/Work/Boost/boost-svn/stage/lib

at present, Boost.Math library always tries to compile long long versions of the function, unless explicit --disable-long-long is passed by the user. I have just checked in a patch that attempt to automatically determine if long long is available. Attached is a sample output of "bjam --with-math" build.
The detection is done by compiling new file named libs/math/src/long_double_check.cpp -- if it compiles, it is assumed long double works. Unfortunately, I don't really know what kind of long double support Boost.Math needs. John, Paul, could either of you add some more content to that file?
Great, but can you direct this to the existing test at libs/math/config/has_long_double_support.cpp ? Does this mean that we have autoconf-like support now? Thanks, John.

John Maddock wrote:
at present, Boost.Math library always tries to compile long long versions of the function, unless explicit --disable-long-long is passed by the user. I have just checked in a patch that attempt to automatically determine if long long is available. Attached is a sample output of "bjam --with-math" build.
The detection is done by compiling new file named libs/math/src/long_double_check.cpp -- if it compiles, it is assumed long double works. Unfortunately, I don't really know what kind of long double support Boost.Math needs. John, Paul, could either of you add some more content to that file?
Great, but can you direct this to the existing test at libs/math/config/has_long_double_support.cpp ?
Done -- I did not realize there's existing test.
Does this mean that we have autoconf-like support now?
At least we can building target and deciding what to do next depending on result. There's a lot to improve but the basics are there. - Volodya

Great, but can you direct this to the existing test at libs/math/config/has_long_double_support.cpp ?
Done -- I did not realize there's existing test.
Thanks!
Does this mean that we have autoconf-like support now?
At least we can building target and deciding what to do next depending on result. There's a lot to improve but the basics are there.
That might well be enough for most things, looks like I'll have to investigate some more! Cheers, John.

John Maddock wrote:
Great, but can you direct this to the existing test at libs/math/config/has_long_double_support.cpp ?
Done -- I did not realize there's existing test.
Thanks!
Does this mean that we have autoconf-like support now?
At least we can building target and deciding what to do next depending on result. There's a lot to improve but the basics are there.
That might well be enough for most things, looks like I'll have to investigate some more!
I'll be tweaking it over next weeks; so don't hesitate to ask me if you want to add something. - Volodya

Vladimir Prus wrote:
John Maddock wrote:
Does this mean that we have autoconf-like support now?
At least we can building target and deciding what to do next depending on result. There's a lot to improve but the basics are there.
Volodya, Great idea, kudos! Could you give an overview on how these options will work? Are they boolean flags indicating what components to include to build? Best regards -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org
participants (4)
-
John Maddock
-
Mateusz Loskot
-
Vladimir Prus
-
Vladimir Prus