mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
Avoid link errors with "configure --disable-shared".
* src/Makefile.am: Create a convenience library, libvirt_test.la, and don't restrict access to *its* symbols. * tests/Makefile.am (LDADDS): Add ../src/libvirt_test.la, so that "configure --disable-shared" no longer provokes link errors. (LIBVIRT): Remove definition. (LDADDS): Remove use. ($(LIBVIRT)): Remove rule. (LDADDS): Use the new convenience library instead. (CLEANFILES): Define. * docs/examples/index.py (dump_Makefile): Append $(COVERAGE_LDFLAGS), to the LDADDS definition, to avoid link error with the combination of --enable-test-coverage and --disable-shared. * docs/examples/Makefile.am: Regenerate. * docs/examples/index.html: Likewise. * qemud/Makefile.am (libvirtd_LDFLAGS): Append $(COVERAGE_LDFLAGS). * src/libvirt_sym.version: Remove some SP-before-TAB.
This commit is contained in:
parent
004ff90483
commit
9262d88e28
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
||||
Thu Feb 28 18:04:59 CET 2008 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
Avoid link errors with "configure --disable-shared".
|
||||
* src/Makefile.am: Create a convenience library, libvirt_test.la,
|
||||
and don't restrict access to *its* symbols.
|
||||
* tests/Makefile.am (LDADDS): Add ../src/libvirt_test.la, so that
|
||||
"configure --disable-shared" no longer provokes link errors.
|
||||
(LIBVIRT): Remove definition.
|
||||
(LDADDS): Remove use.
|
||||
($(LIBVIRT)): Remove rule.
|
||||
(LDADDS): Use the new convenience library instead.
|
||||
(CLEANFILES): Define.
|
||||
* docs/examples/index.py (dump_Makefile): Append $(COVERAGE_LDFLAGS),
|
||||
to the LDADDS definition, to avoid link error with the combination of
|
||||
--enable-test-coverage and --disable-shared.
|
||||
* docs/examples/Makefile.am: Regenerate.
|
||||
* docs/examples/index.html: Likewise.
|
||||
* qemud/Makefile.am (libvirtd_LDFLAGS): Append $(COVERAGE_LDFLAGS).
|
||||
* src/libvirt_sym.version: Remove some SP-before-TAB.
|
||||
|
||||
Thu Feb 28 12:16:39 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/qemu_conf.c: applied patch from Cole Robinson to use virErrorMsg
|
||||
|
@ -3,7 +3,7 @@
|
||||
SUBDIRS=python
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
|
||||
DEPS = $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la $(COVERAGE_LDFLAGS)
|
||||
|
||||
rebuild: examples.xml index.html
|
||||
|
||||
|
@ -4,4 +4,4 @@
|
||||
of the example:</p><ul><li><p><a href="#Informations">Informations</a> :</p><ul><li><a href="#info1.c">info1.c</a>: Extract informations about Xen domain 0</li></ul></li><li><p><a href="#Scheduling">Scheduling</a> :</p><ul><li><a href="#suspend.c">suspend.c</a>: Suspend a domain and then resume its execution</li></ul></li></ul><p> Getting the compilation options and libraries dependancies needed
|
||||
to generate binaries from the examples is best done on Linux/Unix by using
|
||||
the pkg-config data which should have been installed as part of <i>make
|
||||
install</i> step or when installing the libvirt development package:</p><pre>gcc -o example example.c `pkg-config libvirt --libs`</pre><h2><a name="Informations" id="Informations"></a>Informations Examples</h2><h3><a name="info1.c" href="info1.c" id="info1.c">info1.c</a>: Extract informations about Xen domain 0</h3><p>Demonstrate the basic use of the library to connect to the hypervisor and extract domain informations.</p><p>Uses:</p><ul><li> line 29: Function <a href="../html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a> from libvirt.h</li><li> line 36: Function <a href="../html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a> from libvirt.h</li><li> line 43: Function <a href="../html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a> from libvirt.h</li><li> line 53: Function <a href="../html/libvirt-libvirt.html#virDomainFree">virDomainFree</a> from libvirt.h</li><li> line 55: Function <a href="../html/libvirt-libvirt.html#virConnectClose">virConnectClose</a> from libvirt.h</li></ul><p>Usage:</p><p>info1</p><p>Author: Daniel Veillard</p><h2><a name="Scheduling" id="Scheduling"></a>Scheduling Examples</h2><h3><a name="suspend.c" href="suspend.c" id="suspend.c">suspend.c</a>: Suspend a domain and then resume its execution</h3><p>Demonstrate the basic use of the library to suspend and resume a domain. If no id is given on the command line this script will suspend and resume the first domain found which is not Domain 0.</p><p>Uses:</p><ul><li> line 30: Function <a href="../html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a> from libvirt.h</li><li> line 49: Function <a href="../html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a> from libvirt.h</li><li> line 61: Function <a href="../html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a> from libvirt.h</li><li> line 72: Function <a href="../html/libvirt-libvirt.html#virDomainResume">virDomainResume</a> from libvirt.h</li><li> line 92: Function <a href="../html/libvirt-libvirt.html#virDomainFree">virDomainFree</a> from libvirt.h</li><li> line 99: Function <a href="../html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a> from libvirt.h</li><li> line 110: Function <a href="../html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a> from libvirt.h</li><li> line 131: Function <a href="../html/libvirt-libvirt.html#virConnectClose">virConnectClose</a> from libvirt.h</li></ul><p>Usage:</p><p>suspend [id]</p><p>Author: Daniel Veillard</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
install</i> step or when installing the libvirt development package:</p><pre>gcc -o example example.c `pkg-config libvirt --libs`</pre><h2><a name="Informations" id="Informations"></a>Informations Examples</h2><h3><a name="info1.c" href="info1.c" id="info1.c">info1.c</a>: Extract informations about Xen domain 0</h3><p>Demonstrate the basic use of the library to connect to the hypervisor and extract domain informations.</p><p>Uses:</p><ul><li> line 29: Function <a href="../html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a> from libvirt.h</li><li> line 36: Function <a href="../html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a> from libvirt.h</li><li> line 43: Function <a href="../html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a> from libvirt.h</li><li> line 53: Function <a href="../html/libvirt-libvirt.html#virDomainFree">virDomainFree</a> from libvirt.h</li><li> line 55: Function <a href="../html/libvirt-libvirt.html#virConnectClose">virConnectClose</a> from libvirt.h</li></ul><p>Usage:</p><p>info1</p><p>Author: Daniel Veillard</p><h2><a name="Scheduling" id="Scheduling"></a>Scheduling Examples</h2><h3><a name="suspend.c" href="suspend.c" id="suspend.c">suspend.c</a>: Suspend a domain and then resume its execution</h3><p>Demonstrate the basic use of the library to suspend and resume a domain. If no id is given on the command line this script will suspend and resume the first domain found which is not Domain 0.</p><p>Uses:</p><ul><li> line 31: Function <a href="../html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a> from libvirt.h</li><li> line 50: Function <a href="../html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a> from libvirt.h</li><li> line 62: Function <a href="../html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a> from libvirt.h</li><li> line 73: Function <a href="../html/libvirt-libvirt.html#virDomainResume">virDomainResume</a> from libvirt.h</li><li> line 93: Function <a href="../html/libvirt-libvirt.html#virDomainFree">virDomainFree</a> from libvirt.h</li><li> line 100: Function <a href="../html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a> from libvirt.h</li><li> line 111: Function <a href="../html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a> from libvirt.h</li><li> line 132: Function <a href="../html/libvirt-libvirt.html#virConnectClose">virConnectClose</a> from libvirt.h</li></ul><p>Usage:</p><p>suspend [id]</p><p>Author: Daniel Veillard</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
|
@ -225,7 +225,8 @@ def dump_Makefile():
|
||||
SUBDIRS=python
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
|
||||
DEPS = $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \
|
||||
$(COVERAGE_LDFLAGS)
|
||||
|
||||
rebuild: examples.xml index.html
|
||||
|
||||
|
@ -48,18 +48,22 @@ libvirtd_SOURCES = \
|
||||
|
||||
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
|
||||
libvirtd_CFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
|
||||
-I$(top_srcdir)/include -I$(top_builddir)/include \
|
||||
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
|
||||
$(POLKIT_CFLAGS) \
|
||||
$(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
|
||||
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
|
||||
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
|
||||
-I$(top_srcdir)/include -I$(top_builddir)/include \
|
||||
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
|
||||
$(POLKIT_CFLAGS) \
|
||||
$(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
|
||||
$(COVERAGE_CFLAGS) \
|
||||
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
|
||||
-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\"" \
|
||||
-DGETTEXT_PACKAGE=\"$(PACKAGE)\"
|
||||
-DGETTEXT_PACKAGE=\"$(PACKAGE)\"
|
||||
|
||||
libvirtd_LDFLAGS = \
|
||||
$(WARN_CFLAGS) $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) \
|
||||
$(COVERAGE_LDFLAGS)
|
||||
$(POLKIT_LIBS)
|
||||
|
||||
libvirtd_LDFLAGS = $(WARN_CFLAGS) $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) \
|
||||
$(POLKIT_LIBS)
|
||||
libvirtd_DEPENDENCIES = ../src/libvirt.la
|
||||
libvirtd_LDADD = ../src/libvirt.la ../gnulib/lib/libgnu.la
|
||||
|
||||
@ -145,7 +149,6 @@ libvirtd.init: libvirtd.init.in
|
||||
chmod a+x $@-t
|
||||
mv $@-t $@
|
||||
|
||||
CLEANFILES = libvirtd.init
|
||||
else
|
||||
|
||||
install-init:
|
||||
@ -154,3 +157,6 @@ uninstall-init:
|
||||
endif # DBUS_INIT_SCRIPTS_RED_HAT
|
||||
|
||||
endif # WITH_LIBVIRTD
|
||||
|
||||
CLEANFILES = libvirtd.init
|
||||
CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
|
||||
|
@ -99,6 +99,25 @@ libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
|
||||
@CYGWIN_EXTRA_LDFLAGS@ @MINGW_EXTRA_LDFLAGS@
|
||||
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS) -DIN_LIBVIRT
|
||||
|
||||
# Create an automake "convenience library" version of libvirt_la,
|
||||
# just for testing, since the test harness requires access to internal
|
||||
# bits and pieces that we don't want to make publicly accessible.
|
||||
noinst_LTLIBRARIES = libvirt_test.la
|
||||
|
||||
# Convert libvirt_sym.version
|
||||
# to libvirt_test_sym.version, and
|
||||
# remove -version-info X.Y.Z (not needed since this is a convenience library.
|
||||
test_LDFLAGS = \
|
||||
$$(echo '$(libvirt_la_LDFLAGS)' \
|
||||
|sed 's!-Wl,--v.*_sym\.version!!' \
|
||||
|sed 's!-version-info @LIBVIRT_VERSION_INFO@!!')
|
||||
|
||||
# Just like the above, but with a slightly different set of public symbols.
|
||||
libvirt_test_la_SOURCES = $(libvirt_la_SOURCES)
|
||||
libvirt_test_la_LIBADD = $(libvirt_la_LIBADD)
|
||||
libvirt_test_la_LDFLAGS = $(test_LDFLAGS)
|
||||
libvirt_test_la_CFLAGS = $(COVERAGE_CFLAGS)
|
||||
|
||||
bin_PROGRAMS = virsh
|
||||
|
||||
virsh_SOURCES = virsh.c console.c console.h util-lib.c util-lib.h
|
||||
|
@ -166,10 +166,10 @@
|
||||
|
||||
__virEventRegisterImpl;
|
||||
|
||||
__virStateInitialize;
|
||||
__virStateCleanup;
|
||||
__virStateReload;
|
||||
__virStateActive;
|
||||
__virStateInitialize;
|
||||
__virStateCleanup;
|
||||
__virStateReload;
|
||||
__virStateActive;
|
||||
|
||||
__virDrvSupportsFeature;
|
||||
|
||||
|
@ -3,14 +3,6 @@
|
||||
SUBDIRS = virshdata confdata sexpr2xmldata \
|
||||
xml2sexprdata xmconfigdata xencapsdata
|
||||
|
||||
# Wierd libtool related juju...
|
||||
#
|
||||
# We explicitly want wildcard here instead of just linking
|
||||
# to the libvirt.a file. This ensures that when coverage
|
||||
# tests are run, all the output data ends up in the correct
|
||||
# location. ie, src/ instead of src/.libs.
|
||||
LIBVIRT = $(wildcard $(top_builddir)/src/.libs/libvirt_la-*.o)
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
|
||||
-I$(top_builddir)/include \
|
||||
@ -34,7 +26,7 @@ LDADDS = \
|
||||
$(SASL_LIBS) \
|
||||
$(SELINUX_LIBS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(LIBVIRT) \
|
||||
../src/libvirt_test.la \
|
||||
../gnulib/lib/libgnu.la \
|
||||
$(COVERAGE_LDFLAGS)
|
||||
|
||||
@ -132,5 +124,4 @@ reconnect_SOURCES = \
|
||||
reconnect.c
|
||||
reconnect_LDADD = $(LDADDS)
|
||||
|
||||
$(LIBVIRT):
|
||||
-@(cd $(top_builddir)/src && $(MAKE) MAKEFLAGS+=--silent)
|
||||
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
|
||||
|
Loading…
x
Reference in New Issue
Block a user