
# HG changeset patch # User Eduardo Lima (Etrunko) <eblima@br.ibm.com> # Date 1306269980 10800 # Node ID f1f5ef86c865fc0f6e475685ece31eeb1ea1fc88 # Parent 8e7c9a8ad1f9e5bf6765c89a36ccca43f0564934 Configure tweaks acinclude.m4 - Better output when checking for CMPI includes configure.ac - Use automake silent rules if available - Introduce libtool version-info. Changes from #1 Makefile.am - Generate versioned .so files Changes from #2 libxkutil/Makefile.am - version-info only makes sense for libraries Signed-off-by: Eduardo Lima (Etrunko) <eblima@br.ibm.com> diff --git a/acinclude.m4 b/acinclude.m4 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/libxkutil/Makefile.am b/libxkutil/Makefile.am --- a/libxkutil/Makefile.am +++ b/libxkutil/Makefile.am @@ -10,7 +10,7 @@ libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ xmlgen.c infostore.c pool_parsing.c - +libxkutil_la_LDFLAGS = -version-info @VERSION_INFO@ libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ @LIBUUID_LIBS@ diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,7 +29,8 @@ CFLAGS += -I$(top_builddir)/libxkutil $(CFLAGS_STRICT) -AM_LDFLAGS = $(XKUADD) +AM_LDFLAGS = $(XKUADD) \ + -version-info @VERSION_INFO@ providerdir = $(PROVIDERDIR)
participants (1)
-
Eduardo Lima (Etrunko)