os-cmpi-xen

annotate acinclude.m4 @ 121:4868ace2726b

Add initial consistence checks in test suite for Xen_MemoryPool, Xen_ProcessorPool and Xen_VirtualSystemManagementService.

Signed-off-by: Luke Szymanski <Lukasz.Szymanski@Unisys.com>
author Jim Fehlig <jfehlig@novell.com>
date Fri Jun 08 10:22:05 2007 -0600 (2007-06-08)
parents 7c8d92923475
children c0beaacf5b03
rev   line source
jbulpin@0 1 dnl
jbulpin@0 2 dnl $Id: acinclude.m4,v 1.1.1.1 2005/08/30 23:08:51 bestor Exp $
jbulpin@0 3 dnl
jbulpin@0 4 dnl
jbulpin@0 5 dnl (C) Copyright IBM Corp. 2004, 2005
jbulpin@0 6 dnl
jbulpin@0 7 dnl THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE
jbulpin@0 8 dnl ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
jbulpin@0 9 dnl CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
jbulpin@0 10 dnl
jbulpin@0 11 dnl You can obtain a current copy of the Common Public License from
jbulpin@0 12 dnl http://www.opensource.org/licenses/cpl1.0.php
jbulpin@0 13 dnl
jbulpin@0 14 dnl Author: Konrad Rzeszutek <konradr@us.ibm.com>
jbulpin@0 15 dnl Contributors: Viktor Mihajlovski <mihajlov@de.ibm.com>
jbulpin@0 16 dnl Date : 09/20/2004
jbulpin@0 17 dnl
jbulpin@0 18 dnl
jbulpin@0 19 dnl CHECK_CMPI: Check for CMPI headers and set the CPPFLAGS
jbulpin@0 20 dnl with the -I<directory>
jbulpin@0 21 dnl
jbulpin@0 22 dnl CHECK_PEGASUS_2_3_2: Check for Pegasus 2.3.2 and set
jbulpin@0 23 dnl the HAVE_PEGASUS_2_3_2
jbulpin@0 24 dnl flag
jbulpin@0 25 dnl
jbulpin@0 26
jbulpin@0 27 AC_DEFUN([CHECK_PEGASUS_2_3_2],
jbulpin@0 28 [
jbulpin@0 29 AC_MSG_CHECKING(for Pegasus 2.3.2)
jbulpin@0 30 if which cimserver > /dev/null 2>&1
jbulpin@0 31 then
jbulpin@0 32 test_CIMSERVER=`cimserver -v`
jbulpin@0 33 fi
jbulpin@0 34 if test "$test_CIMSERVER" == "2.3.2"; then
jbulpin@0 35 AC_MSG_RESULT(yes)
jbulpin@0 36 AC_DEFINE_UNQUOTED(HAVE_PEGASUS_2_3_2,1,[Defined to 1 if Pegasus 2.3.2 is used])
jbulpin@0 37 else
jbulpin@0 38 AC_MSG_RESULT(no)
jbulpin@0 39
jbulpin@0 40 fi
jbulpin@0 41 ]
jbulpin@0 42 )
jbulpin@0 43
jbulpin@0 44 dnl
jbulpin@0 45 dnl CHECK_PEGASUS_2_4: Check for Pegasus 2.4 and set the
jbulpin@0 46 dnl the -DPEGASUS_USE_EXPERIMENTAL_INTERFACES flag
jbulpin@0 47 dnl
jbulpin@0 48 AC_DEFUN([CHECK_PEGASUS_2_4],
jbulpin@0 49 [
jbulpin@0 50 AC_MSG_CHECKING(for Pegasus 2.4)
jbulpin@0 51 if which cimserver > /dev/null 2>&1
jbulpin@0 52 then
jbulpin@0 53 test_CIMSERVER=`cimserver -v`
jbulpin@0 54 fi
jbulpin@0 55 if test "$test_CIMSERVER" == "2.4"; then
jbulpin@0 56 AC_MSG_RESULT(yes)
jbulpin@0 57 CPPFLAGS="$CPPFLAGS -DPEGASUS_USE_EXPERIMENTAL_INTERFACES"
jbulpin@0 58 AC_DEFINE_UNQUOTED(HAVE_PEGASUS_2_4,1,[Defined to 1 if Pegasus 2.4 is used])
jbulpin@0 59 else
jbulpin@0 60 AC_MSG_RESULT(no)
jbulpin@0 61
jbulpin@0 62 fi
jbulpin@0 63 ]
jbulpin@0 64 )
jbulpin@0 65
jbulpin@0 66
jbulpin@0 67 dnl
jbulpin@0 68 dnl Helper functions
jbulpin@0 69 dnl
jbulpin@0 70 AC_DEFUN([_CHECK_CMPI],
jbulpin@0 71 [
jbulpin@0 72 AC_MSG_CHECKING($1)
jbulpin@0 73 AC_TRY_LINK(
jbulpin@0 74 [
jbulpin@0 75 #include <cmpimacs.h>
jbulpin@0 76 #include <cmpidt.h>
jbulpin@0 77 #include <cmpift.h>
jbulpin@0 78 ],
jbulpin@0 79 [
jbulpin@0 80 CMPIBroker broker;
jbulpin@0 81 CMPIStatus status = {CMPI_RC_OK, NULL};
jbulpin@0 82 CMPIString *s = CMNewString(&broker, "TEST", &status);
jbulpin@0 83 ],
jbulpin@0 84 [
jbulpin@0 85 have_CMPI=yes
jbulpin@0 86 dnl AC_MSG_RESULT(yes)
jbulpin@0 87 ],
jbulpin@0 88 [
jbulpin@0 89 have_CMPI=no
jbulpin@0 90 dnl AC_MSG_RESULT(no)
jbulpin@0 91 ])
jbulpin@0 92
jbulpin@0 93 ])
jbulpin@0 94
jbulpin@0 95 AC_DEFUN([_CHECK_INDHELP_HEADER],
jbulpin@0 96 [
jbulpin@0 97 AC_MSG_CHECKING($1)
jbulpin@0 98 AC_TRY_COMPILE(
jbulpin@0 99 [
jbulpin@0 100 #include <stdio.h>
jbulpin@0 101 #include <ind_helper.h>
jbulpin@0 102 ],
jbulpin@0 103 [
jbulpin@0 104 CMPISelectExp *filter = NULL;
jbulpin@0 105 ind_set_select("/root/cimv2",NULL,filter);
jbulpin@0 106 ],
jbulpin@0 107 [
jbulpin@0 108 have_INDHELP=yes
jbulpin@0 109 dnl AC_MSG_RESULT(yes)
jbulpin@0 110 ],
jbulpin@0 111 [
jbulpin@0 112 have_INDHELP=no
jbulpin@0 113 dnl AC_MSG_RESULT(no)
jbulpin@0 114 ])
jbulpin@0 115
jbulpin@0 116 ])
jbulpin@0 117
jbulpin@0 118 dnl
jbulpin@0 119 dnl The main function to check for CMPI headers
jbulpin@0 120 dnl Modifies the CPPFLAGS with the right include directory and sets
jbulpin@0 121 dnl the 'have_CMPI' to either 'no' or 'yes'
jbulpin@0 122 dnl
jbulpin@0 123
jbulpin@0 124 AC_DEFUN([CHECK_CMPI],
jbulpin@0 125 [
jbulpin@0 126 AC_MSG_CHECKING(for CMPI headers)
jbulpin@0 127 dnl Check just with the standard include paths
jbulpin@0 128 CMPI_CPP_FLAGS="$CPPFLAGS"
jbulpin@0 129 _CHECK_CMPI(standard)
jbulpin@0 130 if test "$have_CMPI" == "yes"; then
jbulpin@0 131 dnl The standard include paths worked.
jbulpin@0 132 AC_MSG_RESULT(yes)
jbulpin@0 133 else
jbulpin@0 134 _DIRS_="/usr/include/cmpi \
jbulpin@0 135 /usr/local/include/cmpi \
jbulpin@0 136 $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \
jbulpin@0 137 /opt/tog-pegasus/include/Pegasus/Provider/CMPI \
jbulpin@0 138 /usr/include/Pegasus/Provider/CMPI \
jbulpin@0 139 /usr/include/openwbem \
jfehlig@6 140 /usr/local/include/openwbem \
jbulpin@0 141 /usr/sniacimom/include"
jbulpin@0 142 for _DIR_ in $_DIRS_
jbulpin@0 143 do
jbulpin@0 144 _cppflags=$CPPFLAGS
jbulpin@0 145 _include_CMPI="$_DIR_"
jbulpin@0 146 CPPFLAGS="$CPPFLAGS -I$_include_CMPI"
jbulpin@0 147 _CHECK_CMPI($_DIR_)
jbulpin@0 148 if test "$have_CMPI" == "yes"; then
jbulpin@0 149 dnl Found it
jbulpin@0 150 AC_MSG_RESULT(yes)
jbulpin@0 151 dnl Save the new -I parameter
jbulpin@0 152 CMPI_CPP_FLAGS="$CPPFLAGS"
jbulpin@0 153 break
jbulpin@0 154 fi
jbulpin@0 155 CPPFLAGS=$_cppflags
jbulpin@0 156 done
jbulpin@0 157 fi
jbulpin@0 158 CPPFLAGS="$CMPI_CPP_FLAGS"
jbulpin@0 159 if test "$have_CMPI" == "no"; then
jbulpin@0 160 AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.)
jbulpin@0 161 fi
jbulpin@0 162 ]
jbulpin@0 163 )
jbulpin@0 164
jbulpin@0 165 dnl
jbulpin@0 166 dnl The main function to check for the indication_helper header.
jbulpin@0 167 dnl Modifies the CPPFLAGS with the right include directory and sets
jbulpin@0 168 dnl the 'have_INDHELP' to either 'no' or 'yes'
jbulpin@0 169 dnl
jbulpin@0 170
jbulpin@0 171 AC_DEFUN([CHECK_INDHELP_HEADER],
jbulpin@0 172 [
jbulpin@0 173 INDHELP_CPP_FLAGS="$CPPFLAGS"
jbulpin@0 174 AC_MSG_CHECKING(for indication helper header)
jbulpin@0 175 dnl Check just with the standard include paths
jbulpin@0 176 _CHECK_INDHELP_HEADER(standard)
jbulpin@0 177 if test "$have_INDHELP" == "yes"; then
jbulpin@0 178 dnl The standard include paths worked.
jbulpin@0 179 AC_MSG_RESULT(yes)
jbulpin@0 180 else
jbulpin@0 181 _DIRS_="/usr/include/sblim \
jbulpin@0 182 /usr/local/include/sblim"
jbulpin@0 183 for _DIR_ in $_DIRS_
jbulpin@0 184 do
jbulpin@0 185 _cppflags=$CPPFLAGS
jbulpin@0 186 _include_INDHELP="$_DIR_"
jbulpin@0 187 CPPFLAGS="$CPPFLAGS -I$_include_INDHELP"
jbulpin@0 188 _CHECK_INDHELP_HEADER($_DIR_)
jbulpin@0 189 if test "$have_INDHELP" == "yes"; then
jbulpin@0 190 dnl Found it
jbulpin@0 191 AC_MSG_RESULT(yes)
jbulpin@0 192 dnl Save the new -I parameter
jbulpin@0 193 INDHELP_CPP_FLAGS="$CPPFLAGS"
jbulpin@0 194 break
jbulpin@0 195 fi
jbulpin@0 196 CPPFLAGS=$_cppflags
jbulpin@0 197 done
jbulpin@0 198 fi
jbulpin@0 199 CPPFLAGS="$INDHELP_CPP_FLAGS"
jbulpin@0 200 if test "$have_INDHELP" == "no"; then
jbulpin@0 201 AC_MSG_RESULT(no)
jbulpin@0 202 fi
jbulpin@0 203 ]
jbulpin@0 204 )
jbulpin@0 205
jbulpin@0 206 dnl
jbulpin@0 207 dnl The check for the CMPI provider directory
jbulpin@0 208 dnl Sets the PROVIDERDIR variable.
jbulpin@0 209 dnl
jbulpin@0 210
jbulpin@0 211 AC_DEFUN([CHECK_PROVIDERDIR],
jbulpin@0 212 [
jbulpin@0 213 AC_MSG_CHECKING(for CMPI provider directory)
jbulpin@0 214 _DIRS="$libdir/cmpi"
jbulpin@0 215 save_exec_prefix=${exec_prefix}
jbulpin@0 216 save_prefix=${prefix}
jbulpin@0 217 if test xNONE == x${prefix}; then
jbulpin@0 218 prefix=/usr/local
jbulpin@0 219 fi
jbulpin@0 220 if test xNONE == x${exec_prefix}; then
jbulpin@0 221 exec_prefix=$prefix
jbulpin@0 222 fi
jbulpin@0 223 for _dir in $_DIRS
jbulpin@0 224 do
jbulpin@0 225 _xdir=`eval echo $_dir`
jbulpin@0 226 AC_MSG_CHECKING( $_dir )
jbulpin@0 227 if test -d $_xdir ; then
jbulpin@0 228 dnl Found it
jbulpin@0 229 AC_MSG_RESULT(yes)
jbulpin@0 230 if test x"$PROVIDERDIR" == x ; then
jbulpin@0 231 PROVIDERDIR=$_dir
jbulpin@0 232 fi
jbulpin@0 233 break
jbulpin@0 234 fi
jbulpin@0 235 done
jbulpin@0 236 if test x"$PROVIDERDIR" == x ; then
jbulpin@0 237 PROVIDERDIR="$libdir"/cmpi
jbulpin@0 238 AC_MSG_RESULT(implied: $PROVIDERDIR)
jbulpin@0 239 fi
jbulpin@0 240 exec_prefix=$save_exec_prefix
jbulpin@0 241 prefix=$save_prefix
jbulpin@0 242 ]
jbulpin@0 243 )
jbulpin@0 244
jbulpin@0 245 dnl
jbulpin@0 246 dnl The "check" for the CIM server type
jbulpin@0 247 dnl Sets the CIMSERVER variable.
jbulpin@0 248 dnl
jbulpin@0 249
jbulpin@0 250 AC_DEFUN([CHECK_CIMSERVER],
jbulpin@0 251 [
jbulpin@0 252 AC_MSG_CHECKING(for CIM servers)
jbulpin@0 253 _SERVERS="sfcbd cimserver owcimomd"
jbulpin@0 254 for _name in $_SERVERS
jbulpin@0 255 do
jbulpin@0 256 AC_MSG_CHECKING( $_name )
jbulpin@0 257 which $_name > /dev/null 2>&1
jbulpin@0 258 if test $? == 0 ; then
jbulpin@0 259 dnl Found it
jbulpin@0 260 AC_MSG_RESULT(yes)
jbulpin@0 261 if test x"$CIMSERVER" == x ; then
jbulpin@0 262 case $_name in
jbulpin@0 263 sfcbd) CIMSERVER=sfcb;;
jbulpin@0 264 cimserver) CIMSERVER=pegasus;;
jbulpin@0 265 owcimomd) CIMSERVER=openwbem;;
jbulpin@0 266 esac
jbulpin@0 267 fi
jbulpin@0 268 break;
jbulpin@0 269 fi
jbulpin@0 270 done
jbulpin@0 271 if test x"$CIMSERVER" == x ; then
jbulpin@0 272 CIMSERVER=sfcb
jbulpin@0 273 AC_MSG_RESULT(implied: $CIMSERVER)
jbulpin@0 274 fi
jbulpin@0 275 ]
jbulpin@0 276 )
jbulpin@0 277
jbulpin@0 278 dnl
jbulpin@0 279 dnl The check for the SBLIM test suite
jbulpin@0 280 dnl Sets the TESTSUITEDIR variable and the TESTSUITE conditional
jbulpin@0 281 dnl
jbulpin@0 282
jbulpin@0 283 AC_DEFUN([CHECK_TESTSUITE],
jbulpin@0 284 [
jbulpin@0 285 AC_MSG_CHECKING(for SBLIM testsuite)
jbulpin@0 286 _DIRS="$datadir/sblim-testsuite"
jbulpin@0 287 save_exec_prefix=${exec_prefix}
jbulpin@0 288 save_prefix=${prefix}
jbulpin@0 289 if test xNONE == x${prefix}; then
jbulpin@0 290 prefix=/usr/local
jbulpin@0 291 fi
jbulpin@0 292 if test xNONE == x${exec_prefix}; then
jbulpin@0 293 exec_prefix=$prefix
jbulpin@0 294 fi
jbulpin@0 295 for _name in $_DIRS
jbulpin@0 296 do
jbulpin@0 297 AC_MSG_CHECKING( $_name )
jbulpin@0 298 _xname=`eval echo $_name`
jbulpin@0 299 if test -x $_xname/run.sh ; then
jbulpin@0 300 dnl Found it
jbulpin@0 301 AC_MSG_RESULT(yes)
jbulpin@0 302 if test x"$TESTSUITEDIR" == x; then
jbulpin@0 303 TESTSUITEDIR=$_name
jbulpin@0 304 fi
jbulpin@0 305 AC_SUBST(TESTSUITEDIR)
jbulpin@0 306 break;
jbulpin@0 307 fi
jbulpin@0 308 done
jbulpin@0 309 if test x"$TESTSUITEDIR" == x ; then
jbulpin@0 310 AC_MSG_RESULT(no)
jbulpin@0 311 fi
jbulpin@0 312 AM_CONDITIONAL(TESTSUITE,[test x"$TESTSUITEDIR" != x])
jbulpin@0 313 exec_prefix=$save_exec_prefix
jbulpin@0 314 prefix=$save_prefix
jbulpin@0 315 ]
jbulpin@0 316 )
jbulpin@0 317
jbulpin@0 318 dnl
jbulpin@0 319 dnl The main function to check for the cmpi-base common header
jbulpin@0 320 dnl Modifies the CPPFLAGS with the right include directory and sets
jbulpin@0 321 dnl the 'have_SBLIMBASE' to either 'no' or 'yes'
jbulpin@0 322 dnl
jbulpin@0 323
jbulpin@0 324 AC_DEFUN([CHECK_SBLIM_BASE],
jbulpin@0 325 [
jbulpin@0 326 AC_MSG_CHECKING(for SBLIM Base)
jbulpin@0 327 SBLIMBASE_CPP_FLAGS="$CPPFLAGS"
jbulpin@0 328 dnl Check just with the standard include paths
jbulpin@0 329 _CHECK_SBLIM_BASE(standard)
jbulpin@0 330 if test "$have_SBLIMBASE" == "yes"; then
jbulpin@0 331 dnl The standard include paths worked.
jbulpin@0 332 AC_MSG_RESULT(yes)
jbulpin@0 333 else
jbulpin@0 334 _DIRS_="/usr/include/sblim \
jbulpin@0 335 /usr/local/include/sblim"
jbulpin@0 336 for _DIR_ in $_DIRS_
jbulpin@0 337 do
jbulpin@0 338 _cppflags=$CPPFLAGS
jbulpin@0 339 _include_SBLIMBASE="$_DIR_"
jbulpin@0 340 CPPFLAGS="$CPPFLAGS -I$_include_SBLIMBASE"
jbulpin@0 341 _CHECK_SBLIM_BASE($_DIR_)
jbulpin@0 342 if test "$have_SBLIMBASE" == "yes"; then
jbulpin@0 343 dnl Found it
jbulpin@0 344 AC_MSG_RESULT(yes)
jbulpin@0 345 dnl Save the new -I parameter
jbulpin@0 346 SBLIMBASE_CPP_FLAGS="$CPPFLAGS"
jbulpin@0 347 LIBSBLIMBASE=-lcmpiOSBase_Common
jbulpin@0 348 break
jbulpin@0 349 fi
jbulpin@0 350 CPPFLAGS=$_cppflags
jbulpin@0 351 done
jbulpin@0 352 fi
jbulpin@0 353 CPPFLAGS=$SBLIMBASE_CPP_FLAGS
jbulpin@0 354 AC_SUBST(LIBSBLIMBASE)
jbulpin@0 355 if test "$have_SBLIMBASE" == "no"; then
jbulpin@0 356 AC_MSG_ERROR(no. The required SBLIM Base package is missing.)
jbulpin@0 357 fi
jbulpin@0 358 ]
jbulpin@0 359 )