aspell-devel
[Top][All Lists]
Advanced

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

Re: [aspell-devel] Aspell on Win32


From: Ruurd Reitsma
Subject: Re: [aspell-devel] Aspell on Win32
Date: Mon, 16 Sep 2002 05:04:10 -0700 (PDT)

> 
> So far I have made the following modifications:
> 
> 1.  I had to remove the gotos from common/info.cpp as the compiler did not 
> like them.
> 
> 2.  I had to move libstdc++.la out of the way to libstdc++.la.old like a few 
> others have had to do in the past to compile other things as dll's.
> 
> Now I am really close to getting a dll.  I am getting

You are close, but there's more behind this point. You'll need the latest CVS,
which has some win32 fixes not present in .50.1. My method:

1. #undef ERROR in info.cpp; #undef OUT in
modules/speller/default/readonly_ws.cpp. Or properly:

#ifdef ERROR
#undef ERROR
#endif

etc.

2. kill all the postdeps/predeps(_objects) in libtool, remove -nostdlib from
the link line. The provided libtool is not up to date with the latest mingw
release.

3. kill the relink functionality in libtool. This makes no sense with .dll's.

4. At some point you'll have to do a path correction in lib/libaspell.la.

5. merge the ENABLE_WIN32_RELOCATABLE stuff from aspell-0.3. eg:

--- /tmp/aspell-0.50.1/common/config.cpp        2002-08-26 01:24:33.000000000 
+0200
+++ config.cpp  2002-09-16 13:53:21.000000000 +0200
@@ -25,6 +25,10 @@
 
 #define DEFAULT_LANG "en_US"
 
+#ifdef ENABLE_WIN32_RELOCATABLE
+#include "windows.h"
+#endif
+
 namespace acommon {
 
   static const ConfigModule a_module = ConfigModule();
@@ -44,6 +48,22 @@
     kmi.extra_end   = 0;
     kmi.modules_begin = &a_module;
     kmi.modules_end   = &a_module;
+#ifdef ENABLE_WIN32_RELOCATABLE
+    if (retrieve_bool("set-prefix")) {
+      char filename[MAX_PATH];
+      GetModuleFileName(0,filename,MAX_PATH);
+      char * last_slash = 0;
+      for (char * i = filename; *i != '\0'; ++i) {
+       if (*i == '\\') {
+         *i = '/';
+         last_slash = i;
+       }
+      }
+       // Assume executable is in <prefix>/bin
+      *(last_slash-4) = '\0';
+      replace("prefix", filename);
+    }
+#endif
   }
 
   Config::~Config() {


Aspell 0.3 with enable-win32-relocatable used to assume that the binary was in
<prefix>. It makes more sense to put all executables & .dll's in <prefix>/bin.
This makes it easier to integrate aspell into other unix->win32 ports.

Cheers,

Ruurd

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]