~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/cxx_standard.m4

  • Committer: Monty Taylor
  • Date: 2009-06-30 18:09:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1083.
  • Revision ID: mordred@inaugust.com-20090630180907-r24363hlhgxg4cbw
Whole boat-load of build fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
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}"
 
2
  AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
 
3
  AS_IF([test "$GCC" = "yes"],
 
4
        [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[],
 
5
               [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"],
 
6
                      [CXXFLAGS="-std=gnu++0x ${CXXFLAGS}"],
 
7
                      [CXXFLAGS="-std=gnu++98"])
 
8
               ])
 
9
        ])
22
10
])