bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27041: MacOS 10.6: fix NS build


From: npostavs
Subject: bug#27041: MacOS 10.6: fix NS build
Date: Wed, 24 May 2017 22:17:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)

> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]