
# HG changeset patch # User Eduardo Lima (Etrunko) <eblima@br.ibm.com> # Date 1306268000 10800 # Node ID cbca2d7ce313a0d3c26d77e04f5e36d7c4549e3e # Parent a93bab93b304329e9f63d50a8d46cab427271c8d Configure tweaks acinclude.m4 - Better output when checking for CMPI includes configure.ac - Use automake silent rules if available - Introduce libtool version-info. Notice that changes in Makefile.am are necessary in order to produce versioned .so. Due to the large amount of libraries we generate, it is a big patch and I will send it separately. Signed-off-by: Eduardo Lima (Etrunko) <eblima@br.ibm.com> diff -r a93bab93b304 -r cbca2d7ce313 acinclude.m4 --- a/acinclude.m4 Tue May 24 17:02:49 2011 -0300 +++ b/acinclude.m4 Tue May 24 17:13:20 2011 -0300 @@ -71,11 +71,9 @@ ], [ have_CMPI=yes - dnl AC_MSG_RESULT(yes) ], [ have_CMPI=no - dnl AC_MSG_RESULT(no) ]) ]) @@ -88,7 +86,7 @@ AC_DEFUN([CHECK_CMPI], [ - AC_MSG_CHECKING(for CMPI headers) + AC_MSG_NOTICE([checking for CMPI headers...]) dnl Check just with the standard include paths CMPI_CPP_FLAGS="$CPPFLAGS" _CHECK_CMPI(standard) @@ -96,6 +94,7 @@ dnl The standard include paths worked. AC_MSG_RESULT(yes) else + AC_MSG_RESULT(no) _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ @@ -115,13 +114,15 @@ dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break + else + AC_MSG_RESULT(no) fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then - AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) + AC_MSG_ERROR(Cannot find CMPI headers files.) fi ] ) @@ -133,7 +134,7 @@ AC_DEFUN([CHECK_PROVIDERDIR], [ - AC_MSG_CHECKING(for CMPI provider directory) + AC_MSG_NOTICE([checking for CMPI provider directory]) _DIRS="$libdir/cmpi" save_exec_prefix=${exec_prefix} save_prefix=${prefix} @@ -146,7 +147,7 @@ for _dir in $_DIRS do _xdir=`eval echo $_dir` - AC_MSG_CHECKING( $_dir ) + AC_MSG_CHECKING([for $_dir]) if test -d $_xdir ; then dnl Found it AC_MSG_RESULT(yes) @@ -172,7 +173,7 @@ AC_DEFUN([CHECK_CIMSERVER], [ - AC_MSG_CHECKING(for CIM servers) + AC_MSG_NOTICE([checking for CIM servers]) if test x"$CIMSERVER" = x then _SERVERS="sfcbd cimserver owcimomd" @@ -194,13 +195,18 @@ esac fi break; - fi + fi + done + if test x"$CIMSERVER" == x; then + AC_MSG_RESULT(no) + else + break + fi done - done PATH=$_SAVE_PATH if test x"$CIMSERVER" == x ; then CIMSERVER=sfcb - AC_MSG_RESULT(implied: $CIMSERVER) + AC_MSG_WARN([CIM server implied: $CIMSERVER]) fi fi # Cross platform only needed for sfcb currently diff -r a93bab93b304 -r cbca2d7ce313 configure.ac --- a/configure.ac Tue May 24 17:02:49 2011 -0300 +++ b/configure.ac Tue May 24 17:13:20 2011 -0300 @@ -1,10 +1,34 @@ # (C) Copyright IBM Corp. 2005 +m4_define([libvirtcim_maj], [0]) +m4_define([libvirtcim_min], [5]) +m4_define([libvirtcim_mic], [12]) +m4_define([libvirtcim_version], [libvirtcim_maj.libvirtcim_min.libvirtcim_mic]) -AC_INIT(libvirt CMPI provider, 0.5.12, cvincent@us.ibm.com, libvirt-cim) +AC_INIT([libvirt CMPI provider], [libvirtcim_version], [cvincent@us.ibm.com], + [libvirt-cim]) AC_CONFIG_SRCDIR([src/Virt_ComputerSystem.c]) +# Autogenerate the autoconf header file to store build settings +AC_CONFIG_HEADER([config.h]) + +# Use silent rules if possible +AM_INIT_AUTOMAKE +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +m4_define([lt_cur], m4_eval(libvirtcim_maj + libvirtcim_min)) +m4_define([lt_rev], libvirtcim_mic) +m4_define([lt_age], libvirtcim_min) +VERSION_INFO="lt_cur:lt_rev:lt_age" +AC_SUBST(VERSION_INFO) + +AC_PROG_CC +AC_C_CONST +AC_PROG_LIBTOOL +AC_PROG_INSTALL +AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) AC_CHECK_HEADERS([stdarg.h errno.h]) +AC_HEADER_STDC AC_CHECK_FUNCS([popen pclose fgets asprintf vfprintf fprintf snprintf sscanf]) CPPFLAGS="$CPPFLAGS -DCMPI_VERSION=100" @@ -109,12 +133,6 @@ AC_SUBST(XEN_EMULATOR) AC_DEFINE_UNQUOTED(XEN_EMULATOR, "$XEN_EMULATOR", [Location of Xen FullVirt emulator]) -# Autogenerate the autoconf header file to store build settings -AC_CONFIG_HEADER([config.h]) - -topdir=`pwd` -AC_SUBST(topdir) - AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc) # Autogenerate the Makefile @@ -129,14 +147,6 @@ Makefile ]) -AM_INIT_AUTOMAKE - -AC_PROG_CC -AC_C_CONST -AC_PROG_LIBTOOL -AC_PROG_INSTALL -AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) -AC_HEADER_STDC # Check for the required CMPI header files (this macro is defined in acinclude.m4) CHECK_CMPI