diff -urN apr-1.4.6/config.layout apr-1.4.6-haiku/config.layout
--- apr-1.4.6/config.layout	2004-11-24 22:51:51.056360960 +0000
+++ apr-1.4.6-haiku/config.layout	2011-07-12 10:34:27.155189248 +0000
@@ -60,6 +60,23 @@
     runtimedir:    ${localstatedir}/run
 </Layout>
 
+#	Haiku Layout making use of finddir
+<Layout haiku>
+    prefix:        /boot/system
+    exec_prefix:   /boot/system
+    bindir:        /boot/system/bin
+    sbindir:       /boot/system/servers
+    libdir:        /boot/system/lib
+    libexecdir:    /boot/system/servers
+    mandir:        /boot/system/documentation/man
+    sysconfdir:    /boot/system/settings
+    datadir:       /boot/system/data
+    installbuilddir: /boot/develop/build
+    includedir:    /boot/system/include
+    localstatedir: /boot/system/var
+    runtimedir:    ${localstatedir}/log
+</Layout>
+
 #   Mac OS X Server (Rhapsody)
 <Layout Mac OS X Server>
     prefix:        /Local/Library/WebServer
diff -urN apr-1.4.6/configure.in apr-1.4.6-haiku/configure.in
--- apr-1.4.6/configure.in	2011-04-11 12:58:38.043253760 -0700
+++ apr-1.4.6-haiku/configure.in	2011-08-02 12:49:33.801112064 -0700
@@ -203,7 +203,7 @@
 AC_PROG_CPP
 AC_PROG_AWK
 AC_PROG_LN_S
-AC_PROG_RANLIB
+AC_PROG_LIBTOOL
 AC_PROG_INSTALL
 AC_CHECK_PROG(RM, rm, rm)
 AC_CHECK_PROG(AS, as, as)
@@ -672,9 +672,9 @@
       ac_cv_func_CreateFileMapping=yes
       ;;
    *)
+      AC_SEARCH_LIBS(socket, socket network)
       AC_SEARCH_LIBS(gethostbyname, nsl)
       AC_SEARCH_LIBS(gethostname, nsl)
-      AC_SEARCH_LIBS(socket, socket)
       AC_SEARCH_LIBS(crypt, crypt ufc)
       AC_CHECK_LIB(truerand, main)
       AC_SEARCH_LIBS(modf, m)
