[glibmm] Bug 781947 - Build fails on MacOS because glib doesn't have gdesktopinfo.



commit dd671f29ff9a005776ebd9e7cf20fdc5e44c14b8
Author: John Ralls <jralls ceridwen us>
Date:   Sat Apr 29 10:37:46 2017 -0700

    Bug 781947 - Build fails on MacOS because glib doesn't have gdesktopinfo.
    
    Disable building desktopapinfo.cpp with the same test used in glib.

 configure.ac        |   12 ++++++++++++
 gio/src/filelist.am |    8 +++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 52e5587..75bdf0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,18 @@ AS_CASE([$host_os], [mingw*], [glibmm_host_windows=yes], [glibmm_host_windows=no
 AC_MSG_RESULT([$glibmm_host_windows])
 AM_CONDITIONAL([HOST_WINDOWS_NATIVE], [test "x$glibmm_host_windows" = xyes])
 
+glib_have_cocoa=no
+AC_MSG_CHECKING([for Mac OS X Cocoa support])
+AC_TRY_CPP([
+#include <Cocoa/Cocoa.h>
+#ifdef GNUSTEP_BASE_VERSION
+#error "Detected GNUstep, not Cocoa"
+#endif
+], glib_have_cocoa=yes)
+
+AC_MSG_RESULT([$glib_have_cocoa])
+AM_CONDITIONAL(OS_COCOA, [test "$glib_have_cocoa" = "yes"])
+
 # TODO: This makes no sense. --danielk
 AS_IF([test "x$enable_static" = xyes],
 [
diff --git a/gio/src/filelist.am b/gio/src/filelist.am
index ca5a3ac..8db8901 100644
--- a/gio/src/filelist.am
+++ b/gio/src/filelist.am
@@ -137,7 +137,6 @@ giomm_files_any_hg =                        \
        zlibcompressor.hg
 
 giomm_files_posix_hg =                 \
-       desktopappinfo.hg               \
        unixconnection.hg               \
        unixcredentialsmessage.hg       \
        unixfdlist.hg                   \
@@ -146,10 +145,17 @@ giomm_files_posix_hg =                    \
        unixoutputstream.hg             \
        unixsocketaddress.hg
 
+giomm_files_not_mac =                  \
+       desktopappinfo.hg
+
 if HOST_WINDOWS_NATIVE
 giomm_files_arch_hg =
 else
+if OS_COCOA
 giomm_files_arch_hg = $(giomm_files_posix_hg)
+else
+giomm_files_arch_hg = $(giomm_files_not_mac) $(giomm_files_posix_hg)
+endif
 endif
 giomm_files_used_hg = $(giomm_files_any_hg) $(giomm_files_arch_hg)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]