48c398
diff -up dhcp-4.2.1-P1/client/Makefile.am.sharedlib dhcp-4.2.1-P1/client/Makefile.am
48c398
--- dhcp-4.2.1-P1/client/Makefile.am.sharedlib	2011-06-30 17:04:29.476676590 +0200
48c398
+++ dhcp-4.2.1-P1/client/Makefile.am	2011-06-30 17:04:29.488676414 +0200
Adam Tkac 81227a
@@ -6,7 +6,7 @@ dhclient_SOURCES = clparse.c dhclient.c 
Adam Tkac 81227a
 		   scripts/solaris scripts/openwrt
Adam Tkac 81227a
 dhclient_CPPFLAGS = -DCLIENT_PATH='"$(sbindir)"' -DLOCALSTATEDIR='"$(localstatedir)"'
Adam Tkac 81227a
 dhclient_CFLAGS = -fpie
Adam Tkac 81227a
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
Adam Tkac 81227a
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
Adam Tkac 81227a
 		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
Adam Tkac 81227a
 dhclient_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
Adam Tkac 81227a
 
48c398
diff -up dhcp-4.2.1-P1/configure.ac.sharedlib dhcp-4.2.1-P1/configure.ac
48c398
--- dhcp-4.2.1-P1/configure.ac.sharedlib	2011-06-30 17:04:29.428677294 +0200
48c398
+++ dhcp-4.2.1-P1/configure.ac	2011-06-30 17:04:29.707673194 +0200
Adam Tkac 81227a
@@ -30,7 +30,8 @@ fi
Adam Tkac 81227a
 # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
Adam Tkac 81227a
 AC_USE_SYSTEM_EXTENSIONS
Adam Tkac 81227a
 
Adam Tkac 81227a
-AC_PROG_RANLIB
Adam Tkac 81227a
+# Use libtool to simplify building of shared libraries
Adam Tkac 81227a
+AC_PROG_LIBTOOL
Adam Tkac 81227a
 AC_CONFIG_HEADERS([includes/config.h])
Adam Tkac 81227a
 
Adam Tkac 81227a
 # we sometimes need to know byte order for building packets
48c398
diff -up dhcp-4.2.1-P1/dhcpctl/Makefile.am.sharedlib dhcp-4.2.1-P1/dhcpctl/Makefile.am
48c398
--- dhcp-4.2.1-P1/dhcpctl/Makefile.am.sharedlib	2011-06-30 17:04:29.311679013 +0200
48c398
+++ dhcp-4.2.1-P1/dhcpctl/Makefile.am	2011-06-30 17:04:29.489676399 +0200
Adam Tkac 81227a
@@ -1,15 +1,15 @@
Adam Tkac 81227a
 bin_PROGRAMS = omshell
Adam Tkac 81227a
-lib_LIBRARIES = libdhcpctl.a
Adam Tkac 81227a
+lib_LTLIBRARIES = libdhcpctl.la
Adam Tkac 81227a
 noinst_PROGRAMS = cltest
Adam Tkac 81227a
 man_MANS = omshell.1 dhcpctl.3
Adam Tkac 81227a
 EXTRA_DIST = $(man_MANS)
Adam Tkac 81227a
 
Adam Tkac 81227a
 omshell_SOURCES = omshell.c
Adam Tkac 81227a
-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
Adam Tkac 81227a
+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
Adam Tkac 81227a
 	        $(BIND9_LIBDIR) -ldns-export -lisc-export
Adam Tkac 81227a
 
Adam Tkac 81227a
-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
Adam Tkac 81227a
+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
Adam Tkac 81227a
 
Adam Tkac 81227a
 cltest_SOURCES = cltest.c
Adam Tkac 81227a
-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
Adam Tkac 81227a
+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
Adam Tkac 81227a
 	       $(BIND9_LIBDIR) -ldns-export -lisc-export
48c398
diff -up dhcp-4.2.1-P1/dst/base64.c.sharedlib dhcp-4.2.1-P1/dst/base64.c
48c398
--- dhcp-4.2.1-P1/dst/base64.c.sharedlib	2009-11-20 02:49:01.000000000 +0100
48c398
+++ dhcp-4.2.1-P1/dst/base64.c	2011-06-30 17:04:29.489676399 +0200
Adam Tkac 81227a
@@ -64,6 +64,7 @@ static const char rcsid[] = "$Id: base64
Adam Tkac 81227a
 
Adam Tkac 81227a
 #include <sys/socket.h>
Adam Tkac 81227a
 
Adam Tkac 81227a
+#include "dst_internal.h"
Adam Tkac 81227a
 #include "cdefs.h"
Adam Tkac 81227a
 #include "osdep.h"
Adam Tkac 81227a
 #include "arpa/nameser.h"
