# HG changeset patch # Parent 14e911353a91702b439bc06e2a77d67e8bd5f661 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 diff -r 14e911353a91 tools/blktap2/vhd/lib/Makefile --- a/tools/blktap2/vhd/lib/Makefile Tue Dec 20 02:30:12 2011 +0100 +++ b/tools/blktap2/vhd/lib/Makefile Tue Dec 20 02:33:11 2011 +0100 @@ -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