diff -urN openssl-1.0.0e/Configure openssl-1.0.0e-haiku/Configure
--- openssl-1.0.0e/Configure	2010-11-30 22:19:26.013631488 +0000
+++ openssl-1.0.0e-haiku/Configure	2010-12-10 09:33:29.000000000 +0000
@@ -582,6 +582,9 @@
 "uClinux-dist","$ENV{'CC'}:\$(CFLAGS)::-D_REENTRANT::\$(LDFLAGS) \$(LDLIBS):BN_LLONG:::::::::::::::$ENV{'LIBSSL_dlfcn'}:linux-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):$ENV{'RANLIB'}::",
 "uClinux-dist64","$ENV{'CC'}:\$(CFLAGS)::-D_REENTRANT::\$(LDFLAGS) \$(LDLIBS):SIXTY_FOUR_BIT_LONG:::::::::::::::$ENV{'LIBSSL_dlfcn'}:linux-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):$ENV{'RANLIB'}::",
 
+##### Haiku
+"haiku-x86",	"gcc:-DL_ENDIAN -O2 -fomit-frame-pointer -Wall::-D_REENTRANT::-lnetwork:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:haiku-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+
 );
 
 my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
diff -urN openssl-1.0.0e/Makefile.shared openssl-1.0.0e-haiku/Makefile.shared
--- openssl-1.0.0e/Makefile.shared	2010-08-21 11:36:49.004456448 +0000
+++ openssl-1.0.0e-haiku/Makefile.shared	2010-12-10 09:33:29.000000000 +0000
@@ -594,10 +594,10 @@
 symlink.cygwin symlink.alpha-osf1 symlink.tru64 symlink.tru64-rpath symlink.beos:
 
 # Compatibility targets
-link_o.bsd-gcc-shared link_o.linux-shared link_o.gnu-shared: link_o.gnu
-link_a.bsd-gcc-shared link_a.linux-shared link_a.gnu-shared: link_a.gnu
-link_app.bsd-gcc-shared link_app.linux-shared link_app.gnu-shared: link_app.gnu
-symlink.bsd-gcc-shared symlink.bsd-shared symlink.linux-shared symlink.gnu-shared: symlink.gnu
+link_o.bsd-gcc-shared link_o.linux-shared link_o.gnu-shared link_o.haiku-shared: link_o.gnu
+link_a.bsd-gcc-shared link_a.linux-shared link_a.gnu-shared link_a.haiku-shared: link_a.gnu
+link_app.bsd-gcc-shared link_app.linux-shared link_app.gnu-shared link_app.haiku-shared: link_app.gnu
+symlink.bsd-gcc-shared symlink.bsd-shared symlink.linux-shared symlink.gnu-shared symlink.haiku-shared: symlink.gnu
 link_o.bsd-shared: link_o.bsd
 link_a.bsd-shared: link_a.bsd
 link_app.bsd-shared: link_app.bsd
diff -urN openssl-1.0.0e/config openssl-1.0.0e-haiku/config
--- openssl-1.0.0e/config	2010-03-09 17:08:39.013369344 +0000
+++ openssl-1.0.0e-haiku/config	2010-12-10 09:33:29.000000000 +0000
@@ -134,6 +134,10 @@
 	echo "${MACHINE}-dg-dgux"; exit 0
 	;;
 
+    Haiku:*:BePC)
+    echo "i586-pc-haiku"; exit 0
+    ;;
+
     HI-UX:*)
 	echo "${MACHINE}-hi-hiux"; exit 0
 	;;
@@ -799,6 +803,8 @@
 	    options="$options no-asm"
 	fi
 	;;
+     i586-*-haiku) OUT="haiku-x86" ;;
+
   # these are all covered by the catchall below
   # *-dgux) OUT="dgux" ;;
   mips-sony-newsos4) OUT="newsos4-gcc" ;;
