
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1195078948 28800 # Node ID 9cfd20d3be0e65d695f6b1ea5b4104c695219aab # Parent 6e221b0af2f4a16fee34213bb6d46a0a3eec4227 Make configure check for broken sblim-cmpi-devel version The sblim version of cmpift.h is broken. We can detect this by checking that the size of the structure on 64-bit platforms meets the CMPI standard of 160 bytes. When sblim fixes their version, this test will start to pass. Testing of this would be appreciated, especially if someone with a 32-bit machine could give it a whirl. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 6e221b0af2f4 -r 9cfd20d3be0e acinclude.m4 --- a/acinclude.m4 Wed Nov 14 11:04:52 2007 +0100 +++ b/acinclude.m4 Wed Nov 14 14:22:28 2007 -0800 @@ -71,3 +71,24 @@ AC_DEFUN([CHECK_CMPI], fi ] ) + +AC_DEFUN([CHECK_BROKEN_CMPIFT], + [ + AC_MSG_CHECKING(for a broken cmpift.h) + AC_RUN_IFELSE([ + #include <cmpift.h> + + int main(void) { + if ((sizeof(unsigned long) == 8) && + (sizeof(struct _CMPIBrokerFT) != 160)) + return 1; + else + return 0; + } + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_ERROR(You have a broken cmpift.h header. Is a broken version of sblim-cmpi-devel installed?) + ] +)]) + diff -r 6e221b0af2f4 -r 9cfd20d3be0e configure.ac --- a/configure.ac Wed Nov 14 11:04:52 2007 +0100 +++ b/configure.ac Wed Nov 14 14:22:28 2007 -0800 @@ -57,6 +57,8 @@ CFLAGS_STRICT="-Werror" CFLAGS_STRICT="-Werror" AC_SUBST(CFLAGS_STRICT) +CHECK_BROKEN_CMPIFT + echo "" echo "Build Embedded Object parser: $eoparser" echo ""