summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2020-08-27 20:50:42 +0100
committerAlan Third <alan@idiocy.org>2020-08-28 19:47:14 +0100
commit72f66f70eef18e3b25cc989d67711887304f184b (patch)
tree3b959c2625eef984cb3b608f92f3b93dea58df10 /configure.ac
parent89286b1f45571c8b7853e6f348b7f711d437ed74 (diff)
downloademacs-72f66f70eef18e3b25cc989d67711887304f184b.tar.gz
Fix Objective-C C99 build problem
* configure.ac (NS_IMPL_GNUSTEP): GCC appears to need to be told to use C99 when compiling Objective-C.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 9a51ea1f7ed..dd2adb7e740 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1900,7 +1900,8 @@ tmp_CPPFLAGS="$CPPFLAGS"
tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c"
CFLAGS="$CFLAGS -x objective-c"
-GNU_OBJC_CFLAGS=
+# Recent versions of GCC don't use C99 to compile Obj-C.
+GNU_OBJC_CFLAGS="-std=c99"
LIBS_GNUSTEP=
if test "${with_ns}" != no; then
# macfont.o requires macuvs.h which is absent after 'make extraclean',
@@ -1916,7 +1917,7 @@ if test "${with_ns}" != no; then
elif flags=$( (gnustep-config --objc-flags) 2>/dev/null); then
NS_IMPL_GNUSTEP=yes
NS_GNUSTEP_CONFIG=yes
- GNU_OBJC_CFLAGS=$flags
+ GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS $flags"
LIBS_GNUSTEP=$(gnustep-config --gui-libs) || exit
elif test -f $GNUSTEP_CONFIG_FILE; then
NS_IMPL_GNUSTEP=yes
@@ -1961,7 +1962,7 @@ fail;
dnl _NATIVE_OBJC_EXCEPTIONS is used by the GNUstep headers.
AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1,
[Define if GNUstep uses ObjC exceptions.])
- GNU_OBJC_CFLAGS="-fobjc-exceptions"
+ GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fobjc-exceptions"
fi
fi
if test $NS_IMPL_GNUSTEP = yes; then