source: rtems/c/src/aclocal/prog-cxx.m4 @ f3b29236

5
Last change on this file since f3b29236 was 9a4eca5, checked in by Chris Johns <chrisj@…>, on 08/10/16 at 03:07:29

build-system: Always enable C++ if the compiler is present.

We always build a C++ compiler and building with C++ does not effect
RTEMS or the runtime. This patch always enabled the support. There is
no need to manually enable it any more.

You can disable C++ with '--disable-cxx'.

If an architecture does not have a C++ compiler support is automatically
disabled.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1dnl
2dnl Check for target g++
3dnl
4
5AC_DEFUN([RTEMS_PROG_CXX_FOR_TARGET],
6[
7AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
8AC_REQUIRE([RTEMS_ENABLE_CXX])
9AC_REQUIRE([RTEMS_CHECK_SMP])
10
11# If CXXFLAGS is not set, default to CFLAGS
12if test x"$rtems_cv_HAS_SMP" = x"yes" ; then
13  CXXFLAGS=${CXXFLAGS-${CFLAGS} -std=gnu++11}
14else
15  CXXFLAGS=${CXXFLAGS-${CFLAGS}}
16fi
17
18RTEMS_CHECK_TOOL(CXX,g++)
19if test "$RTEMS_HAS_CPLUSPLUS" = "yes";
20then
21  dnl Only accept g++
22  dnl NOTE: This might be too restrictive
23  if test -z "$CXX";
24  then
25    RTEMS_HAS_CPLUSPLUS=no
26    HAS_CPLUSPLUS=no
27    ## Work-around to a bug in automake
28    AM_CONDITIONAL([am__fastdepCXX],[false])
29  else
30    AC_PROG_CXX
31    AC_PROG_CXXCPP
32    if test "$ac_cv_prog_cc_cross" != "$ac_cv_prog_cxx_cross"; then
33      AC_MSG_ERROR([***]
34       [Inconsistency in compiler configuration:]
35       [Target C compiler and target C++ compiler]
36       [must both either be cross compilers or native compilers])
37    fi
38  fi
39else
40  ## Work-around to a bug in automake
41  AM_CONDITIONAL([am__fastdepCXX],[false])
42fi
43])
Note: See TracBrowser for help on using the repository browser.