  dnl this flag screws up non-darwin gcc even when the check fails. special-case it.
  if test x$TARGET_OS = xdarwin; then
    AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
-@@ -463,7 +483,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
+@@ -485,7 +505,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
    ]
  )
  

diff --git a/Makefile.am b/Makefile.am
index b51f477..58241df 100644
--- a/Makefile.am

   chain.h \
   chainparams.h \
   chainparamsbase.h \
@@ -152,10 +155,17 @@ JSON_H = \
   json/json_spirit_writer.h \
   json/json_spirit_writer_template.h
 
