autoconf
[Top][All Lists]
Advanced

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

Re: Question: Configuration Header Templates


From: Jeffrey Walton
Subject: Re: Question: Configuration Header Templates
Date: Mon, 15 Feb 2010 16:32:26 -0500

Hi Eric,

Thanks for the reply.

>
> [SNIP]
>
>> After bootstrap/configure, this produces (in config.h):
>> /* Force the usage of the 64 bits bignum ... */
>> /* #undef PDF_FORCE_BIGNUMS */
>
> That is typical behavior for when a feature was not selected.
Since the #undef is commented, it leads me to believe that BIGNUMS are
in use and one should uncomment to use a built-in 64 bit type. Put
another way, why would one need to #undef something that is not in
use?

>> What I'm looking for (notice the a #define is used, and the define is
>> commented):
>> /* Force the usage of the 64 bits bignum ... */
>> /* #define PDF_FORCE_BIGNUMS */
>
> There is no way to result in a commented #define in config.h.  It is
> either a commented #undef or an uncommented #define. Maybe we need to
> take a step back, and ask why you think you need a commented #define to
> result in config.h?
If BIGNUMS are not being used, I would expect that the comment would
be '#define PDF_FORCE_BIGNUMS' or  '#define PDF_FORCE_BIGNUMS 1'. This
makes sense to me - one should define something a PP symbol if they
want to use the feature.

> Also, are you sure you are testing the use of
> './configure --enable-bignum-forcing'?
I'm not sure about this (I just joined the project). Personally, when
I jump between BIGNUMS or built-ins for testing, I either '#define
PDF_FORCE_BIGNUMS' or I comment it out (and then re-make). I don't
re-configure since the define is available in config.h. I can't speak
for others, or how the testing framework might use the switch.

Also, if it matters: In the code, the conditional compilation occurs
on PDF_USE_BIGNUMS. The PP statements look similar to:
#if defined(x) || defined(y) || !defined( PDF_FORCE_BIGNUMS)
#  define USE_BUILTIN_64
#endif

I think USE_BUILTIN_64 works well, though someone more familiar with
automake (and friends) might [will?] disagree.

Jeff




reply via email to

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