summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-02-19 13:23:45 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-02-19 13:23:45 +0200
commit35ac66f0561ccd6d46f83262d56bebccb83fed40 (patch)
tree7db40bae047d70894415a72d12de7044b84b9137
parent9d392215f9a067fd1951b2d727371fd2f682036a (diff)
downloadmailutils-35ac66f0561ccd6d46f83262d56bebccb83fed40.tar.gz
mailutils-35ac66f0561ccd6d46f83262d56bebccb83fed40.tar.bz2
Work around a libtool bug.
* configure.ac [WITH_GSSAPI]: Remove any -Wl directives from GSSAPI_LIBS.
-rw-r--r--configure.ac21
1 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 84fb2afd6..29a760028 100644
--- a/configure.ac
+++ b/configure.ac
@@ -256,7 +256,26 @@ if test "x$WITH_GSSAPI" != "xno"; then
AC_CACHE_SAVE
AC_MSG_RESULT([GSSAPI libraries not found])
else
- SERV_AUTHLIBS="$SERV_AUTHLIBS $GSSAPI_LIBS"
+ # Output produced by `krb5-config --libs' may contain `-Wl,-rpath -Wl,DIR'
+ # options. Once they are added to SERV_AUTHLIBS, libtool, when creating
+ # relink command line in wrapper files for executables, places them at the
+ # beginnig of the option list and adds its own -rpath directives at
+ # the end. Executables created by such command will look for the runtime
+ # libraries first in DIR and then in the local tree subdirectories. Thus,
+ # if DIR contains libraries from a previous installation of Mailutils, the
+ # programs will use old libraries.
+ #
+ # Obviously, libtool should be fixed to place user-added -rpath directives
+ # after the ones added by it. For the time being I work around this bug by
+ # removing any -Wl directives from GSSAPI_LIBS.
+ #
+ for arg in $GSSAPI_LIBS
+ do
+ case $arg in
+ -Wl,*) ;;
+ *) SERV_AUTHLIBS="$SERV_AUTHLIBS $arg"
+ esac
+ done
SERV_AUTHINCS="$SERV_AUTHINCS $GSSAPI_CFLAGS"
IMAP_AUTHOBJS="$IMAP_AUTHOBJS auth_gss.o"
AC_DEFINE(WITH_GSSAPI,1,[Define if mailutils is using GSSAPI])

Return to:

Send suggestions and report system problems to the System administrator.