diff -urN libwmf-0.2.8.4/configure.ac libwmf-0.2.8.4-haiku/configure.ac
--- libwmf-0.2.8.4/configure.ac	2009-03-07 01:58:56.000000000 +0000
+++ libwmf-0.2.8.4-haiku/configure.ac	2009-03-07 02:18:00.000000000 +0000
@@ -124,6 +124,9 @@
     os_win32=yes
     SYS_LIBM=""
     ;;
+  *haiku*|*beos*)
+    SYS_LIBM=""
+    ;;
   *)
     os_win32=no
     SYS_LIBM="-lm"
@@ -528,7 +531,7 @@
 			WMF_PNG_LDFLAGS="-lpng"
 		fi
 	],[	AC_MSG_ERROR(* * * unable to find libpng which is required by libwmf * * *)
-	],-lz -lm)
+	],-lz $SYS_LIBM)
 ],[	AC_MSG_ERROR(* * * unable to find "png.h" which is required by libwmf * * *)
 ])
 
@@ -645,7 +648,7 @@
 
 	CPPFLAGS="$CPPFLAGS $WMF_FT_CFLAGS $WMF_PNG_CFLAGS $WMF_Z_CFLAGS"
 	LDFLAGS="$LDFLAGS $WMF_FT_LDFLAGS $WMF_PNG_LDFLAGS $WMF_Z_LDFLAGS"
-	other_libs="$other_libs -lfreetype -lpng -lz -lm"
+	other_libs="$other_libs -lfreetype -lpng -lz $SYS_LIBM"
 
 	AC_CHECK_HEADER(gd.h,[
 		AC_CHECK_LIB(gd,gdClipSetAdd,[
diff -urN libwmf-0.2.8.4/configure.in libwmf-0.2.8.4-haiku/configure.in
--- libwmf-0.2.8.4/configure.in	2009-03-07 01:58:56.000000000 +0000
+++ libwmf-0.2.8.4-haiku/configure.in	2009-03-07 01:49:01.000000000 +0000
@@ -123,6 +123,9 @@
     os_win32=yes
     SYS_LIBM=""
     ;;
+  haiku*|beos*)
+    SYS_LIBM=""
+    ;;
   *)
     os_win32=no
     SYS_LIBM="-lm"

Patch to fix -lm issue on libwmf on Haiku
Patch to fix -lm issue on libwmf on Haiku

