OS X lacks open_memstream, causing hivexsh to fail to build. This patch
defines HAVE_HIVEXSH, setting the only condition to open_memstream
existence.
Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>
# Work around broken libtool.
export to_tool_file_cmd=func_convert_file_noop
-SUBDIRS = gnulib/lib generator lib images gnulib/tests sh xml po
+SUBDIRS = gnulib/lib generator lib images gnulib/tests xml po
+
+if HAVE_HIVEXSH
+SUBDIRS += sh
+endif
if HAVE_OCAML
SUBDIRS += ocaml
AC_REPLACE_FUNCS([mmap])
dnl Functions.
-AC_CHECK_FUNCS([bindtextdomain])
+AC_CHECK_FUNCS([bindtextdomain open_memstream])
dnl Check for pod2man and pod2text.
AC_CHECK_PROG([POD2MAN],[pod2man],[pod2man],[no])
AC_SUBST([LIBXML2_CFLAGS])
AC_SUBST([LIBXML2_LIBS])
+dnl hivexsh depends on open_memstream, which is absent on OS X.
+AM_CONDITIONAL([HAVE_HIVEXSH],[test "x$HAVE_OPEN_MEMSTREAM" = "xyes"])
+
dnl Check for OCaml (optional, for OCaml bindings).
AC_PROG_OCAML
AC_PROG_FINDLIB