-# 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
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ocaml-augeas,0.3)
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_INIT(ocaml-augeas,0.5)
dnl Check for basic C environment.
AC_PROG_CC
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 Check for aug_source function, added in Augeas 1.8.0.
+old_LIBS="$LIBS"
+LIBS="$AUGEAS_LIBS $LIBS"
+AC_CHECK_FUNCS([aug_source])
+LIBS="$old_LIBS"
dnl Produce output files.
AC_CONFIG_HEADERS([config.h])