CAMLprim value
ocaml_augeas_source (value tv, value pathv)
{
+#ifdef HAVE_AUG_SOURCE
CAMLparam2 (tv, pathv);
CAMLlocal2 (optv, v);
augeas_t t = Augeas_t_val (tv);
raise_error (t, "Augeas.source");
CAMLreturn (optv);
+#else
+ caml_failwith ("Augeas.source: function not implemented");
+#endif
}
dnl Check for Augeas C library.
PKG_CHECK_MODULES([AUGEAS], [augeas])
+dnl Check for aug_source function, added in Augeas 1.8.0.
+old_LIBS="$LIBS"
+LIBS="$AUGEAS_LIBS"
+AC_CHECK_FUNCS([aug_source])
+LIBS="$old_LIBS"
+
dnl Produce output files.
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile META])