48c398
diff -up dhcp-4.2.1-P1/dst/Makefile.am.sharedlib dhcp-4.2.1-P1/dst/Makefile.am
48c398
--- dhcp-4.2.1-P1/dst/Makefile.am.sharedlib	2007-05-29 18:32:10.000000000 +0200
48c398
+++ dhcp-4.2.1-P1/dst/Makefile.am	2011-06-30 17:04:29.490676384 +0200
Adam Tkac 81227a
@@ -1,8 +1,8 @@
Adam Tkac 81227a
 AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
Adam Tkac 81227a
 
Adam Tkac 81227a
-lib_LIBRARIES = libdst.a
Adam Tkac 81227a
+lib_LTLIBRARIES = libdst.la
Adam Tkac 81227a
 
Adam Tkac 81227a
-libdst_a_SOURCES = dst_support.c dst_api.c hmac_link.c md5_dgst.c \
Adam Tkac 81227a
+libdst_la_SOURCES = dst_support.c dst_api.c hmac_link.c md5_dgst.c \
Adam Tkac 81227a
 		   base64.c prandom.c
Adam Tkac 81227a
 
Adam Tkac 81227a
 EXTRA_DIST = dst_internal.h md5.h md5_locl.h
48c398
diff -up dhcp-4.2.1-P1/omapip/Makefile.am.sharedlib dhcp-4.2.1-P1/omapip/Makefile.am
48c398
--- dhcp-4.2.1-P1/omapip/Makefile.am.sharedlib	2011-06-30 17:04:29.477676575 +0200
48c398
+++ dhcp-4.2.1-P1/omapip/Makefile.am	2011-06-30 17:04:29.490676384 +0200
Adam Tkac 81227a
@@ -1,9 +1,9 @@
Adam Tkac 81227a
 AM_CFLAGS = -fpic
Adam Tkac 81227a
 
Adam Tkac 81227a
-lib_LIBRARIES = libomapi.a
Adam Tkac 81227a
+lib_LTLIBRARIES = libomapi.la
Adam Tkac 81227a
 noinst_PROGRAMS = svtest
Adam Tkac 81227a
 
Adam Tkac 81227a
-libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
Adam Tkac 81227a
+libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
Adam Tkac 81227a
 		     errwarn.c listener.c dispatch.c generic.c support.c \
Adam Tkac 81227a
 		     handle.c message.c convert.c hash.c auth.c inet_addr.c \
Adam Tkac 81227a
 		     array.c trace.c toisc.c iscprint.c isclib.c
Adam Tkac 81227a
@@ -13,5 +13,5 @@ EXTRA_DIST = $(man_MANS)
Adam Tkac 81227a
 
Adam Tkac 81227a
 svtest_SOURCES = test.c
Adam Tkac 81227a
 svtest_CFLAGS = -fpie
Adam Tkac 81227a
-svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
Adam Tkac 81227a
+svtest_LDADD = libomapi.la $(BIND9_LIBDIR) -ldns-export -lisc-export
Adam Tkac 81227a
 
48c398
diff -up dhcp-4.2.1-P1/relay/Makefile.am.sharedlib dhcp-4.2.1-P1/relay/Makefile.am
48c398
--- dhcp-4.2.1-P1/relay/Makefile.am.sharedlib	2011-06-30 17:04:29.478676560 +0200
48c398
+++ dhcp-4.2.1-P1/relay/Makefile.am	2011-06-30 17:04:29.490676384 +0200
Adam Tkac 81227a
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
Adam Tkac 81227a
 sbin_PROGRAMS = dhcrelay
Adam Tkac 81227a
 dhcrelay_SOURCES = dhcrelay.c
Adam Tkac 81227a
 dhcrelay_CFLAGS = -fpie
Adam Tkac 81227a
-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
Adam Tkac 81227a
+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
48c398
 		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
Adam Tkac 81227a
 dhcrelay_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
Adam Tkac 81227a
 
48c398
diff -up dhcp-4.2.1-P1/server/Makefile.am.sharedlib dhcp-4.2.1-P1/server/Makefile.am
48c398
--- dhcp-4.2.1-P1/server/Makefile.am.sharedlib	2011-06-30 17:04:29.478676560 +0200
48c398
+++ dhcp-4.2.1-P1/server/Makefile.am	2011-06-30 17:06:32.831862566 +0200
48c398
@@ -7,9 +7,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
Adam Tkac 81227a
 		dhcpv6.c mdb6.c ldap.c ldap_casa.c
Adam Tkac 81227a
 
Adam Tkac 81227a
 dhcpd_CFLAGS = $(LDAP_CFLAGS) -fpie
Adam Tkac 81227a
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
48c398
-	      ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export \
48c398
-	      $(CAPNG_LDADD)
Adam Tkac 81227a
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
48c398
+	      ../dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) \
48c398
+	      -ldns-export -lisc-export $(CAPNG_LDADD)
Adam Tkac 81227a
 dhcpd_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
Adam Tkac 81227a
 
Adam Tkac 81227a
 man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5