krb5-config --libs: include rpath like MIT
This commit is contained in:
@@ -25,6 +25,7 @@ endif
|
|||||||
|
|
||||||
subst = sed -e "s!@PACKAGE\@!$(PACKAGE)!g" \
|
subst = sed -e "s!@PACKAGE\@!$(PACKAGE)!g" \
|
||||||
-e "s!@VERSION\@!$(VERSION)!g" \
|
-e "s!@VERSION\@!$(VERSION)!g" \
|
||||||
|
-e "s!@CANONICAL_HOST\@!$(CANONICAL_HOST)!g" \
|
||||||
-e "s!@prefix\@!$(prefix)!g" \
|
-e "s!@prefix\@!$(prefix)!g" \
|
||||||
-e "s!@exec_prefix\@!$(exec_prefix)!g" \
|
-e "s!@exec_prefix\@!$(exec_prefix)!g" \
|
||||||
-e "s!@libdir\@!$(libdir)!g" \
|
-e "s!@libdir\@!$(libdir)!g" \
|
||||||
|
@@ -60,7 +60,9 @@ Print the exec-prefix if no
|
|||||||
is specified, otherwise set exec-prefix to
|
is specified, otherwise set exec-prefix to
|
||||||
.Ar dir .
|
.Ar dir .
|
||||||
.It Fl Fl libs
|
.It Fl Fl libs
|
||||||
Output the set of libraries that should be linked against.
|
Output the set of libraries that should be linked against. This also
|
||||||
|
includes rpath flags with the expectation that the C compiler is used
|
||||||
|
for final link-edits.
|
||||||
.It Fl Fl cflags
|
.It Fl Fl cflags
|
||||||
Output the set of flags to give to the C compiler when using the
|
Output the set of flags to give to the C compiler when using the
|
||||||
Heimdal libraries.
|
Heimdal libraries.
|
||||||
|
@@ -168,6 +168,36 @@ if test "$print_exec_prefix" = "yes"; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The following rpath_flag setting code is distilled from MIT Kerberos'
|
||||||
|
# src/config/shlib.conf. Some of this seems ancient and likely to be
|
||||||
|
# wrong in some cases, but right for all the cases we probably care
|
||||||
|
# about. Also, this will very likely be wrong depending on how the
|
||||||
|
# caller will be doing link-edits (with what compiler-driver or
|
||||||
|
# link-editor)! There's no fixing this.
|
||||||
|
#
|
||||||
|
# In principle this doesn't belong here: application should instead use
|
||||||
|
# krb5-config --libdir to get the directory to use for the rpath, then
|
||||||
|
# workout the rpath flags on their own. Of course, there's no --libdir
|
||||||
|
# option... And MIT's krb5-config does include rpath flags.
|
||||||
|
#
|
||||||
|
# Compatibility with MIT is the winning consideration for now.
|
||||||
|
case "@CANONICAL_HOST@" in
|
||||||
|
alpha*-dec-osf*)
|
||||||
|
rpath_flag='-Wl,-rpath -Wl,';;
|
||||||
|
*-*-hpux*)
|
||||||
|
rpath_flag='-Wl,+b,';;
|
||||||
|
*-*-irix* | mips-*-netbsd*)
|
||||||
|
rpath_flag='-Wl,-rpath -Wl,';;
|
||||||
|
*-*-netbsd* | *-*-openbsd* | *-*-solaris*)
|
||||||
|
rpath_flag='-R';;
|
||||||
|
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-freebsd*)
|
||||||
|
rpath_flag='-Wl,--enable-new-dtags -Wl,-rpath -Wl,';;
|
||||||
|
*-*-aix*)
|
||||||
|
rpath_flag='-Wl,-blibpath:';;
|
||||||
|
*)
|
||||||
|
rpath_flag=;;
|
||||||
|
esac
|
||||||
|
|
||||||
if test "$do_libs" = "yes"; then
|
if test "$do_libs" = "yes"; then
|
||||||
deplibs=""
|
deplibs=""
|
||||||
if test "$lib_gssapi" = yes; then
|
if test "$lib_gssapi" = yes; then
|
||||||
@@ -208,6 +238,9 @@ if test "$do_libs" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
if test X"$libdir" != X/usr/lib; then
|
if test X"$libdir" != X/usr/lib; then
|
||||||
lib_flags="-L${libdir} $lib_flags"
|
lib_flags="-L${libdir} $lib_flags"
|
||||||
|
if test X"$rpath_flag" != X; then
|
||||||
|
lib_flags="${rpath_flag}${libdir} $lib_flags"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ${lib_flags}
|
echo ${lib_flags}
|
||||||
|
Reference in New Issue
Block a user