[3294] in Kerberos-V5-bugs
krb5-libs/1039: krb5-config --cflags can produce -I/usr/include
daemon@ATHENA.MIT.EDU (amu@alum.mit.edu)
Fri Jan 11 11:10:06 2002
Resent-From: gnats@rt-11.mit.edu (GNATS Management)
Resent-To: krb5-unassigned@rt-11.mit.edu
Resent-Reply-To: krb5-bugs@MIT.EDU, amu@alum.mit.edu
Message-Id: <E16P4FA-0007Wu-00@tux.internal.ucko.debian.net>
Date: Fri, 11 Jan 2002 11:09:24 -0500
From: amu@alum.mit.edu
To: krb5-bugs@mit.edu
>Number: 1039
>Category: krb5-libs
>Synopsis: krb5-config --cflags can produce -I/usr/include
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Fri Jan 11 11:10:00 EST 2002
>Last-Modified:
>Originator: Aaron M. Ucko
>Organization:
individual
>Release: krb5-1.2.3
>Environment:
Debian/i386 pre-3.0; prefix=/usr
System: Linux tux 2.4.17 #1 SMP Wed Dec 26 20:54:33 EST 2001 i686 unknown
Architecture: i686
>Description:
If Kerberos is installed with a prefix of /usr,
krb5-config --cflags
produces "-I/usr/include". This is a problem on machines
which need GCC's fixincludes or the equivalent, because it
causes the original (broken) system headers to shadow the
fixed headers. There is an analogous issue with
krb5-config --libs
and -L/usr/lib; I don't know of a situation where the
redundant library directory is harmful, but it should probably
go away too.
>How-To-Repeat:
Install Kerberos in /usr and run krb5-config --cflags
>Fix:
Here's a unified diff -b that should make krb5-config avoid
mentioning /usr/include and /usr/lib:
--- krb5-config.in.dist Wed Jan 9 17:26:46 2002
+++ krb5-config.in Fri Jan 11 11:05:42 2002
@@ -162,16 +162,21 @@
$all_exit
fi
-if test -n "$do_cflags"; then
+if test -n "$do_cflags" -a "x$includedir" != "x/usr/include"; then
echo "-I${includedir}"
fi
if test -n "$do_libs"; then
# Ugly gross hack for our build tree
+ case "$libdir" in
+ /lib|/usr/lib) lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//'` ;;
+ *)
lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
-e 's#\$(PROG_RPATH)#'$libdir'#' \
-e 's#\$(PROG_LIBPATH)#-L'$libdir'#'`
+ ;;
+ esac
if test $library = 'kdb'; then
lib_flags="$lib_flags -lkdb5 -ldb"
>Audit-Trail:
>Unformatted: