diff --git a/Config.h.in b/Config.h.in
--- a/Config.h.in
+++ b/Config.h.in
@@ -57,6 +57,9 @@
 /* Augeas library has the aug_srun function. */
 #undef HAS_AUGEAS_SRUN
 
+/* Augeas library has the aug_to_xml function. */
+#undef HAS_AUGEAS_TO_XML
+
 /* Define to 1 if you have the <augeas.h> header file. */
 #undef HAVE_AUGEAS_H
 
diff --git a/HUnitAug.hs b/HUnitAug.hs
--- a/HUnitAug.hs
+++ b/HUnitAug.hs
@@ -1,7 +1,7 @@
 -- file: HUnitAug.hs
 
 -- Haskell bindings for the Augeas library
--- Copyright (c) 2009-2011, Jude Nagurney
+-- Copyright (c) 2009-2012, Jude Nagurney
 
 -- This library is free software; you can redistribute it and/or modify it 
 -- under the terms of the GNU Lesser General Public License as published by 
@@ -623,11 +623,39 @@
                             )
 #endif
 
+-- ----------------
+-- aug_to_xml tests
+-- ----------------
+#ifdef HAS_AUGEAS_TO_XML
+testToXml :: Test
+testToXml = TestCase ( with_augptr $ \aug_ptr -> do
+                          
+                          -- test success (ret==0, AugeasXmlNode != NULL)
+                          ret_toxml <- aug_to_xml aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1/canonical") [none] 
+                          assertEqual "testGoodToXml" success (fst ret_toxml)
+                          
+                          assertBool "testGoodToXmlJustPtr" ((snd ret_toxml) /= Nothing)
+                          
+                          ret_toxml2 <- aug_to_xml aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1/canonical") [save_backup] 
+                          assertEqual "testFlagsNotZero" System.Augeas.error (fst ret_toxml2)
+                          
+                          err_message <- aug_error_message aug_ptr
+                          assertEqual "testFlagsNotZeroErr" (Data.ByteString.Char8.pack "Invalid argument in function call") err_message
+                          
+                          err_details <- aug_error_details aug_ptr
+                          assertEqual "testFlagsNotZeroErrDetails" (Data.ByteString.Char8.pack "aug_to_xml: FLAGS must be 0") err_details
 
+                          assertEqual "testFlagsNotZeroNode" Nothing (snd ret_toxml2)
+                          
+                          )
+#endif
 
 
 
 
+
+
+
 main :: IO Counts
 main = runTestTT $ TestList [
         -- testBadRoot,
@@ -714,14 +742,16 @@
         ,testSrunQuit
 #endif
 
-
 #ifndef HAS_AUGEAS_ERROR
         ,testError
 #endif
+
 #ifdef HAS_AUGEAS_ERROR_MESSAGE
-        -- aug_error_minor_message
-        -- aug_error_details
         ,testErrMessage
+#endif
+
+#ifdef HAS_AUGEAS_TO_XML
+        ,testToXml
 #endif
 
         -- aug_close already handled in ForeignPtr, so there's no need to surface it to Haskell users at all.
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 ## file: Makefile
 
 ## Haskell bindings for the Augeas library
-## Copyright (c) 2009-2011, Jude Nagurney
+## Copyright (c) 2009-2012, Jude Nagurney
 
 ## This library is free software; you can redistribute it and/or modify it 
 ## under the terms of the GNU Lesser General Public License as published by 
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -3,7 +3,7 @@
 -- file: Setup.hs
 
 -- Haskell bindings for the Augeas library
--- Copyright (c) 2009-2011 Jude Nagurney
+-- Copyright (c) 2009-2012 Jude Nagurney
 
 -- This library is free software; you can redistribute it and/or modify it 
 -- under the terms of the GNU Lesser General Public License as published by 
diff --git a/System/Augeas.hs b/System/Augeas.hs
--- a/System/Augeas.hs
+++ b/System/Augeas.hs
@@ -1,7 +1,7 @@
 -- file: System/Augeas.hs
 
 -- Haskell bindings for the Augeas library
--- Copyright (c) 2009-2011, Jude Nagurney
+-- Copyright (c) 2009-2012, Jude Nagurney
 
 -- This library is free software; you can redistribute it and/or modify it 
 -- under the terms of the GNU Lesser General Public License as published by 
@@ -79,6 +79,9 @@
     , aug_error_message        
     , aug_error_minor_message
     , aug_error_details
+#ifdef HAS_AUGEAS_TO_XML
+    , aug_to_xml
+#endif
     ) where
 
 import System.IO
