From 867e2f90107ba2124ed0542a01a06bb63b0e8860 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 16 Mar 2010 15:50:36 +0100 Subject: [PATCH 02/10] 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 fd6835f..61b7b29 100644 --- a/configure.in +++ b/configure.in @@ -74,6 +74,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 ;; @@ -94,11 +98,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) @@ -966,7 +974,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.7.0