[Fontconfig] libiconv detection seems convoluted

Daniel Macks dmacks at netspace.org
Fri Dec 21 22:46:04 PST 2012


On OS X, iconv.h is in a default search path (no need for -I flags); but is not part of the system library itself,so -liconv is needed (but again is in default search path so no need for -L flags). There are a bunch of special-purpose --with-libiconv* flags, but there doesn't seem to be an easy way to handle my situation. If I understand the if/elif spaghetti, I need to declare an explicit libiconv prefix or includes directory in order for libiconv_cflags to be set, which is the only way to trigger libiconv_libs getting set. Or else I need to pass LDFLAGS=-liconv to the whole build process. 

"See if libiconv is available, possibly with some ./configure flag hints" is a common task with standard (in autoconf or in libiconv) recipes. For portability, hand-coding seems fragile, and ease of use ("behaves like other packages that use libiconv") also suffers. For example, libiconv's iconv.m4 has a AM_ICONV function. 

dan

--
Daniel Macks
dmacks at netspace.org



More information about the Fontconfig mailing list