summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2015-08-29 15:30:32 +0200
committerFrancis Dupont <fdupont@isc.org>2015-08-29 15:30:32 +0200
commitc488058ea2f87e043ce36aadf7ed6926f67b1f2e (patch)
tree5f506783838ed01773a3b7e8ea72a03c24f4ac72
parent[master] Updated git hash (diff)
downloadkea-c488058ea2f87e043ce36aadf7ed6926f67b1f2e.tar.xz
kea-c488058ea2f87e043ce36aadf7ed6926f67b1f2e.zip
[3911a] Reorganized library Makefile.am files (exception, util, log)
-rw-r--r--src/lib/exceptions/tests/Makefile.am7
-rw-r--r--src/lib/log/Makefile.am6
-rw-r--r--src/lib/log/compiler/Makefile.am2
-rw-r--r--src/lib/log/interprocess/Makefile.am2
-rw-r--r--src/lib/log/interprocess/tests/Makefile.am5
-rw-r--r--src/lib/log/logger_manager.h4
-rw-r--r--src/lib/log/logger_name.cc4
-rw-r--r--src/lib/log/tests/Makefile.am47
-rw-r--r--src/lib/log/tests/logger_lock_test.cc2
-rw-r--r--src/lib/log/tests/logger_manager_unittest.cc2
-rw-r--r--src/lib/log/tests/logger_unittest.cc2
-rw-r--r--src/lib/util/Makefile.am2
-rw-r--r--src/lib/util/io/fd.cc4
-rw-r--r--src/lib/util/io/fd_share.cc4
-rw-r--r--src/lib/util/io/socketsession.cc8
-rw-r--r--src/lib/util/memory_segment_local.cc4
-rw-r--r--src/lib/util/tests/Makefile.am4
-rw-r--r--src/lib/util/threads/sync.cc2
-rw-r--r--src/lib/util/threads/tests/Makefile.am3
-rw-r--r--src/lib/util/threads/thread.cc6
-rw-r--r--src/lib/util/unittests/Makefile.am7
-rw-r--r--src/lib/util/unittests/fork.cc4
-rw-r--r--src/lib/util/unittests/newhook.cc4
-rw-r--r--src/lib/util/unittests/resource.cc4
-rw-r--r--src/lib/util/unittests/testdata.cc4
-rw-r--r--src/lib/util/unittests/wiredata.cc4
26 files changed, 79 insertions, 68 deletions
diff --git a/src/lib/exceptions/tests/Makefile.am b/src/lib/exceptions/tests/Makefile.am
index 500f10b8d9..8006d1fad6 100644
--- a/src/lib/exceptions/tests/Makefile.am
+++ b/src/lib/exceptions/tests/Makefile.am
@@ -1,6 +1,4 @@
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
-AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
-
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_STATIC_LINK
@@ -19,8 +17,9 @@ run_unittests_SOURCES = run_unittests.cc
run_unittests_SOURCES += exceptions_unittest.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(GTEST_LDFLAGS)
-run_unittests_LDADD = $(GTEST_LDADD)
-run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
+run_unittests_LDADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
+run_unittests_LDADD += $(GTEST_LDADD)
+
endif
noinst_PROGRAMS = $(TESTS)
diff --git a/src/lib/log/Makefile.am b/src/lib/log/Makefile.am
index f626bbb4c5..c4616b0d9e 100644
--- a/src/lib/log/Makefile.am
+++ b/src/lib/log/Makefile.am
@@ -43,8 +43,10 @@ if USE_GXX
libkea_log_la_CXXFLAGS += -Wno-unused-parameter
endif
libkea_log_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
-libkea_log_la_LIBADD = $(top_builddir)/src/lib/util/libkea-util.la
-libkea_log_la_LIBADD += interprocess/libkea-log_interprocess.la
+libkea_log_la_LIBADD = $(top_builddir)/src/lib/log/interprocess/libkea-log_interprocess.la
+libkea_log_la_LIBADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
+libkea_log_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
+libkea_log_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
libkea_log_la_LIBADD += $(LOG4CPLUS_LIBS)
libkea_log_la_LDFLAGS = -no-undefined -version-info 1:0:1
diff --git a/src/lib/log/compiler/Makefile.am b/src/lib/log/compiler/Makefile.am
index f8ac5accbb..00e7540a2c 100644
--- a/src/lib/log/compiler/Makefile.am
+++ b/src/lib/log/compiler/Makefile.am
@@ -15,5 +15,7 @@ bin_PROGRAMS = message
message_SOURCES = message.cc
message_LDADD = $(top_builddir)/src/lib/log/libkea-log.la
+message_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
message_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
message_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
+message_LDADD += $(LOG4CPLUS_LIBS)
diff --git a/src/lib/log/interprocess/Makefile.am b/src/lib/log/interprocess/Makefile.am
index 2e949d16b8..cd51d00e8a 100644
--- a/src/lib/log/interprocess/Makefile.am
+++ b/src/lib/log/interprocess/Makefile.am
@@ -16,6 +16,6 @@ libkea_log_interprocess_la_SOURCES += interprocess_sync_file.cc
libkea_log_interprocess_la_SOURCES += interprocess_sync_null.h
libkea_log_interprocess_la_SOURCES += interprocess_sync_null.cc
-libkea_log_interprocess_la_LIBADD = $(top_builddir)/src/lib/util/threads/libkea-threads.la
+libkea_log_interprocess_la_LIBADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
EXTRA_DIST = README
diff --git a/src/lib/log/interprocess/tests/Makefile.am b/src/lib/log/interprocess/tests/Makefile.am
index 9502daff9d..14cff1c401 100644
--- a/src/lib/log/interprocess/tests/Makefile.am
+++ b/src/lib/log/interprocess/tests/Makefile.am
@@ -27,9 +27,10 @@ run_unittests_SOURCES += interprocess_sync_null_unittest.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
-run_unittests_LDADD = ../libkea-log_interprocess.la
+run_unittests_LDADD = $(top_builddir)/src/lib/log/interprocess/libkea-log_interprocess.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
-run_unittests_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
+run_unittests_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
+run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
run_unittests_LDADD += $(GTEST_LDADD)
endif
diff --git a/src/lib/log/logger_manager.h b/src/lib/log/logger_manager.h
index 4e4a67e8ee..1895490a87 100644
--- a/src/lib/log/logger_manager.h
+++ b/src/lib/log/logger_manager.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
#ifndef LOGGER_MANAGER_H
#define LOGGER_MANAGER_H
-#include "exceptions/exceptions.h"
+#include <exceptions/exceptions.h>
#include <util/threads/sync.h>
#include <log/logger_specification.h>
diff --git a/src/lib/log/logger_name.cc b/src/lib/log/logger_name.cc
index 4c7261c852..828e7d6c43 100644
--- a/src/lib/log/logger_name.cc
+++ b/src/lib/log/logger_name.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -13,7 +13,7 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <string>
-#include "log/logger_name.h"
+#include <log/logger_name.h>
namespace isc {
namespace log {
diff --git a/src/lib/log/tests/Makefile.am b/src/lib/log/tests/Makefile.am
index 6f10b7bb33..c56fb69dd9 100644
--- a/src/lib/log/tests/Makefile.am
+++ b/src/lib/log/tests/Makefile.am
@@ -27,6 +27,7 @@ logger_example_SOURCES = logger_example.cc
logger_example_CPPFLAGS = $(AM_CPPFLAGS)
logger_example_LDFLAGS = $(AM_LDFLAGS)
logger_example_LDADD = $(top_builddir)/src/lib/log/libkea-log.la
+logger_example_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
logger_example_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
logger_example_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
logger_example_LDADD += $(AM_LDADD) $(LOG4CPLUS_LIBS)
@@ -36,6 +37,7 @@ init_logger_test_SOURCES = init_logger_test.cc
init_logger_test_CPPFLAGS = $(AM_CPPFLAGS)
init_logger_test_LDFLAGS = $(AM_LDFLAGS)
init_logger_test_LDADD = $(top_builddir)/src/lib/log/libkea-log.la
+init_logger_test_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
init_logger_test_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
init_logger_test_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
init_logger_test_LDADD += $(AM_LDADD) $(LOG4CPLUS_LIBS)
@@ -45,20 +47,19 @@ buffer_logger_test_SOURCES = buffer_logger_test.cc
buffer_logger_test_CPPFLAGS = $(AM_CPPFLAGS)
buffer_logger_test_LDFLAGS = $(AM_LDFLAGS)
buffer_logger_test_LDADD = $(top_builddir)/src/lib/log/libkea-log.la
+buffer_logger_test_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
buffer_logger_test_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
buffer_logger_test_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
buffer_logger_test_LDADD += $(AM_LDADD) $(LOG4CPLUS_LIBS)
-# This test directly uses libkea-threads, and on some systems it seems to
-# require explicit LDADD (even if libkea-log has indirect dependencies)
noinst_PROGRAMS += logger_lock_test
logger_lock_test_SOURCES = logger_lock_test.cc
nodist_logger_lock_test_SOURCES = log_test_messages.cc log_test_messages.h
logger_lock_test_CPPFLAGS = $(AM_CPPFLAGS)
logger_lock_test_LDFLAGS = $(AM_LDFLAGS)
logger_lock_test_LDADD = $(top_builddir)/src/lib/log/libkea-log.la
-logger_lock_test_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
logger_lock_test_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
+logger_lock_test_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
logger_lock_test_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
logger_lock_test_LDADD += $(AM_LDADD) $(LOG4CPLUS_LIBS)
@@ -69,19 +70,22 @@ if HAVE_GTEST
TESTS =
# Define the flags used in each set of tests
+TESTSCXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
# Workaround unused variables tcout and tcerr in log4cplus's streams.h.
-AM_CXXFLAGS += -Wno-unused-variable
+TESTSCXXFLAGS += -Wno-unused-variable
endif
-AM_CPPFLAGS += $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES)
-AM_LDFLAGS += $(GTEST_LDFLAGS)
-
-AM_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
-AM_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
-AM_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
-AM_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
-AM_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
-AM_LDADD += $(GTEST_LDADD)
+TESTSCPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES)
+TESTSLDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
+
+TESTSLDADD = $(AM_LDADD)
+TESTSLDADD += $(top_builddir)/src/lib/log/libkea-log.la
+TESTSLDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
+TESTSLDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
+TESTSLDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
+TESTSLDADD += $(top_builddir)/src/lib/util/libkea-util.la
+TESTSLDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
+TESTSLDADD += $(LOG4CPLUS_LIBS) $(GTEST_LDADD)
# Set of unit tests for the general logging classes
TESTS += run_unittests
@@ -100,11 +104,10 @@ run_unittests_SOURCES += output_option_unittest.cc
run_unittests_SOURCES += buffer_appender_unittest.cc
nodist_run_unittests_SOURCES = log_test_messages.cc log_test_messages.h
-run_unittests_CPPFLAGS = $(AM_CPPFLAGS)
-run_unittests_CXXFLAGS = $(AM_CXXFLAGS)
-run_unittests_LDADD = $(AM_LDADD)
-run_unittests_LDADD += $(LOG4CPLUS_LIBS)
-run_unittests_LDFLAGS = $(AM_LDFLAGS)
+run_unittests_CPPFLAGS = $(TESTSCPPFLAGS)
+run_unittests_CXXFLAGS = $(TESTSCXXFLAGS)
+run_unittests_LDADD = $(TESTSLDADD)
+run_unittests_LDFLAGS = $(TESTSLDFLAGS)
# logging initialization tests. These are put in separate programs to
# ensure that the initialization status at the start of each test is known,
@@ -115,10 +118,10 @@ initializer_unittests_1_SOURCES = run_initializer_unittests.cc
initializer_unittests_1_SOURCES += message_initializer_1_unittest.cc
initializer_unittests_1_SOURCES += message_initializer_1a_unittest.cc
-initializer_unittests_1_CPPFLAGS = $(AM_CPPFLAGS)
-initializer_unittests_1_CXXFLAGS = $(AM_CXXFLAGS)
-initializer_unittests_1_LDADD = $(AM_LDADD)
-initializer_unittests_1_LDFLAGS = $(AM_LDFLAGS)
+initializer_unittests_1_CPPFLAGS = $(TESTSCPPFLAGS)
+initializer_unittests_1_CXXFLAGS = $(TESTSCXXFLAGS)
+initializer_unittests_1_LDADD = $(TESTSLDADD)
+initializer_unittests_1_LDFLAGS = $(TESTSLDFLAGS)
noinst_PROGRAMS += $(TESTS)
endif
diff --git a/src/lib/log/tests/logger_lock_test.cc b/src/lib/log/tests/logger_lock_test.cc
index 626fb0e84a..0cabb36d80 100644
--- a/src/lib/log/tests/logger_lock_test.cc
+++ b/src/lib/log/tests/logger_lock_test.cc
@@ -17,7 +17,7 @@
#include <log/logger_manager.h>
#include <log/log_messages.h>
#include <log/interprocess/interprocess_sync.h>
-#include "log_test_messages.h"
+#include <log/tests/log_test_messages.h>
#include <util/threads/sync.h>
#include <iostream>
diff --git a/src/lib/log/tests/logger_manager_unittest.cc b/src/lib/log/tests/logger_manager_unittest.cc
index 78e04ea782..a1936591dc 100644
--- a/src/lib/log/tests/logger_manager_unittest.cc
+++ b/src/lib/log/tests/logger_manager_unittest.cc
@@ -35,7 +35,7 @@
#include <log/message_initializer.h>
#include <log/output_option.h>
-#include "tempdir.h"
+#include <log/tests/tempdir.h>
#include <sys/types.h>
#include <regex.h>
diff --git a/src/lib/log/tests/logger_unittest.cc b/src/lib/log/tests/logger_unittest.cc
index b9cae00661..2ee372c3e8 100644
--- a/src/lib/log/tests/logger_unittest.cc
+++ b/src/lib/log/tests/logger_unittest.cc
@@ -24,7 +24,7 @@
#include <log/logger_name.h>
#include <log/log_messages.h>
#include <log/interprocess/interprocess_sync_file.h>
-#include "log/tests/log_test_messages.h"
+#include <log/tests/log_test_messages.h>
#include <iostream>
#include <string>
diff --git a/src/lib/util/Makefile.am b/src/lib/util/Makefile.am
index ea120b0720..0cf5c2115d 100644
--- a/src/lib/util/Makefile.am
+++ b/src/lib/util/Makefile.am
@@ -3,8 +3,6 @@ AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS = . io unittests tests python threads
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
-AM_CPPFLAGS += -I$(top_srcdir)/src/lib/util -I$(top_builddir)/src/lib/util
-AM_CPPFLAGS += -I$(top_srcdir)/src/lib/exceptions -I$(top_builddir)/src/lib/exceptions
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
diff --git a/src/lib/util/io/fd.cc b/src/lib/util/io/fd.cc
index 49aac397a1..6fb536a871 100644
--- a/src/lib/util/io/fd.cc
+++ b/src/lib/util/io/fd.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include "fd.h"
+#include <util/io/fd.h>
#include <unistd.h>
#include <cerrno>
diff --git a/src/lib/util/io/fd_share.cc b/src/lib/util/io/fd_share.cc
index 5f69cd8ab0..0f6cdd6ddd 100644
--- a/src/lib/util/io/fd_share.cc
+++ b/src/lib/util/io/fd_share.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2010, 2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -21,7 +21,7 @@
#include <errno.h>
#include <stdlib.h> // for malloc and free
#include <unistd.h>
-#include "fd_share.h"
+#include <util/io/fd_share.h>
namespace isc {
namespace util {
diff --git a/src/lib/util/io/socketsession.cc b/src/lib/util/io/socketsession.cc
index 1885b1cecc..0c1ddd58a5 100644
--- a/src/lib/util/io/socketsession.cc
+++ b/src/lib/util/io/socketsession.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -41,9 +41,9 @@
#include <util/buffer.h>
-#include "fd_share.h"
-#include "socketsession.h"
-#include "sockaddr_util.h"
+#include <util/io/fd_share.h>
+#include <util/io/socketsession.h>
+#include <util/io/sockaddr_util.h>
using namespace std;
diff --git a/src/lib/util/memory_segment_local.cc b/src/lib/util/memory_segment_local.cc
index b81fe5e915..a0c8a8f62a 100644
--- a/src/lib/util/memory_segment_local.cc
+++ b/src/lib/util/memory_segment_local.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include "memory_segment_local.h"
+#include <util/memory_segment_local.h>
#include <exceptions/exceptions.h>
namespace isc {
diff --git a/src/lib/util/tests/Makefile.am b/src/lib/util/tests/Makefile.am
index a7ded73d35..57059442ae 100644
--- a/src/lib/util/tests/Makefile.am
+++ b/src/lib/util/tests/Makefile.am
@@ -55,9 +55,9 @@ run_unittests_SOURCES += stopwatch_unittest.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
-run_unittests_LDADD = $(top_builddir)/src/lib/util/libkea-util.la
+run_unittests_LDADD = $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
-run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
+run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
run_unittests_LDADD += $(GTEST_LDADD)
endif
diff --git a/src/lib/util/threads/sync.cc b/src/lib/util/threads/sync.cc
index 3a85f2d858..771bdadc95 100644
--- a/src/lib/util/threads/sync.cc
+++ b/src/lib/util/threads/sync.cc
@@ -14,7 +14,7 @@
#include <config.h>
-#include "sync.h"
+#include <util/threads/sync.h>
#include <exceptions/exceptions.h>
diff --git a/src/lib/util/threads/tests/Makefile.am b/src/lib/util/threads/tests/Makefile.am
index 124e198a58..792f6e9c49 100644
--- a/src/lib/util/threads/tests/Makefile.am
+++ b/src/lib/util/threads/tests/Makefile.am
@@ -30,6 +30,9 @@ run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS) $(PTHREAD_LDFLAGS)
run_unittests_LDADD = $(top_builddir)/src/lib/util/threads/libkea-threads.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
+run_unittests_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
+run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
+run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
run_unittests_LDADD += $(GTEST_LDADD)
endif
diff --git a/src/lib/util/threads/thread.cc b/src/lib/util/threads/thread.cc
index 43668653b5..4ec90fdcac 100644
--- a/src/lib/util/threads/thread.cc
+++ b/src/lib/util/threads/thread.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include "thread.h"
-#include "sync.h"
+#include <util/threads/thread.h>
+#include <util/threads/sync.h>
#include <memory>
#include <string>
diff --git a/src/lib/util/unittests/Makefile.am b/src/lib/util/unittests/Makefile.am
index 4364aa99d0..8f5a0a4e03 100644
--- a/src/lib/util/unittests/Makefile.am
+++ b/src/lib/util/unittests/Makefile.am
@@ -22,8 +22,11 @@ if HAVE_GTEST
libutil_unittests_la_CPPFLAGS += $(GTEST_INCLUDES)
endif
-libutil_unittests_la_LIBADD = $(top_builddir)/src/lib/util/libkea-util.la
-libutil_unittests_la_LIBADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
+libutil_unittests_la_LIBADD = $(top_builddir)/src/lib/util/io/libkea-util-io.la
+libutil_unittests_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
libutil_unittests_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
+if HAVE_GTEST
+libutil_unittests_la_LIBADD += $(GTEST_LDADD)
+endif
CLEANFILES = *.gcno *.gcda
diff --git a/src/lib/util/unittests/fork.cc b/src/lib/util/unittests/fork.cc
index 9da0ceaab0..8c2a1143a7 100644
--- a/src/lib/util/unittests/fork.cc
+++ b/src/lib/util/unittests/fork.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include "fork.h"
+#include <util/unittests/fork.h>
#include <util/io/fd.h>
diff --git a/src/lib/util/unittests/newhook.cc b/src/lib/util/unittests/newhook.cc
index 9e545a5a76..42fb7eee8e 100644
--- a/src/lib/util/unittests/newhook.cc
+++ b/src/lib/util/unittests/newhook.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +17,7 @@
#include <new>
#include <stdexcept>
-#include "newhook.h"
+#include <util/unittests/newhook.h>
#ifdef ENABLE_CUSTOM_OPERATOR_NEW
void*
diff --git a/src/lib/util/unittests/resource.cc b/src/lib/util/unittests/resource.cc
index 3e77e0d41a..03eea62f38 100644
--- a/src/lib/util/unittests/resource.cc
+++ b/src/lib/util/unittests/resource.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include "resource.h"
+#include <util/unittests/resource.h>
#include <gtest/gtest.h>
diff --git a/src/lib/util/unittests/testdata.cc b/src/lib/util/unittests/testdata.cc
index 2148d3117d..3ff8bcfb8b 100644
--- a/src/lib/util/unittests/testdata.cc
+++ b/src/lib/util/unittests/testdata.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +17,7 @@
#include <fstream>
#include <vector>
-#include "testdata.h"
+#include <util/unittests/testdata.h>
using namespace std;
diff --git a/src/lib/util/unittests/wiredata.cc b/src/lib/util/unittests/wiredata.cc
index f24176d91b..478437909a 100644
--- a/src/lib/util/unittests/wiredata.cc
+++ b/src/lib/util/unittests/wiredata.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include "wiredata.h"
+#include <util/unittests/wiredata.h>
#include <gtest/gtest.h>