Dominik Vogt <fvwm-workers@fvwm.org> writes:

> Yes, there is a very good reason: configure chokes on the
> -Werror flag and produces more or less random test results.
> This can be hell to debug.  Maybe I can find a way to enable
> the original CFLAGS again before they are placed in the
> Makefiles.

That is not generally sufficient, nor is setting the variables on
the make command line.  There is a reason for the standard
behavior.  If you have libraries installed outside the standard
search path (/usr), you need to set CPPFLAGS and LDFLAGS before
running configure.  The most famous examples are /usr/X11R6 and
/usr/local (yes, i know most (all?) GNU/Linux distributions put
those on the standard search path, but that's just lunacy), but
there are also things like /opt and /usr/pkg (where NetBSD
packages are installed).

And no, it isn't generally sufficient for the configure script to
set the appropriate options itself.  That is necessary for the
standard options (-L and -I), but not sufficient because
sometimes platform- or site-specific settings are needed.  For
example, on NetBSD we always set an rpath with -Wl,-R, but on
Darwin the linker will explode since it has no -R option.
Configure scripts would be a mess if they had to handle this sort
of thing.

I say "generally" because, in my experience, it is not necessary
to set these variables with fvwm.  I think it's picking up
/usr/{X11R6,pkg}/{include,pkg} from the gtk-config script.  So
the above paragraph may not apply to Fvwm (someone not using the
Gtk stuff will have to comment), but it's good to keep in mind
anyway.  And it may be worth sticking with the standard behavior
so as not to violate the principle of least surprise, if for no
other reason.

As for the -Werror example, that is just user error.  There are
things you need to put into CPPFLAGS (defines and includes), and
there are things you can put in there that will break (code
generation or scanning flags).

--  
Eric Gillespie <*> [EMAIL PROTECTED]

Build a fire for a man, and he'll be warm for a day.  Set a man on
fire, and he'll be warm for the rest of his life. -Terry Pratchett
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to