# HG changeset patch
# User Jay Gagnon <grendel(a)linux.vnet.ibm.com>
# Date 1204056960 18000
# Node ID 568bffb0a58444972a9ae262f45c9b2b9068bbfc
# Parent 0840762ff38237d40ca56973d3455a1b54f154b7
[CU] (#2) add cmpi void to check to libcmpiutil
This used to be only required by libvirt-cim, but the new functionality in std_indication
has made it necessary in libcmpiutil as well.
Signed-off-by: Jay Gagnon <grendel(a)linux.vnet.ibm.com>
diff -r 0840762ff382 -r 568bffb0a584 acinclude.m4
--- a/acinclude.m4 Tue Feb 26 15:15:57 2008 -0500
+++ b/acinclude.m4 Tue Feb 26 15:16:00 2008 -0500
@@ -92,6 +92,34 @@ AC_DEFUN([CHECK_BROKEN_CMPIFT],
]
)])
+#
+# Check for void EnableIndications return
+#
+AC_DEFUN([CHECK_IND_VOID], [
+ AH_TEMPLATE([CMPI_EI_VOID],
+ [Defined if return type of EnableIndications
+ should be void])
+ AC_MSG_CHECKING([return type for indications])
+ CFLAGS_TMP=$CFLAGS
+ CFLAGS="-Werror"
+ AC_TRY_COMPILE([
+ #include <cmpift.h>
+ static void ei(CMPIIndicationMI *mi, const CMPIContext *c) {
+ return;
+ }
+ ],[
+ struct _CMPIIndicationMIFT ft;
+ ft.enableIndications = ei;
+ return 0;
+ ], [
+ echo "void"
+ AC_DEFINE_UNQUOTED([CMPI_EI_VOID], [yes])
+ ], [
+ echo "CMPIStatus"
+ ])
+ CFLAGS=$CFLAGS_TMP
+])
+
AC_DEFUN([CHECK_LIBXML2],
[
PKG_CHECK_MODULES([LIBXML], [libxml-2.0])
diff -r 0840762ff382 -r 568bffb0a584 configure.ac
--- a/configure.ac Tue Feb 26 15:15:57 2008 -0500
+++ b/configure.ac Tue Feb 26 15:16:00 2008 -0500
@@ -4,6 +4,7 @@ AC_CONFIG_SRCDIR([libcmpiutil.h])
AC_CONFIG_SRCDIR([libcmpiutil.h])
CHECK_CMPI
+CHECK_IND_VOID
AC_CHECK_HEADERS([cmpidt.h cmpift.h cmpimacs.h])
@@ -22,7 +23,7 @@ CC_WARNINGS="\
CFLAGS="$CFLAGS $CC_WARNINGS -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE"
-#AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADER([config.h])
topdir=`pwd`
AC_SUBST(topdir)