Thu Nov 29 17:40:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>

* configure.in: Added CYGWIN_EXTRA_LDFLAGS, CYGWIN_EXTRA_LIBADD,
	  CYGWIN_EXTRA_PYTHON_LIBADD, CYGWIN automake conditional.
	* src/Makefile.am: Extra flags required to build DLL of libvirt
	  for Cygwin.
	* python/Makefile.am: Extra flags and rule required to build
	  Python module for Cygwin.
This commit is contained in:
Richard W.M. Jones 2007-11-29 17:44:01 +00:00
parent 65aa3dbf6c
commit d63034c018
4 changed files with 50 additions and 8 deletions

View File

@ -1,3 +1,12 @@
Thu Nov 29 17:40:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Added CYGWIN_EXTRA_LDFLAGS, CYGWIN_EXTRA_LIBADD,
CYGWIN_EXTRA_PYTHON_LIBADD, CYGWIN automake conditional.
* src/Makefile.am: Extra flags required to build DLL of libvirt
for Cygwin.
* python/Makefile.am: Extra flags and rule required to build
Python module for Cygwin.
Thu Nov 29 17:38:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com> Thu Nov 29 17:38:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Check for C compiler first before checking for * configure.in: Check for C compiler first before checking for

View File

@ -536,6 +536,28 @@ else
ALL_LINGUAS="af am ar as be bg bn_IN bn ca cs cy da de el en_GB es et eu_ES fa fi fr gl gu he hi hr hu hy id is it ja ka kn ko ku lo lt lv mk ml mr ms my nb nl nn no nso or pa pl pt_BR pt ro ru si sk sl sq sr@Latn sr sv ta te th tr uk ur vi zh_CN zh_TW zu" ALL_LINGUAS="af am ar as be bg bn_IN bn ca cs cy da de el en_GB es et eu_ES fa fi fr gl gu he hi hr hu hy id is it ja ka kn ko ku lo lt lv mk ml mr ms my nb nl nn no nso or pa pl pt_BR pt ro ru si sk sl sq sr@Latn sr sv ta te th tr uk ur vi zh_CN zh_TW zu"
fi fi
dnl Extra link-time flags for Cygwin.
dnl Copied from libxml2 configure.in, but I removed mingw changes
dnl for now since I'm not supporting mingw at present. - RWMJ
cygwin=
CYGWIN_EXTRA_LDFLAGS=
CYGWIN_EXTRA_LIBADD=
CYGWIN_EXTRA_PYTHON_LIBADD=
case "$host" in
*-*-cygwin*)
cygwin=yes
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
if test "x$PYTHON_VERSION" != "x"; then
CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
fi
;;
esac
AC_SUBST(CYGWIN_EXTRA_LDFLAGS)
AC_SUBST(CYGWIN_EXTRA_LIBADD)
AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD)
AM_CONDITIONAL(CYGWIN,[test "x$cygwin" = "xyes"])
# very annoying # very annoying
rm -f COPYING rm -f COPYING
cp COPYING.LIB COPYING cp COPYING.LIB COPYING

View File

@ -23,8 +23,6 @@ EXTRA_DIST = \
libvirt-python-api.xml \ libvirt-python-api.xml \
$(DOCS) $(DOCS)
libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs
if WITH_PYTHON if WITH_PYTHON
mylibs = $(top_builddir)/src/libvirt.la mylibs = $(top_builddir)/src/libvirt.la
@ -33,10 +31,14 @@ all-local: libvirt.py
python_LTLIBRARIES = libvirtmod.la python_LTLIBRARIES = libvirtmod.la
libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
libvirtmod_la_LIBADD = $(mylibs)
# Python header files contain a redundant decl, hence: # Python header files contain a redundant decl, hence:
libvirtmod_la_CFLAGS = -Wno-redundant-decls libvirtmod_la_CFLAGS = -Wno-redundant-decls
libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs \
@CYGWIN_EXTRA_LDFLAGS@
libvirtmod_la_LIBADD = $(mylibs) \
@CYGWIN_EXTRA_LIBADD@ @CYGWIN_EXTRA_PYTHON_LIBADD@
GENERATE = generator.py GENERATE = generator.py
API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml
GENERATED= libvirt-export.c \ GENERATED= libvirt-export.c \
@ -61,6 +63,13 @@ install-data-local:
@(for doc in $(DOCS) ; \ @(for doc in $(DOCS) ; \
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done) do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
if CYGWIN
install-data-hook:
cd $(DESTDIR)$(pythondir) && \
rm -f libvirtmod.dll && \
ln -s cygvirtmod.dll libvirtmod.dll
endif
uninstall-local: uninstall-local:
rm -f $(DESTDIR)$(pythondir)/libvirt.py rm -f $(DESTDIR)$(pythondir)/libvirt.py

View File

@ -24,11 +24,6 @@ conf_DATA = qemu.conf
EXTRA_DIST = libvirt_sym.version $(conf_DATA) EXTRA_DIST = libvirt_sym.version $(conf_DATA)
lib_LTLIBRARIES = libvirt.la lib_LTLIBRARIES = libvirt.la
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS)
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
-version-info @LIBVIRT_VERSION_INFO@ \
$(COVERAGE_CFLAGS:-f%=-Wc,-f%)
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
CLIENT_SOURCES = \ CLIENT_SOURCES = \
libvirt.c internal.h \ libvirt.c internal.h \
@ -64,6 +59,13 @@ SERVER_SOURCES = \
../qemud/remote_protocol.c ../qemud/remote_protocol.h ../qemud/remote_protocol.c ../qemud/remote_protocol.h
libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES) libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(LTLIBOBJS) \
@CYGWIN_EXTRA_LIBADD@
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
-version-info @LIBVIRT_VERSION_INFO@ \
$(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
@CYGWIN_EXTRA_LDFLAGS@
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
bin_PROGRAMS = virsh bin_PROGRAMS = virsh