[Spice-devel,usbredir,1/6] configure: Windows: ignore usbredirserver and usbredirtestclient subdirs

Submitted by Uri Lublin on May 3, 2012, 3:04 p.m.

Details

Message ID 1336057479-22629-2-git-send-email-uril@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Uri Lublin May 3, 2012, 3:04 p.m.
---
 Makefile.am  |    5 ++++-
 configure.ac |   14 ++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/Makefile.am b/Makefile.am
index 9d392d5..6b77127 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,2 +1,5 @@ 
-SUBDIRS = usbredirparser usbredirhost usbredirserver usbredirtestclient
+SUBDIRS = usbredirparser usbredirhost
+if ! OS_WIN32
+SUBDIRS += usbredirserver  usbredirtestclient
+endif
 EXTRA_DIST = README.multi-thread usb-redirection-protocol.txt
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 8c72972..e561d52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,19 @@  AC_PROG_LN_S
 LT_INIT
 dnl AC_DEFINE(_GNU_SOURCE, [1], [Enable GNU extensions])

+AC_MSG_CHECKING([for native Win32])
+echo "host is $host"
+case "$host" in
+     *mingw*|*cygwin*)
+        os_win32=yes
+        ;;
+     *)
+        os_win32=no
+        ;;
+esac
+AC_MSG_RESULT([$os_win32])
+AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
+
 # Set some sane default CFLAGS, avoid having to do another release like 0.4.1
 if test "$ac_test_CFLAGS" != set; then
   DEFAULT_CFLAGS="-Wall -Werror -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4"
@@ -44,6 +57,7 @@  fi
 PKG_PROG_PKG_CONFIG
 PKG_CHECK_MODULES(LIBUSB, [libusb-1.0 >= 1.0.9])

+
 AC_CONFIG_FILES([
 Makefile
 usbredirhost/Makefile

Comments

What's wrong with the test client on Windows? The socket code?

ACK (another extra whitespace change though)

Christophe

On Thu, May 03, 2012 at 06:04:34PM +0300, Uri Lublin wrote:
> ---
>  Makefile.am  |    5 ++++-
>  configure.ac |   14 ++++++++++++++
>  2 files changed, 18 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 9d392d5..6b77127 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,2 +1,5 @@
> -SUBDIRS = usbredirparser usbredirhost usbredirserver usbredirtestclient
> +SUBDIRS = usbredirparser usbredirhost
> +if ! OS_WIN32
> +SUBDIRS += usbredirserver  usbredirtestclient
> +endif
>  EXTRA_DIST = README.multi-thread usb-redirection-protocol.txt
> \ No newline at end of file
> diff --git a/configure.ac b/configure.ac
> index 8c72972..e561d52 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -26,6 +26,19 @@ AC_PROG_LN_S
>  LT_INIT
>  dnl AC_DEFINE(_GNU_SOURCE, [1], [Enable GNU extensions])
> 
> +AC_MSG_CHECKING([for native Win32])
> +echo "host is $host"
> +case "$host" in
> +     *mingw*|*cygwin*)
> +        os_win32=yes
> +        ;;
> +     *)
> +        os_win32=no
> +        ;;
> +esac
> +AC_MSG_RESULT([$os_win32])
> +AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
> +
>  # Set some sane default CFLAGS, avoid having to do another release like 0.4.1
>  if test "$ac_test_CFLAGS" != set; then
>    DEFAULT_CFLAGS="-Wall -Werror -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4"
> @@ -44,6 +57,7 @@ fi
>  PKG_PROG_PKG_CONFIG
>  PKG_CHECK_MODULES(LIBUSB, [libusb-1.0 >= 1.0.9])
> 
> +
>  AC_CONFIG_FILES([
>  Makefile
>  usbredirhost/Makefile
> -- 
> 1.7.7.6
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
On 05/03/2012 06:48 PM, Christophe Fergeau wrote:
> What's wrong with the test client on Windows? The socket code?
>


I spent some time trying to make usbredirtestclient to work on Windows, 
but not too much.
Various things needs to be ported (some are as easy as adding an 
include, some not as easy):
1. Socket (need to include winsock2.h and ws2tcpip.h, and possibly add 
something to the link command)
2. sigaction -- replace with signal
3. #undef interface (apparently it is defined)
4. #define _POSIX for signal values
5. "The *AI_NUMERICSERV* flag is defined on Windows SDK for 
Windows Vista and later"
6. more

Thanks,
     Uri.
On Mon, May 14, 2012 at 10:22:52PM +0300, Uri Lublin wrote:
> On 05/03/2012 06:48 PM, Christophe Fergeau wrote:
> >What's wrong with the test client on Windows? The socket code?
> >
> 
> 
> I spent some time trying to make usbredirtestclient to work on
> Windows, but not too much.
> Various things needs to be ported (some are as easy as adding an
> include, some not as easy):
> 1. Socket (need to include winsock2.h and ws2tcpip.h, and possibly
> add something to the link command)
> 2. sigaction -- replace with signal
> 3. #undef interface (apparently it is defined)
> 4. #define _POSIX for signal values
> 5. "The *AI_NUMERICSERV* flag is defined on Windows SDK for Windows
> Vista and later"
> 6. more

Can you add this kind of explanations to the log message? This will make it
clear why it was disabled in case this is no longer an issue years in the
future, and someone wonders why we disabled it back in the days.

Christophe