Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/sound-juicer/Makefile.am,v
retrieving revision 1.11
diff -u -u -r1.11 Makefile.am
--- Makefile.am	18 Sep 2005 15:47:27 -0000	1.11
+++ Makefile.am	9 Jan 2006 15:08:28 -0000
@@ -11,11 +11,15 @@
 	    -e s/\@DATE\@/`date +%F`/g \
 	< $< > $@
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libjuicer.pc
+
 EXTRA_DIST = \
 	autogen.sh \
 	sound-juicer.spec \
 	gnome-doc-utils.make \
 	doap.rdf doap.rdf.in \
+	libjuicer.pc.in \
 	$(INTLTOOL_BUILT:=.in)
 
 CLEANFILES = doap.rdf
Index: configure.in
===================================================================
RCS file: /cvs/gnome/sound-juicer/configure.in,v
retrieving revision 1.136
diff -u -u -r1.136 configure.in
--- configure.in	7 Jan 2006 14:24:54 -0000	1.136
+++ configure.in	9 Jan 2006 15:08:28 -0000
@@ -7,6 +7,16 @@
 AM_CONFIG_HEADER(src/config.h)
 AM_MAINTAINER_MODE
 
+# Before making a release, the JUICER_LT_VERSION string should be modified.
+# The string is of the form C:R:A.
+# - If interfaces have been changed or added, but binary compatibility has
+#   been preserved, change to C+1:0:A+1
+# - If binary compatibility has been broken (eg removed or changed interfaces)
+#   change to C+1:0:0
+# - If the interface is the same as the previous version, change to C:R+1:A
+JUICER_LT_VERSION=0:0:0
+AC_SUBST(JUICER_LT_VERSION)
+
 # Honour user-set aclocal flags
 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
 
@@ -130,6 +140,7 @@
 # Finally, generate the files
 AC_OUTPUT([
 sound-juicer.spec
+libjuicer.pc
 Makefile
 help/Makefile
 help/sound-juicer/Makefile
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/sound-juicer/src/Makefile.am,v
retrieving revision 1.35
diff -u -u -r1.35 Makefile.am
--- src/Makefile.am	7 Jan 2006 15:38:05 -0000	1.35
+++ src/Makefile.am	9 Jan 2006 15:08:28 -0000
@@ -18,34 +18,26 @@
 
 # We always build Sound Juicer
 bin_PROGRAMS = sound-juicer
+lib_LTLIBRARIES = libjuicer.la
+noinst_LIBRARIES = libjuicer_common.a
 
 if HAVE_CDIO
-CDIO_SOURCES = 	sj-metadata-cdtext.h sj-metadata-cdtext.c
+CDIO_SOURCES = 	sj-metadata-cdtext.c
+CDIO_HEADER = 	sj-metadata-cdtext.h
 endif
 
 sound_juicer_SOURCES = \
 	dummy.cpp \
 	sound-juicer.h \
-	sj-structures.h \
-	sj-structures.c \
 	sj-main.c \
 	sj-prefs.h \
 	sj-prefs.c \
-	sj-error.h \
-	sj-error.c \
 	sj-extractor.h \
 	sj-extractor.c \
-	sj-metadata.h \
-	sj-metadata.c \
-	$(CDIO_SOURCES) \
-	sj-metadata-musicbrainz.h \
-	sj-metadata-musicbrainz.c \
 	sj-play.c \
 	sj-play.h \
 	sj-profile-chooser.h \
 	sj-profile-chooser.c \
-	sj-util.h \
-	sj-util.c \
 	sj-about.h \
 	sj-about.c \
 	sj-extracting.h \
@@ -54,13 +46,39 @@
 	gconf-bridge.c \
 	bacon-volume.c \
 	bacon-volume.h \
-	$(BACON_FILES) \
+	$(BACON_FILES)
+
+sound_juicer_LDFLAGS = @MUSICBRAINZ_LIBS@ @MEDIA_PROFILES_LIBS@ @GSTREAMER_LIBS@ @BURN_LIBS@ @UI_LIBS@ libjuicer.la libjuicer_common.a
+
+libjuicer_common_a_SOURCES =  \
+	sj-error.h \
+	sj-error.c \
+	sj-util.h \
+	sj-util.c \
+	sj-structures.h \
+	sj-structures.c \
 	$(MARSHALFILES)
 
-sound_juicer_LDFLAGS = @MUSICBRAINZ_LIBS@ @MEDIA_PROFILES_LIBS@ @GSTREAMER_LIBS@ @BURN_LIBS@ @UI_LIBS@
+
+libjuicer_la_SOURCES =                  \
+	$(CDIO_SOURCES) \
+	sj-metadata.c \
+	sj-metadata-musicbrainz.c
+
+juicerincludedir = $(includedir)/libjuicer
+juicerinclude_HEADERS =                       \
+	$(CDIO_HEADER) \
+	sj-metadata.h \
+	sj-metadata-musicbrainz.h
+
+libjuicer_la_LDFLAGS =                  \
+	libjuicer_common.a		\
+        -version-info $(JUICER_LT_VERSION)    \
+        -no-undefined
 if HAVE_CDIO
-sound_juicer_LDFLAGS += @CDIO_LIBS@
+libjuicer_la_LDFLAGS += @CDIO_LIBS@
 endif
+
 
 #
 # Build the GValue marshals
Index: src/sj-util.c
===================================================================
RCS file: /cvs/gnome/sound-juicer/src/sj-util.c,v
retrieving revision 1.23
diff -u -u -r1.23 sj-util.c
--- src/sj-util.c	22 Jun 2005 12:15:49 -0000	1.23
+++ src/sj-util.c	9 Jan 2006 15:08:28 -0000
@@ -20,7 +20,6 @@
  * Authors: Ross Burton <ross@burtonini.com>
  */
 
-#include "sound-juicer.h"
 #include "sj-util.h"
 
 #include <libgnomevfs/gnome-vfs-ops.h>
--- /dev/null	2006-01-09 13:38:03.406375128 +1100
+++ libjuicer.pc.in	2006-01-10 02:06:02.000000000 +1100
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+gconf_serverdir=@libexecdir@
+
+
+Name: libjuicer
+Description: SoundJuicer utility library
+Version: @VERSION@
+Requires: glib-2.0 gobject-2.0 gtk+-2.0 gnome-vfs-2.0 gnome-vfs-module-2.0 libmusicbrainz
+Libs: -L${libdir} -ljuicer
+Cflags: -I${includedir}/libjuicer
