[Patches] [Patch #101298] Enable Py_DEBUG via configure

noreply@sourceforge.net noreply@sourceforge.net
Tue, 29 Aug 2000 09:31:46 -0700


Patch #101298 has been updated. 

Project: 
Category: Build
Status: Open
Summary: Enable Py_DEBUG via configure

Follow-Ups:

Date: 2000-Aug-25 06:07
By: montanaro

Comment:
Assigned to Thomas so he doesn't need to keep editing
config.h manually. ;-)

-------------------------------------------------------

Date: 2000-Aug-25 14:38
By: twouters

Comment:
Looks fine to me, though I would expand the 'help' message for this option a bit. State that it is for 'extensive debugging of the Python interpreter' or some such. And as far as I'm concerned, it's accepted.

Oh, wait, not quite accepted: don't edit config.h.in manually. Edit acconfig.h to add a specific comment to a #define (just add the #define and the comment to that file) and then 'autoheader' will create config.h.in just like 'autoconf' creates configure from configure.in. (If the define is not present in acconfig.h, but is set in configure.in, a generic comment is used instead.)


-------------------------------------------------------

Date: 2000-Aug-25 15:35
By: montanaro

Comment:
I've never used autoheader before.  Simpleminded usage:

    autoheader acconfig.h > config.h.in

fails with

    % autoheader acconfig.h
    error: AC_CONFIG_HEADER not found in acconfig.h

Trying it with no args yields

    % autoheader
    /usr/bin/autoheader: Symbol `WITH_LIBDB' is not covered\
      by /usr/share/autoconf/acconfig.h ./acconfig.h

Of course, there is no autoheader man page or info file on my system.  What's the magic incantation?

-------------------------------------------------------

Date: 2000-Aug-26 04:00
By: twouters

Comment:
You don't need to redirect the output of 'autoheader' (or 'autoconf' for that matter!) but you *are* apparently missing something important from acconfig.h. This is probably related to the other patches you have lying around :)

If you *do* pass an argument to autoheader, the argument should be the configure.in file, not the acconfig.h file. The config.h.in file is generated from configure.in (by looking at what defines it sets) with help from acconfig.h. My earlier statement that 'a generic comment will be used if a #define is missing from acconfig.h' was probably a bit misleading, though: it's not that simple.

Autoheader uses *two* acconfig.h files: a system-wide one, and the local one. The system-wide one contains the #defines & comments for the most common checks, but if you set one in configure.in which isn't in the global acconfig.h yet, you have to add it to the local acconfig.h yourself.

In addition to the two acconfig.h files, autoheader also tries to figure out what #defines you set and auto-generates comments for those: the defines set by AC_CHECK_LIB(S), AC_CHECK_HEADERS, etc, are added automatically, unless they already exist in acconfig.h (in which case, the comment in acconfig.h is used instead of the generated one.)

The error you get, about WITH_LIBDB, probably means you need to add WITH_LIBDB to acconfig.h. 

Oh, and no, there isn't a manpage for autoheader and autoconf, because it's GNU, and documentation on GNU software is primarily 'info'. You have to be lucky to get manpages :-S And 'info autoheader' won't work, because it's a command and not a package: you need to use 'info autoconf', and then look for autoheader (using 's').

That said, do you want me to grab your patch, fix it up and commit it, or do you want to give it a shot yourself ?
-------------------------------------------------------

Date: 2000-Aug-26 10:22
By: montanaro

Comment:
Here's an updated version that includes acconfig.h.
config.h.in was generated by autoheader.  You should be able
to apply this patch but will probably get some offset
warnings from patch because I snipped out a couple other
changes.  Diffs for configure aren't included here.  I will
generate a proper configure file when checking this in.

-------------------------------------------------------

Date: 2000-Aug-26 10:23
By: montanaro

Comment:
oh bother ... I forgot C-x C-s after trimming the patch... 
-------------------------------------------------------

Date: 2000-Aug-29 09:31
By: marangoz

Comment:
+1; looks good and works as expected on Linux.
Side note: you needn't to include config.h.in in the patch --
this file is generated by autoheader from acconfig.h
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101298&group_id=5470