Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_cxx_have_sstream.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_CXX_HAVE_SSTREAM
  8. #
  9. # DESCRIPTION
  10. #
  11. # If the C++ library has a working stringstream, define HAVE_SSTREAM.
  12. #
  13. # LICENSE
  14. #
  15. # Copyright (c) 2008 Ben Stanley <Ben.Stanley@exemail.com.au>
  16. #
  17. # Copying and distribution of this file, with or without modification, are
  18. # permitted in any medium without royalty provided the copyright notice
  19. # and this notice are preserved. This file is offered as-is, without any
  20. # warranty.
  21. #serial 7
  22. AU_ALIAS([AC_CXX_HAVE_SSTREAM], [AX_CXX_HAVE_SSTREAM])
  23. AC_DEFUN([AX_CXX_HAVE_SSTREAM],
  24. [AC_CACHE_CHECK(whether the compiler has stringstream,
  25. ax_cv_cxx_have_sstream,
  26. [AC_REQUIRE([AX_CXX_NAMESPACES])
  27. AC_LANG_SAVE
  28. AC_LANG_CPLUSPLUS
  29. AC_TRY_COMPILE([#include <sstream>
  30. #ifdef HAVE_NAMESPACES
  31. using namespace std;
  32. #endif],[stringstream message; message << "Hello"; return 0;],
  33. ax_cv_cxx_have_sstream=yes, ax_cv_cxx_have_sstream=no)
  34. AC_LANG_RESTORE
  35. ])
  36. if test "$ax_cv_cxx_have_sstream" = yes; then
  37. AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream])
  38. fi
  39. ])