--- dnscrypt-proxy-1.4.2/src/plugins/example/Makefile.am.orig	2014-12-09 21:32:37.767600000 +0300
+++ dnscrypt-proxy-1.4.2/src/plugins/example/Makefile.am	2014-12-09 21:32:40.638000000 +0300
@@ -16,4 +16,5 @@
 
 libdcplugin_example_la_CPPFLAGS = \
 	$(LTDLINCL) \
-	-I../../include
+	-I../../include \
+	-I$(srcdir)/../../include
--- dnscrypt-proxy-1.4.2/src/plugins/example-ldns-aaaa-blocking/Makefile.am.orig	2014-12-09 21:28:43.235200000 +0300
+++ dnscrypt-proxy-1.4.2/src/plugins/example-ldns-aaaa-blocking/Makefile.am	2014-12-09 21:28:47.213200000 +0300
@@ -18,4 +18,5 @@
 
 libdcplugin_example_ldns_aaaa_blocking_la_CPPFLAGS = \
 	$(LTDLINCL) \
-	-I../../include
+	-I../../include \
+	-I$(srcdir)/../../include
--- dnscrypt-proxy-1.4.2/src/plugins/example-ldns-blocking/Makefile.am.orig	2014-12-09 21:29:06.507000000 +0300
+++ dnscrypt-proxy-1.4.2/src/plugins/example-ldns-blocking/Makefile.am	2014-12-09 21:29:09.221400000 +0300
@@ -18,4 +18,5 @@
 
 libdcplugin_example_ldns_blocking_la_CPPFLAGS = \
 	$(LTDLINCL) \
-	-I../../include
+	-I../../include \
+	-I$(srcdir)/../../include
--- dnscrypt-proxy-1.4.2/src/plugins/example-ldns-opendns-deviceid/Makefile.am.orig	2014-12-09 21:29:26.394000000 +0300
+++ dnscrypt-proxy-1.4.2/src/plugins/example-ldns-opendns-deviceid/Makefile.am	2014-12-09 21:29:30.699600000 +0300
@@ -18,4 +18,5 @@
 
 libdcplugin_example_ldns_opendns_deviceid_la_CPPFLAGS = \
 	$(LTDLINCL) \
-	-I../../include
+	-I../../include \
+	-I$(srcdir)/../../include
--- dnscrypt-proxy-1.4.2/src/plugins/example-ldns-opendns-set-client-ip/Makefile.am.orig	2014-12-09 21:30:06.634000000 +0300
+++ dnscrypt-proxy-1.4.2/src/plugins/example-ldns-opendns-set-client-ip/Makefile.am	2014-12-09 21:30:54.682000000 +0300
@@ -18,4 +18,5 @@
 
 libdcplugin_example_ldns_opendns_set_client_ip_la_CPPFLAGS = \
 	$(LTDLINCL) \
-	-I../../include
+	-I../../include \
+	-I$(srcdir)/../../include
--- dnscrypt-proxy-1.4.2/src/plugins/example-logging/Makefile.am.orig	2014-12-09 21:31:14.376400000 +0300
+++ dnscrypt-proxy-1.4.2/src/plugins/example-logging/Makefile.am	2014-12-09 21:31:17.652400000 +0300
@@ -16,4 +16,5 @@
 
 libdcplugin_example_logging_la_CPPFLAGS = \
 	$(LTDLINCL) \
-	-I../../include
+	-I../../include \
+	-I$(srcdir)/../../include
--- dnscrypt-proxy-1.4.2/src/hostip/Makefile.am.orig	2014-12-09 21:27:24.540800000 +0300
+++ dnscrypt-proxy-1.4.2/src/hostip/Makefile.am	2014-12-09 21:27:29.423600000 +0300
@@ -11,7 +11,8 @@
 AM_CFLAGS = @CWFLAGS@
 
 AM_CPPFLAGS = \
-	-I../libevent-modified/include
+	-I../libevent-modified/include \
+	-I$(srcdir)/../libevent-modified/include
 
 hostip_LDADD = \
 	../libevent-modified/libevent_extra.la \
--- dnscrypt-proxy-1.4.2/src/proxy/Makefile.am.orig	2014-12-09 21:25:07.351800000 +0300
+++ dnscrypt-proxy-1.4.2/src/proxy/Makefile.am	2014-12-09 21:26:24.837000000 +0300
@@ -49,6 +49,8 @@
 AM_CPPFLAGS = \
 	-I../ext \
 	-I../libevent-modified/include \
+	-I$(srcdir)/../ext \
+	-I$(srcdir)/../libevent-modified/include \
 	-DPKGDATADIR='"${pkgdatadir}"'
 
 dnscrypt_proxy_LDADD = \
@@ -62,8 +62,8 @@
 BUILT_SOURCES = \
 	probes.h
 
-probes.h: @PROBES_SOURCE@
-	cat @PROBES_SOURCE@ > $@
+probes.h: $(srcdir)/@PROBES_SOURCE@
+	cat $(srcdir)/@PROBES_SOURCE@ > $@
 
 probes_dnscrypt_proxy.h: probes_dnscrypt_proxy.d
 	@DTRACE@ -o $@ -h -s probes_dnscrypt_proxy.d
@@ -83,6 +83,7 @@
 AM_CPPFLAGS += \
 	$(LTDLINCL) \
 	-I../include \
+	-I$(srcdir)/../include \
 	-DPLUGINS_ROOT=\"$(pkglibdir)/\"
 
 dnscrypt_proxy_LDADD += $(LIBLTDL)
