C source code in the "edit", "mlvisit", "parallel",
"progress", "structs",
"visit", and "windows" modules includes "guestfs.h", but the
makefiles of
those modules do not add $(LIBGUESTFS_CFLAGS) to the respective module
CFLAGS macros.
This is a problem when these modules are built as a part of guestfs-tools,
against a just-built libguestfs tree, as follows:
guestfs-tools$ ../libguestfs/run ./configure
guestfs-tools$ ../libguestfs/run make
Example error:
CC libmlvisit_a-visit-c.o
visit-c.c:33:10: fatal error: guestfs.h: No such file or directory
33 | #include "guestfs.h"
| ^~~~~~~~~~~
Add the missing $(LIBGUESTFS_CFLAGS) instances.
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
edit/Makefile.am | 3 ++-
mlvisit/Makefile.am | 1 +
parallel/Makefile.am | 1 +
progress/Makefile.am | 1 +
structs/Makefile.am | 1 +
visit/Makefile.am | 1 +
windows/Makefile.am | 3 ++-
7 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/edit/Makefile.am b/edit/Makefile.am
index e45c9bacead8..dff8b8e8c709 100644
--- a/edit/Makefile.am
+++ b/edit/Makefile.am
@@ -30,6 +30,7 @@ libedit_la_CPPFLAGS = \
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
$(INCLUDE_DIRECTORY)
libedit_la_CFLAGS = \
- $(WARN_CFLAGS) $(WERROR_CFLAGS)
+ $(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(LIBGUESTFS_CFLAGS)
libedit_la_LIBADD = \
$(top_builddir)/common/utils/libutils.la
diff --git a/mlvisit/Makefile.am b/mlvisit/Makefile.am
index a727f4fe0459..64108ebfbbc7 100644
--- a/mlvisit/Makefile.am
+++ b/mlvisit/Makefile.am
@@ -60,6 +60,7 @@ libmlvisit_a_CPPFLAGS = \
-I$(top_srcdir)/common/visit
libmlvisit_a_CFLAGS = \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(LIBGUESTFS_CFLAGS) \
$(LIBVIRT_CFLAGS) $(LIBXML2_CFLAGS) \
-fPIC
diff --git a/parallel/Makefile.am b/parallel/Makefile.am
index 73d31494f4ee..8cf35424c1ef 100644
--- a/parallel/Makefile.am
+++ b/parallel/Makefile.am
@@ -39,6 +39,7 @@ libparallel_la_CPPFLAGS = \
libparallel_la_CFLAGS = \
-pthread \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(LIBGUESTFS_CFLAGS) \
$(LIBXML2_CFLAGS) \
$(LIBVIRT_CFLAGS)
libparallel_la_LIBADD = \
diff --git a/progress/Makefile.am b/progress/Makefile.am
index 1a5d11996483..beea95a5e655 100644
--- a/progress/Makefile.am
+++ b/progress/Makefile.am
@@ -31,6 +31,7 @@ libprogress_la_CPPFLAGS = \
$(INCLUDE_DIRECTORY)
libprogress_la_CFLAGS = \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(LIBGUESTFS_CFLAGS) \
$(LIBTINFO_CFLAGS)
libprogress_la_LIBADD = \
$(top_builddir)/common/utils/libutils.la \
diff --git a/structs/Makefile.am b/structs/Makefile.am
index 32fd91c36bc8..5881a1c9bd32 100644
--- a/structs/Makefile.am
+++ b/structs/Makefile.am
@@ -40,4 +40,5 @@ libstructs_la_CPPFLAGS = \
$(INCLUDE_DIRECTORY)
libstructs_la_CFLAGS = \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(LIBGUESTFS_CFLAGS) \
$(GCC_VISIBILITY_HIDDEN)
diff --git a/visit/Makefile.am b/visit/Makefile.am
index e57cdfa5be86..7a4be2978e60 100644
--- a/visit/Makefile.am
+++ b/visit/Makefile.am
@@ -32,4 +32,5 @@ libvisit_la_CPPFLAGS = \
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs
libvisit_la_CFLAGS = \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(LIBGUESTFS_CFLAGS) \
$(GCC_VISIBILITY_HIDDEN)
diff --git a/windows/Makefile.am b/windows/Makefile.am
index 3f38ca67ddfb..7bdb7b862162 100644
--- a/windows/Makefile.am
+++ b/windows/Makefile.am
@@ -31,7 +31,8 @@ libwindows_la_CPPFLAGS = \
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
$(INCLUDE_DIRECTORY)
libwindows_la_CFLAGS = \
- $(WARN_CFLAGS) $(WERROR_CFLAGS)
+ $(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(LIBGUESTFS_CFLAGS)
libwindows_la_LIBADD = \
$(top_builddir)/common/utils/libutils.la \
$(LTLIBINTL)
--
2.19.1.3.g30247aa5d201