@@ -258,9 +261,9 @@
   
    Define a variable NAME whose value is the result of evaluating EXPR. If
    a variable NAME already exists, its name will be replaced with the
-   result of evaluating EXPR.
+   result of evaluating EXPR.  Context will not be applied to EXPR.
   
-   If EXPR is Nothing, the variable NAME will be removed if it is defined.
+   If (Maybe EXPR) is Nothing, the variable NAME will be removed if it is defined.
   
    Path variables can be used in path expressions later on by prefixing
    them with '$'.
@@ -852,6 +855,51 @@
      _ <- fflush out
      _ <- fclose out
      return(ret)
+#endif
+
+-- ----------
+-- aug_to_xml
+-- ----------
+#ifdef HAS_AUGEAS_TO_XML
+-- TODO:  What's the standard GHC interface to libxml2 ? : libxml  (Text.XML.LibXML) or  xml (Text.XML.Light)
+foreign import ccall safe "augeas.h aug_to_xml"
+  c_aug_to_xml :: Ptr Augeas            -- aug
+             -> CString                 -- path
+             -> (Ptr (Ptr AugeasXmlNode ))    -- xmldoc
+             -> AugFlag                 -- flags
+             -> IO (AugRet)             -- error code  (0 on success, <0 on error)
+#endif
+{-|
+   Function: aug_to_xml
+
+   Turn the Augeas tree(s) matching PATH into an XML tree XMLDOC. The
+   parameter FLAGS is currently unused and must be set to 0.
+
+   Returns:
+   0 on success, or a negative value on failure
+
+   In case of failure, *xmldoc is set to Nothing
+-}
+
+aug_to_xml :: Ptr Augeas           -- ^ Augeas pointer
+           -> ByteString           -- ^ path
+           -> [AugFlag]            -- ^ flags    
+           -> IO (AugRet, Maybe (Ptr AugeasXmlNode))  -- ^ error code
+aug_to_xml aug_ptr bs_path flags  =
+#ifndef HAS_AUGEAS_TO_XML
+  Prelude.error "aug_to_xml requires at least augeas version 0.10.0"
+  Prelude.error ((show aug_ptr) ++ (show fptr_out) ++ (show bs_text))  -- stop compiler warning
+#else
+  useAsCString bs_path $ \path -> do
+    alloca $ \ptr -> do
+      ret <- c_aug_to_xml aug_ptr path ptr (combineFlags flags)
+      ret_xml <- peek ptr
+      if ret_xml == nullPtr 
+         then do 
+             return (ret, Nothing)
+         else do 
+             return (ret, (Just ret_xml))
+
 #endif
 
 -- --------
diff --git a/System/AugeasHsc.hsc b/System/AugeasHsc.hsc
--- a/System/AugeasHsc.hsc
+++ b/System/AugeasHsc.hsc
@@ -1,7 +1,7 @@
 -- file: Augeas.hsc
 
 -- Haskell bindings for the Augeas library
--- Copyright (c) 2009-2011, Jude Nagurney
+-- Copyright (c) 2009-2012, Jude Nagurney
 
 -- This library is free software; you can redistribute it and/or modify it 
 -- under the terms of the GNU Lesser General Public License as published by 
@@ -21,7 +21,7 @@
 -- Contact the author at
 -- jude@pwan.org
 
