Unbound Makefile has two small issues preventing building python modules in a non-source directory (eg in a subdir).
First, swig fails to find <libunbound/unbound.h> which is not in build dir but in source dir. Next, libunbound/python/unbound.py is now being generated file, generated in the build dir, not in source dir. This patch fixes them. Signed-off-by: Michael Tokarev <[email protected]> diff --git a/Makefile.in b/Makefile.in index 55125a44..f04db624 100644 --- a/Makefile.in +++ b/Makefile.in @@ -59,3 +59,3 @@ CC=@CC@ CPPFLAGS=-I. @CPPFLAGS@ -PYTHON_CPPFLAGS=-I. @PYTHON_CPPFLAGS@ +PYTHON_CPPFLAGS=-I$(srcdir) @PYTHON_CPPFLAGS@ CFLAGS=-DSRCDIR=$(srcdir) @CFLAGS@ @@ -558,3 +558,3 @@ pyunbound-install: $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG) - $(INSTALL) -c -m 644 $(srcdir)/libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py + $(INSTALL) -c -m 644 libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py $(LIBTOOL) --mode=install cp _unbound.la $(DESTDIR)$(PYTHON_SITE_PKG)
