diff --git a/daemon/configure.ac b/daemon/configure.ac
index d81152e04ca4b66fdb3823a0989fc71f9698dcff..a06fe449c80fd9334c5be2658879084583e8642b 100644
--- a/daemon/configure.ac
+++ b/daemon/configure.ac
@@ -119,10 +119,15 @@ LIBSAMPLERATE_MIN_VERSION=0.1.2
 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= ${LIBSAMPLERATE_MIN_VERSION},, AC_MSG_ERROR([Missing libsamplerate development package: libsamplerate0-dev]))
 
 LIBCCGNU2_MIN_VERSION=1.3.1
-PKG_CHECK_MODULES(CCGNU2, commoncpp >= ${LIBCCGNU2_MIN_VERSION},, AC_MSG_ERROR([Missing common cpp development package: libcommoncpp2-dev]))
+PKG_CHECK_MODULES([CCGNU2], [commoncpp] >= ${LIBCCGNU2_MIN_VERSION}, AC_DEFINE_UNQUOTED([COMMONCPP_PREFIX], [1], [Use commoncpp include prefix]), [
+        PKG_CHECK_MODULES([CCGNU2], [libccgnu2] >= ${LIBCCGNU2_MIN_VERSION}, AC_DEFINE_UNQUOTED([CCPP_PREFIX], [1], [Use cc++ include prefix]),
+            AC_MSG_ERROR([Missing common cpp development package: libcommoncpp2-dev]))
+        ])
 
-LIBCCRT_MIN_VERSION=1.3.0
-PKG_CHECK_MODULES(CCRTP, libccrtp >= ${LIBCCRT_MIN_VERSION},, AC_MSG_ERROR([Missing ccrtp development package: libccrtp-dev]))
+LIBCCRTP_MIN_VERSION=1.3.0
+PKG_CHECK_MODULES([CCRTP], [libccrtp] >= ${LIBCCRTP_MIN_VERSION},, [
+        PKG_CHECK_MODULES([CCRTP], [libccrtp1] >= ${LIBCCRTP_MIN_VERSION},, AC_MSG_ERROR([Missing ccrtp development package: libccrtp-dev]))
+        ])
 
 dnl Check for OpenSSL to link against pjsip and provide SIPS TLS support
 PKG_CHECK_MODULES([libssl], libssl,, AC_MSG_ERROR([Missing ssl development package: libssl-dev]))
diff --git a/daemon/src/Makefile.am b/daemon/src/Makefile.am
index 3886ea0855895ccaae1bf565fc288fbbec9f3654..cbfae79450b80df4ac3fea794517c9d63565b45a 100644
--- a/daemon/src/Makefile.am
+++ b/daemon/src/Makefile.am
@@ -48,7 +48,8 @@ noinst_HEADERS = \
 		logger.h \
 		numbercleaner.h \
 		fileutils.h \
-		noncopyable.h
+		noncopyable.h \
+		cc_thread.h
 
 libsflphone_la_LIBADD = \
 	$(top_builddir)/libs/iax2/libiax2.la \
diff --git a/daemon/src/audio/audiolayer.h b/daemon/src/audio/audiolayer.h
index a0f60fb58ef9d49b48d50f113be1275f56770452..dbc652cb96dc6dc249c9b5f5165659d57f50c0e6 100644
--- a/daemon/src/audio/audiolayer.h
+++ b/daemon/src/audio/audiolayer.h
@@ -34,7 +34,7 @@
 #ifndef __AUDIO_LAYER_H__
 #define __AUDIO_LAYER_H__
 
-#include <commoncpp/thread.h> // for ost::Mutex
+#include "cc_thread.h" // for ost::Mutex
 #include <sys/time.h>
 
 #include "ringbuffer.h"
diff --git a/daemon/src/audio/audiorecorder.h b/daemon/src/audio/audiorecorder.h
index aa95b8b68855adb8308a9c15e6c87bf823c72889..82be9a4795f4555073944080294a0c56dc14c8b5 100644
--- a/daemon/src/audio/audiorecorder.h
+++ b/daemon/src/audio/audiorecorder.h
@@ -28,11 +28,11 @@
  *  as that of the covered work.
  */
 
