diff -urN Python-3.0rc1/configure.in Python-3.0rc1-haiku/configure.in
--- Python-3.0rc1/configure.in	2008-09-07 19:23:19.000000000 +0000
+++ Python-3.0rc1-haiku/configure.in	2008-10-10 12:23:15.000000000 +0000
@@ -230,6 +230,7 @@
 	case $MACHDEP in
 	cygwin*) MACHDEP="cygwin";;
 	darwin*) MACHDEP="darwin";;
+       haiku*) MACHDEP="haiku";;
 	atheos*) MACHDEP="atheos";;
         irix646) MACHDEP="irix6";;
 	'')	MACHDEP="unknown";;
@@ -3009,7 +3010,7 @@
 # check for --with-libm=...
 AC_SUBST(LIBM)
 case $ac_sys_system in
-Darwin) ;;
+Darwin|Haiku*) ;;
 *) LIBM=-lm
 esac
 AC_MSG_CHECKING(for --with-libm=STRING)
