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

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

    Attachment: util.mingw.patch

This patch modifies the utilities (axutil) so that they compile and test fine 
with MinGW.

The self tests all compile and pass and generate the same output as on linux. 
There are some slight differences in the output but these are to be expected. 
Namely:
  The uuid_gen test generates different UUIDs, but that is to be expected. They 
are different each time you run "make check".
  The axutil_rand test gets a different range after 
axutil_rand_get_seed_value_based_on_time. Once again this is to be expected as 
it is based on the time.
  The test_thread test generates the same output but it is (or can be) in a 
different order. This is to be expected.

There are some small code changes. They are in:
 util/test/util/test_thread.c
 util/include/platforms/windows/axutil_dir_windows.h
 util/include/platforms/windows/axutil_windows.h
 util/include/axutil_utils_defines.h
 util/src/platforms/windows/axutil_windows.c
 util/src/platforms/windows/thread_windows.c
 util/src/platforms/windows/dir_windows.c
 util/src/platforms/windows/uuid_gen_windows.c
In all cases the code changes are within "#ifdef"s for the __MINGW32__ macro so 
should make no difference to a "regular" Windows build. In many cases the 
changes are just to remove compilation warnings (which result in errors since 
"-Werror" is added to the CFLAGS).

About the only "iffy" thing about the code changes is definition of 
AXIS2_LIB_SUFFIX in util/include/platforms/windows/axutil_windows.h. Because 
the DLL created by libtool on MinGW includes the first digit of the version 
info in its name this has to be "-0.dll". If the version info ever goes up this 
might prove to be a problem and would need to be revisited. Probably the best 
solution there would be to not add "-version-info" to the link line on Windows.

The configuration chages are in:
  util/test/properties/Makefile.am
  util/test/util/Makefile.am
  util/src/platforms/Makefile.am  (New file)
  util/src/platforms/windows/Makefile.am (New file)
  util/src/Makefile.am
  util/configure.ac

The configure.ac changes are:
  Added an AC_CHECK_LIB for pthread_join in pthread (this adds "-lpthread" to 
$LIBS if it finds it) and the unconditional adding of "-lpthread" to LDFLAGS 
was removed.
  Added the required Windows libs and LDFLAGS for "*mingw*" host
  Added a new var "PLATFORM" which is either "windows" or "unix" to buildand 
include the right platforms sub-directory.
  Added the new sub-makefiles in platforms and platforms/windows.

The properties test Makefile change is a bit iffy but is required to get 
property_test to link. property_test uses the axutil_properties_read() function 
but that is not exported by the axutil DLL. The Makefile change is to add the 
properties object to the link.

The util test Makefile change is to remove the "-lpthread" from the links 
(still works on linux due to the AC_CHECK_LIB addition in configure.ac).

The src Makefile change is to get the right platforms sub-library in the axutil 
library link.


> 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: 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