Re: [xml] RFC: mingw autoconf && config.h vs. win32config.h



Igor Zlatkovic <igor stud fh-frankfurt de> writes:

Hi there,

Hi,

Elizabeth Barham wrote:
[...] 
This and modifying libxml.h slightly, to use config.h and not
win32config.h, allowed most of the c sources to compile into object
code. But when it hit nanohttp.c, there were many errors.

Strange, I succeeded to compile everything without source modifications, 
but solely through the modification of win32/Makefile.mingw. 
Unfortunately, mingw linker, when called as ld, does not know where 
mingw is installed and fails to find some core libraries, such as 
C-runtime. Specifying the installation path with -L helps, but is far 
from a general solution.

In 2.4.24, the win32/Makefile.mingw didn't work as it had in 2.4.23
and I've been using the Linux Debian MinGW cross-tools and thought
that configuring with autoconf, etc. would be nice especially now that
the MinGW team has provided us with MSYS.

My next try would be to call the linker as gcc, or try the dlltool, but 
all that was for fun and not for any real need, so I'll accept the 
accusation I didn't push it far enough :-)

I *personally* would like to see the DLL built with libtool but
apparently that support is only in the CVS tree of libtool right
now. But that's just me and my reasoning is skewed toward the GNU
tools ;-)

So, at this point, I'w wondering if I should forget about
win32config.h and modify nanohttp.c directly, adding something like:

#ifdef WIN32
#include <winsock2.h>
#define ENOPROTOOPT             WSAENOPROTOOPT
(etc)

Nooooo, preventing that sort of mess in a source file is precisely the 
reason for the existence of win32config.h. Besides, these winsock 
definitions are allready in win32config.h.

Right, but the ./configure makes a "config.h" and there is some
selection process in nanohttp.c that included win32config.h and did
not include config.h. To my understanding, Winsock is very similar to
the standard so perhaps an addition of various #define's within
config.h would allow cross-compatability with relativly minimal
changes.

Please correct me if I'm wrong on this; my win32 book does not have
socket information in it.

I'd like to submit the patches to Daniel provided if and when the
whole is modified enough so as to build on a mingw system with
./configure.

Ah, your environment is somewhat different to mine. I have mingw, but no 
Cygwin and no MSYS. That means, I cannot execute a Korn/Bourne shell 
script. GNU autoconf/automake does not fit well in such environment. The 
attempt described above was rather an integration into the JScript-based 
configuration, as found underneath ./win32.

So, now I am wondering, what are other's opinion on this? Is
win32config.h very important? And should I continue down this path or
should I just modify win32config.h with other DEFINE's (although I am
very fond of supporting configure for mingw systems).

Well, you must know what fits your environment best. Win32config.h is 
very important for compilation with the Microsoft's compiler. You can 
basically put everything you want in win32config.h, as long it does not 
break other things.

I would suggest, simply do what you think is best and post the patches. 
Feedback on these will then come by itself.

Someone recently posted information on a patch for building on MSYS
with much less fuss so perhaps this is not needed, and indeed, if and
when this is implemented, I shall receive much better feedback.

Thanks you,

Elizabeth



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