diff options
author | Alin Gabriel Serdean <aserdean@ovn.org> | 2020-09-24 09:17:23 +0300 |
---|---|---|
committer | Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> | 2020-10-04 22:09:39 +0300 |
commit | 809e13ed21a8e4692734bf63c99ddaf53ff87b1f (patch) | |
tree | 54be94df6882badaea9fccdca2dedfe6efbb053f /m4 | |
parent | a52c073b2fdf35e852cfbe8edc36b4d6937aafb1 (diff) | |
download | openvswitch-809e13ed21a8e4692734bf63c99ddaf53ff87b1f.tar.gz |
windows: Add default value for VSTUDIO_CONFIG
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 <aserdean@ovn.org>
Acked-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/openvswitch.m4 | 90 |
1 files 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. |