summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2006-07-04 07:25:44 +0000
committerMark Wielaard <mark@klomp.org>2006-07-04 07:25:44 +0000
commite8300a31ab3b898fb656e5be1956cd41d0d49bda (patch)
tree18754a915a39fc8b52ec48e1af8b17914d8a7880 /configure.ac
parent9fcf2d2352094b519bf39c483e5b72206da76eed (diff)
downloadclasspath-e8300a31ab3b898fb656e5be1956cd41d0d49bda.tar.gz
2006-07-04 Mario Torre <neugens@limasoftware.net>
* configure.ac: Added new option --enable-default-preferences-peer to pass user specified default preference backend. If the GConf peer is built, GConf become the default backend. * resource/META-INF/services/java.util.prefs.PreferencesFactory.in: new file. * lib/Makefile.am: excludes files terminating in 'in' from the metafiles list. * lib/copy-vmresources.sh.in: excludes files terminating in 'in' from copy into META-INF. * java/util/prefs/Preferences.java: added two new import classes gnu.classpath.ServiceFactory and java.util.Iterator. (getFactory): Now try to check for a system defined default preference backend before to fall back on FileBasedPreference.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 24 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3345130f7..865b238cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,18 @@ AC_ARG_ENABLE([core-jni],
AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
dnl -----------------------------------------------------------
+dnl Default Preference Backend
+dnl -----------------------------------------------------------
+AC_ARG_ENABLE(default-preferences-peer,
+ AS_HELP_STRING([--enable-default-preferences-peer],
+ [fully qualified class name of default Preferences API Backend]))
+DEFAULT_PREFS_PEER=$enable_default_preferences_peer
+if test "$DEFAULT_PREFS_PEER" = ""; then
+ DEFAULT_PREFS_PEER=gnu.java.util.prefs.FileBasedFactory
+fi
+dnl AC_SUBST(DEFAULT_PREFS_PEER)
+
+dnl -----------------------------------------------------------
dnl GConf native peer (enabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([gconf-peer],
@@ -100,7 +112,6 @@ dnl GTK native peer error checking
dnl -----------------------------------------------------------
AC_ARG_ENABLE([gconf-peers],,AC_MSG_ERROR([No --enable-gconf-peers (or --disable-gconf-peers) option; you want --enable-gconf-peer]))
-
dnl ------------------------------------------------------------
dnl Whether to compile with -Werror or not (disabled by default)
dnl ------------------------------------------------------------
@@ -456,6 +467,13 @@ if test "x${COMPILE_JNI}" = xyes; then
PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.11.2)
AC_SUBST(GCONF_CFLAGS)
AC_SUBST(GCONF_LIBS)
+ dnl check if the config value was given form the command line,
+ dnl if not, overwrite the default if we have the gconf backend
+ dnl compiled in
+ USE_GCONF_PREFS_PEER=$enable_default_preferences_peer
+ if test "$USE_GCONF_PREFS_PEER" = ""; then
+ DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory
+ fi
fi
dnl Check for AWT related Qt4
@@ -745,6 +763,10 @@ then
fi
AM_CONDITIONAL(ENABLE_LOCAL_SOCKETS, test "x$ENABLE_LOCAL_SOCKETS" = "xyes")
+dnl -----------------------------------------------------------
+dnl Add the default preference peer
+dnl -----------------------------------------------------------
+AC_SUBST(DEFAULT_PREFS_PEER)
dnl -----------------------------------------------------------
dnl output files
@@ -780,6 +802,7 @@ native/target/Makefile
native/target/Linux/Makefile
native/target/generic/Makefile
resource/Makefile
+resource/META-INF/services/java.util.prefs.PreferencesFactory
scripts/Makefile
scripts/classpath.spec
lib/Makefile