After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353399 - configure.in results in config.h with ${prefix} literal
configure.in results in config.h with ${prefix} literal
Status: RESOLVED DUPLICATE of bug 356616
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-29 13:33 UTC by Willie Walker
Modified: 2006-09-18 20:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Patch to expand ${prefix} in config.h (1.33 KB, patch)
2006-08-29 13:37 UTC, Willie Walker
none Details | Review

Description Willie Walker 2006-08-29 13:33:03 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.
Comment 1 Willie Walker 2006-08-29 13:37:58 UTC
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.
Comment 2 Pat Suwalski 2006-08-30 04:44:06 UTC
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."
Comment 3 Willie Walker 2006-08-30 13:28:47 UTC
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! 
Comment 4 Pat Suwalski 2006-08-30 13:55:45 UTC
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
Comment 5 Behdad Esfahbod 2006-08-30 15:52:20 UTC
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.
Comment 6 Behdad Esfahbod 2006-09-18 20:22:20 UTC

*** This bug has been marked as a duplicate of 356616 ***