# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1196982077 28800
# Node ID 19fe21b48ba3b5841b80a3a6cccdefd6f3ea5e8d
# Parent 0a1c811ef3bdc9651166a6259562b7b95f4f7838
Change libcmpiutil check in configure to use pkg-config
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 0a1c811ef3bd -r 19fe21b48ba3 acinclude.m4
--- a/acinclude.m4 Thu Dec 06 11:52:09 2007 -0800
+++ b/acinclude.m4 Thu Dec 06 15:01:17 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],
[