summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2017-08-15 18:51:19 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2017-08-15 18:51:19 +0200
commit6ef89b62e563065b7bc720f15e70ae7cd8ae6929 (patch)
treebacb556c29ea892747cdc81986a3d89edbb6dc92 /configure.ac
parent853ac0f5517e4307cf28de0c780672d7b94cfff8 (diff)
downloadglibmm-6ef89b62e563065b7bc720f15e70ae7cd8ae6929.tar.gz
Gio: Exclude DesktopAppInfo from wrap_init.cc on MacOS
Modify the conditional inclusion of desktopappinfo.h in giomm.h and wrap_init.cc. It shall not be included when running under MacOS. This should have been fixed by commit fe99895f8d3b61409c416f1244a29f2aa3478f96. Bug 781947
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 13 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 7006b824..d54668c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,17 +55,25 @@ 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
+# This test for Mac OS is copied from glib. If the result of glib's test
+# is ever made available outside glib, use glib's result instead of this test.
+# glib: https://bugzilla.gnome.org/show_bug.cgi?id=780309
+# glibmm: https://bugzilla.gnome.org/show_bug.cgi?id=781947
+glibmm_have_cocoa=no
AC_MSG_CHECKING([for Mac OS X Cocoa support])
-AC_TRY_CPP([
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <Cocoa/Cocoa.h>
#ifdef GNUSTEP_BASE_VERSION
#error "Detected GNUstep, not Cocoa"
#endif
-], glib_have_cocoa=yes)
+]])],[glibmm_have_cocoa=yes],[])
-AC_MSG_RESULT([$glib_have_cocoa])
-AM_CONDITIONAL(OS_COCOA, [test "$glib_have_cocoa" = "yes"])
+AC_MSG_RESULT([$glibmm_have_cocoa])
+AM_CONDITIONAL(OS_COCOA, [test "$glibmm_have_cocoa" = "yes"])
+AS_IF([test "$glibmm_have_cocoa" = "yes"],
+[
+ AC_DEFINE([GLIBMM_OS_COCOA], [1], [Define only on Mac OS, COCOA])
+])
# TODO: This makes no sense. --danielk
AS_IF([test "x$enable_static" = xyes],