[ 
https://issues.apache.org/jira/browse/AXIS2C-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Nairn updated AXIS2C-1107:
--------------------------------

    Attachment: axiom.mingw.patch

The attached patch (axiom.mingw.patch) modifies axiom so that it compiles fine 
with MinGW.

There are only configuration changes (no code changes).

It works with both guththila ("--enable-guththila") and libxml2 
("--enable-guththila=no --enable-libxml2") as the XML parser.

Axis2/C still builds, tests and runs fine on linux. The output of the self test 
(test_soap) on linux before and after the change is the same.

The output of the self test (test_soap) on Windows with MinGW is the same as on 
linux (except when using libxml2 as the parser. This is because the read_soap() 
callback in test_soap does not null terminate the buffer before printing it so 
occasionally garbage is appended to the output).

The configuration changes are as follows:

configure.ac was changed to remove the checks for libz and libdl. These 
libraries are not used directly by axiom but might be used by libaxutil (in 
which case they will be added to the link command from the libaxutil.la libtool 
file). Similarly "-lpthread" was removed from LDFLAGS (for the same reason).
configure.ac was changed to remove the checks for "sys/socket.h" and 
"linux/if.h" since there didn't seem to be any point them being there (nothing 
in axiom uses them).
configure.ac was changed to add the required preprocessor macros 
("AXIS2_DECLARE_EXPORT" etc) and LDFLAGS ("-no-undefined" to build the DLL OK) 
for Windows. They are added if the host_os is "mingw32".
Finally, configure.ac was changed to remove the addition of LIBXML2_CFLAGS and 
GUTHTHILA_CFLAGS to CFLAGS (this is now done in the appropriate Makefile.am).

axiom/src/parser/Makefile.am was changed to make sure both the guththila and 
libxml2 sub-directories are in DIST_SUBDIRS (this is not really required but 
makes sure both directories are cleaned up with a "make distclean").

axiom/src/parser/guththila/Makefile.am was changed to add libaxutil.la to the 
link. This is required to resolve references to utility functions (as windows 
DLLs can't contain unresolved references).

axiom/src/parser/libxml2/Makefile.am has larger changes. The target 
libaxis2_libxml2.la was removed as there didn't seem much point building it 
(nothing uses it). This change is not strictly required but fixes some 
"untidiness". It was also modified to add libaxutil.la to the link (for the 
same reason as axiom/src/parser/guththila/Makefile.am). Finally it was changed 
to use LIBXML2_LIBS and LIBXML2_CFLAGS (which are set by the configure script) 
for compiling/linking the library - this makes it a lot easier to use libxml2 
that is installed in a non-standard location.

Lastly the test makefile.am's (axiom/test/soap/Makefile.am and 
axiom/test/om/Makefile.am) were modified to remove the "hard-coding" of 
AM_CFLAGS and to remove LIBXML2_LIBS and GUTHTHILA_LIBS from the link line 
(libtool will get the required libraries from the libaxis2_parser.la file). 
These changes aren't really required (once again just make things a bit tidier).


> Enhance configuration scripts to support building with MinGW
> ------------------------------------------------------------
>
>                 Key: AXIS2C-1107
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1107
>             Project: Axis2-C
>          Issue Type: New Feature
>          Components: build system (Windows)
>         Environment: Windows XP, MinGW & MSYS
>            Reporter: Steve Nairn
>            Priority: Minor
>         Attachments: axiom.mingw.patch, guththila.mingw.patch, 
> util.mingw.patch
>
>
> Would there be any interest in some patches to the various configure.ac and 
> Makefile.am files to support building on Windows XP using MinGW?
> Our product uses Libxml2, libcurl, OpenSSL and Apache httpd (among others) 
> and on Windows these are all built with MinGW and MSYS. In order to get 
> Axis2/C to play well with the other libraries (DLLs) I've had to modify the 
> autoconf/automake to support building with MinGW (as well as some minor code 
> changes).
> If I posted the changes in a patch as an attachment to this issue would it be 
> of any interest/use to anyone?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to