diff -Nurd -x'*~' libcapsinetwork-0.3.0.orig/Makefile.am libcapsinetwork-0.3.0/Makefile.am
--- libcapsinetwork-0.3.0.orig/Makefile.am	2004-07-15 05:42:39.000000000 -0400
+++ libcapsinetwork-0.3.0/Makefile.am	2015-11-19 11:12:35.000000000 -0500
@@ -1,2 +1,3 @@
+ACLOCAL_AMFLAGS = -I m4
 EXTRA_DIST = AUTHORS ChangeLog depcomp
 SUBDIRS = src
diff -Nurd -x'*~' libcapsinetwork-0.3.0.orig/configure.ac libcapsinetwork-0.3.0/configure.ac
--- libcapsinetwork-0.3.0.orig/configure.ac	2004-07-15 05:39:28.000000000 -0400
+++ libcapsinetwork-0.3.0/configure.ac	2015-11-19 11:15:22.000000000 -0500
@@ -1,5 +1,7 @@
 # Process this file with autoconf to produce a configure script.
-AC_INIT(src/server.cpp)
+AC_INIT(libcapsinetwork, 0.3.0)
+AC_CONFIG_SRCDIR(src/server.cpp)
+AC_CONFIG_MACRO_DIRS([m4])
 
 AM_CONFIG_HEADER(config.h)
 
@@ -34,7 +36,7 @@
     AC_DEFINE(USE_INET_ATON,,[we can't use inet_pton()])
 fi
 
-AM_INIT_AUTOMAKE(libcapsinetwork, 0.3.0)
+AM_INIT_AUTOMAKE
 
 AC_OUTPUT([
   Makefile
diff -Nurd libcapsinetwork-0.3.0/src/Makefile.am libcapsinetwork-0.3.0-patched/src/Makefile.am
--- libcapsinetwork-0.3.0/src/Makefile.am	2004-07-15 05:39:28.000000000 -0400
+++ libcapsinetwork-0.3.0-patched/src/Makefile.am	2009-09-08 11:53:00.000000000 -0400
@@ -8,7 +8,7 @@
 
 noinst_PROGRAMS = exampleserver
 exampleserver_SOURCES = server.cpp
-exampleserver_LDADD = -L. -lcapsinetwork
+exampleserver_LDADD = ./libcapsinetwork.la
 exampleserverincdir = .
 
 noinst_HEADERS = listenport.h server.h
diff -Nurd libcapsinetwork-0.3.0/src/Makefile.in libcapsinetwork-0.3.0-patched/src/Makefile.in
--- libcapsinetwork-0.3.0/src/Makefile.in	2004-07-15 05:39:51.000000000 -0400
+++ libcapsinetwork-0.3.0-patched/src/Makefile.in	2009-09-08 11:48:36.000000000 -0400
@@ -96,7 +96,7 @@
 
 noinst_PROGRAMS = exampleserver
 exampleserver_SOURCES = server.cpp
-exampleserver_LDADD = -L. -lcapsinetwork
+exampleserver_LDADD = ./libcapsinetwork.la
 exampleserverincdir = .
 
 noinst_HEADERS = listenport.h server.h
diff -Nurd libcapsinetwork-0.3.0/src/listener.cpp libcapsinetwork-0.3.0-patched/src/listener.cpp
--- libcapsinetwork-0.3.0/src/listener.cpp	2004-07-15 05:39:28.000000000 -0400
+++ libcapsinetwork-0.3.0-patched/src/listener.cpp	2009-09-08 11:47:51.000000000 -0400
@@ -31,6 +31,7 @@
 
 #include <netdb.h>
 #include <unistd.h>
+#include <stdlib.h>
 
 #include "listener.h"
 #include "listenport.h"
diff -Nurd libcapsinetwork-0.3.0/src/listenport.cpp libcapsinetwork-0.3.0-patched/src/listenport.cpp
--- libcapsinetwork-0.3.0/src/listenport.cpp	2004-07-15 05:39:28.000000000 -0400
+++ libcapsinetwork-0.3.0-patched/src/listenport.cpp	2009-09-08 11:47:51.000000000 -0400
@@ -30,6 +30,7 @@
 #include <fcntl.h>
 #include <netdb.h>
 #include <unistd.h>
+#include <string.h>
 
 #include "listenport.h"
 
diff -Nurd libcapsinetwork-0.3.0/src/server.cpp libcapsinetwork-0.3.0-patched/src/server.cpp
--- libcapsinetwork-0.3.0/src/server.cpp	2004-07-15 05:39:28.000000000 -0400
+++ libcapsinetwork-0.3.0-patched/src/server.cpp	2009-09-08 11:47:51.000000000 -0400
@@ -26,6 +26,7 @@
 
 #include <string>
 #include <stdio.h>
+#include <stdlib.h>
 
 // In real applications, use the following include instead of the local.
 // #include <libcapsinetwork/socket.h>
diff -Nurd libcapsinetwork-0.3.0/src/socket.cpp libcapsinetwork-0.3.0-patched/src/socket.cpp
--- libcapsinetwork-0.3.0/src/socket.cpp	2004-07-15 05:39:28.000000000 -0400
+++ libcapsinetwork-0.3.0-patched/src/socket.cpp	2009-09-08 11:48:48.000000000 -0400
@@ -25,6 +25,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>
 
 #include "socket.h"
 
@@ -49,7 +50,7 @@
 const bool Socket::hasReadLine()
 {
 	static std::string newLine = "\r\n";
-	unsigned int pos = m_ioBuf.find_first_of(newLine);
+	std::string::size_type pos = m_ioBuf.find_first_of(newLine);
 
 	return (!(pos == std::string::npos));
 }
@@ -57,7 +58,7 @@
 const std::string Socket::readLine()
 {
 	static std::string newLine = "\r\n";
-	unsigned int pos = m_ioBuf.find_first_of(newLine);
+	std::string::size_type pos = m_ioBuf.find_first_of(newLine);
 
 	if (pos != std::string::npos)
 	{
