From patchwork Thu Dec 20 12:50:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 1899651 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 25F713FC64 for ; Thu, 20 Dec 2012 12:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751758Ab2LTM5X (ORCPT ); Thu, 20 Dec 2012 07:57:23 -0500 Received: from mail-yh0-f54.google.com ([209.85.213.54]:56714 "EHLO mail-yh0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727Ab2LTM5X (ORCPT ); Thu, 20 Dec 2012 07:57:23 -0500 Received: by mail-yh0-f54.google.com with SMTP id s35so734155yhf.27 for ; Thu, 20 Dec 2012 04:57:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=g02qa8OL4BMQGFyiyJ73oetCf5uQHpDA3Bek1rZHZLQ=; b=KkwggbxX+j8FQPwX9VBw0HmsiN+ZFVzLAg1gcu32ZQK7BriR+oFw0ahG4clazqkGht e6kVAo3qpmSjsmjnVrjBCyZKekbOwwQL5mjGJUt2lsU9Uuw1RDg9sWIuMHCHq/D+V/pW 9iTghEjF8zRguk42xRdzm6qIWYU/0Y87VszkP8QS33uoiya5IhQ+gfvxOTMpc36ykqhE PvSYOc/g3fzCwRMRFRzytshpU6exlzqJH2mhs7LyeR4MmAda09bVextzsEpthwLZTf9i ZJoIYmMrkWhmvvJHQMXdXvRcyNux2BBkFE4fRMuJ8JsFgwjKe2vP7hAtsGmXF1n1KqmI qd4w== X-Received: by 10.236.118.193 with SMTP id l41mr9226619yhh.50.1356007847078; Thu, 20 Dec 2012 04:50:47 -0800 (PST) Received: from salusa.poochiereds.net (cpe-107-015-113-143.nc.res.rr.com. [107.15.113.143]) by mx.google.com with ESMTPS id n40sm6835481ani.16.2012.12.20.04.50.45 (version=SSLv3 cipher=OTHER); Thu, 20 Dec 2012 04:50:46 -0800 (PST) From: Jeff Layton To: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Subject: [PATCH v3 4/6] cifs-utils: add autoconf test for WBC_ID_TYPE_BOTH Date: Thu, 20 Dec 2012 07:50:31 -0500 Message-Id: <1356007833-10893-5-git-send-email-jlayton@samba.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1356007833-10893-1-git-send-email-jlayton@samba.org> References: <1356007833-10893-1-git-send-email-jlayton@samba.org> X-Gm-Message-State: ALoCoQneKv5eJg/uoc02mKmk2ymnijxVNitxQBuQFRnAv18Qf40ogVICAbkYIEqfMJViJgEqUukA Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org WBC_ID_TYPE_BOTH is a new addition (in Samba 4.0 only). Add a test for its presence. Because it's an enum, we have to jump through some extra hoops here... Signed-off-by: Jeff Layton --- aclocal/idmap.m4 | 15 +++++++++++++++ configure.ac | 3 +++ 2 files changed, 18 insertions(+) diff --git a/aclocal/idmap.m4 b/aclocal/idmap.m4 index 70a0649..939a901 100644 --- a/aclocal/idmap.m4 +++ b/aclocal/idmap.m4 @@ -1,5 +1,6 @@ dnl Check for wbclient package dnl + AC_DEFUN([AC_TEST_WBCHL],[ if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then PKG_CHECK_MODULES(WBCLIENT, wbclient, , [ @@ -29,3 +30,17 @@ if test $enable_cifsacl != "no"; then ], [ ]) fi ]) + +AC_DEFUN([AC_TEST_WBC_IDMAP_BOTH],[ + AC_MSG_CHECKING([whether WBC_ID_TYPE_BOTH enum value is defined]) + AC_LANG_PUSH([C]) + ac_wbc_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $WBCLIENT_CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include +#include +#include ], [enum wbcIdType id = WBC_ID_TYPE_BOTH;])], + AC_DEFINE(HAVE_WBC_ID_TYPE_BOTH, 1, [Does wbclient.h have a WBC_ID_TYPE_BOTH enum?]) + AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) + CFLAGS=$ac_wbc_save_CFLAGS + AC_LANG_POP([C]) +]) diff --git a/configure.ac b/configure.ac index 9652ad2..209bff2 100644 --- a/configure.ac +++ b/configure.ac @@ -197,6 +197,9 @@ fi # checks for wbclient.h and libwbclient.so library AC_TEST_WBCHL +# test for presence of WBC_ID_TYPE_BOTH enum value +AC_TEST_WBC_IDMAP_BOTH + if test $enable_cifscreds != "no"; then AC_CHECK_HEADERS([keyutils.h], , [