Issue#84: explicitly remove old headers and include/json directory so creating the compat symlink can work.
diff --git a/Makefile.am b/Makefile.am
index 51159b0..73e8116 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -66,7 +66,13 @@
-rm -rf configure
if ENABLE_OLDNAME_COMPAT
+# Remove old headers and create a compatibility link
install-data-hook:
+ if test -d "$(DESTDIR)@includedir@/json" ; then \
+ (cd "$(DESTDIR)@includedir@/json" && \
+ rm -f $(libjson_cinclude_HEADERS)) ; \
+ rmdir "$(DESTDIR)@includedir@/json" ; \
+ fi
test \! -e "$(DESTDIR)@includedir@/json" || rm "$(DESTDIR)@includedir@/json"
$(LN_S) json-c "$(DESTDIR)@includedir@/json"