+AC_PROG_MKDIR_P
+
+# Set some internal variables depending on the platform for later use.
+dbus_win=no
+dbus_cygwin=no
+dbus_unix=no
+case "${host}" in
+ *-mingw32ce*)
+ dbus_win=yes
+ dbus_wince=yes
+ ;;
+ *-mingw32*)
+ dbus_win=yes
+ ;;
+ *-cygwin*)
+ dbus_cygwin=yes
+ dbus_unix=yes
+ ;;
+ *)
+ dbus_unix=yes
+ ;;
+esac
+
+# Special defines for certain platforms
+if test "$dbus_win" = yes; then
+ AC_DEFINE(DBUS_WIN,1,[Defined if we run on a W32 API based system])
+ BUILD_TIMESTAMP=`date --iso-8601=minutes`
+ AC_SUBST(BUILD_TIMESTAMP)
+ # Assume DBUS_VERSION is always three numbers
+ BUILD_FILEVERSION=`echo "$DBUS_VERSION" | sed -e 's/\./,/g'`,0
+ AC_SUBST(BUILD_FILEVERSION)
+ AC_CHECK_TOOL(WINDRES, windres, no)
+ 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])
+ AC_DEFINE(_WIN32_WCE, 0x0502, [Defined to get newer W32 CE APIs])
+ fi
+else
+ AC_DEFINE(DBUS_UNIX,1,[Defined if we run on a Unix-based system])
+fi
+if test "$dbus_cygwin" = yes; then
+ AC_DEFINE(DBUS_CYGWIN,1,[Defined if we run on a cygwin API 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)
+AM_CONDITIONAL(DBUS_CYGWIN, test "$dbus_cygwin" = yes)