-#ifndef __AUDIORECORDER_H_
-#define __AUDIORECORDER_H_
+#ifndef AUDIORECORDER_H_
+#define AUDIORECORDER_H_
 
 #include <string>
-#include <commoncpp/thread.h>
+#include "cc_thread.h"
 #include "audiorecord.h"
 #include "noncopyable.h"
 
diff --git a/daemon/src/audio/audiortp/audio_rtp_factory.h b/daemon/src/audio/audiortp/audio_rtp_factory.h
index 9aa90d3b4d1a13112edb8623770b515c2003eb5d..0aa88f0f31279b16e0653991be5192685020ff9f 100644
--- a/daemon/src/audio/audiortp/audio_rtp_factory.h
+++ b/daemon/src/audio/audiortp/audio_rtp_factory.h
@@ -32,8 +32,8 @@
 #define __AUDIO_RTP_FACTORY_H__
 
 #include <stdexcept>
-#include <commoncpp/thread.h>
 #include <ccrtp/CryptoContext.h>
+#include "cc_thread.h"
 #include "audio_rtp_session.h"
 #include "noncopyable.h"
 
diff --git a/daemon/src/audio/mainbuffer.h b/daemon/src/audio/mainbuffer.h
index b81deb9bed7f139b9a0a2553130ef538ced7c1b7..66dd65b4dc0091d5855fc689552e3487730efce2 100644
--- a/daemon/src/audio/mainbuffer.h
+++ b/daemon/src/audio/mainbuffer.h
@@ -34,9 +34,9 @@
 
 #include <map>
 #include <set>
-#include <commoncpp/thread.h> // for ost::Mutex
 #include <string>
 
+#include "cc_thread.h" // for ost::Mutex
 #include "global.h"
 #include "call.h"
 #include "ringbuffer.h"
diff --git a/daemon/src/call.h b/daemon/src/call.h
index 63f8a8d21687b7791dbb2038f8257efda7252f85..36ca85fc01b708486f972214a21f05287ba682c6 100644
--- a/daemon/src/call.h
+++ b/daemon/src/call.h
@@ -32,9 +32,8 @@
 #ifndef CALL_H
 #define CALL_H
 
-#include <commoncpp/thread.h> // for mutex
 #include <sstream>
-
+#include "cc_thread.h"
 #include "audio/recordable.h"
 
 /*
diff --git a/daemon/src/cc_config.h b/daemon/src/cc_config.h
new file mode 100644
index 0000000000000000000000000000000000000000..8da77b2325bd74ef88b1e095d0eeb083f3c71555
--- /dev/null
+++ b/daemon/src/cc_config.h
@@ -0,0 +1,44 @@
+/*
+ *  Copyright (C) 2012 Savoir-Faire Linux Inc.
+ *  Author: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Additional permission under GNU GPL version 3 section 7:
+ *
+ *  If you modify this program, or any covered work, by linking or
+ *  combining it with the OpenSSL project's OpenSSL library (or a
+ *  modified version of that library), containing parts covered by the
+ *  terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
+ *  grants you additional permission to convey the resulting work.
+ *  Corresponding Source for a non-source form of such a combination
+ *  shall include the source code for the parts of OpenSSL used as well
+ *  as that of the covered work.
+ */
+
+#ifndef CC_CONFIG_H_
+#define CC_CONFIG_H_
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef CCPP_PREFIX
+#include <cc++/config.h>
+#else
+#include <commoncpp/config.h>
+#endif
+
+#endif // CC_CONFIG_H_
diff --git a/daemon/src/cc_thread.h b/daemon/src/cc_thread.h
new file mode 100644
index 0000000000000000000000000000000000000000..4af48e2e82ceb0eb862cd04a5003dcfd6383293b
--- /dev/null
+++ b/daemon/src/cc_thread.h
@@ -0,0 +1,44 @@
+/*
+ *  Copyright (C) 2012 Savoir-Faire Linux Inc.
+ *  Author: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Additional permission under GNU GPL version 3 section 7:
+ *
+ *  If you modify this program, or any covered work, by linking or
+ *  combining it with the OpenSSL project's OpenSSL library (or a
+ *  modified version of that library), containing parts covered by the
+ *  terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
+ *  grants you additional permission to convey the resulting work.
+ *  Corresponding Source for a non-source form of such a combination
+ *  shall include the source code for the parts of OpenSSL used as well
+ *  as that of the covered work.
+ */
+
+#ifndef CC_THREAD_H_
+#define CC_THREAD_H_
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef CCPP_PREFIX
+#include <cc++/thread.h> // for mutex
+#else
+#include <commoncpp/thread.h> // for mutex
+#endif
+
+#endif	// CC_THREAD_H_
diff --git a/daemon/src/codec.h b/daemon/src/codec.h
index fd771eaeb0807681c165c9a892efb4ea38f095ff..713ac9a1d9ba5a29636f456e78a5859918276408 100644
--- a/daemon/src/codec.h
+++ b/daemon/src/codec.h
@@ -27,10 +27,10 @@
  *  as that of the covered work.
  */
 
