aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libfsimage
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libfsimage')
-rw-r--r--tools/libfsimage/Makefile2
-rw-r--r--tools/libfsimage/ext2fs-lib/Makefile5
-rw-r--r--tools/libfsimage/ext2fs-lib/ext2fs-lib.c5
3 files changed, 9 insertions, 3 deletions
diff --git a/tools/libfsimage/Makefile b/tools/libfsimage/Makefile
index 5a506f3325..69fd18a820 100644
--- a/tools/libfsimage/Makefile
+++ b/tools/libfsimage/Makefile
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
SUBDIRS-y = common ufs reiserfs iso9660 fat zfs
SUBDIRS-$(CONFIG_X86) += xfs
-ifeq ($(CONFIG_EXT2FS), y)
+ifneq ($(EXTFS_LIBS), )
SUBDIRS-y += ext2fs-lib
else
SUBDIRS-y += ext2fs
diff --git a/tools/libfsimage/ext2fs-lib/Makefile b/tools/libfsimage/ext2fs-lib/Makefile
index 142207f63b..671fbffd73 100644
--- a/tools/libfsimage/ext2fs-lib/Makefile
+++ b/tools/libfsimage/ext2fs-lib/Makefile
@@ -4,7 +4,10 @@ LIB_SRCS-y = ext2fs-lib.c
FS = ext2fs-lib
-FS_LIBDEPS = -lext2fs
+FS_LIBDEPS = $(EXTFS_LIBS)
+
+# Include configure output (config.h) to headers search path
+CFLAGS += -I$(XEN_ROOT)/tools
.PHONY: all
all: fs-all
diff --git a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
index 36a27dc028..ed471465f9 100644
--- a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
+++ b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
@@ -21,8 +21,11 @@
* Use is subject to license terms.
*/
+/* Include output from configure */
+#include <config.h>
+
#include <fsimage_plugin.h>
-#include <ext2fs/ext2fs.h>
+#include INCLUDE_EXTFS_H
#include <errno.h>
#include <inttypes.h>