tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: icu wants c++11



On Tue, Apr 25, 2017 at 08:19:40AM +0000, coypu%sdf.org@localhost wrote:
> I was equally perplexed.
> the icu builds on SmartOS are failing too (seems like it does not set
> C++11 as a standard, but works fine on NetBSD)
> Excerpt from icu configure script:
> 
> if [[ "$GXX" = yes ]]; then
>     # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++11,
>     # and check that the compiler still works.
>     if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then
>         OLD_CXXFLAGS="${CXXFLAGS}"
>         CXXFLAGS="$CXXFLAGS -std=c++11"
>         AC_MSG_CHECKING([[if we have a C++11 compiler]])
>         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx11_okay=yes],[cxx11_okay=no])
>         AC_MSG_RESULT($cxx11_okay)
>         if [[ $cxx11_okay = yes ]]; then
>             AC_MSG_NOTICE([Adding CXXFLAGS option -std=c++11])
>             UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -std=c++11"
>         else
>             CXXFLAGS="$OLD_CXXFLAGS"
>         fi
>         case "${host}" in
>         *-*-solaris*)
>             CXXFLAGS="$OLD_CXXFLAGS"
>             ;;
>         esac
>     fi
> fi
> 
> Maybe it's workarounds for the sun compiler?

Taking a leaf out of squid3's book, do

http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html

give any clues? ("use AX_CXX_COMPILE_STDCXX_11" might be an easier patch
to send to icu...)

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index