Index: Makefile.in =================================================================== --- Makefile.in (revision 2207) +++ Makefile.in (working copy) @@ -57,7 +57,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\" -LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@ +LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@ @MINGW32_WS2@ LDFLAGS = @LDFLAGS@ # Index: configure.in =================================================================== --- configure.in (revision 2207) +++ configure.in (working copy) @@ -140,9 +140,28 @@ dnl case "$host_os" in *win32) exeext='.exe';; - *) exeext='';; + mingw32*) + exeext='.exe' + WIN32_OBJ="mswindows.o" + MINGW32_WS2="-lws2_32" + AC_DEFINE([WINDOWS], 1, [Define to 1 if we're building for win32.]) + ;; + *) + exeext='' + dnl We expect to have these functions on Unix-like systems configure + dnl runs on. The defines are provided to get them in config.h.in so + dnl Wget can still be ported to non-Unix systems (such as Windows) + dnl that lack some of these functions. + AC_DEFINE([HAVE_STRCASECMP], 1, [Define to 1 if you have the `strcasecmp' function.]) + AC_DEFINE([HAVE_STRNCASECMP], 1, [Define to 1 if you have the `strncasecmp' function.]) + AC_DEFINE([HAVE_STRDUP], 1, [Define to 1 if you have the `strdup' function.]) + AC_DEFINE([HAVE_ISATTY], 1, [Define to 1 if you have the `isatty' function.]) + AC_DEFINE([HAVE_SYMLINK], 1, [Define to 1 if you have the `symlink' function.]) + ;; esac AC_SUBST(exeext) +AC_SUBST(WIN32_OBJ) +AC_SUBST(MINGW32_WS2) dnl dnl Checks for basic compiler characteristics. @@ -208,16 +227,6 @@ AC_CHECK_FUNCS(strptime timegm snprintf vsnprintf vasprintf drand48) AC_CHECK_FUNCS(strtoll usleep ftello sigblock sigsetjmp memrchr) -dnl We expect to have these functions on Unix-like systems configure -dnl runs on. The defines are provided to get them in config.h.in so -dnl Wget can still be ported to non-Unix systems (such as Windows) -dnl that lack some of these functions. -AC_DEFINE([HAVE_STRCASECMP], 1, [Define to 1 if you have the `strcasecmp' function.]) -AC_DEFINE([HAVE_STRNCASECMP], 1, [Define to 1 if you have the `strncasecmp' function.]) -AC_DEFINE([HAVE_STRDUP], 1, [Define to 1 if you have the `strdup' function.]) -AC_DEFINE([HAVE_ISATTY], 1, [Define to 1 if you have the `isatty' function.]) -AC_DEFINE([HAVE_SYMLINK], 1, [Define to 1 if you have the `symlink' function.]) - dnl dnl Call Wget-specific macros defined in aclocal. dnl Index: src/Makefile.in =================================================================== --- src/Makefile.in (revision 2207) +++ src/Makefile.in (working copy) @@ -51,8 +51,8 @@ # The following line is losing on some versions of make! DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\" CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@ @MINGW32_WS2@ exeext = @exeext@ INCLUDES = -I. -I$(srcdir) @@ -71,13 +71,14 @@ NTLM_OBJ = @NTLM_OBJ@ SSL_OBJ = @SSL_OBJ@ GETOPT_OBJ = @GETOPT_OBJ@ +WIN32_OBJ = @WIN32_OBJ@ -OBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o \ +OBJ += $(ALLOCA) cmpt.o connect.o convert.o cookies.o \ ftp.o ftp-basic.o ftp-ls.o $(OPIE_OBJ) $(GETOPT_OBJ) hash.o \ host.o html-parse.o html-url.o http.o $(NTLM_OBJ) init.o \ log.o main.o $(MD5_OBJ) netrc.o progress.o ptimer.o recur.o \ res.o retr.o safe-ctype.o snprintf.o spider.o $(SSL_OBJ) \ - url.o utils.o version.o xmalloc.o + url.o utils.o version.o xmalloc.o $(WIN32_OBJ) .SUFFIXES: .SUFFIXES: .c .o