* [PATCH] Changes to work with GNUstep
@ 2011-08-23 23:54 Germán Arias
2011-08-26 23:39 ` Germán Arias
0 siblings, 1 reply; 4+ messages in thread
From: Germán Arias @ 2011-08-23 23:54 UTC (permalink / raw)
To: Emacs
Below is a patch to configure and compile with latest gnustep packages.
Let me know if this is OK or I need change something.
This patch define _NATIVE_OBJC_EXCEPTIONS, that is needed to build
gnustep's apps without using gnustep-make. And add the flags to found
the gnustep headers. Necessary if gnustep is installed with gnustep
layout instead FHS.
=== modified file 'configure.in'
*** configure.in 2011-08-13 10:48:03 +0000
--- configure.in 2011-08-16 01:14:52 +0000
*************** test "X${with_gnustep_conf}" != X && tes
*** 219,224 ****
--- 219,232 ----
test "X$GNUSTEP_CONFIG_FILE" = "X" && \
GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
+ GS_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo
$GNUSTEP_LOCAL_HEADERS)"
+
+ if grep "BASE_NATIVE_OBJC_EXCEPTIONS 1"
${GS_LOCAL_HEADERS}/GNUstepBase/GSConfig.h; then
+ AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1, [Synchronize native exceptions
with gnustep-base.])
+ else
+ AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 0, [Synchronize native exceptions
with gnustep-base.])
+ fi
+
AC_ARG_ENABLE(ns-self-contained,
[AS_HELP_STRING([--disable-ns-self-contained],
[disable self contained build under NeXTstep])],
*************** tmp_CFLAGS="$CFLAGS"
*** 1499,1504 ****
--- 1507,1515 ----
CPPFLAGS="$CPPFLAGS -x objective-c"
CFLAGS="$CFLAGS -x objective-c"
TEMACS_LDFLAGS2="\${LDFLAGS}"
+ if _NATIVE_OBJC_EXCEPTIONS=1; then
+ CFLAGS="$CFLAGS -fobjc-exceptions"
+ fi
dnl I don't think it's especially important, but src/Makefile.in
dnl (now the only user of ns_appdir) used to go to the trouble of
adding a
dnl trailing "/" to it, so now we do it here.
*************** if test "${HAVE_NS}" = "yes"; then
*** 2571,2578 ****
AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS
windowing under GNUstep.])
# See also .m.o rule in Makefile.in */
# FIXME: are all these flags really needed? Document here why.
*/
! C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import
-fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1
-DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
fi
if test "${NS_HAVE_NSINTEGER}" = "yes"; then
AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is
defined.])
--- 2582,2592 ----
AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS
windowing under GNUstep.])
# See also .m.o rule in Makefile.in */
# FIXME: are all these flags really needed? Document here why.
*/
! C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I
${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import
-fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1
-DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
+ if _NATIVE_OBJC_EXCEPTIONS=1; then
+ GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fobjc-exceptions"
+ fi
fi
if test "${NS_HAVE_NSINTEGER}" = "yes"; then
AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is
defined.])
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Changes to work with GNUstep
2011-08-23 23:54 [PATCH] Changes to work with GNUstep Germán Arias
@ 2011-08-26 23:39 ` Germán Arias
2011-08-27 0:11 ` David De La Harpe Golden
2011-09-15 3:32 ` Glenn Morris
0 siblings, 2 replies; 4+ messages in thread
From: Germán Arias @ 2011-08-26 23:39 UTC (permalink / raw)
To: emacs-devel
On mar, 2011-08-23 at 17:54 -0600, Germán Arias wrote:
> Below is a patch to configure and compile with latest gnustep packages.
> Let me know if this is OK or I need change something.
>
> This patch define _NATIVE_OBJC_EXCEPTIONS, that is needed to build
> gnustep's apps without using gnustep-make. And add the flags to found
> the gnustep headers. Necessary if gnustep is installed with gnustep
> layout instead FHS.
>
Can someone check this patch, please? Apply it or refuse it? I resend
it, because configure.in has changed in trunk. Thanks (I don't have
write permission in repository).
=== modified file 'configure.in'
*** configure.in 2011-08-26 07:12:16 +0000
--- configure.in 2011-08-26 22:06:04 +0000
*************** test "X${with_gnustep_conf}" != X && tes
*** 219,224 ****
--- 219,232 ----
test "X$GNUSTEP_CONFIG_FILE" = "X" && \
GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
+ GS_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo
$GNUSTEP_LOCAL_HEADERS)"
+
+ if grep "BASE_NATIVE_OBJC_EXCEPTIONS 1"
${GS_LOCAL_HEADERS}/GNUstepBase/GSConfig.h; then
+ AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1, [Synchronize native exceptions
with gnustep-base.])
+ else
+ AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 0, [Synchronize native exceptions
with gnustep-base.])
+ fi
+
AC_ARG_ENABLE(ns-self-contained,
[AS_HELP_STRING([--disable-ns-self-contained],
[disable self contained build under NeXTstep])],
*************** tmp_CFLAGS="$CFLAGS"
*** 1499,1504 ****
--- 1507,1515 ----
CPPFLAGS="$CPPFLAGS -x objective-c"
CFLAGS="$CFLAGS -x objective-c"
TEMACS_LDFLAGS2="\${LDFLAGS}"
+ if _NATIVE_OBJC_EXCEPTIONS=1; then
+ CFLAGS="$CFLAGS -fobjc-exceptions"
+ fi
dnl I don't think it's especially important, but src/Makefile.in
dnl (now the only user of ns_appdir) used to go to the trouble of
adding a
dnl trailing "/" to it, so now we do it here.
*************** if test "${HAVE_NS}" = "yes"; then
*** 2571,2578 ****
AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS
windowing under GNUstep.])
# See also .m.o rule in Makefile.in */
# FIXME: are all these flags really needed? Document here why.
*/
! C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import
-fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1
-DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
fi
if test "${NS_HAVE_NSINTEGER}" = "yes"; then
AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is
defined.])
--- 2582,2592 ----
AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS
windowing under GNUstep.])
# See also .m.o rule in Makefile.in */
# FIXME: are all these flags really needed? Document here why.
*/
! C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I
${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import
-fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1
-DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
+ if _NATIVE_OBJC_EXCEPTIONS=1; then
+ GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fobjc-exceptions"
+ fi
fi
if test "${NS_HAVE_NSINTEGER}" = "yes"; then
AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is
defined.])
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Changes to work with GNUstep
2011-08-26 23:39 ` Germán Arias
@ 2011-08-27 0:11 ` David De La Harpe Golden
2011-09-15 3:32 ` Glenn Morris
1 sibling, 0 replies; 4+ messages in thread
From: David De La Harpe Golden @ 2011-08-27 0:11 UTC (permalink / raw)
To: emacs-devel; +Cc: Germán Arias
On 27/08/11 00:39, Germán Arias wrote:
> On mar, 2011-08-23 at 17:54 -0600, Germán Arias wrote:
>> Below is a patch to configure and compile with latest gnustep packages.
>> Let me know if this is OK or I need change something.
>>
>> This patch define _NATIVE_OBJC_EXCEPTIONS, that is needed to build
>> gnustep's apps without using gnustep-make. And add the flags to found
>> the gnustep headers. Necessary if gnustep is installed with gnustep
>> layout instead FHS.
>>
>
> Can someone check this patch, please? Apply it or refuse it? I resend
> it, because configure.in has changed in trunk. Thanks (I don't have
> write permission in repository).
>
Turns out my local gnustep install has somehow broken in the weeks since
I last used it (maybe something to do with the recent debian/unstable
multilib move ...or more likely just something silly I did), so this is
without testing, but my current feeling is the patch is wrong, it seems
excessively fugly to grep through a header like that.
AFAICS gnustep-config will happily output -fobj-exceptions or not as
necessary automatically (and appropriate include path flags too to find
headers) for us. So IMO configure should just be calling that, a bit
like pkg-config is used.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Changes to work with GNUstep
2011-08-26 23:39 ` Germán Arias
2011-08-27 0:11 ` David De La Harpe Golden
@ 2011-09-15 3:32 ` Glenn Morris
1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2011-09-15 3:32 UTC (permalink / raw)
To: emacs-devel
Germán Arias wrote:
> + GS_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo
> $GNUSTEP_LOCAL_HEADERS)"
> +
> + if grep "BASE_NATIVE_OBJC_EXCEPTIONS 1"
> ${GS_LOCAL_HEADERS}/GNUstepBase/GSConfig.h; then
> + AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1, [Synchronize native exceptions
> with gnustep-base.])
> + else
> + AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 0, [Synchronize native exceptions
> with gnustep-base.])
> + fi
> +
Thank you for keeping the poor old GNUstep port in your thoughts.
It's bad form to test headers with grep, I installed something more
autoconf-ish.
It still doesn't actually build for me though:
temacs --batch --load loadup bootstrap
never (?) returns.
But it seems like GNUstep in Debian testing is in an inconsistent state
right now, maybe this is related.
/usr/bin/ld: warning: libobjc.so.2, needed by
/usr/lib/libgnustep-gui.so, may conflict with libobjc.so.3
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629477
Anyway, it might be nice if GNUstep builds could be added to
emacs-buildstatus. On a Debian system, all you need to do is
apt-get install gnustep-devel; configure --with-ns.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-15 3:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-23 23:54 [PATCH] Changes to work with GNUstep Germán Arias
2011-08-26 23:39 ` Germán Arias
2011-08-27 0:11 ` David De La Harpe Golden
2011-09-15 3:32 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).