-#ifndef __SFL_CODEC_H__
-#define __SFL_CODEC_H__
+#ifndef CODEC_H_
+#define CODEC_H_
 
-#include <commoncpp/config.h> // for types
+#include "cc_config.h" // for types
 
 /**
  * Interface for both audio codecs as well as video codecs.
@@ -65,4 +65,4 @@ typedef sfl::Codec* create_t();
 
 typedef void destroy_t (sfl::Codec*);
 
-#endif
+#endif // CODEC_H_
diff --git a/daemon/src/dbus/Makefile.am b/daemon/src/dbus/Makefile.am
index 53ab8b9d24154deabefcaa9fd9f8220b2fa4d53e..992b691253687eb5ba8a379511ba210da8e3a8ae 100644
--- a/daemon/src/dbus/Makefile.am
+++ b/daemon/src/dbus/Makefile.am
@@ -29,6 +29,7 @@ libdbus_la_CXXFLAGS = \
             -DPROGSHAREDIR=\"${datadir}/sflphone\" \
             $(NETWORKMANAGER)
 
+
 noinst_HEADERS =            \
     callmanager.h           \
     configurationmanager.h  \
diff --git a/daemon/src/eventthread.h b/daemon/src/eventthread.h
index 8c48f9d123fb00fe3a26ace4798f69298ade992a..af3aee58efb191202860f86bbe79fe7f3d4a2cb8 100644
--- a/daemon/src/eventthread.h
+++ b/daemon/src/eventthread.h
@@ -31,7 +31,7 @@
 #ifndef EVENT_THREAD_H_
 #define EVENT_THREAD_H_
 
-#include <commoncpp/thread.h>
+#include "cc_thread.h"
 #include "noncopyable.h"
 
 class VoIPLink;
diff --git a/daemon/src/managerimpl.h b/daemon/src/managerimpl.h
index 53ca83746ba061f8a547cca109127badd48ad3c1..d91481829ee6793812c0f5bc8be228896fc728a5 100644
--- a/daemon/src/managerimpl.h
+++ b/daemon/src/managerimpl.h
@@ -39,8 +39,8 @@
 #include <vector>
 #include <set>
 #include <map>
-#include <commoncpp/thread.h>
 #include <memory>
+#include "cc_thread.h"
 #include "dbus/dbusmanager.h"
 
 #include "config/config.h"
diff --git a/daemon/src/sip/siptransport.cpp b/daemon/src/sip/siptransport.cpp
index b08f7c3017194152235fe28b765eb147d38e504a..2f07f5e979a7b3d65f07c13b2c92663a8984f9f4 100644
--- a/daemon/src/sip/siptransport.cpp
+++ b/daemon/src/sip/siptransport.cpp
@@ -45,6 +45,7 @@
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <arpa/inet.h>
+#include <net/if.h>
 
 #include "siptransport.h"
 #include "manager.h"
diff --git a/daemon/src/voiplink.h b/daemon/src/voiplink.h
index f28dfffe19f536bba25c164a79bff88739d7078a..7889e471c50449e78d0ab7d4577de1c3f68445aa 100644
--- a/daemon/src/voiplink.h
+++ b/daemon/src/voiplink.h
@@ -36,7 +36,7 @@
 
 #include <stdexcept>
 #include <map>
-#include <commoncpp/thread.h> // for ost::Mutex
+#include "cc_thread.h" // for ost::Mutex
 
 class Call;
 class Account;