Ecore: fix Cocoa stuff detection on FreeBSD and Mac OS X, clean up ipv6 detection

SVN revision: 64652
This commit is contained in:
Vincent Torri 2011-11-02 18:16:23 +00:00
parent a6ed843005
commit 8d3cd7339d
1 changed files with 50 additions and 26 deletions

View File

@ -1157,16 +1157,36 @@ AC_CHECK_HEADER([linux/fb.h],
# Cocoa header files (ecore_cocoa)
cocoa_ldflags="";
cocoa_ldflags=""
have_cocoa="no"
m4_ifdef([AC_PROG_OBJC], [
if test "x${have_gnu_objc}" = "xyes" ; then
AC_LANG_PUSH([Objective C])
AC_CHECK_HEADER([Cocoa/Cocoa.h],
LIBS_save="$LIBS"
LIBS="$LIBS -framework Cocoa"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <Cocoa/Cocoa.h>
]],
[[
NSWindow *window;
window = [[NSWindow alloc]
initWithContentRect:NSMakeRect(0, 0, 1, 1)
styleMask:(NSTitledWindowMask)
backing:NSBackingStoreBuffered
defer:NO
screen:nil
];
]])],
[
have_cocoa="yes"
cocoa_ldflags="-framework Cocoa"
])
],
[have_cocoa="no"])
LIBS="$LIBS_save"
AC_MSG_CHECKING([whether Cocoa framework is supported])
AC_MSG_RESULT([${have_cocoa}])
AC_LANG_POP([Objective C])
fi
])
@ -1330,11 +1350,9 @@ have_curl="no"
have_gnutls="no"
have_openssl="no"
have_cares="no"
if test "x${have_ecore_con}" = "xyes" ; then
# Verify IPV6 availability in headers
want_ipv6="yes"
have_ipv6="no"
AC_ARG_ENABLE([ipv6],
[AC_HELP_STRING([--disable-ipv6],
[disable ipv6 functionality @<:@default=detect@:>@])],
@ -1344,9 +1362,15 @@ if test "x${have_ecore_con}" = "xyes" ; then
else
want_ipv6="no"
fi],
[want_ipv6=auto])
[want_ipv6="auto"])
if test "x${have_ecore_con}" = "xyes" ; then
# Verify IPV6 availability in headers
if test "x${want_ipv6}" != "xno" ; then
AC_CHECK_TYPES([struct ipv6_mreq], [have_ipv6="yes"], [have_ipv6="no"],
AC_CHECK_TYPES([struct ipv6_mreq],
[have_ipv6="yes"],
[have_ipv6="no"],
[[
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>