From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: Re: What to do about config.h, etc... Date: Thu, 13 Mar 2003 13:45:57 -0600 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <874r67rqx6.fsf@raven.i.defaultvalue.org> References: <87vfyzoswd.fsf@raven.i.defaultvalue.org> <87bs0r3qc0.fsf@alice.rotty.yi.org> <87r89mmy32.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1047584853 23237 80.91.224.249 (13 Mar 2003 19:47:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2003 19:47:33 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Mar 13 20:47:29 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18tYfp-000628-00 for ; Thu, 13 Mar 2003 20:47:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18tYgG-0002Yg-00 for guile-devel@m.gmane.org; Thu, 13 Mar 2003 14:47:56 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18tYf3-0001o0-00 for guile-devel@gnu.org; Thu, 13 Mar 2003 14:46:41 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18tYex-0001gr-00 for guile-devel@gnu.org; Thu, 13 Mar 2003 14:46:36 -0500 Original-Received: from dsl093-098-016.wdc1.dsl.speakeasy.net ([66.93.98.16] helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18tYeQ-0001T2-00 for guile-devel@gnu.org; Thu, 13 Mar 2003 14:46:02 -0500 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 3697740AC; Thu, 13 Mar 2003 13:45:57 -0600 (CST) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 2D588DE756; Thu, 13 Mar 2003 13:45:57 -0600 (CST) Original-To: Andreas Rottmann In-Reply-To: <87r89mmy32.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Tue, 04 Mar 2003 18:55:13 -0600") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2078 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2078 Rob Browning 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