#!/bin/sh

# this is an ugly kludge to fix the libtool script generated by OSX'
# libtool 1.4.x. It is not necessary on any other platform and it
# should become obsolete with libtool 1.5.x

sed 's%archive_cmds=\"\\$nonopt \\$(test \\\\\\"x\\$module\\\\\\" = xyes && echo -bundle || echo -dynamiclib) \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs\\$linker_flags -install_name \\$rpath/\\$soname \\$verstring\"%archive_cmds=\"\\$nonopt \\$(test .\\$module = .yes \&\& echo -bundle \|\| echo -dynamiclib) \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs\\$linker_flags \\$(test .\\$module != .yes \&\& echo -install_name \\$rpath/\\$soname \\$verstring)\"%' < libtool > libtool.new
mv libtool libtool.orig
mv libtool.new libtool

