~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/cxx_standard.m4

  • Committer: Monty Taylor
  • Date: 2009-03-10 00:05:04 UTC
  • mfrom: (919.2.22 mordred)
  • mto: This revision was merged to the branch mainline in revision 928.
  • Revision ID: mordred@inaugust.com-20090310000504-sx3b9kgdkjcame63
MergedĀ fromĀ Solaris.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_DEFUN([AC_CXX_CHECK_STANDARD],[
 
2
  AC_CACHE_CHECK([what C++ standard the compiler supports],
 
3
    [ac_cv_cxx_standard],[
 
4
    AC_LANG_PUSH(C++)
 
5
    save_CXXFLAGS="${CXXFLAGS}"
 
6
    CXXFLAGS="-std=gnu++0x ${CXXFLAGS}"
 
7
    AC_COMPILE_IFELSE(
 
8
      [AC_LANG_PROGRAM(
 
9
        [[
 
10
#include <string>
 
11
 
 
12
using namespace std;
 
13
        ]],[[
 
14
string foo("test string");
 
15
        ]])],
 
16
        [ac_cv_cxx_standard="gnu++0x"],
 
17
        [ac_cv_cxx_standard="gnu++98"])
 
18
    CXXFLAGS="${save_CXXFLAGS}"
 
19
    AC_LANG_POP()
 
20
  ])
 
21
  CXXFLAGS="-std=${ac_cv_cxx_standard} ${CXXFLAGS}"
 
22
])