From 733538eeff0a67be144adc181e54771e059ef222 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 11 Jun 2012 13:52:13 +0100 Subject: [PATCH] Use pkg-config to detect Augeas and libxml2. --- Makefile.in | 5 +++-- configure.ac | 14 ++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index eacd01d..330429e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,9 +26,10 @@ OCAMLDOC = @OCAMLDOC@ INSTALL = @INSTALL@ CC = @CC@ -CFLAGS = @CFLAGS@ -fPIC -I$(shell ocamlc -where) -Wall -Werror +CFLAGS = @CFLAGS@ @AUGEAS_CFLAGS@ @LIBXML2_CFLAGS@ \ + -fPIC -I$(shell ocamlc -where) -Wall -Werror LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ +LIBS = @AUGEAS_LIBS@ @LIBXML2_LIBS@ @LIBS@ OCAMLCFLAGS = -g OCAMLCPACKAGES = diff --git a/configure.ac b/configure.ac index 7526898..a17e068 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -# Bitmatch syntax extension. -# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones +# Augeas +# Copyright (C) 2008-2012 Red Hat Inc., Richard W.M. Jones # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -37,13 +37,11 @@ if test "x$OCAMLFIND" = "x"; then AC_MSG_ERROR([You must have ocaml and findlib installed]) fi +dnl Check for libxml2. +PKG_CHECK_MODULES([LIBXML2], [libxml-2.0]) + dnl Check for Augeas C library. -AC_CHECK_LIB(augeas,aug_init, - [], - AC_MSG_ERROR([You must install the Augeas library])) -AC_CHECK_HEADER([augeas.h], - [], - AC_MSG_ERROR([You must install the Augeas development package])) +PKG_CHECK_MODULES([AUGEAS], [augeas]) dnl Produce output files. AC_CONFIG_HEADERS([config.h]) -- 1.8.3.1