diff options
author | Alex Nelson <ajnelson@cs.ucsc.edu> | 2011-09-06 20:42:44 -0700 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-09-07 13:15:30 +0100 |
commit | 0a28041f4156878a74543966f9a72ed3d214ba44 (patch) | |
tree | d60546b5aa38b135546428d6dbcddff938ec7e58 | |
parent | 085707078097f6def993b20a794001d6c06f1492 (diff) | |
download | hivex-0a28041f4156878a74543966f9a72ed3d214ba44.tar.gz hivex-0a28041f4156878a74543966f9a72ed3d214ba44.tar.xz hivex-0a28041f4156878a74543966f9a72ed3d214ba44.zip |
hivexsh: Conditionally build for Mac OS X
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>
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 8d69c55..dbab38a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,7 +20,11 @@ ACLOCAL_AMFLAGS = -I m4 # 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 diff --git a/configure.ac b/configure.ac index 9d04e35..85dbfdc 100644 --- a/configure.ac +++ b/configure.ac @@ -137,7 +137,7 @@ dnl Check for mmap 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]) @@ -176,6 +176,9 @@ PKG_CHECK_MODULES([LIBXML2], [libxml-2.0]) 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 |