[PATCH] Make configure check for broken sblim-cmpi-devel version

# 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 ""

Dan Smith wrote:
# 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>
My limited ability to read Linear A -- I mean, m4 -- stops me from being able to comment on the syntax of the patch, but the approach seems sound and we certainly need a check for this. I've got a 32-bit machine I can try and test this on. -- -Jay

Jay Gagnon wrote:
Dan Smith wrote:
# 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>
My limited ability to read Linear A -- I mean, m4 -- stops me from being able to comment on the syntax of the patch, but the approach seems sound and we certainly need a check for this. I've got a 32-bit machine I can try and test this on.
I'm getting rejects on both files, but my tree is up to date. Does this patch depend on any other patches? -- -Jay

Dan Smith wrote:
# 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>
Fixed the reject issue, by applying the patch to the correct tree. Go Jay. Applies fun, and I pass the configure check "checking for a broken cmpift.h... no" which is how it should be. You want me to try to get it to fail? -- -Jay

JG> Fixed the reject issue, by applying the patch to the correct tree. JG> Go Jay. Applies fun, and I pass the configure check "checking for JG> a broken cmpift.h... no" which is how it should be. You want me JG> to try to get it to fail? Nope. It only matters on 64-bit anyway, so it shouldn't be fail-able on 32. I just needed to make sure it didn't fail as a false-positive. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com
participants (2)
-
Dan Smith
-
Jay Gagnon