[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mpsort without <config.h>

From: Denis Excoffier
Subject: Re: mpsort without <config.h>
Date: Fri, 27 Jul 2012 09:07:24 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jul 26, 2012 at 05:21:58PM -0600, Eric Blake wrote:
>> On 07/26/2012 04:48 PM, Denis Excoffier wrote:
>> > Hello,
>> > 
>> > Is it conceivable that in mpsort.c, the line
>> > 
>> > #include <config.h>
>> > 
>> > is (officially) replaced by the three lines
>> > 
>> > #ifdef HAVE_CONFIG_H
>> > # include <config.h>
>> > #endif
>> > 
>> > for those people (like me...) that don't work with <config.h> but prefer 
>> > to keep mpsort.c untouched?
>> > This is already done for other files in gnulib/lib, like eg printf.c or 
>> > mkdir.c
>> Umm, we removed it from mkdir.c in commit 0632e11 in Sep 2006, nearly
>> six years ago.  The only reason printf.c still has it is because that
>> code is shared verbatim with the gettext project.  Use of gnulib
>> normally requires the use of <config.h> (where gettext is the oddball
>> explaining exceptions like printf.c); would you mind explaining more why
>> it is too hard for you to provide even a dummy empty config.h?

I usually create packages that depend on some other packages, eg GMP is
a common dependency. Since i don't deliver GMP as a part of my own
packages, i have to explain to my users that *they* have to provide
the (well-known) GMP package (in some version), and set up the
appropriate -I and -L in order to compile and link successfully.

Therefore i use #include <gmp.h> in my source code. That way, i don't
track for include dependencies in my Makefiles: it is a means to point
"outside" my contribution.

Similar, if i include <config.h>, *they* (i mean: my users, not me)
have to provide a working configuration in order that <config.h> is
properly included, and in this case at least an appropriate -I will be

It is not too hard to provide an empty config.h, it is impossible from
my package. Instead, i will have to provide a separate package with
no functionality at all, named e.g. CONFIG, with "config.h" as the
only file in it. And explain to my users that they have to link with
it. Feasible of course, but i would be more reasonable to directly
remove #include <config.h> from mpsort.c in this case.

As a summary, i wish to be a user of (some) gnulib software, without
being also a user of the ./configure etc. usual mechanism. I
understand that it might not be the right philosophy.


Denis Excoffier.

>> -- 
>> Eric Blake   address@hidden    +1-919-301-3266
>> Libvirt virtualization library http://libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]