From patchwork Thu May 4 16:39:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Jackson X-Patchwork-Id: 9712285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E00A660362 for ; Thu, 4 May 2017 16:40:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0578286BA for ; Thu, 4 May 2017 16:40:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5326286A9; Thu, 4 May 2017 16:40:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E9F9F286B6 for ; Thu, 4 May 2017 16:40:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 646496E522; Thu, 4 May 2017 16:39:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F2526E522 for ; Thu, 4 May 2017 16:39:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD5B04E341 for ; Thu, 4 May 2017 16:39:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CD5B04E341 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ajax@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CD5B04E341 Received: from desoxy.redhat.com (ovpn-123-108.rdu2.redhat.com [10.10.123.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id 839DA7D4F1 for ; Thu, 4 May 2017 16:39:50 +0000 (UTC) From: Adam Jackson To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] configure: Fix the check Date: Thu, 4 May 2017 12:39:50 -0400 Message-Id: <20170504163950.25046-1-ajax@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 May 2017 16:39:50 +0000 (UTC) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP AC_HEADER_MAJOR only defines MAJOR_IN_SYSMACROS if major() is _not_ defined by alone. It is, but it warns, and that's ugly. To fix this, push -Werror into CFLAGS when invoking AC_HEADER_MAJOR so the warning makes the compilation test fail. Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index e5158b7d..43fcf68f 100644 --- a/configure.ac +++ b/configure.ac @@ -54,7 +54,11 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_ALLOCA +save_CFLAGS="$CFLAGS" +export CFLAGS="$CFLAGS -Werror" AC_HEADER_MAJOR +CFLAGS="$save_CFLAGS" + AC_CHECK_HEADERS([sys/sysctl.h sys/select.h]) # Initialize libtool