summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2017-04-29 22:40:32 +0100
committerReuben Thomas <rrt@sc3d.org>2017-04-30 17:49:59 +0100
commitfd306d6f364690037e01527e9398f69b33218db6 (patch)
treeeec4be8edac193a052c664a3ff1ac4de237ddb65 /src
parenta1167a25f2c0a22d18c5f3cb6b19e044d3f7d950 (diff)
downloadenchant-fd306d6f364690037e01527e9398f69b33218db6.tar.gz
Get AppleSpell back-end working again, and add list_dicts method
It transpired that owing to a problem in configure.ac, the backend was not being built, even on macOS. Fix this. As a result, some compilation errors recently introduced emerged. Fix them. Note that AppleSpell.config wasn't being installed. Fix this. Also fix its loading: it was being looked for in pkglibdir, but should be installed in pkgdatadir (and now is). In order to find the config file, promote enchant_get_conf_dirs to enchant-provider.h, which now therefore needs to include glib.h again.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am5
-rw-r--r--src/enchant-provider.h2
-rw-r--r--src/lib.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b901b92..21d94f6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -21,15 +21,14 @@ endif
libenchant_includedir = $(includedir)/enchant
libenchant_include_HEADERS = enchant.h enchant-provider.h enchant++.h
-orderingdir=$(datadir)/enchant
-ordering_DATA = enchant.ordering
+pkgdata_DATA = enchant.ordering
dist_man_MANS = enchant.1
LDADD = libenchant.la $(ENCHANT_LIBS) $(top_builddir)/lib/libgnu.la
bin_PROGRAMS = enchant-lsmod enchant
-EXTRA_DIST = $(ordering_DATA)
+EXTRA_DIST = $(pkgdata_DATA)
.rc.lo:
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
diff --git a/src/enchant-provider.h b/src/enchant-provider.h
index 300c08e..c6ae27e 100644
--- a/src/enchant-provider.h
+++ b/src/enchant-provider.h
@@ -31,6 +31,7 @@
#define ENCHANT_PROVIDER_H
#include <enchant.h>
+#include <glib.h>
#include <stddef.h>
#ifdef __cplusplus
@@ -51,6 +52,7 @@ typedef struct str_enchant_provider EnchantProvider;
char *enchant_get_user_language(void);
char *enchant_get_user_config_dir (void);
+GSList *enchant_get_conf_dirs (void);
/**
* enchant_get_prefix_dir
diff --git a/src/lib.c b/src/lib.c
index a024db6..d589420 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -121,7 +121,7 @@ enchant_get_user_config_dir (void)
return g_build_filename (g_get_user_config_dir (), "enchant", NULL);
}
-static GSList *
+GSList *
enchant_get_conf_dirs (void)
{
GSList *conf_dirs = NULL;