From patchwork Thu Sep 24 06:17:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin-Gabriel Serdean X-Patchwork-Id: 1370296 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BxlG36fB3z9s1t for ; Thu, 24 Sep 2020 16:17:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2108386AEE; Thu, 24 Sep 2020 06:17:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UlD4Qb243u8D; Thu, 24 Sep 2020 06:17:45 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 3814085B36; Thu, 24 Sep 2020 06:17:45 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1FA97C0859; Thu, 24 Sep 2020 06:17:45 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id EAA37C0051 for ; Thu, 24 Sep 2020 06:17:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E687186AED for ; Thu, 24 Sep 2020 06:17:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kq8AQUiw3xwy for ; Thu, 24 Sep 2020 06:17:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9003B85B36 for ; Thu, 24 Sep 2020 06:17:42 +0000 (UTC) Received: from localhost.localdomain (unknown [89.137.184.67]) (Authenticated sender: aserdean@ovn.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 9EE3C100006 for ; Thu, 24 Sep 2020 06:17:38 +0000 (UTC) From: Alin Gabriel Serdean To: ovs-dev@openvswitch.org Date: Thu, 24 Sep 2020 09:17:23 +0300 Message-Id: <20200924061723.1905-1-aserdean@ovn.org> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH v3 2/8] windows: Add default value for VSTUDIO_CONFIG X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" VSTUDIO_CONFIG is used when generating the windows installer. If the parameter passed to configure `--with-vstudiotarget` is not specified to configure we default it to `Default`. Fixes bug: vstudiotarget/vstudiotargetver should be available only on Windows. Signed-off-by: Alin Gabriel Serdean --- m4/openvswitch.m4 | 90 +++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 6fe79297e..907e6b060 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -146,51 +146,51 @@ dnl OVS_CHECK_WINDOWS dnl dnl Configure Visual Studio solution build AC_DEFUN([OVS_CHECK_VISUAL_STUDIO_DDK], [ -AC_ARG_WITH([vstudiotarget], - [AS_HELP_STRING([--with-vstudiotarget=target_type], - [Target type: Debug/Release])], - [ - case "$withval" in - "Release") ;; - "Debug") ;; - *) AC_MSG_ERROR([No valid Visual Studio configuration found]) ;; - esac - - VSTUDIO_CONFIG=$withval - ], [ - VSTUDIO_CONFIG= - ] - ) - - AC_SUBST([VSTUDIO_CONFIG]) - -AC_ARG_WITH([vstudiotargetver], - [AS_HELP_STRING([--with-vstudiotargetver=target_ver1,target_ver2], - [Target versions: Win8,Win8.1,Win10])], - [ - targetver=`echo "$withval" | tr -s , ' ' ` - for ver in $targetver; do - case "$ver" in - "Win8") VSTUDIO_WIN8=true ;; - "Win8.1") VSTUDIO_WIN8_1=true ;; - "Win10") VSTUDIO_WIN10=true ;; - *) AC_MSG_ERROR([No valid Visual Studio target version found]) ;; - esac - done - - ], [ - VSTUDIO_WIN8=true - VSTUDIO_WIN8_1=true - VSTUDIO_WIN10=true - ] - ) - - AM_CONDITIONAL([VSTUDIO_WIN8], [test -n "$VSTUDIO_WIN8"]) - AM_CONDITIONAL([VSTUDIO_WIN8_1], [test -n "$VSTUDIO_WIN8_1"]) - AM_CONDITIONAL([VSTUDIO_WIN10], [test -n "$VSTUDIO_WIN10"]) - - AC_DEFINE([VSTUDIO_DDK], [1], [System uses the Visual Studio build target.]) - AM_CONDITIONAL([VSTUDIO_DDK], [test -n "$VSTUDIO_CONFIG"]) +if test "$WIN32" = yes; then + AC_ARG_WITH([vstudiotarget], + [AS_HELP_STRING([--with-vstudiotarget=target_type], + [Target type: Debug/Release])], + [ + case "$withval" in + "Release") ;; + "Debug") ;; + *) AC_MSG_ERROR([No valid Visual Studio configuration found]) ;; + esac + + VSTUDIO_CONFIG=$withval + ], [ + VSTUDIO_CONFIG="Debug" + ] + ) + + AC_SUBST([VSTUDIO_CONFIG]) + + AC_ARG_WITH([vstudiotargetver], + [AS_HELP_STRING([--with-vstudiotargetver=target_ver1,target_ver2], + [Target versions: Win8,Win8.1,Win10])], + [ + targetver=`echo "$withval" | tr -s , ' ' ` + for ver in $targetver; do + case "$ver" in + "Win8") VSTUDIO_WIN8=true ;; + "Win8.1") VSTUDIO_WIN8_1=true ;; + "Win10") VSTUDIO_WIN10=true ;; + *) AC_MSG_ERROR([No valid Visual Studio target version found]) ;; + esac + done + + ], [ + VSTUDIO_WIN8=true + VSTUDIO_WIN8_1=true + VSTUDIO_WIN10=true + ] + ) + AC_DEFINE([VSTUDIO_DDK], [1], [System uses the Visual Studio build target.]) +fi +AM_CONDITIONAL([VSTUDIO_WIN8], [test -n "$VSTUDIO_WIN8"]) +AM_CONDITIONAL([VSTUDIO_WIN8_1], [test -n "$VSTUDIO_WIN8_1"]) +AM_CONDITIONAL([VSTUDIO_WIN10], [test -n "$VSTUDIO_WIN10"]) +AM_CONDITIONAL([VSTUDIO_DDK], [test -n "$VSTUDIO_CONFIG"]) ]) dnl Checks for Netlink support.