From 0370d33d3b276e2884236d0b38ae01170c628c8a Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 16 Mar 2010 15:50:36 +0100 Subject: [PATCH 3/9] Add WinCE detection to configure.in and choose right socket library. --- configure.in | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/configure.in b/configure.in index 71e416a..96fd275 100644 --- a/configure.in +++ b/configure.in @@ -72,6 +72,10 @@ AC_PROG_MKDIR_P dbus_win=no dbus_unix=no case "${host}" in + *-mingw32ce*) + dbus_win=yes + dbus_wince=yes + ;; *-mingw32*) dbus_win=yes ;; @@ -92,11 +96,15 @@ if test "$dbus_win" = yes; then if test "$WINDRES" = no; then AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.]) fi + if test "$dbus_wince" = yes; then + AC_DEFINE(DBUS_WINCE,1,[Defined if we run on a W32 CE API based system]) + fi else AC_DEFINE(DBUS_UNIX,1,[Defined if we run on a Unix-based system]) fi AM_CONDITIONAL(DBUS_WIN, test "$dbus_win" = yes) +AM_CONDITIONAL(DBUS_WINCE, test "$dbus_wince" = yes) AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes) AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE) @@ -925,7 +933,11 @@ static int x = SCM_RIGHTS; NETWORK_libs= if test x$dbus_win = xyes ; then - NETWORK_libs="-lws2_32" + if test x$dbus_wince = xyes ; then + NETWORK_libs="-lws2" + else + NETWORK_libs="-lws2_32" + fi fi #### Set up final flags -- 1.6.3.3