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: 27041 <at> debbugs.gnu.org
Cc: Alan Third <alan <at> idiocy.org>, "Charles A. Roelli" <charles <at> aurox.ch>
Subject: bug#27041: MacOS 10.6: fix NS build
Date: Wed, 24 May 2017 22:17:44 -0400
> FWIW, that instancetype type appears to be a built‐in and we should
> probably be doing some sort of check whether the compiler supports it
> natively or not. I don’t know how to go about doing that.

I think you should add something like this to configure.ac:

  AC_CACHE_CHECK([if the Objective C compiler supports instancetype], emacs_cv_objc_instancetype,
    AC_LANG_PUSH([Objective C])
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[- (instancetype) foo: () {return self;}]])],
                      emacs_cv_objc_instancetype=yes, emacs_cv_objc_instancetype=no)
    AC_LANG_POP([Objective C]))
  if test x$emacs_cv_objc_exceptions = xyes ; then
    AC_DEFINE(NATIVE_OBJC_INSTANCETYPE, 1,
         [Define if ObjC compiler supports instancetype natively.])
  fi

Probably you have to fix the code I put inside AC_LANG_PROGRAM([[...]]),
I don't know Objective C at all.




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.