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
This commit is contained in:
Klaus Goger 2017-09-18 21:19:06 +02:00
parent 08c0d21888
commit 288c61aa08

View File

@ -16,6 +16,8 @@ AC_PROG_MAKE_SET
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_SEARCH_LIBS(iconv, iconv)
PKG_CHECK_MODULES(LIBUSB1,libusb-1.0) PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])