<div dir="ltr"><div>Dear all,</div><div><br></div><div>In order to compile in a conda environment (where iconv is installed through conda, not in the system), I'm trying to add a path to icon into ./configure(.in). The issue is that although GRASS happens to configure properly, the compilation fails because libiconv.* is not found.<br></div><div><br></div><div>I have added code which is used for other libraries, although I'm not sure what exactly should I do for a mandatory dependency. The part which seems to be failing is AC_CHECK_FUNC.</div><br>ac_save_ldflags="$LDFLAGS"<br><div>LDFLAGS="$LDFLAGS $ICONVLIBPATH"</div><div></div><div># LDFLAGS now contains the path set using --with-iconv-libs<br></div><div></div>AC_CHECK_FUNC(iconv, ICONVLIB=, [<br>AC_CHECK_LIB(iconv, iconv, ICONVLIB=-liconv, [<br>AC_CHECK_LIB(giconv, iconv, ICONVLIB=-lgiconv, [<br>AC_CHECK_FUNC(libiconv, ICONVLIB=, [<br>AC_CHECK_LIB(iconv, libiconv, ICONVLIB=-liconv, [<br>AC_CHECK_LIB(giconv, libiconv, ICONVLIB=-lgiconv, [<br>    AC_MSG_WARN([*** Unable to locate iconv() function.])<br>    ICONVLIB=<br>])])])])])])<br><div>AC_SUBST(ICONVLIB)</div><div></div>LDFLAGS="${ac_save_ldflags}"<br><div></div><div># The AC_CHECK_FUNC step above seems to succeed</div><div># The output is "checking for iconv... yes"</div><div># The step below fails because $ICONVLIB is empty</div><div># With "checking for iconv in -l... no"</div><div></div><div></div>LOC_CHECK_LIBS($ICONVLIB,iconv,iconv,$ICONVLIBPATH,ICONV,,,)<br><div><br></div><div>I'm including a full diff too. Note that the iconv library is different from the others because our ./configure allows for different names of the library.<br></div><div><br></div><div>Alternative would be to use LDFLAGS. That would be actually ideal, because all libraries are just at one common prefix. However, providing it as a parameter to ./configure (which seems to be the recommended way even over the above) results in "unknown platform" and providing it as an environmental variable does not have any effect.<br></div><div><br></div><div>Please, let me know if you have any advice,</div><div>Vaclav<br></div><div><br></div></div>