ac-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ vendor specific compiler switches (CXXFLAGS)


From: Ludovic Courtès
Subject: C++ vendor specific compiler switches (CXXFLAGS)
Date: Thu, 9 Sep 2004 11:27:55 +0200
User-agent: Mutt/1.5.4i [Guile enabled]

Hello,

The following macro makes use of `AC_CXX_COMPILER_VENDOR' which I posted
a few days ago [1] in order to determine what flags (compile-time)
should be passed to the C++ compiler to enable standard C++ support.
Other similar macros to follow.

dnl @synopsis AC_CXX_CXXFLAGS_STD_LANG(CXX-FLAGS)
dnl
dnl Append to variable CXX-FLAGS the set of compile-time flags that
dnl should be passed to the C++ compiler in order to enable use of
dnl C++ features as defined in the ANSI C++ standard (eg. use of
dnl standard iostream classes in the `std' namespace, etc.).  Note that
dnl if you use GNU Libtool you may need to prefix each of those flags
dnl with `-Xcompiler' so that Libtool doesn't discard them (see
dnl Libtool's manual and `AC_LIBTOOLIZE_CFLAGS').
dnl
dnl @version 20040907
dnl @author  Ludovic Courtès <address@hidden>
AC_DEFUN([AC_CXX_CXXFLAGS_STD_LANG],
  [AC_REQUIRE([AC_CXX_COMPILER_VENDOR])
   case "$ac_cv_cxx_compiler_vendor" in
     sgi)    $1="$$1 -LANG:std -exceptions";;
     hp)     $1="$$1 -AA";;
   esac])

Thanks,
Ludovic.

[1] 
http://lists.gnu.org/archive/html/ac-archive-maintainers/2004-09/msg00000.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]