 @@ -433,6 +442,17 @@ if test x$use_hardening != xno; then
    OBJCXXFLAGS="$CXXFLAGS"
  fi
-
+ 
 +AC_DEFINE([ENABLE_DAEMONLIB],[0],[Enable daemonlib.])
 +AM_CONDITIONAL([ENABLE_DAEMONLIB],[false])
 +if test x$use_daemonlib != xno; then

+  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

commit 29c1ca452ba6178d6b17be0a0b5a65567ba846af
Author: Chris Kleeschulte <chrisk@bitpay.com>
Date:   Mon Jul 13 16:35:37 2015 -0400

    allow compiling of libbitcoind.so.

diff --git a/config_me.sh b/config_me.sh
new file mode 100644
