changeset 2359:75598f596c92 trunk

[svn] - support for libmcs (pass --enable-mcs to configure) - clean up some idieosyncracies in configure
author nenolod
date Wed, 17 Jan 2007 21:46:23 -0800
parents 9c84ab3eb2c6
children d2d296826b06
files ChangeLog configure.ac mk/rules.mk.in src/libaudacious/Makefile src/libaudacious/configdb_libmcs.c
diffstat 5 files changed, 43 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jan 17 12:51:12 2007 -0800
+++ b/ChangeLog	Wed Jan 17 21:46:23 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-17 20:51:12 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [3726]
+  - add configdb backend based on libmcs.
+  
+  trunk/src/libaudacious/configdb_libmcs.c |  194 +++++++++++++++++++++++++++++++
+  1 file changed, 194 insertions(+)
+
+
 2007-01-17 20:26:55 +0000  Giacomo Lozito <james@develia.org>
   revision [3724]
   - added progressbar with display of elapsed time for metadata tooltip
--- a/configure.ac	Wed Jan 17 12:51:12 2007 -0800
+++ b/configure.ac	Wed Jan 17 21:46:23 2007 -0800
@@ -239,7 +239,9 @@
 
 dnl GConf support
 
-AC_ARG_ENABLE( gconf,
+CONFIGDB_BACKEND="rcfile"
+
+AC_ARG_ENABLE(gconf,
     [  --enable-gconf          enable GConf support (default=disabled)],
     [enable_gconf=$enableval],
     [enable_gconf="no"]
@@ -257,8 +259,28 @@
 
 if test "$enable_gconf" = "yes"; then
 	CONFIGDB_BACKEND="gconf"
-else
-	CONFIGDB_BACKEND="rcfile"
+fi
+
+dnl libmcs support
+
+AC_ARG_ENABLE(mcs,
+    [  --enable-mcs            enable mcs support (default=disabled)],
+    [enable_mcs=$enableval],
+    [enable_mcs="no"]
+)
+
+if test "$enable_mcs" = "yes"; then
+    PKG_CHECK_MODULES(LIBMCS, [libmcs >= 0.1],
+        [
+         AC_DEFINE(HAVE_MCS, , [Define if building with libmcs support])
+         ADD_PC_REQUIRES([libmcs >= 0.1])
+        ],
+        [AC_MSG_ERROR([Cannot find libmcs])]
+    )
+fi
+
+if test "$enable_mcs" = "yes"; then
+	CONFIGDB_BACKEND="libmcs"
 fi
 
 AC_SUBST(CONFIGDB_BACKEND)
@@ -417,14 +439,14 @@
     echo "  Current Audacious executable:           $BEEP_PATH"
 fi
 
-echo "  Configuration path:                     \$HOME/$rc_path"
+echo "  Legacy configuration path:              \$HOME/$rc_path"
 echo
 echo "  Use one plugin dir:                     $enable_one_plugin_dir"
 echo "  Allow user plugin dir:                  $enable_user_plugin_dir"
 echo
-echo "  GNOME support"
-echo "  -------------"
-echo "  GConf support                           $enable_gconf"
+echo "  GConf support:                          $enable_gconf"
+echo
+echo "  mcs support:                            $enable_mcs"
 echo
 
 if test "$beep_cv_lib_xlibs_threadsafe" = "no"; then
--- a/mk/rules.mk.in	Wed Jan 17 12:51:12 2007 -0800
+++ b/mk/rules.mk.in	Wed Jan 17 21:46:23 2007 -0800
@@ -330,3 +330,5 @@
 LIBLDFLAGS ?= @LIBLDFLAGS@
 AUDLDFLAGS ?= @AUDLDFLAGS@
 INTL_OBJECTIVE ?= @INTL_OBJECTIVE@
+LIBMCS_CFLAGS ?= @LIBMCS_CFLAGS@
+LIBMCS_LIBS ?= @LIBMCS_LIBS@
--- a/src/libaudacious/Makefile	Wed Jan 17 12:51:12 2007 -0800
+++ b/src/libaudacious/Makefile	Wed Jan 17 21:46:23 2007 -0800
@@ -10,11 +10,13 @@
 
 LIBADD = \
 	$(GTK_LIBS)      \
-	$(GCONF_LIBS)
+	$(GCONF_LIBS)	\
+	$(LIBMCS_LIBS)
 
 CFLAGS += $(PICFLAGS) \
 	$(GTK_CFLAGS)        \
 	$(GCONF_CFLAGS)      \
+	$(LIBMCS_CFLAGS)	\
 	-D_AUDACIOUS_CORE    \
 	-I.. -I../..	      \
 	-I../intl
--- a/src/libaudacious/configdb_libmcs.c	Wed Jan 17 12:51:12 2007 -0800
+++ b/src/libaudacious/configdb_libmcs.c	Wed Jan 17 21:46:23 2007 -0800
@@ -39,7 +39,6 @@
 bmp_cfg_db_open()
 {
     ConfigDb *db;
-    char *tmp;
 
     db = g_new(ConfigDb, 1);
 
@@ -152,7 +151,7 @@
     if (!section)
         section = RCFILE_DEFAULT_SECTION_NAME;
 
-    mcs_set_boolean(db->handle, section, key, value);
+    mcs_set_bool(db->handle, section, key, value);
 }
 
 void