From: Michael R. Blair Date: Fri, 2 Jun 2006 03:06:56 +0000 (+0000) Subject: Suppress & includes when files are not present. X-Git-Tag: 20090517-FFI~1048 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=bb248546902109b0327b3b8e70d996d370316a08;p=mit-scheme.git Suppress & includes when files are not present. This avoids "makegen.scm" spewing syntactic crud (error/failure messages) into "Makefile.deps" (and thus "Makefile.in" & "Makefile") during the invocation of "./Setup.sh" by virtue of "prmcrypt" and "prmhash" appearing in "makegen/files-optional.scm". Note how "prmd5.c" is already nicely conditionalized on `HAVE_MD5_H'. --- diff --git a/v7/src/microcode/configure.ac b/v7/src/microcode/configure.ac index 9156dd83b..def84186e 100644 --- a/v7/src/microcode/configure.ac +++ b/v7/src/microcode/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([MIT/GNU Scheme], [14.17], [bug-mit-scheme@gnu.org], [mit-scheme]) -AC_REVISION([$Id: configure.ac,v 1.9 2006/04/08 03:07:48 cph Exp $]) +AC_REVISION([$Id: configure.ac,v 1.10 2006/06/02 03:06:56 ihtfisp Exp $]) AC_CONFIG_SRCDIR([boot.c]) AC_CONFIG_HEADERS([config.h]) AC_PROG_MAKE_SET @@ -597,6 +597,15 @@ if test "${scheme_cv_lib_crypto}" = "yes"; then fi fi +dnl These libraries might not be installed, so take care generating +dnl file dependencies using "makegen/makegen.scm" when called on +dnl "makegen/files-optional.scm". To wit, "prmhash.c" & "prmcrypt.c" +dnl must conditionalize their dependencies on & , +dnl respectively, to avoid warnings in "Makefile.deps" and its embeds. +dnl Finally, note that "prmd5.c" is similarly conditionalized as well. +HAVE_LIBMHASH="no" +HAVE_LIBMCRYPT="no" + dnl The mhash library provides md5 support. It can be loaded in addition dnl to other MD5 libraries and provides a rich set of hashes. if test "${scheme_cv_lib_mhash}" = "yes"; then diff --git a/v7/src/microcode/prmcrypt.c b/v7/src/microcode/prmcrypt.c index bf481272f..55bae0d1e 100644 --- a/v7/src/microcode/prmcrypt.c +++ b/v7/src/microcode/prmcrypt.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: prmcrypt.c,v 1.5 2003/02/14 18:28:23 cph Exp $ +$Id: prmcrypt.c,v 1.6 2006/06/02 03:06:56 ihtfisp Exp $ Copyright (c) 2001 Massachusetts Institute of Technology @@ -29,7 +29,15 @@ USA. #include "prims.h" #include "usrdef.h" #include "os.h" -#include + +#ifdef HAVE_MCRYPT_H +# include +#else +/* +** Hack: Dependency suppressed to appease "makegen/makegen.scm". +** This is OK since it cannot link w/o the library anyway. +*/ +#endif static SCHEME_OBJECT cp2s (char * cp) diff --git a/v7/src/microcode/prmhash.c b/v7/src/microcode/prmhash.c index d86d396cc..9ac3046c2 100644 --- a/v7/src/microcode/prmhash.c +++ b/v7/src/microcode/prmhash.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: prmhash.c,v 11.7 2006/03/11 04:13:10 cph Exp $ +$Id: prmhash.c,v 11.8 2006/06/02 03:06:56 ihtfisp Exp $ Copyright (c) 2000-2001 Massachusetts Institute of Technology @@ -29,7 +29,15 @@ USA. #include "prims.h" #include "usrdef.h" #include "os.h" -#include + +#ifdef HAVE_MHASH_H +# include +#else +/* +** Hack: Dependency suppressed to appease "makegen/makegen.scm". +** This is OK since it cannot link w/o the library anyway. +*/ +#endif #define UNARY_OPERATION(name, get_arg, cvt_val) \ { \