summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 4e83ea7..4fed9d6 100644
--- a/configure.in
+++ b/configure.in
@@ -32,6 +32,7 @@ dnl Checks for programs.
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
+AC_PROG_OBJC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
@@ -198,6 +199,18 @@ AC_MSG_RESULT([$native_win32])
AM_CONDITIONAL(OS_WIN32, test "x$native_win32" = "xyes")
AC_SUBST([ENCHANT_WIN32_RESOURCE])
+AC_MSG_CHECKING([for OS X])
+case ${host_os} in
+ *darwin*)
+ check_applespell=yes
+ ;;
+ *)
+ check_applespell=no
+ ;;
+esac
+AC_MSG_RESULT([$check_applespell])
+AM_CONDITIONAL(WITH_APPLESPELL, test "x$check_applespell" = "xyes")
+
AC_SUBST(SOCKET_LIBS)
# Courtesy of Glib: Ensure MSVC-compatible struct packing convention
@@ -485,6 +498,27 @@ 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)
+
+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)
+
dnl =======================================================================================
AC_OUTPUT([
@@ -529,6 +563,7 @@ $PACKAGE-$VERSION
Build Myspell/Hunspell backend: ${build_myspell}
Build Voikko backend: ${build_voikko}
Build Zemberek backend: ${build_zemberek}
+ Build Apple Spell backend: ${build_applespell}
Build a relocatable library: ${relocatable_library}"
if test "x$build_zemberek" = "xyes"; then