On 10/21/2014 03:30 AM, Daiki Ueno wrote: > Werner LEMBERG <w...@gnu.org> writes: > >>>> Given that the intention of the above test is to check if the iconv >>>> function works properly, maybe a workaround would be to use the >>>> fixed prototype of iconv (as attached)? >>> >>> Sorry, that was obviously wrong. The other idea is to suppress the >>> error with a pragma, but I guess it would be better to actually >>> check the prototype in AM_ICONV_LINK. >> >> What about using m4_foreach, running the link tests with and without >> `const'?
m4_foreach causes the loop to be expanded at m4 time (a larger configure file). In this case, you could probably easily get by with a shell loop instead, for a smaller configure file (untested): for type in 'char **' 'const char **'; do AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ... typedef $type gl_iconv_buf_t; -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature