MLT static builds: Help needed

I am trying to make static builds of MLT.
This is for writing compilation guidelines for packagers.
Can you help me compile?

Try this patch.
Index: mlt-0.3.2/src/modules/avformat/configure
--- mlt-0.3.2.orig/src/modules/avformat/configure    2008-12-16 10:34:29.000000000 +0100
+++ mlt-0.3.2/src/modules/avformat/configure    2008-12-16 10:35:01.000000000 +0100
@@ -123,7 +123,7 @@
         echo "PREFIX=$shared_ffmpeg" >> config.mak
         echo "CFLAGS+=$(pkg-config --cflags libavformat) $TMP_CFLAGS" >> config.mak
-        echo "LDFLAGS+=$(pkg-config --libs libavformat)" >> config.mak
+        echo "LDFLAGS+=/usr/lib/libavformat.a" >> config.mak
         [ -d "$shared_ffmpeg/include/ffmpeg/libavformat" ] &&
             echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg/libavformat -I$shared_ffmpeg/include/ffmpeg/libavcodec" >> config.mak
         [ -d "$shared_ffmpeg/include/libavformat" ] &&
Index: mlt-0.3.2/src/modules/avformat/Makefile
--- mlt-0.3.2.orig/src/modules/avformat/Makefile    2008-12-16 10:35:11.000000000 +0100
+++ mlt-0.3.2/src/modules/avformat/Makefile    2008-12-16 10:36:07.000000000 +0100
@@ -17,11 +17,11 @@
+LDFLAGS+=/usr/lib/libavformat.a /usr/lib/libavcodec.a /usr/lib/libavutil.a /usr/lib/libavdevice.a $(EXTRA_LIBS) -lmlt
 ifdef SWSCALE
+    LDFLAGS+=/usr/lib/libswscale.a

While this may fix a build against a static installation of ffmpeg in /usr, it clearly is not advisable to hardcode ffmpeg lib paths.

Rather, some option should be passed to mlt, that makes it do "-static" on the linker line.

Thanks Christian, it compiles fine. libmltavformat is linked staticly.

Then I test using inigo:
inigo out.ogv
mlt_repository.c, mlt_repository_init: failed to dlopen /usr/lib/mlt/
It seems more tricky ... compiling staticly may have side effects.
For the moment, I am about to give up this experience, until someone comes up with a clean solution.

Of course the /usr path is only here for an example.
The -static flags does nothing.