1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

configure: Allow C++ components.

This commit is contained in:
Petr Rockai 2014-06-08 18:23:47 +02:00
parent f476655fee
commit bf1f22cc99
2 changed files with 8 additions and 3 deletions

View File

@ -69,6 +69,7 @@ dnl -- Checks for programs.
AC_PROG_SED
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CXX
dnl probably no longer needed in 2008, but...
AC_PROG_GCC_TRADITIONAL

View File

@ -106,6 +106,7 @@ DEFAULT_MANGLING = @MANGLING@
# Setup vpath search paths for some suffixes
vpath %.c $(srcdir)
vpath %.cpp $(srcdir)
vpath %.in $(srcdir)
vpath %.po $(srcdir)
vpath %.exported_symbols $(srcdir)
@ -136,7 +137,7 @@ INSTALL_ROOT_DIR = $(INSTALL) -m 700 -d
INSTALL_ROOT_DATA = $(INSTALL) -m 600
INSTALL_SCRIPT = $(INSTALL) -p $(M_INSTALL_PROGRAM)
.SUFFIXES: .c .d .o .so .a .po .pot .mo .dylib
.SUFFIXES: .c .cpp .d .o .so .a .po .pot .mo .dylib
WFLAGS += -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings \
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
@ -239,7 +240,7 @@ INC_LNS = $(top_builddir)/include/.symlinks_created
DEPS = $(top_builddir)/make.tmpl $(top_srcdir)/VERSION \
$(top_builddir)/Makefile $(INC_LNS)
OBJECTS = $(SOURCES:%.c=%.o)
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
POTFILES = $(SOURCES:%.c=%.pot)
.PHONY: all pofile distclean clean cleandir cflow device-mapper
@ -366,6 +367,9 @@ $(TARGETS): $(OBJECTS)
%.o: %.c
$(CC) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
%.o: %.cpp
$(CXX) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
%.pot: %.c Makefile
$(CC) -E $(INCLUDES) -include $(top_builddir)/include/pogen.h \
$(DEFS) $(WFLAGS) $(CFLAGS) $< > $@
@ -454,7 +458,7 @@ distclean: cleandir $(SUBDIRS.distclean)
ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov \
help check check_local check_cluster check_lvmetad))
ifdef SOURCES
-include $(SOURCES:.c=.d)
-include $(SOURCES:.c=.d) $(CXXSOURCES:.cpp=.d)
endif
ifdef SOURCES2
-include $(SOURCES2:.c=.d)