summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2022-08-25 09:51:40 +0200
committerAndreas Schwab <schwab@suse.de>2022-08-25 09:56:44 +0200
commitce82300221f270241fdda1f5dfb567bdb1208543 (patch)
tree138be34a4bedc57a39cd5a2bfd72ac2ea7323703 /configure.ac
parent34686263b7459f78fd1e6d68dc1aa9c8644876b3 (diff)
downloademacs-ce82300221f270241fdda1f5dfb567bdb1208543.tar.gz
* configure.ac: Move AC_LANG_PUSH/POP out of AC_CACHE_CHECK. (Bug#57380)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 9 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 7616e450d0f..6ca3052ea3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2155,17 +2155,16 @@ AC_SUBST([NS_OBJ])
AC_SUBST([NS_OBJC_OBJ])
if test "${HAVE_NS}" = yes; then
+ AC_LANG_PUSH([Objective C])
AC_CACHE_CHECK(
[if the Objective C compiler supports instancetype],
[emacs_cv_objc_instancetype],
- [AC_LANG_PUSH([Objective C])
- AC_COMPILE_IFELSE(
+ [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])])
+ [emacs_cv_objc_instancetype=no])])
if test x$emacs_cv_objc_instancetype = xyes ; then
AC_DEFINE([NATIVE_OBJC_INSTANCETYPE], [1],
@@ -2175,16 +2174,15 @@ if test "${HAVE_NS}" = yes; then
AC_CACHE_CHECK(
[if the Objective C compiler defaults to C99],
[emacs_cv_objc_c99],
- [AC_LANG_PUSH([Objective C])
- AC_COMPILE_IFELSE(
+ [AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [[for (int i = 0;;);]])],
[emacs_cv_objc_c99=yes],
- [emacs_cv_objc_c99=no])
- AC_LANG_POP([Objective C])])
+ [emacs_cv_objc_c99=no])])
- if test x$emacs_cv_objc_c99 = xno ; then
- GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -std=c99"
- fi
+ if test x$emacs_cv_objc_c99 = xno ; then
+ GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -std=c99"
+ fi
+ AC_LANG_POP([Objective C])
fi
HAVE_BE_APP=no