You could temporarily switch the language around the AC_LINK_IFELSE test in
aclocal.m4 using AC_LANG_PUSH([Objective C]) before the AC_LINK_IFELSE test and
AC_LANG_POP([Objective C]). However, as this will also switch the test to using
the variables OBJC and OBJCFLAGS instead of CC and CFLAGS, respectively, you
might not want to do this.
>I believe this test is done in a macro and the output file auto-generated.
>
>Files with obj-c content should be indeed called .m, apparently it helps
>the compiler to select the correct mode.
>
>I'd gladly improve that.
Regarding the link order issue, which seems to be the real problem here, it
would help to just include `gnustep-config --gui-libs` in the LIBS definition
rather than in LDFLAGS. I've just committed this change.