mp3blaster-3.2.3 on Debian Sid

1. configure problem
./configure --without-oggvorbis --enable-static
<snip>
./configure: line 2193: -z: command not found
<snip>

patch:
--- configure.orig      2006-08-06 04:14:42 +0700
+++ configure   2007-04-11 16:14:54 +0700
@@ -2190,7 +2190,7 @@

#Custom C++ flags - later options override earlier ones
-if  -z "$CXXFLAGS"  ; then
+if test -z "$CXXFLAGS"  ; then
        CXXFLAGS="-O2 -Wall -W -fno-strength-reduce"
fi

2. make problem in nmixer
Making all in nmixer
make[2]: Entering directory `/home/andika/projects/igos/mp3blaster-3.2.3/nmixer'
g++  -g -O2  -static -L../mpegsound -L../nmixer -o nmixer  main.o -lncurses  -lnmixer -lpthread -lm  -lpthread
../nmixer/libnmixer.a(nmixer.o): In function `NMixer::DrawFixedStuff()':
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:540: undefined reference to `wchgat'
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:541: undefined reference to `wchgat'
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:542: undefined reference to `wchgat'
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:543: undefined reference to `wchgat'
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:545: undefined reference to `wchgat'
../nmixer/libnmixer.a(nmixer.o):/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:546: more undefined references to `wchgat' follow
../nmixer/libnmixer.a(nmixer.o): In function `NMixer::DrawScrollbar(short, int)':
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:293: undefined reference to `move'
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:244: undefined reference to `wchgat'
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:288: undefined reference to `wchgat'
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:234: undefined reference to `wchgat'
/home/andika/projects/igos/mp3blaster-3.2.3/nmixer/nmixer.cc:223: undefined reference to `wchgat'
collect2: ld returned 1 exit status

3. link problem
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libncurses.a(lib_mouse.o): In function `_nc_mouse_init':
(.text+0x862): undefined reference to `dlopen'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libncurses.a(lib_mouse.o): In function `_nc_mouse_init':
(.text+0x87d): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libncurses.a(lib_mouse.o): In function `_nc_mouse_init':
(.text+0x897): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libncurses.a(lib_mouse.o): In function `_nc_mouse_init':
(.text+0x8b1): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libncurses.a(lib_mouse.o): In function `_nc_mouse_init':
(.text+0x8cb): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libncurses.a(lib_mouse.o): In function `_nc_mouse_init':
(.text+0x8e8): undefined reference to `dlclose'
collect2: ld returned 1 exit status

patch:
--- configure.orig      2006-08-06 04:14:42 +0700
+++ configure   2007-04-11 16:14:54 +0700
@@ -5507,6 +5507,7 @@
if test "${enable_static+set}" = set; then
   enableval=$enable_static;  if test "$enableval" = "yes" ; then
       LDFLAGS="$LDFLAGS -static" ; HAVE_STATIC="yes"
+      LIBS="$LIBS -ldl"
     else HAVE_STATIC="no" ; fi
else
    HAVE_STATIC="no"

Please comment if my patch is ok or maybe there is better alternative.