diff -Naur bakefile-0.2.8/autoconf/bakefile.m4 bakefile-0.2.8.haiku/autoconf/bakefile.m4
--- bakefile-0.2.8/autoconf/bakefile.m4	2009-10-24 12:10:42.060030976 +0200
+++ bakefile-0.2.8.haiku/autoconf/bakefile.m4	2010-07-11 15:43:22.013893632 +0200
@@ -77,6 +77,7 @@
     PLATFORM_MACOSX=0
     PLATFORM_OS2=0
     PLATFORM_BEOS=0
+    PLATFORM_HAIKU=0
 
     if test "x$BAKEFILE_FORCE_PLATFORM" = "x"; then
         case "${BAKEFILE_HOST}" in
@@ -96,6 +97,9 @@
             *-*-beos* )
                 PLATFORM_BEOS=1
             ;;
+            *-*-haiku* )
+                PLATFORM_HAIKU=1
+            ;;
             powerpc-apple-macos* )
                 PLATFORM_MAC=1
                 PLATFORM_MACOS=1
@@ -125,6 +129,9 @@
             beos )
                 PLATFORM_BEOS=1
             ;;
+            haiku )
+                PLATFORM_HAIKU=1
+            ;;
             * )
                 AC_MSG_ERROR([Unknown platform: $BAKEFILE_FORCE_PLATFORM])
             ;;
@@ -139,6 +146,7 @@
     AC_SUBST(PLATFORM_MACOSX)
     AC_SUBST(PLATFORM_OS2)
     AC_SUBST(PLATFORM_BEOS)
+    AC_SUBST(PLATFORM_HAIKU)
 ])
 
 
@@ -181,7 +189,7 @@
         fi
         ;;
 
-      i*86-*-beos* )
+      i*86-*-beos* | i*86-*-haiku*)
         LDFLAGS="-L/boot/develop/lib/x86 $LDFLAGS"
         ;;
     esac
@@ -413,7 +421,7 @@
         fi
       ;;
 
-      *-*-beos* )
+      *-*-beos* | *-*-haiku*)
         dnl can't use gcc under BeOS for shared library creation because it
         dnl complains about missing 'main'
         SHARED_LD_CC="${LD} -nostart -o"
diff -Naur bakefile-0.2.8/rules/autoconf.bkl bakefile-0.2.8.haiku/rules/autoconf.bkl
--- bakefile-0.2.8/rules/autoconf.bkl	2009-06-21 21:04:08.005505024 +0200
+++ bakefile-0.2.8.haiku/rules/autoconf.bkl	2010-07-11 15:49:26.029097984 +0200
@@ -78,6 +78,7 @@
     <option name="PLATFORM_MACOSX"/>
     <option name="PLATFORM_OS2"/>
     <option name="PLATFORM_BEOS"/>
+    <option name="PLATFORM_HAIKU"/>
 
     <option name="srcdir" never_empty="1"/>
     <option name="top_srcdir"/>
diff -Naur bakefile-0.2.8/rules/common.bkl bakefile-0.2.8.haiku/rules/common.bkl
--- bakefile-0.2.8/rules/common.bkl	2009-03-26 20:34:42.005505024 +0100
+++ bakefile-0.2.8.haiku/rules/common.bkl	2010-07-11 15:49:26.029360128 +0200
@@ -42,6 +42,7 @@
     <set var="PLATFORM_MACOSX" overwrite="0">0</set>
     <set var="PLATFORM_OS2" overwrite="0">0</set>
     <set var="PLATFORM_BEOS" overwrite="0">0</set>
+    <set var="PLATFORM_HAIKU" overwrite="0">0</set>
     <set var="PLATFORM_SYMBIAN" overwrite="0">0</set>
 
     <define-rule name="compilation_rule">
