diff options
author | Fabiano Fidencio <fabiano@fidencio.org> | 2011-06-25 22:46:19 +0000 |
---|---|---|
committer | Fabiano Fidencio <fabiano@fidencio.org> | 2011-06-25 22:46:19 +0000 |
commit | aff90429260fc5c5d11e9f572ab76d1d4c62e5f4 (patch) | |
tree | a86eff2c2045da7fc279edc7f4a9864e03c66c43 | |
parent | d4404a9d363f1a5adaceae70bd7ae9e775a46f6c (diff) | |
download | enchant-aff90429260fc5c5d11e9f572ab76d1d4c62e5f4.tar.gz |
[mac] Fixing enchant breakage
- Now, applespell is an option valid only for OS X
If you try to enable it on Linux/Windows, you'll be ignored :-)
- The default, is applespell be disabled. To enable, use
--enable-applespell
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@29875 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r-- | configure.in | 21 | ||||
-rw-r--r-- | src/Makefile.am | 14 |
2 files changed, 19 insertions, 16 deletions
diff --git a/configure.in b/configure.in index 4fed9d6..3fb5770 100644 --- a/configure.in +++ b/configure.in @@ -209,7 +209,6 @@ case ${host_os} in ;; esac AC_MSG_RESULT([$check_applespell]) -AM_CONDITIONAL(WITH_APPLESPELL, test "x$check_applespell" = "xyes") AC_SUBST(SOCKET_LIBS) @@ -498,26 +497,28 @@ AM_CONDITIONAL(WITH_ZEMBEREK, test "x$build_zemberek" = "xyes") zemberek_dir=${datadir}/enchant/zemberek -build_applespell=no - APPLESPELL_CFLAGS="" APPLESPELL_LIBS="" APPLESPELL_LDFLAGS="" -AC_ARG_ENABLE(applespell, AS_HELP_STRING([--disable-applespell],[enable the applespell backend @<:@default=auto@:>@]), check_applespell="$enableval", check_applespell=yes) +build_applespell=no +if test "x$check_applespell" = "xyes"; then + + AC_ARG_ENABLE(applespell, AS_HELP_STRING([--disable-applespell],[enable the applespell backend @<:@default=no@:>@]), build_applespell="$enableval", build_applespell=no) + + if test "x$build_applespell" != "xno"; then + APPLESPELL_CFLAGS+=" -DXP_TARGET_COCOA -xobjective-c" + APPLESPELL_LIBS+=" -lobjc" + APPLESPELL_LDFLAGS+=" -framework Cocoa" + fi -if test "x$check_applespell" != "xno"; then - APPLESPELL_CFLAGS+=" -DXP_TARGET_COCOA -xobjective-c" - APPLESPELL_LIBS+=" -lobjc" - APPLESPELL_LDFLAGS+=" -framework Cocoa" - build_applespell=yes fi AC_SUBST(APPLESPELL_CFLAGS) AC_SUBST(APPLESPELL_LIBS) AC_SUBST(APPLESPELL_LDFLAGS) -AM_CONDITIONAL(WITH_APPLESPELL, test "$build_applespell" = yes) +AM_CONDITIONAL(WITH_APPLESPELL, test "x$build_applespell" = "xyes") dnl ======================================================================================= diff --git a/src/Makefile.am b/src/Makefile.am index 48ebc07..7fa7b1a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,12 +1,12 @@ SUBDIRS=. aspell ispell uspell myspell hspell applespell voikko zemberek -INCLUDES=-I$(top_srcdir) $(ENCHANT_CFLAGS) $(CC_WARN_CFLAGS) -DENCHANT_GLOBAL_MODULE_DIR=\"$(libdir)/enchant\" -DENCHANT_GLOBAL_ORDERING=\"$(datadir)/enchant\" -D_ENCHANT_BUILD=1 -DENCHANT_VERSION_STRING=\"@ENCHANT_MAJOR_VERSION@.@ENCHANT_MINOR_VERSION@.@ENCHANT_MICRO_VERSION@\" @APPLESPELL_CFLAGS@ +INCLUDES=-I$(top_srcdir) $(ENCHANT_CFLAGS) $(CC_WARN_CFLAGS) -DENCHANT_GLOBAL_MODULE_DIR=\"$(libdir)/enchant\" -DENCHANT_GLOBAL_ORDERING=\"$(datadir)/enchant\" -D_ENCHANT_BUILD=1 -DENCHANT_VERSION_STRING=\"@ENCHANT_MAJOR_VERSION@.@ENCHANT_MINOR_VERSION@.@ENCHANT_MICRO_VERSION@\" lib_LTLIBRARIES = libenchant.la -libenchant_la_LIBADD= $(ENCHANT_LIBS) @ENCHANT_WIN32_RESOURCE@ @APPLESPELL_LIBS@ +libenchant_la_LIBADD= $(ENCHANT_LIBS) @ENCHANT_WIN32_RESOURCE@ -libenchant_la_LDFLAGS = -no-undefined -export-dynamic @APPLESPELL_LDFLAGS@ +libenchant_la_LDFLAGS = -no-undefined -export-dynamic if OS_WIN32 libenchant_la_LDFLAGS += -avoid-version else @@ -15,13 +15,15 @@ endif libenchant_la_DEPENDENCIES = @ENCHANT_WIN32_RESOURCE@ libenchant_la_SOURCES = prefix.c enchant.c pwl.c enchant.h prefix.h pwl.h -if WITH_APPLESPELL -libenchant_la_SOURCES += enchant_cocoa.m enchant_cocoa.h -endif libenchant_includedir = $(includedir)/enchant libenchant_include_HEADERS = enchant.h enchant-provider.h enchant++.h + if WITH_APPLESPELL +INCLUDES += @APPLESPELL_CFLAGS@ +libenchant_la_LIBADD += @APPLESPELL_LIBS@ +libenchant_la_LDFLAGS += @APPLESPELL_LDFLAGS@ +libenchant_la_SOURCES += enchant_cocoa.m enchant_cocoa.h libenchant_include_HEADERS += enchant_cocoa.h endif |