Bryce McKinlay <[EMAIL PROTECTED]> writes:
> Brian Jones wrote:
>
> > > Bryce> I propose an interface (this ensures that only constants can be
> > > Bryce> defined) called gnu.classpath.Flags (or CompileSettings?
> > > Bryce> DebugFlags?)
> >
> > Seems like a good idea to me. Will you be modifying the configure
> > system so that the debugging can be toggled (--enable-debugging) or
> > should I?
>
> I was planning to look at classpath's configure and mirror the changes
> there, but if you want to do it that would be even better ;-)
>
> For reference, the libgcj patch is here:
>
> http://sources.redhat.com/ml/java-patches/2000-q4/msg00128.html
Thanks, the attached is the patch to classpath for the same. I've
left the arguments to configure the same... seems like
--enable-java-debug should add '-g' to put debug symbols in class
files... and I couldn't really change the define in the java file
anyway without breaking gcj...
Brian
--
Brian Jones <[EMAIL PROTECTED]>
? ChangeLog.one
? gnu/classpath/Configuration.java
Index: acconfig.h
===================================================================
RCS file: /cvs/classpath/acconfig.h,v
retrieving revision 1.1
diff -r1.1 acconfig.h
20a21,23
> /* Define as 1 if building with debugging code included, this is not -g */
> #define DEBUG 0
>
Index: configure.in
===================================================================
RCS file: /cvs/classpath/configure.in,v
retrieving revision 1.63
diff -r1.63 configure.in
197a198,217
>
> dnl -----------------------------------------------------------
> dnl Enable debugging statements at compile time. By default
> dnl these statements should be optimized out of the bytecode
> dnl produced by an optimizing Java compiler and not hinder
> dnl performance.
> dnl -----------------------------------------------------------
> LIBGCJDEBUG="false"
> AC_ARG_ENABLE(libgcj-debug,
> [ --enable-libgcj-debug enable runtime debugging code],
> if test "$enable_libgcj_debug" = yes; then
> AC_DEFINE(DEBUG)
> LIBGCJDEBUG="true"
> fi)
> ]
> AC_SUBST(LIBGCJDEBUG)
>
> dnl -----------------------------------------------------------
>
>
267a288,289
> gnu/classpath/Makefile
> gnu/classpath/Configuration.java
Index: gnu/Makefile.am
===================================================================
RCS file: /cvs/classpath/gnu/Makefile.am,v
retrieving revision 1.5
diff -r1.5 Makefile.am
4c4
< SUBDIRS = java tools
---
> SUBDIRS = classpath java tools
Index: gnu/classpath/.cvsignore
===================================================================
RCS file: .cvsignore
diff -N .cvsignore
0a1,2
> Makefile
> Makefile.in
Index: gnu/classpath/Configuration.java.in
===================================================================
RCS file: Configuration.java.in
diff -N Configuration.java.in
0a1,41
> /* gnu.classpath.Configuration
> Copyright (C) 1998 Free Software Foundation, Inc.
>
> This file is part of GNU Classpath.
>
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> General Public License for more details.
>
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING. If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
>
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
>
> package gnu.classpath;
>
> /**
> * This file defines compile-time constants that can be accessed by
> * java code. It is pre-processed by configure.
> */
> public interface Configuration
> {
> // The value of DEBUG is substituted according to whether the
> // "--enable-libgcj-debug" argument was passed to configure. Code
> // which is made conditional based on the value of this flag will
> // be removed by the optimizer in a non-debug build.
>
> boolean DEBUG = @LIBGCJDEBUG@;
> }
Index: gnu/classpath/Makefile.am
===================================================================
RCS file: Makefile.am
diff -N Makefile.am
0a1,5
> ## Input file for automake to generate the Makefile.in used by configure
>
> EXTRA_DIST = \
> Configuration.java.in
>