X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=configure.ac;h=716f22d6527c2afee7778737cea6913575fad61f;hb=8481f7a0ad3a050ebc8fd665fec6abd76a84e606;hp=c70c142b9d39de2728bac1ac73ae2a35e86029b4;hpb=9ac8c21231ed48f25264e3ddc6ac8ce632767669;p=lttng-ust.git diff --git a/configure.ac b/configure.ac index c70c142b..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"]) @@ -266,7 +279,6 @@ AC_CONFIG_FILES([ tools/Makefile tests/Makefile tests/hello/Makefile - tests/hello-static-lib/Makefile tests/hello.cxx/Makefile tests/same_line_tracepoint/Makefile tests/snprintf/Makefile