From 99c53e440ea659753f4deff2a6502a7e63f83988 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 3 Feb 2015 17:12:28 +0100 Subject: [PATCH] btrfs-progs: autoconf: check btrfs-convert dependencies Use the standard pkg-config checks. Signed-off-by: David Sterba --- Makefile.in | 2 +- configure.ac | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index c4deb517..93b6a3c1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -82,7 +82,7 @@ endif # external libs required by various binaries; for btrfs-foo, # specify btrfs_foo_libs = ; see $($(subst...)) rules below -btrfs_convert_libs = -lext2fs -lcom_err +btrfs_convert_libs = @EXT2FS_LIBS@ @COM_ERR_LIBS@ btrfs_fragments_libs = -lgd -lpng -ljpeg -lfreetype SUBDIRS = diff --git a/configure.ac b/configure.ac index 95e28093..cbad0992 100644 --- a/configure.ac +++ b/configure.ac @@ -99,6 +99,11 @@ AC_ARG_ENABLE([convert], AS_IF([test "x$enable_btrfsconvert" = xyes], [DISABLE_BTRFSCONVERT=0], [DISABLE_BTRFSCONVERT=1]) AC_SUBST([DISABLE_BTRFSCONVERT]) +if test "x$enable_btrfsconvert" = xyes; then + PKG_CHECK_MODULES(EXT2FS, [ext2fs]) + PKG_CHECK_MODULES(COM_ERR, [com_err]) +fi + dnl Define _LIBS= and _CFLAGS= by pkg-config dnl