message: build: consolidate reduced export checks
diff: @@ -1201,12 +1201,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  [ AC_MSG_RESULT(no); HAVE_WEAK_GETAUXVAL=0 ]
  )
  -dnl Check for reduced exports
  -if test x$use_reduce_exports = xyes; then
  - AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],
  - [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])])
  -fi
  -
  AC_MSG_CHECKING([for std::system])
  AC_LINK_IFELSE(
  [ AC_LANG_PROGRAM(
  @@ -1420,8 +1414,10 @@ BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFL
  BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
  fi
  +dnl Check for reduced exports
  if test x$use_reduce_exports = xyes; then
  - CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
  + AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"],
  + [AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])],[[$CXXFLAG_WERROR]])
  AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]],[RELDFLAGS="-Wl,--exclude-libs,ALL"],,[[$LDFLAG_WERROR]])
  fi
  