Alex Nelson
2011-Sep-07 03:42 UTC
[Libguestfs] [PATCH] 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 at cs.ucsc.edu> --- Makefile.am | 6 +++++- configure.ac | 4 ++++ 2 files changed, 9 insertions(+), 1 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 d7520e7..ce9dd48 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,7 @@ AC_CHECK_HEADERS([byteswap.h endian.h libintl.h]) dnl Functions. AC_CHECK_FUNCS([bindtextdomain]) +AC_CHECK_FUNCS([open_memstream]) dnl Check for pod2man and pod2text. AC_CHECK_PROG([POD2MAN],[pod2man],[pod2man],[no]) @@ -173,6 +174,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 -- 1.7.4.4
Richard W.M. Jones
2011-Sep-07 12:15 UTC
[Libguestfs] [PATCH] hivexsh: Conditionally build for Mac OS X
On Tue, Sep 06, 2011 at 08:42:44PM -0700, Alex Nelson wrote:> 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 at cs.ucsc.edu>Applied and pushed, thanks.> AC_CHECK_FUNCS([bindtextdomain]) > +AC_CHECK_FUNCS([open_memstream])I changed this to a single command. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Seemingly Similar Threads
- Re: Notes on getting libguestfs to work on Mac OS X
- Notes on getting libguestfs to work on Mac OS X
- [PATCH 0/3] hivex: Improve OS X support
- [PATCH 01/27] build: Make OCaml compiler required for all builds.
- Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.