Changeset 2e0fd427 in rtems for aclocal/prog-cxx.m4


Ignore:
Timestamp:
Nov 2, 2000, 3:44:04 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
a314d3b4
Parents:
8262fda
Message:

2000-11-02 Ralf Corsepius <corsepiu@…>

  • aclocal/*: Replace with contents of macros/*.m4
  • macros/: Remove.
  • aclocal/ar-s.m4 aclocal/tool-prefix.m4: Remove.
  • Makefile.am: Reflect changes to aclocal/ and macros/.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • aclocal/prog-cxx.m4

    r8262fda r2e0fd427  
    44dnl Check for target g++
    55dnl
    6 dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    7 dnl                             Completely reworked
    86
    97AC_DEFUN(RTEMS_PROG_CXX,
    108[
    119AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
    12 AC_BEFORE([$0], [AC_PROG_CXX])dnl
    1310AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
    14 AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
    1511AC_REQUIRE([RTEMS_ENABLE_LIBCDIR])dnl
    1612
    17 dnl Only accept g++ and c++
    18 dnl NOTE: This might be too restrictive for native compilation
    19 AC_PATH_PROGS(CXX_FOR_TARGET, "$program_prefix"g++ "$program_prefix"c++)
    20 test -z "$CXX_FOR_TARGET" \
     13dnl Only accept g++
     14dnl NOTE: This might be too restrictive
     15AC_CHECK_TOOL(CXX,g++)
     16AC_PROG_CXX
     17test -z "$CXX" \
    2118  && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
    22 
    23 dnl backup
    24 rtems_save_CXX=$CXX
    25 rtems_save_CXXFLAGS=$CXXFLAGS
    26 
    27 dnl temporarily set CXX
    28 CXX=$CXX_FOR_TARGET
    29 
    30 AC_PROG_CXX_WORKS
    31 AC_PROG_CXX_GNU
    32 
    33 if test $ac_cv_prog_gxx = yes; then
    34   GXX=yes
    35 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
    36 dnl plays around with CXXFLAGS (such as to build both debugging and
    37 dnl normal versions of a library), tasteless as that idea is.
    38   ac_test_CXXFLAGS="${CXXFLAGS+set}"
    39   ac_save_CXXFLAGS="$CXXFLAGS"
    40   CXXFLAGS=
    41   AC_PROG_CXX_G
    42   if test "$ac_test_CXXFLAGS" = set; then
    43     CXXFLAGS="$ac_save_CXXFLAGS"
    44   elif test $ac_cv_prog_cxx_g = yes; then
    45     CXXFLAGS="-g -O2"
    46   else
    47     CXXFLAGS="-O2"
    48   fi
    49 else
    50   GXX=
    51   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
    52 fi
    53 
    54 rtems_cv_prog_gxx=$ac_cv_prog_gxx
    55 rtems_cv_prog_cxx_g=$ac_cv_prog_cxx_g
    56 rtems_cv_prog_cxx_works=$ac_cv_prog_cxx_works
    57 rtems_cv_prog_cxx_cross=$ac_cv_prog_cxx_cross
    58 
    59 CXX=$rtems_save_CXX
    60 CXXFLAGS=$rtems_save_CXXFLAGS
    61 
    62 dnl restore initial values
    63 unset ac_cv_prog_gxx
    64 unset ac_cv_prog_cc_g
    65 unset ac_cv_prog_cxx_works
    66 unset ac_cv_prog_cxx_cross
    67 dnl somehow autoconf macros leave this file
    68 rm -f conftest.C
    6919])
    7020
     
    7222[
    7323  RTEMS_PROG_CXX
    74   if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then
     24  if test "$ac_cv_prog_cc_cross" != "$ac_cv_prog_cxx_cross"; then
    7525    AC_MSG_ERROR([***]
    7626     [Inconsistency in compiler configuration:]
    77      [Target C compiler and Target C++ compiler]
     27     [Target C compiler and target C++ compiler]
    7828     [must both either be cross compilers or native compilers]
    7929     [Hint: If building a posix bsp: LD_LIBRARY_PATH?] )
Note: See TracChangeset for help on using the changeset viewer.