[deamon-fix] Fix for FoxP in make_kdbus_bus
[platform/upstream/dbus.git] / cmake / ConfigureChecks.cmake
index 5c405a8..33a9cee 100644 (file)
@@ -10,6 +10,7 @@ check_include_file(sys/poll.h   HAVE_POLL)      # dbus-sysdeps.c, dbus-sysdeps-w
 check_include_file(sys/time.h   HAVE_SYS_TIME_H)# dbus-sysdeps-win.c
 check_include_file(sys/wait.h   HAVE_SYS_WAIT_H)# dbus-sysdeps-win.c
 check_include_file(time.h       HAVE_TIME_H)    # dbus-sysdeps-win.c
+check_include_file(ws2tcpip.h   HAVE_WS2TCPIP_H)# dbus-sysdeps-win.c
 check_include_file(wspiapi.h    HAVE_WSPIAPI_H) # dbus-sysdeps-win.c
 check_include_file(unistd.h     HAVE_UNISTD_H)  # dbus-sysdeps-util-win.c
 check_include_file(stdio.h      HAVE_STDIO_H)   # dbus-sysdeps.h
@@ -17,6 +18,8 @@ check_include_file(sys/syslimits.h    HAVE_SYS_SYSLIMITS_H)   # dbus-sysdeps-uni
 check_include_file(errno.h     HAVE_ERRNO_H)    # dbus-sysdeps.c
 check_include_file(signal.h     HAVE_SIGNAL_H)
 check_include_file(locale.h     HAVE_LOCALE_H)
+check_include_file(inttypes.h     HAVE_INTTYPES_H)   # dbus-pipe.h
+check_include_file(stdint.h     HAVE_STDINT_H)   # dbus-pipe.h
 
 check_symbol_exists(backtrace    "execinfo.h"       HAVE_BACKTRACE)          #  dbus-sysdeps.c, dbus-sysdeps-win.c
 check_symbol_exists(getgrouplist "grp.h"            HAVE_GETGROUPLIST)       #  dbus-sysdeps.c
@@ -51,43 +54,39 @@ check_type_size("__int64"   SIZEOF___INT64)
 if(SIZEOF_INT EQUAL 8)
     set (DBUS_HAVE_INT64 1)
     set (DBUS_INT64_TYPE "int")
-else(SIZEOF_INT EQUAL 8)
-    if(SIZEOF_LONG EQUAL 8)
-        set (DBUS_HAVE_INT64 1)
-        set (DBUS_INT64_TYPE "long")
-    else(SIZEOF_LONG EQUAL 8)
-        if(SIZEOF_LONG_LONG EQUAL 8)
-            set (DBUS_HAVE_INT64 1)
-            set (DBUS_INT64_TYPE "long long")
-        else(SIZEOF_LONG_LONG EQUAL 8)
-            if(SIZEOF___INT64 EQUAL 8)
-                set (DBUS_HAVE_INT64 1)
-                set (DBUS_INT64_TYPE "__int64")
-            endif(SIZEOF___INT64 EQUAL 8)
-        endif(SIZEOF_LONG_LONG EQUAL 8)
-    endif(SIZEOF_LONG EQUAL 8)
+    set (DBUS_INT64_CONSTANT  "(val)")
+    set (DBUS_UINT64_CONSTANT "(val##U)")
+elseif(SIZEOF_LONG EQUAL 8)
+    set (DBUS_HAVE_INT64 1)
+    set (DBUS_INT64_TYPE "long")
+    set (DBUS_INT64_CONSTANT  "(val##L)")
+    set (DBUS_UINT64_CONSTANT "(val##UL)")
+elseif(SIZEOF_LONG_LONG EQUAL 8)
+    set (DBUS_HAVE_INT64 1)
+    set (DBUS_INT64_TYPE "long long")
+    set (DBUS_INT64_CONSTANT  "(val##LL)")
+    set (DBUS_UINT64_CONSTANT "(val##ULL)")
+elseif(SIZEOF___INT64 EQUAL 8)
+    set (DBUS_HAVE_INT64 1)
+    set (DBUS_INT64_TYPE "__int64")
+    set (DBUS_INT64_CONSTANT  "(val##i64)")
+    set (DBUS_UINT64_CONSTANT "(val##ui64)")
 endif(SIZEOF_INT EQUAL 8)
 
 # DBUS_INT32_TYPE
 if(SIZEOF_INT EQUAL 4)
     set (DBUS_INT32_TYPE "int")
-else(SIZEOF_INT EQUAL 4)
-    if(SIZEOF_LONG EQUAL 4)
-        set (DBUS_INT32_TYPE "long")
-    else(SIZEOF_LONG EQUAL 4)
-        if(SIZEOF_LONG_LONG EQUAL 4)
-            set (DBUS_INT32_TYPE "long long")
-        endif(SIZEOF_LONG_LONG EQUAL 4)
-    endif(SIZEOF_LONG EQUAL 4)
+elseif(SIZEOF_LONG EQUAL 4)
+    set (DBUS_INT32_TYPE "long")
+elseif(SIZEOF_LONG_LONG EQUAL 4)
+    set (DBUS_INT32_TYPE "long long")
 endif(SIZEOF_INT EQUAL 4)
 
 # DBUS_INT16_TYPE
 if(SIZEOF_INT EQUAL 2)
     set (DBUS_INT16_TYPE "int")
-else(SIZEOF_INT EQUAL 2)
-    if(SIZEOF_SHORT EQUAL 2)
-        set (DBUS_INT16_TYPE "short")
-    endif(SIZEOF_SHORT EQUAL 2)
+elseif(SIZEOF_SHORT EQUAL 2)
+    set (DBUS_INT16_TYPE "short")
 endif(SIZEOF_INT EQUAL 2)
 
 find_program(DOXYGEN doxygen)