unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
Cc: guile-devel@gnu.org
Subject: Re: What to do about config.h, etc...
Date: Thu, 13 Mar 2003 13:45:57 -0600	[thread overview]
Message-ID: <874r67rqx6.fsf@raven.i.defaultvalue.org> (raw)
In-Reply-To: <87r89mmy32.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Tue, 04 Mar 2003 18:55:13 -0600")

Rob Browning <rlb@defaultvalue.org> writes:

> My initial trial code seems reasonably promising, but this approach
> does introduce the limitation that (without special precautions) we
> can't use AC_DEFINE(GUILE_DEBUG ...) *and* expect to use GUILE_DEBUG
> in our public header -- the two definitions, the one in config.h and
> the one in libguile/scmconfig.h, would conflict.
>
> The solution I'm leaning toward is to just remove the AC_DEFINEs for
> any values we want to make public.  That's probably OK since we have
> to duplicate the AC_DEFINE information in the AC_CONFIG_COMMANDS when
> generating scmconfig.h anyway.  However, this does mean that if there
> are any symbols that configure.in automatically AC_DEFINEs that we
> also want to make public, we'll have to choose another name for the
> public incarnation.

After playing with the AC_CONFIG_COMMANDS approach for a while, I
think I may have to revert to my "generate the public header via a
small C program at build time" approach.  Though the
AC_CONFIG_COMMANDS approach *almost* works, I don't see any way to
handle things like TIME_WITH_SYS_TIME which autoconf automatically
AC_DEFINES when appropriate.  In this case, configure AC_DEFINEs this
value during the processing of AC_HEADER_TIME, and we require that
value, if any, in libguile/stime.h.  i.e. I need to be able to

  #define SCM_TIME_WITH_SYS_TIME 1

when appropriate, but AFAICT there's no way from configure.in to get
access to the value of something that is only AC_DEFINEd.  Note that
TIME_WITH_SYS_TIME isn't the only case, this will be true for any
other implicit AC_DEFINEs.

With the small C program approach, this isn't an issue because we have
direct access to the generated content of config.h via #include.

Suggestions and alternatives welcome...

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2003-03-13 19:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-04 19:04 What to do about config.h, etc Rob Browning
2003-03-04 19:05 ` Andreas Rottmann
2003-03-04 19:53   ` Rob Browning
2003-03-05  0:55   ` Rob Browning
2003-03-13 19:45     ` Rob Browning [this message]
2003-03-14 23:16       ` Kevin Ryde
2003-03-14 23:28       ` Kevin Ryde
2003-03-05 14:18 ` Marius Vollmer
2003-03-06 22:04 ` Kevin Ryde
2003-03-07  5:25   ` Rob Browning
2003-03-11 23:18     ` Kevin Ryde
2003-03-12  3:12       ` Rob Browning

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874r67rqx6.fsf@raven.i.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).