On 01/25/2017 10:57 AM, Thorsten Glaser wrote: > On Wed, 25 Jan 2017, Thorsten Glaser wrote: > >> Looking at the source, AC_SYS_LARGEFILE calls AC_DEFINE_UNQUOTED, >> which appends to DEFS (which I agree with Tom Dickey is wrong) as >> Florian Weimer said, but — even more confusingly — only when >> AC_CONFIG_HEADERS is not used. >> >> If AC_CONFIG_HEADERS is used, the definition is only written to >> its output file (config.h by default). >> >> This is even more unfortunate, because now, if any program includes >> a glibc system header before "config.h", the definition will be >> ignored, because it comes too late. >> >> CPPFLAGS is r̲e̲a̲l̲l̲y̲ the correct place for this. Again. > > Let’s keep track of t̲h̲i̲s̲ bug here <852617@xxxxxxxxxxxxxxx>. > Again, please forward this upstream, too. > > The workaround I was forced to use in a real-world package is thus: > https://anonscm.debian.org/cgit/pkg-remote/xrdp.git/plain/debian/patches/lfs.diff?id=e17430063641d44f5596b5bfc1b32ac4ba39f9f1 If the real-world package is not including config.h first, then that is a bug in the real-world package that should be fixed there. Autoconf clearly documents that if you create config.h, it MUST be included first, before any system headers. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf