$NetBSD: patch-aa,v 1.4 2013/05/04 12:46:42 joerg Exp $ --- Makefile.orig 2013-03-19 21:41:56.000000000 +0000 +++ Makefile @@ -109,9 +109,6 @@ DIST_TAR_XZ = $(DIST_TAR).xz EXT_PKGS_CFLAGS = `pkg-config --cflags $(EXT_PKGS)` EXT_PKGS_LDFLAGS = `pkg-config --libs $(EXT_PKGS)` -# REQUIRED_CFLAGS absolutely get appended to CFLAGS, whatever the -# the value of CFLAGS in the environment. -REQUIRED_CFLAGS=-Wl,-lstdc++ # Because -fPIC can interfere with compilation on 32-bit platforms but # is absolutely necessary for AMD64, we check what the target machine's @@ -229,7 +227,7 @@ $(VAPI_FILE): $(EXPANDED_VAPI_INPUT) $(D vapigen --library=$(PKGNAME) --metadatadir=vapi vapi/$(PKGNAME).gi $(PC_FILE): $(PC_INPUT) Makefile $(CONFIG_IN) - m4 '--define=_VERSION_=$(VERSION)' '--define=_PREFIX_=$(PREFIX)' $< > $@ + m4 '-D_VERSION_=$(VERSION)' '-D_PREFIX_=$(PREFIX)' $< > $@ $(EXPANDED_LO_FILES): $(BUILD_DIR)/%.lo: gexiv2/%.cpp $(EXPANDED_HEADER_FILES) $(CONFIG_IN) Makefile @pkg-config --print-errors --exists '$(EXT_PKG_VERSIONS)' @@ -237,5 +235,5 @@ $(EXPANDED_LO_FILES): $(BUILD_DIR)/%.lo: libtool --mode=compile --tag=CC $(CXX) -c $(EXT_PKGS_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I. -o $@ $< $(LIBRARY_BIN): $(EXPANDED_LO_FILES) - libtool --mode=link --tag=CC $(CXX) -rpath $(PREFIX)/$(LIB) $(EXPANDED_LO_FILES) $(EXT_PKGS_LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -version-info $(VERSION_INFO) -o $(LIBRARY_BIN) + libtool --mode=link --tag=CXX $(CXX) -no-undefined -rpath $(PREFIX)/$(LIB) $(EXPANDED_LO_FILES) $(EXT_PKGS_LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -version-info $(VERSION_INFO) -o $(LIBRARY_BIN)