summaryrefslogtreecommitdiff
path: root/src/s
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-05-04 19:46:16 +0000
committerMiles Bader <miles@gnu.org>2008-05-04 19:46:16 +0000
commitf67e15be8d94718b2e2ea7da68eb0b2dc94ce016 (patch)
treeb7cdaa984d777c3bd0425f2ca2612d9a1de0d832 /src/s
parentf8a295058a5682dbc70f48f376fe51a18d21281a (diff)
parent092a8af3e7cc0d72c417f9eb19c7ac61ef782a87 (diff)
downloademacs-f67e15be8d94718b2e2ea7da68eb0b2dc94ce016.tar.gz
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1142
Diffstat (limited to 'src/s')
-rw-r--r--src/s/darwin.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/s/darwin.h b/src/s/darwin.h
index dee3480c783..2e7e4e40be4 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -265,9 +265,31 @@ Boston, MA 02110-1301, USA. */
/* Indicate that we are compiling for Mac OS X. */
#define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX
+#ifdef HAVE_CARBON
+
+#ifdef HAVE_AVAILABILITYMACROS_H
+#include <AvailabilityMacros.h>
+#endif
+
+/* Whether to use the Image I/O framework for reading images. */
+#ifndef USE_MAC_IMAGE_IO
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1040 || MAC_OS_X_VERSION_MIN_REQUIRED < 1020)
+#define USE_MAC_IMAGE_IO 1
+#endif
+#endif
+
+/* If the Image I/O framework is not used, fall back on QuickTime. */
+#if USE_MAC_IMAGE_IO
+#define LIBS_IMAGE
+#else
+#define LIBS_IMAGE -framework QuickTime
+#endif
+
+#endif /* HAVE_CARBON */
+
/* Link in the Carbon lib. */
#ifdef HAVE_CARBON
-#define LIBS_CARBON -framework Carbon -framework QuickTime
+#define LIBS_CARBON -framework Carbon LIBS_IMAGE
#else
#define LIBS_CARBON
#endif