[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new module no-c++
From: |
Bruno Haible |
Subject: |
new module no-c++ |
Date: |
Mon, 11 Dec 2006 17:30:45 +0100 |
User-agent: |
KMail/1.9.1 |
Hi,
We've seen that it can be useful, for typechecking purposes, to be able
to compile a whole package with a C++ compiler. But some parts, such as
the regex module, are written in C, and too many code changes would be needed
to make them compile in C++ mode.
This module allows to group such modules in automake "convenience libraries"
and compile them with a C compiler, even if $CC is set to a C++ compiler.
So far only "CC=g++" is supported, but that's sufficient since g++ implements
ANSI C++ fairly decently.
Objections?
Bruno
=============================== modules/no-c++ ===============================
Description:
Support for compiling in C mode when CC is set to a C++ compiler.
Files:
m4/no-c++.m4
Depends-on:
configure.ac:
gt_NO_CXX
Makefile.am:
Include:
License:
LGPL
Maintainer:
Bruno Haible
================================ m4/no-c++.m4 ================================
# no-c++.m4 serial 1 (gettext-0.16.2)
dnl Copyright (C) 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Support for C source files that cannot be compiled by a C++ compiler.
# Set NO_CXX to the C++ compiler flags needed to request C mode instead of
# C++ mode.
# So far only g++ is supported.
AC_DEFUN([gt_NO_CXX],
[
NO_CXX=
AC_EGREP_CPP([Is g++], [
#if defined __GNUC__ && defined __cplusplus
Is g++
#endif
],
[NO_CXX="-x c"])
AC_SUBST([NO_CXX])
])
- new module no-c++,
Bruno Haible <=