GNOME Bugzilla – Bug 353399
configure.in results in config.h with ${prefix} literal
Last modified: 2006-09-18 20:22:20 UTC
When one runs configure.in, it will create a config.h file that contains defines similar to the following: #define DATADIR "${prefix}/share" ... #define LOCALEDIR "${prefix}/share/locale" Given that this is a header file, ${prefix} should be expanded. If this is not done, bad things can happen, such as VTE not finding a needed termcap file and then SEGV'ing.
Created attachment 71830 [details] [review] Patch to expand ${prefix} in config.h With this patch, one can now build vte and run it without it SEGV'ing.
This solution is a little gross. I'm looking into a better solution since my project, Celestia, has the same issue with automake-1.9. From the autoconf manual: "A corollary is that you should not use these variables except in Makefiles. For instance, instead of trying to evaluate datadir in `configure' and hard-coding it in Makefiles using e.g., `AC_DEFINE_UNQUOTED(DATADIR, "$datadir")', you should add `-DDATADIR="$(datadir)"' to your CPPFLAGS."
Sounds fine to me. Automake/autogen are still a bit of a mysterious black box to me, so it all looks gross and distasteful to me. :-) If you come up with a prettier solution, all the better!
After I posted Comment #2, I asked on automake-list. The reply has a wealth of information on the subject. I'll share it here: http://lists.gnu.org/archive/html/automake/2006-08/msg00100.html
Thanks Pat for sharing. I think I'll go with a separate header file. Wondering if we should do a GnomeGoal on these kind of stuff.
*** This bug has been marked as a duplicate of 356616 ***