From 264ed02079e3ddc2eac9c09fd52fa5c6a767fd35 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 18 Dec 2008 12:20:00 +0000 Subject: [PATCH] Fix gcc-ism in python build (John Levon) --- ChangeLog | 6 ++++++ acinclude.m4 | 6 ++++++ python/Makefile.am | 5 +++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 849d74303f..814f905cea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 18 12:18:58 GMT 2008 Daniel P. Berrange + + Fix gcc-ism in python build (John Levon) + * acinclude.m4: Add -Wno-redundant-decls check for compiler + * python/Makefile.am: Remove hardcoded -Wno-redundant-decls + Thu Dec 18 12:11:58 GMT 2008 Daniel P. Berrange * src/remote_internal.c: Don't free event after queueing it diff --git a/acinclude.m4 b/acinclude.m4 index 0cfc1bc1e6..e93ac2ad82 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -87,6 +87,12 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ WARN_CFLAGS="$compiler_flags $complCFLAGS" AC_SUBST(WARN_CFLAGS) + + dnl Needed to keep compile quiet on python 2.4 + COMPILER_FLAGS= + gl_COMPILER_FLAGS(-Wno-redundant-decls) + WARN_PYTHON_CFLAGS=$COMPILER_FLAGS + AC_SUBST(WARN_PYTHON_CFLAGS) ]) diff --git a/python/Makefile.am b/python/Makefile.am index 90b87bb907..8d1462b3f0 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -34,8 +34,9 @@ all-local: libvirt.py python_LTLIBRARIES = libvirtmod.la libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h -# Python header files contain a redundant decl, hence: -libvirtmod_la_CFLAGS = -Wno-redundant-decls +# Python <= 2.4 header files contain a redundant decl, hence we +# need extra flags here +libvirtmod_la_CFLAGS = @WARN_PYTHON_CFLAGS@ libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs \ @CYGWIN_EXTRA_LDFLAGS@