Re: [bug-gnulib] inline.m4: use compiler, not cpp

2006-11-14 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > $ ./configure > $ make > $ make clean > $ make CFLAGS="-g -O0" > be trapped in the link error: xmalloc.c, compiled with optimization, will > not define xnmalloc, whereas the main sources, compiled without optimization, > will require it. How abou

Re: [bug-gnulib] inline.m4: use compiler, not cpp

2006-11-14 Thread Bruno Haible
Paul Eggert wrote: > whenever you get into trouble, just do "make clean" > and then make with the CFLAGS you prefer. Many hackers probably use the same approach... Since "make CFLAGS=..." does not pass the CFLAGS down to subdirectories, the user of a package with - its main sources in the main d

Re: [bug-gnulib] inline.m4: use compiler, not cpp

2006-11-13 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > If you want to force it to a certain value, I think we can consider a > --enable/--disable-inlining configure option. Probably not worth the trouble. I can always configure with CC='gcc -fno-inline'. > How would you deal with such a link error situatio

Re: [bug-gnulib] inline.m4: use compiler, not cpp

2006-11-13 Thread Bruno Haible
Paul Eggert wrote: > A downside of this approach is that if I compile the xalloc module > with optimization (so that it does not bother to to generate a extern > xmalloc function, but simply assumes it's inline) but then compile an > xalloc user without optimization (so that it assumes there's an e

Re: [bug-gnulib] inline.m4: use compiler, not cpp

2006-11-13 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > AC_C_INLINE and gl_INLINE simply answer two different questions. A problem I have with gl_INLINE is that it decides the value HAVE_INLINE once, at configure-time. If I compile most of my package with optimization, but then recompile some modules without

Re: [bug-gnulib] inline.m4: use compiler, not cpp

2006-11-13 Thread Bruno Haible
Eric Blake wrote: > Is it worth trying to override AC_C_INLINE's definition of inline when we > detect that inline is not supported, such that inline is redefined to the > empty string, and uses of inline in headers that are not protected by > HAVE_INLINE will then cause multiple copy link errors i

Re: [bug-gnulib] inline.m4: use compiler, not cpp

2006-11-10 Thread Bruno Haible
Jim Meyering wrote: > 2006-11-10 Jim Meyering <[EMAIL PROTECTED]> > > * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, > so that relevant options in CFLAGS (like -O, -fno-inline) are > taken into account. Thanks again! I applied this patch, with added comments, an