GNU bug report logs - #27041
MacOS 10.6: fix NS build

Previous Next

Package: emacs;

Reported by: "Charles A. Roelli" <charles <at> aurox.ch>

Date: Tue, 23 May 2017 18:58:02 UTC

Severity: normal

Merged with 27059

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Alan Third <alan <at> idiocy.org>
Cc: 27041 <at> debbugs.gnu.org, "Charles A. Roelli" <charles <at> aurox.ch>
Subject: bug#27041: [PATCH] Check if instancetype supported in ObjC
Date: Thu, 25 May 2017 19:42:05 -0400
Alan Third <alan <at> idiocy.org> writes:

> --- a/configure.ac
> +++ b/configure.ac
> @@ -1980,6 +1980,23 @@ AC_DEFUN
>  AC_SUBST(NS_OBJ)
>  AC_SUBST(NS_OBJC_OBJ)
>  
> +AC_CACHE_CHECK(
> +  [if the Objective C compiler supports instancetype],
> +  [emacs_cv_objc_instancetype],
> +  [AC_LANG_PUSH([Objective C])
> +   AC_COMPILE_IFELSE(
> +     [AC_LANG_SOURCE([[@interface Test
> +                        + (instancetype)test;
> +                        @end]])],
> +     emacs_cv_objc_instancetype=yes,
> +     emacs_cv_objc_instancetype=no)
> +   AC_LANG_POP([Objective C])])
> +
> +if test x$emacs_cv_objc_instancetype = xyes ; then
> +  AC_DEFINE(NATIVE_OBJC_INSTANCETYPE, 1,
> +            [Define if ObjC compiler supports instancetype natively.])
> +fi
> +
>  HAVE_W32=no
>  W32_OBJ=
>  W32_LIBS=

I guess this should be inside 'if test "${HAVE_NS}" = yes; ...'
(although it seems harmless anyway).




This bug report was last modified 7 years and 358 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.