Re: Small bug in configure script?




Jim Harmon <jharmon@telecnnct.com> writes:

[...]

> > First, if you are saying --enable-debug=NO, it will be completely
> > ignored. That should be --enable-debug=no (note case), or more simply
> > --disable-debug.
> 
> (The upcase was only for this discussion, I use lowercase in the actual
> commandline.  :)

[ I thought so, but figured I should check ]
 
> > But that will not suppress the -g flags. The maintainers of autoconf
> > apparently have a stake in hard drive manufacturers, so the effect
> > (on CFLAGS) will simply be to add the -O2 flag.

[...]

> >   CFLAGS=-O2 ./configure
> 
> >From what I've seen in the configure script, it will still insert the
> "-g" in the CFLAGS setting, regardless of the environment setting on the
> commandline.

=======
$ CFLAGS=-O2 ../gtk+/configure
[...]

$ make
[...]

/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../gtk+/glib -I. -I../../gtk+/glib  -O2 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -c ../../gtk+/glib/garray.c
gcc -DHAVE_CONFIG_H -I. -I../../gtk+/glib -I. -I../../gtk+/glib -O2 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -Wp,-MD,.deps/garray.p -c -fPIC -DPIC ../../gtk+/glib/garray.c
=======

Works for me... (In the distant past there were problems, but they
should have been fixed up)

> It's been entirely too frustrating.  :(

What compiler are you using? The configure checks are separated
out for gcc and non-gcc, but from what I can tell, neither case
should set CFLAGS if the environment variable is set.
 
> > (And if you are developing GTK applications, you will do yourself
> >  a huge favor by compiling with --enable-debug/--enable-debug=yes,
> >  which adds a lot of checks that cause your bugs to be caught
> >  immediately, instead of having GTK segfault in some obscure place)
> 
> As I haven't developed anything yet, and the debug option increases my
> executables by as much as 250%, I don't have room for the "default"
> setting, even with a minimum debug setting.

If you set CFLAGS yourself, the --enable-debug setting should have
nothing to do with the -g flag. It only controls assertion checking,
and if you use --enable-debug=yes, some optional debugging printfs.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]