rrthomas / enchant

enchant spellchecking library
http://rrthomas.github.io/enchant/
GNU Lesser General Public License v2.1
347 stars 60 forks source link

Remove mostly bogus configure options --with-*-dir #352

Closed franko closed 10 months ago

franko commented 10 months ago

I had problems building enchant with aspell in a non-standard location.

If I am right the configure option:

--with-aspell-dir

is just ignored and it is impossible to build the library if aspell is in a non-standard location. I tried to use the option and it doesn't work and the configure script seems just to ignore this option.

rrthomas commented 10 months ago

There is no configure option --with-aspell-dir that I'm aware of. Where did you get the impression that it exists?

franko commented 10 months ago

Hi and thank you for the quick reply, I appreciate.

extract from ./configure --help

 --with-hunspell-dir=PATH
                          path to installed hunspell dicts
  --with-nuspell          enable the nuspell provider [default=check]
  --with-nuspell-dir=PATH path to installed nuspell dicts
  --with-aspell           enable the aspell provider [default=check]
  --with-aspell-dir=PATH  path to installed aspell dicts
  --with-hspell           enable the hspell provider [default=check]
  --with-hspell-dir=PATH  path to installed hspell dicts
  --with-voikko           enable the voikko provider [default=check]
  --with-voikko-dir=PATH  path to installed voikko dicts
  --with-applespell       enable the applespell provider
                          [default=check]
  --with-applespell-dir=PATH
                          path to installed applespell dicts
  --with-zemberek         enable the zemberek provider
                          [default=no]
  --with-zemberek-dir=PATH
                          path to installed zemberek dicts

from enchant 2.6.4.

rrthomas commented 10 months ago

Sorry, I was looking at what's in git, and these options are generated. I'll investigate.

franko commented 10 months ago

Thank you. What I really would need is to have an option to indicate where the aspell library is located.

EDIT: Well, that's doesn't change the issue but after reading the documentation I think that for my usage I may drop aspell and try to use hunspell or nuspell as they seems to be better modern options.

rrthomas commented 10 months ago

OK, I just looked at some history, and these options are a mistaken generalization. The only one that actually does something is --with-hunspell-dir.

For aspell, you should configure aspell's local-data-dir (see its documentation).

I will remove the configuration for hunspell, since it has its own environment variable, DICPATH.

I will also remove all the other bogus options.

Many thanks for bringing this to my attention!

rrthomas commented 10 months ago

What I really would need is to have an option to indicate where the aspell library is located.

Ideally you would have installed aspell on your normal system paths, but if you haven't you can indicate its location with LIBS and CPPFLAGS as you would for any library installed in a non-standard location.

franko commented 10 months ago

Well I think the options were there for a reason, to indicate the location of the library. It seems to me "you throw the baby out with the bathwater".

But don't mind, I will find a solution in one way or another and thank you for having a look at the problem.

rrthomas commented 10 months ago

[Apologies, I accidentally edited your comment rather than reply to it; I have now restored your comment's original content verbatim, and written this reply.]

Well I think the options were there for a reason, to indicate the location of the library. It seems to me "you throw the baby out with the bathwater".

As documented, the (non-standard) options were there to indicate the location of dictionaries, not libraries.

The standard configure options are used to indicate the location of libraries, as I mentioned above: specifically, LIBS and CPPFLAGS.

rrthomas commented 10 months ago

(As a historical footnote: I created all of those configure flags except for --with-hunspell-dir when I simplified the autoconf code some years ago. Unfortunately, it seems I didn't realize the significance of this special-purpose flag, and over-generalized it.

Looking at the implementation of --with-hunspell-dir, it added an Enchant-specific way to hardcode an extra path at which to find Hunspell dictionaries. This is unnecessary: there's already a way to specify an extra path dynamically (the DICPATH environment variable), and user-specific dictionaries (the hunspell subdirectory of the per-user Enchant configuration directory, e.g. ~/.config/enchant/hunspell). Hence, it seemed sensible to remove this original flag along with the equivalent flags for other spelling providers, which have never done anything.)