-From 05084f2a640b862132588b322461ec8e13058fc3 Mon Sep 17 00:00:00 2001
-From: Chris Kleeschulte <chrisk@bitpay.com>
-Date: Mon, 13 Jul 2015 12:49:30 -0400
-Subject: [PATCH] libbitcoind
+commit 29c1ca452ba6178d6b17be0a0b5a65567ba846af
+Author: Chris Kleeschulte <chrisk@bitpay.com>
+Date:   Mon Jul 13 16:35:37 2015 -0400
 
----
- config_me.sh         |  1 +
- configure.ac         | 37 ++++++++++++++++++++++++++++++++-----
- src/Makefile.am      | 42 ++++++++++++++++++++++++++++++++++--------
- src/bitcoind.cpp     |  6 ++++++
- src/init.h           |  5 +++++
- src/leveldb/Makefile |  6 +++++-
- src/leveldbwrapper.h | 12 ++++++++++++
- 7 files changed, 95 insertions(+), 14 deletions(-)
- create mode 100644 config_me.sh
+    allow compiling of libbitcoind.so.
 
 diff --git a/config_me.sh b/config_me.sh
 new file mode 100644

--- a/src/init.h
+++ b/src/init.h
@@ -18,6 +18,11 @@ class thread_group;

 extern CWallet* pwalletMain;

+#if ENABLE_DAEMONLIB
+#include <boost/filesystem/path.hpp>
+#include <boost/thread/mutex.hpp>

+  if test x$use_daemonlib = xno; then
+    AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"])
+  fi
 
   AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[
     AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
@@ -415,7 +424,7 @@ if test x$use_hardening != xno; then
   AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"])
   AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"])
 
-  if test x$TARGET_OS != xwindows; then
+  if test x$TARGET_OS != xwindows -a x$use_daemonlib = xno; then
     # All windows code is PIC, forcing it on just adds useless compile warnings
