From 2298406004115614c30554cb189f5e9ce2919326 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sat, 29 Apr 2017 10:37:46 -0700 Subject: 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 deletion(-) diff --git a/configure.ac b/configure.ac index 02352bd3..e19f2122 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 +#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 0095128e..31339d38 100644 --- a/gio/src/filelist.am +++ b/gio/src/filelist.am @@ -136,7 +136,6 @@ giomm_files_any_hg = \ zlibcompressor.hg giomm_files_posix_hg = \ - desktopappinfo.hg \ unixconnection.hg \ unixcredentialsmessage.hg \ unixfdlist.hg \ @@ -145,10 +144,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) -- cgit v1.2.1