Bug 9056 - configure always defines PREFIX_INCLUDE_DIR
Summary: configure always defines PREFIX_INCLUDE_DIR
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 3.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-25 00:16 UTC by fcusack
Modified: 2003-08-07 15:13 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-06-16 18:28:48


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fcusack 2002-12-25 00:16:00 UTC
This bit from gcc/configure.in:

if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
  AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include")
fi

always includes $prefix/include.  (The condition can never
be false.)

Also, why is this always set?  This makes gcc
unbuildable in my environment (including in $prefix/include
requires linking against $prefix/lib, which I don't want).

Release:
3.2.1
Comment 1 fcusack 2002-12-25 00:16:00 UTC
Fix:
if test "$prefix" == "/usr" || test "$prefix" == "/usr/local" ; then
  :
else
  AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include")
fi
Comment 2 Dara Hazeghi 2003-05-26 21:44:34 UTC
Hello,

visual verification of sources on gcc 3.3 branch and mainline (20030524) show that this problem is 
still present. Would it be possible for you to make a formal patch for this problem, attach it to the 
bug report, and send it to gcc-patches for review? Thanks,

Dara
Comment 3 Andrew Pinski 2003-05-26 21:47:23 UTC
See Dara's question.
Comment 4 Dara Hazeghi 2003-06-16 18:28:48 UTC
Shouldn't be in WAITING...
Comment 5 Andrew Pinski 2003-08-07 15:13:22 UTC
We are want prefix to be inlcuded always with gcc since people install software them 
selves (not being root) so including $prefix/include is usefull for this.
Actually this condition can be false when $prefix is either /usr/local (which happens a lot) 
or /usr (happens when building the system compiler).