]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Workaround python header file insanity
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 24 Feb 2012 15:10:53 +0000 (15:10 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 24 Feb 2012 16:43:27 +0000 (16:43 +0000)
The /usr/include/python/pyconfig.h file pollutes the global
namespace with a huge number of HAVE_XXX and WITH_XXX
defines. These change what we detected in our own config.h
In particular if you try to build without DTrace, python's
headers turn it back on with predictable fail.

THe hack to workaround this is to rename WITH_DTRACE to
WITH_DTRACE_PROBES to avoid the namespace clash

configure.ac
daemon/Makefile.am
src/Makefile.am
src/internal.h
tests/Makefile.am

index 732f4fe72578d558a0b91b9929de2f182a4d54ba..262e63b768fdc21cdf438a246aedd8a65b362cca 100644 (file)
@@ -1378,10 +1378,10 @@ if test "$with_dtrace" != "no" ; then
     with_dtrace=yes
   fi
   if test "$with_dtrace" = "yes"; then
-    AC_DEFINE_UNQUOTED([WITH_DTRACE], 1, [whether DTrace static probes are available])
+    AC_DEFINE_UNQUOTED([WITH_DTRACE_PROBES], 1, [whether DTrace static probes are available])
   fi
 fi
-AM_CONDITIONAL([WITH_DTRACE], [test "$with_dtrace" != "no"])
+AM_CONDITIONAL([WITH_DTRACE_PROBES], [test "$with_dtrace" != "no"])
 
 
 dnl NUMA lib
index e2c13573867c96dc2ddcea849d9a3977f9cc64c5..db4abf53fe8d35627d333e23f694c45ab8827b5b 100644 (file)
@@ -109,7 +109,7 @@ libvirtd_LDADD =                                    \
        $(SASL_LIBS)                                    \
        $(POLKIT_LIBS)
 
-if WITH_DTRACE
+if WITH_DTRACE_PROBES
 libvirtd_LDADD += ../src/probes.o
 endif
 
index d5f52a08b6486b6bd5122ba61bbe528498358f57..9b1921d402f264eaa922a54afbac8a0241d8e29c 100644 (file)
@@ -1284,7 +1284,7 @@ libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
 # picked out for us.
 libvirt_la_DEPENDENCIES = $(libvirt_la_BUILT_LIBADD) $(LIBVIRT_SYMBOL_FILE)
 
-if WITH_DTRACE
+if WITH_DTRACE_PROBES
 libvirt_la_BUILT_LIBADD += probes.o
 libvirt_la_DEPENDENCIES += probes.o
 nodist_libvirt_la_SOURCES = probes.h
@@ -1521,7 +1521,7 @@ libvirt_lxc_LDADD = $(CAPNG_LIBS) $(YAJL_LIBS) \
                $(LIBNL_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
                $(RT_LIBS) \
                ../gnulib/lib/libgnu.la
-if WITH_DTRACE
+if WITH_DTRACE_PROBES
 libvirt_lxc_LDADD += probes.o
 endif
 if WITH_SECDRIVER_SELINUX
index fabcb52fb7d5857caa2a765a4d8eab531d969f39..34085419cb7adcf4e1aa8a526e58d08dc0a62de3 100644 (file)
 # define VIR_DIV_UP(value, size) (((value) + (size) - 1) / (size))
 
 
-# if WITH_DTRACE
+# if WITH_DTRACE_PROBES
 #  ifndef LIBVIRT_PROBES_H
 #   define LIBVIRT_PROBES_H
 #   include "probes.h"
index 3fb9e2f29f7d44ffcccf00163370058aa1d17967..9974c2ffb218142943faf3e951316de746d0d746 100644 (file)
@@ -29,7 +29,7 @@ INCLUDES += \
 endif
 
 PROBES_O =
-if WITH_DTRACE
+if WITH_DTRACE_PROBES
 PROBES_O += ../src/probes.o
 endif