ACLOCAL_AMFLAGS = -I autostuff
-AM_CPPFLAGS = -Isrc -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
+AM_CPPFLAGS = -I$(srcdir)/src -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
lib_LTLIBRARIES = libsigrok.la
AC_SUBST(SR_PKGLIBS)
-CFLAGS="$CFLAGS -I./include/libsigrok $LIB_CFLAGS"
-CXXFLAGS="$CXXFLAGS -I./include -I./bindings/cxx/include $LIB_CFLAGS"
+CFLAGS="$CFLAGS -Iinclude/libsigrok -I${srcdir}/include/libsigrok $LIB_CFLAGS"
+CXXFLAGS="$CXXFLAGS -Iinclude/libsigrok -I${srcdir}/include -I${srcdir}/bindings/cxx/include $LIB_CFLAGS"
# Find Java compiler and JNI includes for Java bindings.