Monday, September 01, 2008

autoconf + Mingw is not working on Windows

Today I try to merge Makefile and Makefile.mingw on #mbpurple project. At first I thought it should be easy, since I had some experience with automake + autoconf + libtool. Somehow it turn out unsuccess because of few things
  1. Pidgin use Mingw. Mingw has a separate system tree from Cygwin. It doesn't understand /home/username, which is only available through Cygwin shell. So all include header files which use absolute path failed. Relative path is a must.
  2. From #1, many internal command of automake and libtool assume absolute path, so the path generated from these tools are unusable by makefile itself. For example, dependencies generated in .Plo contains c:\Cygwin\blah\blah, Cygwin Makefile treat this as "multiple target presence", then failed.
  3. The speed of execution on Windows is slow. automake will invoke config.sub and missing when something's changed. Sometimes perl just crash. This has almost no effect on Linux since execution of libtoolize && aclocal && autoheader && automake && autoconf is quick enough, but not the case for Windows.
So I decided to revert back to just plain Makefile and have a variable to detect for Cygwin. Maybe this is another reason that Pidgin on windows is built using Makefile only.

No comments: