From 83e53eb8d0aeed4ecab569e70289c758274da651 Mon Sep 17 00:00:00 2001 From: "Fred L. Drake, Jr." Date: Thu, 1 Mar 2001 03:47:12 +0000 Subject: [PATCH] Sam TH: Only configure makefiles in child directories that exist. [...and added explanation as to why this is useful -- FLD.] This closes SF tracker patch #403585. --- expat/configure.in | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/expat/configure.in b/expat/configure.in index df874e2f..b0e299f3 100644 --- a/expat/configure.in +++ b/expat/configure.in @@ -80,11 +80,26 @@ AC_FUNC_MEMCMP AC_FUNC_MMAP AC_SUBST(FILEMAP_OBJ) if test -z "$HAVE_MMAP"; then -FILEMAP_OBJ=unixfilemap.o + FILEMAP_OBJ=unixfilemap.o else -FILEMAP_OBJ=readfilemap.o + FILEMAP_OBJ=readfilemap.o fi AC_CHECK_FUNCS(memmove bcopy) -AC_OUTPUT(Makefile lib/Makefile lib/expat.h xmlwf/Makefile examples/Makefile) +dnl Generate makefiles only for the directories that are present; +dnl this allows this (and the generated configure script) to work +dnl in "embedded distributions", where only part of the Expat sources +dnl are included in the sources for another project. + +OUTPUT="Makefile lib/Makefile lib/expat.h" +if test -d xmlwf; then + OUTPUT="$OUTPUT xmlwf/Makefile" +fi +if test -d sample; then + OUTPUT="$OUTPUT sample/Makefile" +fi +if test -d examples; then + OUTPUT="$OUTPUT examples/Makefile" +fi +AC_OUTPUT($OUTPUT) -- 2.40.0