automake: Link with C++ linker

If automake sees no C++ files in the source it assumes have to
use C linker settings not linking C++ library.
This was not a problem as code did not use C++ libraries but next
patch will use pure virtual function call.
It could be provided but as later we will use RTTI use C++ library.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2020-03-01 19:38:38 +00:00 committed by Frediano Ziglio
parent 6e14b6bc99
commit 38cd152952
2 changed files with 5 additions and 0 deletions

View File

@ -214,6 +214,9 @@ endif
libspice_server_la_LIBADD = libserver.la
libspice_server_la_SOURCES =
## see https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html
## ("Libtool Convenience Libraries")
nodist_EXTRA_libspice_server_la_SOURCES = dummy.cpp
spice-server-enums.c: spice-server.h spice-server-enums.c.tmpl
$(AM_V_GEN)glib-mkenums --template $(srcdir)/spice-server-enums.c.tmpl $< > $@

View File

@ -74,6 +74,8 @@ check_PROGRAMS = \
test-record \
$(NULL)
LINK = $(CXXLINK)
if HAVE_SMARTCARD
check_PROGRAMS += test-smartcard
test_smartcard_SOURCES = test-smartcard.cpp