diff -Nurd -x'*~' babl-0.0.22.orig/babl/babl-extension.c babl-0.0.22/babl/babl-extension.c
--- babl-0.0.22.orig/babl/babl-extension.c	2008-04-15 17:10:07.000000000 -0400
+++ babl-0.0.22/babl/babl-extension.c	2008-11-17 13:14:34.000000000 -0500
@@ -238,7 +238,7 @@
               stat (path, &st);
 
               if ((extension = strrchr (dentry->d_name, '.')) != NULL &&
-                  !strcmp (extension, SHREXT))
+                  !strcmp (extension, LTDL_SHLIB_EXT))
                 {
                   babl_extension_load (path);
                 }
diff -Nurd -x'*~' babl-0.0.22.orig/babl/base/Makefile.am babl-0.0.22/babl/base/Makefile.am
--- babl-0.0.22.orig/babl/base/Makefile.am	2007-11-10 08:48:07.000000000 -0500
+++ babl-0.0.22/babl/base/Makefile.am	2008-11-17 14:30:07.000000000 -0500
@@ -18,7 +18,7 @@
 noinst_LTLIBRARIES= libbase.la
 libbase_la_SOURCES= $(h_sources) $(c_sources) 
 
-EXTRA_DIST := 		\
+EXTRA_DIST = 		\
 	rgb-constants.h	\
 	util.h
 
diff -Nurd -x'*~' babl-0.0.22.orig/configure.ac babl-0.0.22/configure.ac
--- babl-0.0.22.orig/configure.ac	2008-06-12 14:54:21.000000000 -0400
+++ babl-0.0.22/configure.ac	2008-11-17 13:14:34.000000000 -0500
@@ -178,30 +178,9 @@
 ####################################################
 # Check how to generate plug-ins (with gcc at least)
 ####################################################
+# sets loadable-module extension in LTDL_SHLIB_EXT token via AC_DEFINE
+AC_LTDL_SHLIBEXT
 
-AC_MSG_CHECKING([for some Win32 platform])
-case "$target_or_host" in 
-  *-*-darwin*)                 # darwin
-    shrext=.dylib
-    dynamiclib=-dynamiclib
-    ;;
-  *-*-mingw* | *-*-cygwin*)    # windows
-    shrext=.dll
-    dynamiclib=-shared
-    ;;
-  *)                           # linux (and BSD?)
-    dynamiclib=-shared
-    shrext=.so
-    ;;
-esac
-
-SHREXT=$shrext
-AC_SUBST(SHREXT)
-AC_DEFINE_UNQUOTED(SHREXT,     "$shrext",     [File extension for shared libraries])
-
-DYNAMICLIB=$dynamiclib
-AC_SUBST(DYNAMICLIB)
-AC_DEFINE_UNQUOTED(DYNAMICLIB, "$dynamiclib", [Dynamic shared library])
 
 dnl ===========================================================================
 
@@ -377,7 +356,7 @@
 AC_DEFINE_UNQUOTED(BABL_DIR_SEPARATOR, "$DIR_SEP", [separator between directories in BABL_PATH])
 
 AC_DEFINE_UNQUOTED(BABL_LIBRARY, "$PACKAGE_NAME-$BABL_API_VERSION", [name of BABL library])
-
+AC_SUBST(BABL_LIBRARY)
 
 
 dnl ===========================================================================
diff -Nurd -x'*~' babl-0.0.22.orig/docs/graphics/Makefile.am babl-0.0.22/docs/graphics/Makefile.am
--- babl-0.0.22.orig/docs/graphics/Makefile.am	2007-11-10 08:48:08.000000000 -0500
+++ babl-0.0.22/docs/graphics/Makefile.am	2008-11-17 14:31:43.000000000 -0500
@@ -31,7 +31,7 @@
 if HAVE_INKSCAPE
 dist-check-inkscape:
 
-%.png: %.svg
+.svg.png:
 	$(INKSCAPE_CMD)
 #-e $@ $< 2>/dev/null
 
diff -Nurd -x'*~' babl-0.0.22.orig/extensions/Makefile.am babl-0.0.22/extensions/Makefile.am
--- babl-0.0.22.orig/extensions/Makefile.am	2008-05-23 10:37:21.000000000 -0400
+++ babl-0.0.22/extensions/Makefile.am	2008-11-17 14:27:02.000000000 -0500
@@ -1,60 +1,48 @@
 # General minimalistic compile file for self contained single
 # file babl_extensions
 
