Add WinCE detection to configure.in and choose right socket library.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Tue, 16 Mar 2010 14:50:36 +0000 (15:50 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 13 Apr 2010 18:11:07 +0000 (20:11 +0200)
configure.in

index fd6835f..61b7b29 100644 (file)
@@ -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