Source for gnu.classpath.Configuration

   1: /* Configuration.java --
   2:    Copyright (C) 1998, 2001, 2003, 2005, 2006, 2007, 2008
   3:    Free Software Foundation, Inc.
   4: 
   5: This file is part of GNU Classpath.
   6: 
   7: GNU Classpath is free software; you can redistribute it and/or modify
   8: it under the terms of the GNU General Public License as published by
   9: the Free Software Foundation; either version 2, or (at your option)
  10: any later version.
  11:  
  12: GNU Classpath is distributed in the hope that it will be useful, but
  13: WITHOUT ANY WARRANTY; without even the implied warranty of
  14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15: General Public License for more details.
  16: 
  17: You should have received a copy of the GNU General Public License
  18: along with GNU Classpath; see the file COPYING.  If not, write to the
  19: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20: 02110-1301 USA.
  21: 
  22: Linking this library statically or dynamically with other modules is
  23: making a combined work based on this library.  Thus, the terms and
  24: conditions of the GNU General Public License cover the whole
  25: combination.
  26: 
  27: As a special exception, the copyright holders of this library give you
  28: permission to link this library with independent modules to produce an
  29: executable, regardless of the license terms of these independent
  30: modules, and to copy and distribute the resulting executable under
  31: terms of your choice, provided that you also meet, for each linked
  32: independent module, the terms and conditions of the license of that
  33: module.  An independent module is a module which is not derived from
  34: or based on this library.  If you modify this library, you may extend
  35: this exception to your version of the library, but you are not
  36: obligated to do so.  If you do not wish to do so, delete this
  37: exception statement from your version. */
  38: 
  39: package gnu.classpath;
  40: 
  41: /**
  42:  * This file defines compile-time constants that can be accessed by
  43:  * java code. It is pre-processed by configure.  
  44:  */
  45: public final class Configuration
  46: {
  47:   private Configuration()
  48:   {
  49:   }
  50: 
  51:   private static native String classpath_home();
  52:   private static native boolean debug();
  53:   private static native String toolkit();
  54:   private static native String ecj();
  55: 
  56:   /**
  57:    * The value of CLASSPATH_HOME is the location that the classpath
  58:    * libraries and support files where installed in. It is set according to
  59:    * the argument for --prefix given to configure and used to set the
  60:    * System property gnu.classpath.home.
  61:    */
  62:   public static final String CLASSPATH_HOME = classpath_home();
  63: 
  64:   /**
  65:    * The release version number of GNU Classpath.
  66:    * It is set according to the value of 'version' in the configure[.in] file
  67:    * and used to set the System property gnu.classpath.version.
  68:    */
  69:   public static final String CLASSPATH_VERSION = "0.99";
  70: 
  71:   /**
  72:    * The value of DEBUG is substituted according to whether the
  73:    * "--enable-debug" argument was passed to configure. Code
  74:    * which is made conditional based on the value of this flag - typically 
  75:    * code that generates debugging output - will be removed by the optimizer 
  76:    * in a non-debug build.
  77:    */
  78:   public static final boolean DEBUG = debug();
  79: 
  80:   /**
  81:    * The value of LOAD_LIBRARY is substituted according to whether the
  82:    * "--enable-load-library" or "--disable-load-library" argument was passed 
  83:    * to configure.  By default, configure should define this is as true.
  84:    * If set to false, loadLibrary() calls to load native function
  85:    * implementations, typically found in static initializers of classes
  86:    * which contain native functions, will be omitted.  This is useful for
  87:    * runtimes which pre-link their native function implementations and do
  88:    * not require additional shared libraries to be loaded.
  89:    */
  90:   public static final boolean INIT_LOAD_LIBRARY = false;
  91: 
  92:   /**
  93:    * Name of default AWT peer library.
  94:    */
  95:   public static final String default_awt_peer_toolkit = toolkit();
  96: 
  97:   /**
  98:    * Whether to automatically run the init* methods in java.lang.System
  99:    * (the default) at class initialization time or whether to have the VM
 100:    * explicitly invoke them.
 101:    *
 102:    * The default is false, meaning the VM does not explicitly run the
 103:    * initializers. 
 104:    * 
 105:    */
 106:   public static final boolean JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = false;
 107: 
 108:   /**
 109:    * The Eclipse Java Compiler jar file for use by the
 110:    * com.sun.tools.javac implementation in tools.zip.
 111:    */
 112:   public static final String ECJ_JAR = ecj();
 113: 
 114:   /**
 115:    * Set to <code>true</code> if the config script found that (a) an
 116:    * implementation of java.math.BigInteger, based on the GNU MP library, is
 117:    * desired in preference to a pure Java one, and (b) the GNU MP library was
 118:    * found on the platform where the JVM is to run. Otherwise, this field is
 119:    * set to <code>false</code>.
 120:    */
 121:   public static final boolean WANT_NATIVE_BIG_INTEGER = true;
 122: }