Re: Non-debug build in Win32

2006-07-19 Thread Hrvoje Niksic
"Christopher G. Lewis" <[EMAIL PROTECTED]> writes:

> Lets edit that and comment out ENABLE_DEBUG:
> config.h
> 
> /* Define if you want the debug output support compiled in. */
> /* #define ENABLE_DEBUG 1 */
>
> After futzing around for a little while, I got it to work.

That should work without any (further) modifications to the source.
If you're having problems, please send us the error message you get
from the compiler.

> Still - I'd like to figure out some better way of dealing with the
> configure options in the windows world:
[...]

In the Unix world, all those options are managed by Autoconf.  Windows
doesn't support the toolchain required for Autoconf (and even if it
did, the compiler flags aren't supported by Autoconf), so that won't
work.  We can either implement an Autoconf-like mechanism on Windows,
or let the Windows users edit config.h manually.  Since maintaining
two configuration mechanisms is too much work, we opted for the
latter.


RE: Non-debug build in Win32

2006-07-19 Thread Christopher G. Lewis
OK, I'm not a big C programmer, so please bear with me.

What I'm trying to do is do a build in win32 without debug support.
Fine, should be simple :-)

Reading the windows\README file is no help - it states to build in Win32
use the following commands:
> Configure.bat --msvc
> Nmake

Hmm.  OK, there's the config.h file.

Lets edit that and comment out ENABLE_DEBUG:
config.h

/* Define if you want the debug output support compiled in. */
/* #define ENABLE_DEBUG 1 */

After futzing around for a little while, I got it to work.  I had Whole
Program Optimization (CC's /GL and link's /LTCG) turned on in my VS
project file, and I think it was trying to optimize a header issue btwn
log.h and log.c when ENABLE_DEBUG wasn't defined.


Still - I'd like to figure out some better way of dealing with the
configure options in the windows world:
  --without-ssl   disable SSL autodetection (used for https
support)
  --with-libssl-prefix=DIR search for libssl in DIR/lib
  --disable-opie  disable support for opie or s/key FTP login
  --disable-digestdisable support for HTTP digest authorization
  --disable-ntlm  disable support for HTTP NTLM authorization
  --disable-debug disable support for debugging output
  --disable-nls   do not use Native Language Support
  --disable-largefile omit support for large files
  --disable-ipv6  disable IPv6 support
  --disable-rpath do not hardcode runtime library paths

Chris

Christopher G. Lewis
http://www.ChristopherLewis.com
 

> -Original Message-
> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 18, 2006 11:58 AM
> To: Christopher G. Lewis
> Cc: wget@sunsite.dk
> Subject: Re: Non-debug build in Win32
> 
> "Christopher G. Lewis" <[EMAIL PROTECTED]> writes:
> 
> > For some reason, a change that was made in log.c between 1.8 and 1.9
> > has broken the ability to do a build without debug enabled.
> > Basically, in config.h if you change ENABLE_DEBUG to 0, wget will no
> > longer build.
> 
> That's not how it works, you're supposed to not #define ENABLE_DEBUG
> in the first place (or #undef it), not #define it to 0.  If you
> configure Wget with --disable-debug, this is done for you
> automatically.
> 
> As far as I know, setting ENABLE_DEBUG to 0 has never been supported.
> For me, setting ENABLE_DEBUG to 0 still builds, but you get a Wget
> that has debugging support anyway.
> 
> > I'm wondering if it makes sense to even have the ability to create a
> > non-debug build at this point.
> 
> It makes sense now as much as it did before -- there are people who
> prefer their executables small, and since we have a macro for debug
> prints anyway, the option comes with no additional price.
> 


Re: Non-debug build in Win32

2006-07-18 Thread Hrvoje Niksic
"Christopher G. Lewis" <[EMAIL PROTECTED]> writes:

> For some reason, a change that was made in log.c between 1.8 and 1.9
> has broken the ability to do a build without debug enabled.
> Basically, in config.h if you change ENABLE_DEBUG to 0, wget will no
> longer build.

That's not how it works, you're supposed to not #define ENABLE_DEBUG
in the first place (or #undef it), not #define it to 0.  If you
configure Wget with --disable-debug, this is done for you
automatically.

As far as I know, setting ENABLE_DEBUG to 0 has never been supported.
For me, setting ENABLE_DEBUG to 0 still builds, but you get a Wget
that has debugging support anyway.

> I'm wondering if it makes sense to even have the ability to create a
> non-debug build at this point.

It makes sense now as much as it did before -- there are people who
prefer their executables small, and since we have a macro for debug
prints anyway, the option comes with no additional price.