From 288c61aa08f04166261bfa6e6d5ecdcc852f12bf Mon Sep 17 00:00:00 2001 From: Klaus Goger Date: Mon, 18 Sep 2017 21:19:06 +0200 Subject: [PATCH] Search for iconv in configure script macOS requires -liconv in the LDFLAGS to link correctly. So add a search macro to the configure script to prevent following error: g++ -g -O2 -o rkdeveloptool main.o crc.o RKBoot.o RKComm.o RKDevice.o RKImage.o RKLog.o RKScan.o -L/usr/local/Cellar/libusb/1.0.21/lib -lusb-1.0 Undefined symbols for architecture x86_64: "_iconv", referenced from: StringToWideString(char*, wchar_t*&) in main.o WideStringToString(wchar_t*, char*&) in main.o "_iconv_close", referenced from: StringToWideString(char*, wchar_t*&) in main.o WideStringToString(wchar_t*, char*&) in main.o "_iconv_open", referenced from: StringToWideString(char*, wchar_t*&) in main.o WideStringToString(wchar_t*, char*&) in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [rkdeveloptool] Error 1 --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 03d3007..a696b0d 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,8 @@ AC_PROG_MAKE_SET AC_PROG_INSTALL AC_PROG_LN_S +AC_SEARCH_LIBS(iconv, iconv) + PKG_CHECK_MODULES(LIBUSB1,libusb-1.0) AC_CONFIG_FILES([Makefile])