X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=m4%2Frw_prog_cxx_works.m4;fp=m4%2Frw_prog_cxx_works.m4;h=0000000000000000000000000000000000000000;hp=f3d6bde6b1c4675ee41778615699bb12c208ec2e;hb=c30417c11fcaf0406c4cfb3a09373c848a86e291;hpb=ca806b0b247f89c62ac628a7779ae84049a8c2d7 diff --git a/m4/rw_prog_cxx_works.m4 b/m4/rw_prog_cxx_works.m4 deleted file mode 100644 index f3d6bde6b..000000000 --- a/m4/rw_prog_cxx_works.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# SYNOPSIS -# -# RW_PROG_CXX_WORKS -# -# DESCRIPTION -# -# RW_PROG_CXX_WORKS checks whether the C++ compiler works. -# -# There's a bit of oversight in autoconf that will set the C++ compiler to -# g++ if no compiler is found, even if g++ is not present! So we need an -# extra test to make sure that the compiler works. -# -# LICENSE -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 1 - -AC_DEFUN([RW_PROG_CXX_WORKS], [ -AC_REQUIRE([AC_PROG_CXX]) -AC_CACHE_CHECK([whether the C++ compiler works], - [rw_cv_prog_cxx_works], - [AC_LANG_PUSH([C++]) - - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ - check_cxx_designated_initializers=yes - ], [ - rw_cv_prog_cxx_works=no - ]) - - AS_IF([test "x$check_cxx_designated_initializers" = "xyes"], [ - 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 - ]) - ]) - - AC_LANG_POP([C++]) -]) -])