From 27cec9523a5190ed9fd04fa78bba45efdd01f3f8 Mon Sep 17 00:00:00 2001 From: Pete Fotheringham Date: Wed, 30 Nov 2011 17:31:26 +0000 Subject: [PATCH] Link against the Kerberos library in /usr/local instead of the version in /usr --- moonshot/acinclude.m4 | 7 +++++-- moonshot/mech_eap/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/moonshot/acinclude.m4 b/moonshot/acinclude.m4 index 401ad2a..9da57ed 100644 --- a/moonshot/acinclude.m4 +++ b/moonshot/acinclude.m4 @@ -17,17 +17,19 @@ AC_ARG_WITH(krb5, [Use krb5 (in specified installation directory)]), [check_krb5_dir="$withval"], [check_krb5_dir=]) -for dir in $check_krb5_dir $prefix /usr /usr/local ; do +for dir in $check_krb5_dir $prefix /usr/local /usr ; do krb5dir="$dir" if test -x "$dir/bin/krb5-config"; then found_krb5="yes"; if test "x$target_windows" = "xyes"; then KRB5_CFLAGS=-I"$check_krb5_dir/include"; - KRB5_LIBS="-L$check_krb5_dir/lib/ -lkrb5_32 -lgssapi32"; + KRB5_LDFLAGS="-L$check_krb5_dir/lib/"; + KRB5_LIBS="-lkrb5_32 -lgssapi32"; COMPILE_ET="$check_krb5_dir/bin/compile_et"; AC_MSG_RESULT([yes]) else KRB5_CFLAGS=`$dir/bin/krb5-config gssapi --cflags`; + KRB5_LDFLAGS="-L$dir/lib"; KRB5_LIBS=`$dir/bin/krb5-config gssapi --libs` AC_MSG_RESULT([yes]) AC_PATH_PROG(COMPILE_ET, [compile_et], [compile_et], [$dir/bin$PATH_SEPARATOr]) @@ -48,6 +50,7 @@ if test x_$found_krb5 != x_yes; then else printf "Kerberos found in $krb5dir\n"; AC_SUBST(KRB5_CFLAGS) + AC_SUBST(KRB5_LDFLAGS) AC_SUBST(KRB5_LIBS) AC_SUBST(COMPILE_ET) AC_CHECK_LIB(krb5, GSS_C_NT_COMPOSITE_EXPORT, [AC_DEFINE_UNQUOTED([HAVE_GSS_C_NT_COMPOSITE_EXPORT], 1, [Define if GSS-API library supports recent naming extensions draft])], [], "$KRB5_LIBS") diff --git a/moonshot/mech_eap/Makefile.am b/moonshot/mech_eap/Makefile.am index a652182..720f79e 100644 --- a/moonshot/mech_eap/Makefile.am +++ b/moonshot/mech_eap/Makefile.am @@ -42,7 +42,7 @@ mech_eap_la_CXXFLAGS += \ @TARGET_CFLAGS@ $(EAP_CFLAGS) mech_eap_la_LDFLAGS = -avoid-version -module \ -export-symbols $(GSSEAP_EXPORTS) -no-undefined \ - @RADSEC_LDFLAGS@ @OPENSSL_LDFLAGS@ @TARGET_LDFLAGS@ + @KRB5_LDFLAGS@ @RADSEC_LDFLAGS@ @OPENSSL_LDFLAGS@ @TARGET_LDFLAGS@ if TARGET_WINDOWS mech_eap_la_LDFLAGS += -debug endif -- 2.1.4