tech-pkg archive

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

Re: icu wants c++11



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?


Home | Main Index | Thread Index | Old Index