-if OS_WIN32
-no_undefined = -no-undefined
-libbabldlla=$(top_builddir)/babl/.libs/libbabl-$(BABL_API_VERSION).dll.a
-endif
-
-CFILES          = $(wildcard $(srcdir)/*.c)
-SOBJS           = $(subst $(srcdir)/,,$(CFILES:.c=$(SHREXT)))
-INSTALLED_ITEMS = $(subst $(srcdir),$(ext_dir),$(CFILES:.c=$(SHREXT)))
-EXTRA_DIST      = $(wildcard *.[ch])
-
-all-local: $(SOBJS)
-
-CFLAGS += \
-	-I $(top_builddir)		\
-	-I $(top_srcdir)		\
-	-I $(top_srcdir)/babl		\
-	-I $(top_srcdir)/extensions	\
+INCLUDES = \
+	-I$(top_builddir)		\
+	-I$(top_srcdir)		\
+	-I$(top_srcdir)/babl		\
+	-I$(top_srcdir)/extensions	\
 	-fPIC
 
-LDFLAGS += $(DYNAMICLIB)
-
-if OS_WIN32
-LDADD    = $(no-undefined) $(libbabldlla) $(MATH_LIB)
-else
-LDADD    = $(top_builddir)/babl/.libs/libbabl-$(BABL_API_VERSION)$(SHREXT) $(MATH_LIB)
-endif
-
-%$(SHREXT): %.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
-
-# if extension needing external libraries are to be # compiled with this make
-# file, each of them can be added according to the this pattern:
-# extra$(SHREXT): extra.c
-#	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<  [own compile and link flags]
-
-CIE-Lab$(SHREXT): CIE-Lab.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
-
-sse-fixups$(SHREXT): sse-fixups.c
-	$(CC) $(CFLAGS) $(MMX_EXTRA_CFLAGS) $(SSE_EXTRA_CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
-#lcms$(SHREXT): lcms.c
-#	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) `pkg-config lcms --cflags --libs`
-#############################################################################
-
-clean-local:
-	rm -f $(SOBJS)
-
-ext_dir = $(DESTDIR)$(libdir)/babl-@BABL_API_VERSION@
+LIBADD = $(top_builddir)/babl/libbabl-$(BABL_API_VERSION).la
+AM_LDFLAGS = -module -avoid-version -no-undefined
 
-install-exec-local: all-local
-	$(INSTALL) -d $(ext_dir)
-	$(INSTALL) $(SOBJS) $(ext_dir)
+extdir = $(libdir)/babl-@BABL_API_VERSION@
 
-uninstall-local:
-	rm -f $(INSTALLED_ITEMS)
+# each plugin is listed in extensions_LTLIBRARIES with a .la extension
+# (will be replaced by the platform-dependent extension by libtool)
+ext_LTLIBRARIES =	\
+	CIE-Lab.la	\
+	gegl-fixups.la	\
+	gggl-lies.la	\
+	gggl.la		\
+	gimp-8bit.la	\
+	naive-CMYK.la	\
+	sse-fixups.la
 
-check-local: all-local
+# the source file(s) for each extensions_LTLIBRARIES are listed here
+# (periods and hyphens in an extensions_LTLIBRARIES entry are
+# converted to underscores for the *_SOURCES variable-name)
+# INCLUDES is an implicit default for all extensions. If special flags
+# are needed for a certain foo.la extension, it can be over-ridden,
+# and also other libraries can be added as needed:
+# foo_la_CPPFLAGS = -Isomedir $(INCLUDES)
+# foo_la_LIBADD = -lsomelib $(LIBADD)
+CIE_Lab_la_SOURCES = CIE-Lab.c
+CIE_Lab_la_LIBADD = $(LIBADD)
+gegl_fixups_la_SOURCES = gegl-fixups.c
+gegl_fixups_la_LIBADD = $(LIBADD)
+gggl_lies_la_SOURCES = gggl-lies.c
+gggl_lies_la_LIBADD = $(LIBADD)
+gggl_la_SOURCES = gggl.c
+gggl_la_LIBADD = $(LIBADD)
+gimp_8bit_la_SOURCES = gimp-8bit.c
+gimp_8bit_la_LIBADD = $(LIBADD)
+naive_CMYK_la_SOURCES = naive-CMYK.c
+naive_CMYK_la_LIBADD = $(LIBADD)
+sse_fixups_la_SOURCES = sse-fixups.c
+sse_fixups_la_LIBADD = $(LIBADD)
