diff options
author | Raoul Hecky <raoul.hecky@gmail.com> | 2014-06-08 21:23:25 +0200 |
---|---|---|
committer | Cedric BAIL <c.bail@partner.samsung.com> | 2014-06-18 11:34:07 +0200 |
commit | 0c8954e6ececad21b20beda3443285d075578f10 (patch) | |
tree | 6b562ada6a52a29232615ab7d367da545e46bf9b /configure.ac | |
parent | edf621245e7555a68c870eeeab055431f00b8a16 (diff) |
Add cocoa engine checks again
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 70 |
1 files changed, 51 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 13420bbd10..e74485d68b 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1293,22 +1293,56 @@ if test "${want_sdl}" = "yes" && test "${with_opengl}" = "full"; then | |||
1293 | fi | 1293 | fi |
1294 | 1294 | ||
1295 | # Cocoa | 1295 | # Cocoa |
1296 | dnl AC_ARG_ENABLE([cocoa], | 1296 | AC_ARG_ENABLE([cocoa], |
1297 | dnl [AC_HELP_STRING([--enable-cocoa], | 1297 | [AC_HELP_STRING([--enable-cocoa], |
1298 | dnl [enable MacOS X Cocoa . @<:@default=disabled@:>@])], | 1298 | [enable MacOS X Cocoa . @<:@default=disabled@:>@])], |
1299 | dnl [ | 1299 | [ |
1300 | dnl if test "x${enableval}" = "xyes" ; then | 1300 | if test "x${enableval}" = "xyes" ; then |
1301 | dnl want_cocoa="yes" | 1301 | want_cocoa="yes" |
1302 | dnl else | 1302 | else |
1303 | dnl want_cocoa="no" | 1303 | want_cocoa="no" |
1304 | dnl fi | 1304 | fi |
1305 | dnl ], | 1305 | ], |
1306 | dnl [want_cocoa="no"]) | 1306 | [want_cocoa="no"]) |
1307 | dnl | 1307 | |
1308 | dnl if test "${want_cocoa}" = "yes"; then | 1308 | if test "${want_cocoa}" = "yes"; then |
1309 | dnl test cocoa requirements (objc and Cocoa/Cocoa.h) | 1309 | #test cocoa requirements (objc and Cocoa/Cocoa.h) |
1310 | dnl fi | 1310 | cocoa_ldflags="" |
1311 | want_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 | [[ | ||
1324 | NSWindow *window; | ||
1325 | window = [[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 | ]) | ||
1344 | fi | ||
1345 | AC_SUBST(cocoa_ldflags) | ||
1312 | 1346 | ||
1313 | # Drm | 1347 | # Drm |
1314 | AC_ARG_ENABLE([drm], | 1348 | AC_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 | ||
2662 | dnl TODO: once cocoa is fixed and test-able, add required libs here | 2696 | EFL_ADD_LIBS([ECORE_COCOA], [-framework Cocoa]) |
2663 | dnl to ECORE_COCOA_LIBS and ECORE_COCOA_CFLAGS. | ||
2664 | dnl Evas already tests for ObjC and Cocoa/Cocoa.h | ||
2665 | 2697 | ||
2666 | ### Checks for types | 2698 | ### Checks for types |
2667 | 2699 | ||