From a69dda2bcef661c81b88b52053eef4369cb11b01 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Tue, 20 Dec 2011 08:31:40 +0100 Subject: blktap2/vhd: add -liconv when linking if using libiconv If libiconv is detected on the system add -liconv when linking the libvhd library. If -liconv is not added when compiling libvhd with libiconv the following error occours when linking vhd-util and vhd-update: gcc -o vhd-util vhd-util.o -Llib -lvhd lib/libvhd.so: undefined reference to `libiconv_open' lib/libvhd.so: undefined reference to `libiconv_close' lib/libvhd.so: undefined reference to `libiconv' Signed-off-by: Roger Pau Monne Committed-by: Ian Jackson Acked-by: Ian Jackson --- tools/blktap2/vhd/lib/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/blktap2') diff --git a/tools/blktap2/vhd/lib/Makefile b/tools/blktap2/vhd/lib/Makefile index 97379c117e..b72e4d9565 100644 --- a/tools/blktap2/vhd/lib/Makefile +++ b/tools/blktap2/vhd/lib/Makefile @@ -23,6 +23,10 @@ ifeq ($(CONFIG_Linux),y) LIBS := -luuid endif +ifeq ($(CONFIG_LIBICONV),y) +LIBS += -liconv +endif + LIB-SRCS := libvhd.c LIB-SRCS += libvhd-journal.c LIB-SRCS += vhd-util-coalesce.c -- cgit v1.2.3