From patchwork Sun Apr 4 14:16:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 49351 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by ozlabs.org (Postfix) with ESMTP id B06C3B7C48 for ; Mon, 5 Apr 2010 00:16:54 +1000 (EST) Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 6FF0AAD1E6; Sun, 4 Apr 2010 08:16:54 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-1.6 required=3.8 tests=AWL,BAYES_00,LONGWORDS, NO_MORE_FUNN,SPF_PASS autolearn=no version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.121]) by lists.samba.org (Postfix) with ESMTP id E924EAD1CB for ; Sun, 4 Apr 2010 08:16:47 -0600 (MDT) X-Authority-Analysis: v=1.1 cv=hj1FozfAy03f2h6OmyVtKRmRTx0FcRdqEzJSNo8ldKo= c=1 sm=0 a=cPLuM7BT7jIA:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=20KFwNOVAAAA:8 a=a3Vhu2OVxgXiM92ncIUA:9 a=gnXuxJH0p8mDmRIB2IKufMQOvhEA:4 a=jEp0ucaQiEUA:10 a=ld/erqUjW76FpBUqCqkKeA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 71.70.153.3 Received: from [71.70.153.3] ([71.70.153.3:52409] helo=mail.poochiereds.net) by cdptpa-oedge03.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id 06/87-28114-E4F98BB4; Sun, 04 Apr 2010 14:16:46 +0000 Received: by mail.poochiereds.net (Postfix, from userid 4447) id 63D2658074; Sun, 4 Apr 2010 10:16:46 -0400 (EDT) From: Jeff Layton To: linux-cifs-client@lists.samba.org Date: Sun, 4 Apr 2010 10:16:46 -0400 Message-Id: <1270390606-24071-1-git-send-email-jlayton@samba.org> X-Mailer: git-send-email 1.6.6.1 Subject: [linux-cifs-client] [PATCH] autotools: don't link mount.cifs against krb5 library X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org mount.cifs is being linked against the krb5 library. Fix it so that that doesn't happen. Signed-off-by: Jeff Layton --- Makefile.am | 2 +- configure.ac | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 605206e..9cf25f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ man_MANS = mount.cifs.8 if CONFIG_CIFSUPCALL sbin_PROGRAMS = cifs.upcall cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c util.c -cifs_upcall_LDADD = -ltalloc -lkrb5 -lkeyutils +cifs_upcall_LDADD = -ltalloc -lkeyutils @KRB5_LDADD@ man_MANS += cifs.upcall.8 endif diff --git a/configure.ac b/configure.ac index b621750..a64113a 100644 --- a/configure.ac +++ b/configure.ac @@ -76,7 +76,10 @@ if test $enable_cifsupcall != "no"; then ]) fi if test $enable_cifsupcall != "no"; then - AC_CHECK_LIB([krb5], [krb5_init_context]) + AC_CHECK_LIB([krb5], [krb5_init_context], + [ KRB5_LDADD='-lkrb5' ], + AC_MSG_ERROR([no functioning krb5 library found!])) + AC_SUBST(KRB5_LDADD) fi # Checks for typedefs, structures, and compiler characteristics. @@ -97,6 +100,10 @@ AC_FUNC_STRNLEN # check for required functions AC_CHECK_FUNCS([alarm atexit endpwent getmntent getpass gettimeofday inet_ntop memset realpath setenv strchr strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol strtoul uname], , [AC_MSG_ERROR([necessary functions(s) not found])]) +# ugly, but I'm not sure how to check for functions in a library that's not in $LIBS +cu_saved_libs=$LIBS +LIBS="$LIBS $KRB5_LDADD" + # determine whether we can use MIT's new 'krb5_auth_con_getsendsubkey' to extract the signing key if test $enable_cifsupcall != "no"; then AC_CHECK_FUNCS([krb5_auth_con_getsendsubkey]) @@ -107,6 +114,8 @@ if test $enable_cifsupcall != "no"; then AC_CHECK_FUNCS([krb5_principal_get_realm krb5_free_unparsed_name]) fi +LIBS=$cu_saved_libs + AM_CONDITIONAL(CONFIG_CIFSUPCALL, [test "$enable_cifsupcall" != "no"]) AC_LIBCAP