diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
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], |