#libcpp is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation; either version 2, or (at your option)
+#the Free Software Foundation; either version 3, or (at your option)
#any later version.
#libcpp is distributed in the hope that it will be useful,
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
-#along with libcpp; see the file COPYING. If not, write to
-#the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-#Boston MA 02110-1301, USA.
+#along with libcpp; see the file COPYING3. If not see
+#<http://www.gnu.org/licenses/>.
@SET_MAKE@
CATALOGS = $(patsubst %,po/%,@CATALOGS@)
CC = @CC@
CFLAGS = @CFLAGS@
-WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
+WARN_CFLAGS = @warn@ @c_warn@ @WARN_PEDANTIC@ @WERROR@
+CXX = @CXX@
+CXXFLAGS = @CXXFLAGS@
+WARN_CXXFLAGS = @warn@ @WARN_PEDANTIC@ @WERROR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
EXEEXT = @EXEEXT@
SHELL = @SHELL@
USED_CATALOGS = @USED_CATALOGS@
XGETTEXT = @XGETTEXT@
-DEPMODE = @CCDEPMODE@
+CCDEPMODE = @CCDEPMODE@
+CXXDEPMODE = @CXXDEPMODE@
DEPDIR = @DEPDIR@
datarootdir = @datarootdir@
-I$(srcdir)/include
ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
+ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(INCLUDES) $(CPPFLAGS)
+
+# The name of the compiler to use.
+ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WITH_CXX@
+ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
+COMPILER = $(CC)
+COMPILER_FLAGS = $(ALL_CFLAGS)
+DEPMODE = $(CCDEPMODE)
+else
+COMPILER = $(CXX)
+COMPILER_FLAGS = $(ALL_CXXFLAGS)
+DEPMODE = $(CXXDEPMODE)
+endif
+
libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
install-man update-po install-html
# Dependency rule.
-COMPILE.base = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALL_CFLAGS) -c
+COMPILE.base = $(COMPILER) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(COMPILER_FLAGS) -c
ifeq ($(DEPMODE),depmode=gcc3)
# Note that we put the dependencies into a .Tpo file, then move them
# into place if the compile succeeds. We need this because gcc does
$(mkinstalldirs) $(srcdir)/po
$(XGETTEXT) --default-domain=$(PACKAGE) \
--keyword=_ --keyword=N_ \
- --keyword=cpp_error:3 --keyword=cpp_errno:3 \
+ --keyword=cpp_error:3 \
+ --keyword=cpp_warning:3 \
+ --keyword=cpp_pedwarning:3 \
+ --keyword=cpp_warning_syshdr:3 \
--keyword=cpp_error_with_line:5 \
+ --keyword=cpp_warning_with_line:5 \
+ --keyword=cpp_pedwarning_with_line:5 \
+ --keyword=cpp_warning_with_line_syshdr:5 \
+ --keyword=cpp_errno:3 \
--keyword=SYNTAX_ERROR --keyword=SYNTAX_ERROR2 \
--copyright-holder="Free Software Foundation, Inc." \
--msgid-bugs-address="http://gcc.gnu.org/bugs.html" \