-{-# LANGUAGE CPP, ForeignFunctionInterface #-}
+{-# LANGUAGE CPP, ForeignFunctionInterface, EmptyDataDecls, StandaloneDeriving #-}
 
 #ifndef _config_h
 #include "Config.h"
@@ -31,6 +31,7 @@
 module System.AugeasHsc where
 
 import Foreign.C.Types
+import Foreign.Storable
 
 #include "augeas.h"
 
@@ -80,4 +81,37 @@
        , err_mv_desc = AUG_EMVDESC
        , err_cmd_run = AUG_ECMDRUN
 #endif
+#ifdef HAS_AUGEAS_TO_XML
+       , err_bad_arg = AUG_EBADARG
+#endif
 }
+
+#ifdef HAS_AUGEAS_TO_XML
+#include <libxml/tree.h>
+#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
+--data xmlNode
+data AugeasXmlNode
+--        deriving (Eq, Show)
+
+data AugeasXmlNodeHandle = Ptr AugeasXmlNode
+
+instance Storable AugeasXmlNode where
+    alignment _ = #{alignment xmlNode}
+    sizeOf _ = #{size xmlNode}
+--    peek ptr = do  
+--      _type <- #{peek xmlNode, type} ptr
+--      name <- #{peek xmlNode, name} ptr
+--      children <- #{peek xmlNode, children} ptr
+--      last <- #{peek xmlNode, last} ptr
+--      parent <- #{peek xmlNode, parent} ptr
+--      next <- #{peek xmlNode, next} ptr
+--      prev <- #{peek xmlNode, prev} ptr
+--      doc <- #{peek xmlNode, doc} ptr
+--      return (XmlNode _type name children last parent next prev doc)
+--      return (XmlNode _type name )
+--    poke ptr (XmlNode _type name children last parent next prev doc) = do 
+--    poke ptr (XmlNode _type name) = do 
+--       #{poke xmlNode, type} ptr _type
+--       #{poke xmlNode, name} ptr name
+    
+#endif
diff --git a/augeas.cabal b/augeas.cabal
--- a/augeas.cabal
+++ b/augeas.cabal
@@ -1,10 +1,10 @@
 Name: augeas
-Version: 0.5.1
+Version: 0.6.0
 Synopsis:  A Haskell FFI wrapper for the Augeas API
 Description: A Haskell FFI wrapper for the Augeas API
 Author: Jude Nagurney
 Maintainer: jude@pwan.org
-Cabal-Version: >= 1.2
+Cabal-Version: >= 1.6
 License: LGPL
 License-File: LICENSE
 Data-Files: AUTHORS, README, THANKS, ChangeLog, testroot/etc/hosts, testroot/etc/hosts.reload
@@ -12,8 +12,12 @@
 Category: System
 Stability: Alpha
 HomePage: http://trac.haskell.org/augeas
-Package-URL: http://hackage.haskell.org/packages/archive/augeas/0.5.0/augeas-0.5.0.tar.gz
+Package-URL: http://hackage.haskell.org/packages/archive/augeas/0.6.0/augeas-0.6.0.tar.gz
 Extra-Source-Files: Makefile, configure.ac, configure, Config.h.in
+
+Source-Repository head
+        Type: darcs
+        Location: http://code.haskell.org:/augeas
 
 library 
         Exposed-Modules: System.Augeas
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for haskell-augeas 0.5.1.
+# Generated by GNU Autoconf 2.68 for haskell-augeas 0.6.0.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -89,6 +89,7 @@
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -214,11 +215,18 @@
   # We cannot yet assume a decent shell, so we have to provide a
 	# neutralization value for shells without unset; and this also
 	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
 	BASH_ENV=/dev/null
 	ENV=/dev/null
 	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -549,8 +557,8 @@
 # Identity of this package.
 PACKAGE_NAME='haskell-augeas'
 PACKAGE_TARNAME='haskell-augeas'
-PACKAGE_VERSION='0.5.1'
-PACKAGE_STRING='haskell-augeas 0.5.1'
+PACKAGE_VERSION='0.6.0'
+PACKAGE_STRING='haskell-augeas 0.6.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1059,7 +1067,7 @@
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1197,7 +1205,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures haskell-augeas 0.5.1 to adapt to many kinds of systems.
+\`configure' configures haskell-augeas 0.6.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1258,7 +1266,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of haskell-augeas 0.5.1:";;
+     short | recursive ) echo "Configuration of haskell-augeas 0.6.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1343,8 +1351,8 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-haskell-augeas configure 0.5.1
-generated by GNU Autoconf 2.67
+haskell-augeas configure 0.6.0
+generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -1390,7 +1398,7 @@
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1436,7 +1444,7 @@
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -1473,7 +1481,7 @@
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1486,10 +1494,10 @@
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval "test \"\${$3+set}\"" = set; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -1552,7 +1560,7 @@
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -1561,7 +1569,7 @@
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -1602,7 +1610,7 @@
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1616,7 +1624,7 @@
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1634,15 +1642,15 @@
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by haskell-augeas $as_me 0.5.1, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+It was created by haskell-augeas $as_me 0.6.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -1900,7 +1908,7 @@
       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2000,6 +2008,9 @@
 fi
 
 
+CPPFLAGS="$CPPFLAGS -I /usr/include/libxml2"
+C_INCLUDE_PATH=/usr/include/libxml2
+
 # augeas-specific content
 has_augeas_init=no
 ac_ext=c
@@ -2012,7 +2023,7 @@
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2052,7 +2063,7 @@
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2105,7 +2116,7 @@
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2145,7 +2156,7 @@
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2204,7 +2215,7 @@
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2248,7 +2259,7 @@
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2303,7 +2314,7 @@
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -2418,7 +2429,7 @@
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -2461,7 +2472,7 @@
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -2520,7 +2531,7 @@
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -2531,7 +2542,7 @@
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2572,7 +2583,7 @@
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -2582,7 +2593,7 @@
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2619,7 +2630,7 @@
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -2697,7 +2708,7 @@
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -2795,7 +2806,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_init" >&5
 $as_echo_n "checking for library containing aug_init... " >&6; }
-if test "${ac_cv_search_aug_init+set}" = set; then :
+if ${ac_cv_search_aug_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -2829,11 +2840,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_init+set}" = set; then :
+  if ${ac_cv_search_aug_init+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_init+set}" = set; then :
+if ${ac_cv_search_aug_init+:} false; then :
 
 else
   ac_cv_search_aug_init=no
@@ -2864,7 +2875,7 @@
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -2980,7 +2991,7 @@
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -2992,7 +3003,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -3055,7 +3066,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -3122,7 +3133,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3252,7 +3263,7 @@
 for ac_header in augeas.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "augeas.h" "ac_cv_header_augeas_h" "$ac_includes_default"
-if test "x$ac_cv_header_augeas_h" = x""yes; then :
+if test "x$ac_cv_header_augeas_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_AUGEAS_H 1
 _ACEOF
@@ -3275,7 +3286,7 @@
 has_augeas_close=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_close" >&5
 $as_echo_n "checking for library containing aug_close... " >&6; }
-if test "${ac_cv_search_aug_close+set}" = set; then :
+if ${ac_cv_search_aug_close+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3309,11 +3320,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_close+set}" = set; then :
+  if ${ac_cv_search_aug_close+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_close+set}" = set; then :
+if ${ac_cv_search_aug_close+:} false; then :
 
 else
   ac_cv_search_aug_close=no
@@ -3345,7 +3356,7 @@
 has_aug_defvar=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_defvar" >&5
 $as_echo_n "checking for library containing aug_defvar... " >&6; }
-if test "${ac_cv_search_aug_defvar+set}" = set; then :
+if ${ac_cv_search_aug_defvar+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3379,11 +3390,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_defvar+set}" = set; then :
+  if ${ac_cv_search_aug_defvar+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_defvar+set}" = set; then :
+if ${ac_cv_search_aug_defvar+:} false; then :
 
 else
   ac_cv_search_aug_defvar=no
@@ -3409,7 +3420,7 @@
 has_aug_missing=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_missing" >&5
 $as_echo_n "checking for library containing aug_missing... " >&6; }
-if test "${ac_cv_search_aug_missing+set}" = set; then :
+if ${ac_cv_search_aug_missing+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3443,11 +3454,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_missing+set}" = set; then :
+  if ${ac_cv_search_aug_missing+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_missing+set}" = set; then :
+if ${ac_cv_search_aug_missing+:} false; then :
 
 else
   ac_cv_search_aug_missing=no
@@ -3473,7 +3484,7 @@
 has_aug_defnode=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_defnode" >&5
 $as_echo_n "checking for library containing aug_defnode... " >&6; }
-if test "${ac_cv_search_aug_defnode+set}" = set; then :
+if ${ac_cv_search_aug_defnode+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3507,11 +3518,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_defnode+set}" = set; then :
+  if ${ac_cv_search_aug_defnode+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_defnode+set}" = set; then :
+if ${ac_cv_search_aug_defnode+:} false; then :
 
 else
   ac_cv_search_aug_defnode=no
@@ -3537,7 +3548,7 @@
 has_aug_get=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_get" >&5
 $as_echo_n "checking for library containing aug_get... " >&6; }
-if test "${ac_cv_search_aug_get+set}" = set; then :
+if ${ac_cv_search_aug_get+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3571,11 +3582,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_get+set}" = set; then :
+  if ${ac_cv_search_aug_get+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_get+set}" = set; then :
+if ${ac_cv_search_aug_get+:} false; then :
 
 else
   ac_cv_search_aug_get=no
@@ -3601,7 +3612,7 @@
 has_aug_set=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_set" >&5
 $as_echo_n "checking for library containing aug_set... " >&6; }
-if test "${ac_cv_search_aug_set+set}" = set; then :
+if ${ac_cv_search_aug_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3635,11 +3646,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_set+set}" = set; then :
+  if ${ac_cv_search_aug_set+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_set+set}" = set; then :
+if ${ac_cv_search_aug_set+:} false; then :
 
 else
   ac_cv_search_aug_set=no
@@ -3665,7 +3676,7 @@
 has_aug_setm=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_setm" >&5
 $as_echo_n "checking for library containing aug_setm... " >&6; }
-if test "${ac_cv_search_aug_setm+set}" = set; then :
+if ${ac_cv_search_aug_setm+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3699,11 +3710,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_setm+set}" = set; then :
+  if ${ac_cv_search_aug_setm+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_setm+set}" = set; then :
+if ${ac_cv_search_aug_setm+:} false; then :
 
 else
   ac_cv_search_aug_setm=no
@@ -3729,7 +3740,7 @@
 has_aug_span=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_span" >&5
 $as_echo_n "checking for library containing aug_span... " >&6; }
-if test "${ac_cv_search_aug_span+set}" = set; then :
+if ${ac_cv_search_aug_span+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3763,11 +3774,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_span+set}" = set; then :
+  if ${ac_cv_search_aug_span+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_span+set}" = set; then :
+if ${ac_cv_search_aug_span+:} false; then :
 
 else
   ac_cv_search_aug_span=no
@@ -3793,7 +3804,7 @@
 has_aug_insert=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_insert" >&5
 $as_echo_n "checking for library containing aug_insert... " >&6; }
-if test "${ac_cv_search_aug_insert+set}" = set; then :
+if ${ac_cv_search_aug_insert+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3827,11 +3838,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_insert+set}" = set; then :
+  if ${ac_cv_search_aug_insert+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_insert+set}" = set; then :
+if ${ac_cv_search_aug_insert+:} false; then :
 
 else
   ac_cv_search_aug_insert=no
@@ -3857,7 +3868,7 @@
 has_aug_rm=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_rm" >&5
 $as_echo_n "checking for library containing aug_rm... " >&6; }
-if test "${ac_cv_search_aug_rm+set}" = set; then :
+if ${ac_cv_search_aug_rm+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3891,11 +3902,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_rm+set}" = set; then :
+  if ${ac_cv_search_aug_rm+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_rm+set}" = set; then :
+if ${ac_cv_search_aug_rm+:} false; then :
 
 else
   ac_cv_search_aug_rm=no
@@ -3921,7 +3932,7 @@
 has_aug_mv=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_mv" >&5
 $as_echo_n "checking for library containing aug_mv... " >&6; }
-if test "${ac_cv_search_aug_mv+set}" = set; then :
+if ${ac_cv_search_aug_mv+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -3955,11 +3966,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_mv+set}" = set; then :
+  if ${ac_cv_search_aug_mv+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_mv+set}" = set; then :
+if ${ac_cv_search_aug_mv+:} false; then :
 
 else
   ac_cv_search_aug_mv=no
@@ -3985,7 +3996,7 @@
 has_aug_match=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_match" >&5
 $as_echo_n "checking for library containing aug_match... " >&6; }
-if test "${ac_cv_search_aug_match+set}" = set; then :
+if ${ac_cv_search_aug_match+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4019,11 +4030,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_match+set}" = set; then :
+  if ${ac_cv_search_aug_match+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_match+set}" = set; then :
+if ${ac_cv_search_aug_match+:} false; then :
 
 else
   ac_cv_search_aug_match=no
@@ -4049,7 +4060,7 @@
 has_aug_save=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_save" >&5
 $as_echo_n "checking for library containing aug_save... " >&6; }
-if test "${ac_cv_search_aug_save+set}" = set; then :
+if ${ac_cv_search_aug_save+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4083,11 +4094,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_save+set}" = set; then :
+  if ${ac_cv_search_aug_save+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_save+set}" = set; then :
+if ${ac_cv_search_aug_save+:} false; then :
 
 else
   ac_cv_search_aug_save=no
@@ -4113,7 +4124,7 @@
 has_aug_load=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_load" >&5
 $as_echo_n "checking for library containing aug_load... " >&6; }
-if test "${ac_cv_search_aug_load+set}" = set; then :
+if ${ac_cv_search_aug_load+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4147,11 +4158,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_load+set}" = set; then :
+  if ${ac_cv_search_aug_load+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_load+set}" = set; then :
+if ${ac_cv_search_aug_load+:} false; then :
 
 else
   ac_cv_search_aug_load=no
@@ -4177,7 +4188,7 @@
 has_aug_print=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_print" >&5
 $as_echo_n "checking for library containing aug_print... " >&6; }
-if test "${ac_cv_search_aug_print+set}" = set; then :
+if ${ac_cv_search_aug_print+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4211,11 +4222,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_print+set}" = set; then :
+  if ${ac_cv_search_aug_print+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_print+set}" = set; then :
+if ${ac_cv_search_aug_print+:} false; then :
 
 else
   ac_cv_search_aug_print=no
@@ -4241,7 +4252,7 @@
 has_aug_srun=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_srun" >&5
 $as_echo_n "checking for library containing aug_srun... " >&6; }
-if test "${ac_cv_search_aug_srun+set}" = set; then :
+if ${ac_cv_search_aug_srun+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4275,11 +4286,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_srun+set}" = set; then :
+  if ${ac_cv_search_aug_srun+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_srun+set}" = set; then :
+if ${ac_cv_search_aug_srun+:} false; then :
 
 else
   ac_cv_search_aug_srun=no
@@ -4302,10 +4313,74 @@
 fi
 
 
+has_aug_to_xml=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_to_xml" >&5
+$as_echo_n "checking for library containing aug_to_xml... " >&6; }
+if ${ac_cv_search_aug_to_xml+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char aug_to_xml ();
+int
+main ()
+{
+return aug_to_xml ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' augeas; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_aug_to_xml=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_aug_to_xml+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_aug_to_xml+:} false; then :
+
+else
+  ac_cv_search_aug_to_xml=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_to_xml" >&5
+$as_echo "$ac_cv_search_aug_to_xml" >&6; }
+ac_res=$ac_cv_search_aug_to_xml
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  has_aug_to_xml=yes
+fi
+
+if test "x${has_aug_to_xml}" = "xyes"; then
+
+$as_echo "#define HAS_AUGEAS_TO_XML /**/" >>confdefs.h
+
+fi
+
+
 has_aug_error=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_error" >&5
 $as_echo_n "checking for library containing aug_error... " >&6; }
-if test "${ac_cv_search_aug_error+set}" = set; then :
+if ${ac_cv_search_aug_error+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4339,11 +4414,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_error+set}" = set; then :
+  if ${ac_cv_search_aug_error+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_error+set}" = set; then :
+if ${ac_cv_search_aug_error+:} false; then :
 
 else
   ac_cv_search_aug_error=no
@@ -4369,7 +4444,7 @@
 has_aug_error_message=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_error_message" >&5
 $as_echo_n "checking for library containing aug_error_message... " >&6; }
-if test "${ac_cv_search_aug_error_message+set}" = set; then :
+if ${ac_cv_search_aug_error_message+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4403,11 +4478,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_error_message+set}" = set; then :
+  if ${ac_cv_search_aug_error_message+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_error_message+set}" = set; then :
+if ${ac_cv_search_aug_error_message+:} false; then :
 
 else
   ac_cv_search_aug_error_message=no
@@ -4433,7 +4508,7 @@
 has_aug_error_minor_message=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_error_minor_message" >&5
 $as_echo_n "checking for library containing aug_error_minor_message... " >&6; }
-if test "${ac_cv_search_aug_error_minor_message+set}" = set; then :
+if ${ac_cv_search_aug_error_minor_message+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4467,11 +4542,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_error_minor_message+set}" = set; then :
+  if ${ac_cv_search_aug_error_minor_message+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_error_minor_message+set}" = set; then :
+if ${ac_cv_search_aug_error_minor_message+:} false; then :
 
 else
   ac_cv_search_aug_error_minor_message=no
@@ -4497,7 +4572,7 @@
 has_aug_error_details=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_error_details" >&5
 $as_echo_n "checking for library containing aug_error_details... " >&6; }
-if test "${ac_cv_search_aug_error_details+set}" = set; then :
+if ${ac_cv_search_aug_error_details+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4531,11 +4606,11 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_aug_error_details+set}" = set; then :
+  if ${ac_cv_search_aug_error_details+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_aug_error_details+set}" = set; then :
+if ${ac_cv_search_aug_error_details+:} false; then :
 
 else
   ac_cv_search_aug_error_details=no
@@ -4626,10 +4701,21 @@
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -4661,7 +4747,7 @@
 
 
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -4762,6 +4848,7 @@
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5068,8 +5155,8 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by haskell-augeas $as_me 0.5.1, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+This file was extended by haskell-augeas $as_me 0.6.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -5121,8 +5208,8 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-haskell-augeas config.status 0.5.1
-configured by $0, generated by GNU Autoconf 2.67,
+haskell-augeas config.status 0.6.0
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -5236,7 +5323,7 @@
   case $ac_config_target in
     "Config.h") CONFIG_HEADERS="$CONFIG_HEADERS Config.h" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -5257,9 +5344,10 @@
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -5267,18 +5355,19 @@
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_HEADERS section.
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -5290,8 +5379,8 @@
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -5392,7 +5481,7 @@
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -5411,7 +5500,7 @@
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
 	 # because $ac_f cannot contain `:'.
@@ -5420,7 +5509,7 @@
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -5446,8 +5535,8 @@
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -5520,20 +5609,20 @@
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
+      mv "$ac_tmp/config.h" "$ac_file" \
 	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
  ;;
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,13 @@
 AC_PREREQ(2.65)
-AC_INIT([haskell-augeas],[0.5.1])
+AC_INIT([haskell-augeas],[0.6.0])
 AC_CONFIG_SRCDIR(Setup.hs)
 AC_CONFIG_HEADERS([Config.h])
 
 AC_ARG_WITH([compiler],[])
 
+CPPFLAGS="$CPPFLAGS -I /usr/include/libxml2"
+C_INCLUDE_PATH=/usr/include/libxml2	
+
 # augeas-specific content
 has_augeas_init=no
 AC_SEARCH_LIBS([aug_init],[augeas],[has_augeas_init=yes])
@@ -55,6 +58,7 @@
 HAS_AUGEAS_FUNC(aug_load,HAS_AUGEAS_LOAD)
 HAS_AUGEAS_FUNC(aug_print,HAS_AUGEAS_PRINT)
 HAS_AUGEAS_FUNC(aug_srun,HAS_AUGEAS_SRUN)
+HAS_AUGEAS_FUNC(aug_to_xml,HAS_AUGEAS_TO_XML)
 HAS_AUGEAS_FUNC(aug_error,HAS_AUGEAS_ERROR)
 HAS_AUGEAS_FUNC(aug_error_message,HAS_AUGEAS_ERROR_MESSAGE)
 HAS_AUGEAS_FUNC(aug_error_minor_message,HAS_AUGEAS_ERROR_MINOR_MESSAGE)
