From: Viktor M. <mih...@us...> - 2005-04-19 11:10:35
|
Update of /cvsroot/sblim/cmpi-samples/autotools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11737 Modified Files: acinclude.m4 Log Message: Added sblimbase check to macro include file. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/autotools/acinclude.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- acinclude.m4 19 Apr 2005 09:00:37 -0000 1.1 +++ acinclude.m4 19 Apr 2005 11:10:27 -0000 1.2 @@ -308,3 +308,45 @@ ] ) +dnl +dnl The main function to check for the cmpi-base common header +dnl Modifies the CPPFLAGS with the right include directory and sets +dnl the 'have_SBLIMBASE' to either 'no' or 'yes' +dnl + +AC_DEFUN([CHECK_SBLIM_BASE], + [ + AC_MSG_CHECKING(for SBLIM Base) + SBLIMBASE_CPP_FLAGS="$CPPFLAGS" + dnl Check just with the standard include paths + _CHECK_SBLIM_BASE(standard) + if test "$have_SBLIMBASE" == "yes"; then + dnl The standard include paths worked. + AC_MSG_RESULT(yes) + else + _DIRS_="/usr/include/sblim \ + /usr/local/include/sblim" + for _DIR_ in $_DIRS_ + do + _cppflags=$CPPFLAGS + _include_SBLIMBASE="$_DIR_" + CPPFLAGS="$CPPFLAGS -I$_include_SBLIMBASE" + _CHECK_SBLIM_BASE($_DIR_) + if test "$have_SBLIMBASE" == "yes"; then + dnl Found it + AC_MSG_RESULT(yes) + dnl Save the new -I parameter + SBLIMBASE_CPP_FLAGS="$CPPFLAGS" + LIBSBLIMBASE=-lcmpiOSBase_Common + break + fi + CPPFLAGS=$_cppflags + done + fi + CPPFLAGS=$SBLIMBASE_CPP_FLAGS + AC_SUBST(LIBSBLIMBASE) + if test "$have_SBLIMBASE" == "no"; then + AC_MSG_ERROR(no. The required SBLIM Base package is missing.) + fi + ] +) |