# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1197304307 28800
# Node ID 65a5013ebb72858c04230962f352ecbe75a246ad
# Parent 27dd39ce2e0d3c9b73edce39498acd7ac723b917
Change libcmpiutil check in configure to use pkg-config
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 27dd39ce2e0d -r 65a5013ebb72 acinclude.m4
--- a/acinclude.m4 Mon Dec 10 08:31:47 2007 -0800
+++ b/acinclude.m4 Mon Dec 10 08:31:47 2007 -0800
@@ -259,43 +259,12 @@ AC_DEFUN([CHECK_LIBXML2],
]
)
-AC_DEFUN([_CHECK_LIBCU_PC],
- [
- if pkg-config --exists libcmpiutil; then
- CPPFLAGS="$CPPFLAGS `pkg-config --cflags libcmpiutil`"
- LDFLAGS="$LDFLAGS `pkg-config --libs libcmpiutil`"
- found_libcu=yes
- fi
- ]
-)
-
-AC_DEFUN([_CHECK_LIBCU_NOPC],
- [
- DIRS="/usr /usr/local"
- for dir in $DIRS; do
- if test -f "${dir}/include/libcmpiutil/libcmpiutil.h"; then
- CPPFLAGS="$CPPFLAGS -I${dir}/include/libcmpiutil"
- LDFLAGS="$LDFLAGS -lcmpiutil -L${dir}/lib"
- found_libcu=yes
- fi
- done
- ]
-)
-
AC_DEFUN([CHECK_LIBCU],
[
- _CHECK_LIBCU_PC
- if test "x$found_libcu" != "xyes"; then
- _CHECK_LIBCU_NOPC
- fi
- AC_CHECK_LIB(cmpiutil, cu_check_args, [], [
- AC_MSG_ERROR(libcmpiutil not found)
- ])
- AC_CHECK_HEADER([libcmpiutil.h], [], [
- AC_MSG_ERROR([libcmpiutil.h not found])
- ])
- ]
-)
+ PKG_CHECK_MODULES([LIBCU], [libcmpiutil >= 0.1])
+ CPPFLAGS="$CPPFLAGS $LIBCU_CFLAGS"
+ LDFLAGS="$LDFLAGS $LIBCU_LIBS"
+ ])
AC_DEFUN([CHECK_LIBVIRT],
[