summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRaoul Hecky <raoul.hecky@gmail.com>2014-06-08 21:23:25 +0200
committerCedric BAIL <c.bail@partner.samsung.com>2014-06-18 11:34:07 +0200
commit0c8954e6ececad21b20beda3443285d075578f10 (patch)
tree6b562ada6a52a29232615ab7d367da545e46bf9b /configure.ac
parentedf621245e7555a68c870eeeab055431f00b8a16 (diff)
Add cocoa engine checks again
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac70
1 files changed, 51 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index 13420bb..e74485d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1293,22 +1293,56 @@ if test "${want_sdl}" = "yes" && test "${with_opengl}" = "full"; then
1293fi 1293fi
1294 1294
1295# Cocoa 1295# Cocoa
1296dnl AC_ARG_ENABLE([cocoa], 1296AC_ARG_ENABLE([cocoa],
1297dnl [AC_HELP_STRING([--enable-cocoa], 1297 [AC_HELP_STRING([--enable-cocoa],
1298dnl [enable MacOS X Cocoa . @<:@default=disabled@:>@])], 1298 [enable MacOS X Cocoa . @<:@default=disabled@:>@])],
1299dnl [ 1299 [
1300dnl if test "x${enableval}" = "xyes" ; then 1300 if test "x${enableval}" = "xyes" ; then
1301dnl want_cocoa="yes" 1301 want_cocoa="yes"
1302dnl else 1302 else
1303dnl want_cocoa="no" 1303 want_cocoa="no"
1304dnl fi 1304 fi
1305dnl ], 1305 ],
1306dnl [want_cocoa="no"]) 1306 [want_cocoa="no"])
1307dnl 1307
1308dnl if test "${want_cocoa}" = "yes"; then 1308 if test "${want_cocoa}" = "yes"; then
1309dnl test cocoa requirements (objc and Cocoa/Cocoa.h) 1309 #test cocoa requirements (objc and Cocoa/Cocoa.h)
1310dnl fi 1310 cocoa_ldflags=""
1311want_cocoa="no" 1311 have_cocoa="no"
1312 m4_ifdef([AC_PROG_OBJC],
1313 [
1314 if test "x${have_gnu_objc}" = "xyes" ; then
1315 AC_LANG_PUSH([Objective C])
1316 LIBS_save="$LIBS"
1317 LIBS="$LIBS -framework Cocoa"
1318 AC_LINK_IFELSE(
1319 [AC_LANG_PROGRAM(
1320 [[
1321#include <Cocoa/Cocoa.h>
1322 ]],
1323 [[
1324NSWindow *window;
1325window = [[NSWindow alloc]
1326 initWithContentRect:NSMakeRect(0, 0, 1, 1)
1327 styleMask:(NSTitledWindowMask)
1328 backing:NSBackingStoreBuffered
1329 defer:NO
1330 screen:nil
1331 ];
1332 ]])],
1333 [
1334 have_cocoa="yes"
1335 cocoa_ldflags="-framework Cocoa"
1336 ],
1337 [have_cocoa="no"])
1338 LIBS="$LIBS_save"
1339 AC_MSG_CHECKING([whether Cocoa framework is supported])
1340 AC_MSG_RESULT([${have_cocoa}])
1341 AC_LANG_POP([Objective C])
1342 fi
1343 ])
1344fi
1345AC_SUBST(cocoa_ldflags)
1312 1346
1313# Drm 1347# Drm
1314AC_ARG_ENABLE([drm], 1348AC_ARG_ENABLE([drm],
@@ -2659,9 +2693,7 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eina])
2659 2693
2660### Checks for header files 2694### Checks for header files
2661 2695
2662dnl TODO: once cocoa is fixed and test-able, add required libs here 2696EFL_ADD_LIBS([ECORE_COCOA], [-framework Cocoa])
2663dnl to ECORE_COCOA_LIBS and ECORE_COCOA_CFLAGS.
2664dnl Evas already tests for ObjC and Cocoa/Cocoa.h
2665 2697
2666### Checks for types 2698### Checks for types
2667 2699