X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=configure.ac;h=716f22d6527c2afee7778737cea6913575fad61f;hb=8481f7a0ad3a050ebc8fd665fec6abd76a84e606;hp=802ccaa5ffe49566740e0e39fdcf46674924f12b;hpb=197bafac425c8bb6c19f90c3d697127021c34b14;p=lttng-ust.git diff --git a/configure.ac b/configure.ac index 802ccaa5..716f22d6 100644 --- a/configure.ac +++ b/configure.ac @@ -83,8 +83,21 @@ AC_CACHE_CHECK([whether the C++ compiler works], [rw_cv_prog_cxx_works], [AC_LANG_PUSH([C++]) AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [rw_cv_prog_cxx_works=yes], + [check_cxx_designated_initializers=yes], [rw_cv_prog_cxx_works=no]) + if test "$check_cxx_designated_initializers" = "yes"; then + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + struct foo { int a; int b; }; + void fct(void) + { + struct foo f = { .a = 0, .b = 1 }; + } + ]])],[ + rw_cv_prog_cxx_works=yes + ],[ + rw_cv_prog_cxx_works=no + ]) + fi AC_LANG_POP([C++])]) AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])