On Mon, Nov 11, 2002 at 09:26:10PM -0800, Doug Kaufman wrote: > Unless I am missing something here, the configure script does not add > the "-g" flag to CFLAGS when "--enable-debug" is specified; it only > removes "-g" if it is not. This patch seems to fix it. Have I been > invoking configure incorrectly?
probably. The particular issue here is that autoconf has a bias, making it want to put -g -O2 when the compiler is gcc, and -g for other compilers. So the -g is an assumption. (The reason given for the choice is that gcc's optimizer is good, and other compiler's are not - not true of course). If you have set $CFLAGS, it overrides that behavior. Most of the time, settings for $CFLAGS should be for $CPPFLAGS (the -I and -D options) instead. > The patch is against configure.in. I presume you don't want a patch > against the configure script itself. > Doug > > --- lynx2.8.5dev.9/lynx2-8-5/configure.in.orig 2002-10-06 17:43:28.000000000 >-0700 > +++ lynx2.8.5dev.9/lynx2-8-5/configure.in 2002-11-11 20:25:40.000000000 -0800 > @@ -93,6 +93,9 @@ > CFLAGS="$CFLAGS -g3" > fi > ;; > + *) > + CFLAGS="$CFLAGS -g" > + ;; > esac > else > case $host_os in > > __ > Doug Kaufman > Internet: [EMAIL PROTECTED] > > > ; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED] -- Thomas E. Dickey <[EMAIL PROTECTED]> http://invisible-island.net ftp://invisible-island.net ; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]
