Hi Aleks.
Attached is a merge directive with the implementation of FS#113:
http://www.gnupdf.org/flyspray/index.php?do=details&task_id=113
Basically, just made sure that pdf.h includes the proper
PDF_HAVE_* symbols defined before actually using them.
A new template was added (pdf-config.h.in) which gets populated
with the proper symbol values once ./configure is run. The
generated pdf-config.h with all these 'public' symbol definitions
is then included at the beginning of pdf.h.
I think that we could avoid the usage of AC_SUBST and thus the need of
maintaining the *_SUBST variables.
If we turn src/pdf-config.h.in into a headers template like:
-- begin of src/pdf-config.h.in
...
/* Set to 1 if forcing bignums. */
#undef PDF_FORCE_BIGNUMS
/* Set to 1 if ... */
#undef PDF_...
...
-- end of src/pdf-config.h.in
then we can ask the configure script to rewrite it into
src/pdf-config.h:
AM_CONFIG_HEADER([src/config.h src/pdf-config.h])
In that way both header files will be generated from the same macros
(AC_DEFINE, AC_CHECK_HEADER, etc). The difference is that while
config.h.in is generated by autoheder (that scans the configure.ac
file and thus also includes templates for the HAVE_* and the gnulib
defines) pdf-config.h.in would be maintained by hand, only including
the defines that we want to deploy in pdf.h.
Oh, BTW, also changed the behavior of AC_OUTPUT in configure.ac,
as passing arguments to AC_OUTPUT is deprecated.
Can you re-submit that one in a separated patch?
Thanks.
--
Jose E. Marchesi [email protected]
GNU Project http://www.gnu.org