For all I'll write below, keep in mind that my autoconf knowledge is fairly limited...


I'm surprised that pkg-config is causing that much trouble. It's used by the guile sources to build guile. So I would expect any system that ships guile also has a compatible version of pkg-config. (I'm not a Guile core dev, but I have worked on getting guile to compile on Windows for the GnuCash project).


I suspect the problems arise from the fact that PGK_CONFIG is inside an if/then construct. I found references that this might cause problems (1).


I have rewritten the code a bit to use AS_IF instead of plain if/then/else, as suggested on that page. You can find my patch here:


Can you try this and see if the expansion issues go away ? The patch is not complete yet, but I'd like to know if it's worth continuing in this direction.


On Saturday 04 May 2013 00:20:54 William S Fulton wrote:


> Some questions:

> - Why was guile-config dropped? It still seems to work okay.

It wasn't working properly when I tried it for guile 2. I'm smarter now than I was when I started this and meanwhile I have found it was mostly used improperly already in the existing configure script. The way guile was installed before 2.0, this didn't cause any issues. But for 2.0 it broke configure. Given that guile in its documentation recommends using pkg-config (2) and not knowing how to invoke guile-config properly for guile 2.0, I decided to go try pkg-config. The guile-config tool is still there in guile 2.0, but I'm not sure if it will remain so.


> - Why isn't PKG_PROG_PKG_CONFIG() used instead of AC_PATH_PROG to look

> for pkg config? Surely that macro will know how to look for the

> appropriately named pkg config program. Using it (when a min version is

> given as a parameter) will also give a much more obvious error as to

> what is wrong if the autoconf macros are not available.

This shows my limited autoconf knowledge. The test for pkg-config was copied from the GnuCash project. I now think the GnuCash config file may be due for some updates.

> - Shouldn't we still be using guile-config if pkg-config does not find

> guile. It looks like it provides the same info we require and can

> probably be mapped to the same GUILExxx variables needed for the makefiles.


In my most recent patch, I have used the autoconf macros provided by guile (which internally depend on pkg-config).

For guile 1.8, the GUILE_FLAGS macro will call guile-config behind the scenes so in the end with guile 1.8 the relevant information comes from the same source. For guile 2.0 this is no longer true. Clearly the guile developers are moving away from guile-config in favour of pkg-config.


So in my opinion getting the pkg-based configuration working properly will be better in the long term.


By the way, I won't be available from Sunday till Friday, so future reactions may come only after that.




(1) For example in section 3.4 on this page: