--- a/configure.ac Thu Nov 27 18:22:45 2008 -0500
+++ b/configure.ac Wed Dec 10 03:44:33 2008 -0500
@@ -277,48 +277,63 @@
AC_SUBST(GTKSPELL_CFLAGS)
+DEPENDENCIES="$DEPENDENCIES,gtkspell" if test x"$gtkspell" = x"yes" ; then
- AC_CHECK_HEADER([aspell.h], HAVE_ASPELL_H=yes, HAVE_ASPELL_H=no)
- if test x"$HAVE_ASPELL_H" = x"yes" ; then
- AC_CHECK_LIB([aspell], [new_aspell_config],BUILD_SWITCH_SPELL=yes,BUILD_SWITCH_SPELL=no)
+ AC_MSG_CHECKING([which backend gtkspell is compiled with]) + $PKG_CONFIG --static --libs gtkspell-2.0 | grep -q enchant + if test $? -eq 0 ; then + AC_MSG_RESULT([enchant]) + PKG_CHECK_MODULES(ENCHANT, [enchant],,[gtkspell=no]) + ENCHANT_CFLAGS="-DUSE_ENCHANT $ENCHANT_CFLAGS" + AC_DEFINE(HAVE_ENCHANT, 1, [define if we've found enchant]) + DEPENDENCIES="$DEPENDENCIES,enchant"
+ AC_MSG_RESULT([aspell]) + AC_CHECK_HEADER([aspell.h], HAVE_ASPELL_H=yes, HAVE_ASPELL_H=no) + if test x"$HAVE_ASPELL_H" = x"yes" ; then + AC_CHECK_LIB([aspell], [new_aspell_config], + [ASPELL_LIBS="-laspell" + BUILD_SWITCH_SPELL=yes], + [BUILD_SWITCH_SPELL=no]) + DEPENDENCIES="$DEPENDENCIES,aspell"
-AC_CHECK_HEADER([aspell.h], HAVE_ASPELL_H=yes, AC_MSG_WARN([
-*** libaspell is required to build the switchspell plugin.])
+if test x"$BUILD_SWITCH_SPELL" = x"no" ; then -if test x"$HAVE_ASPELL_H" = x"yes" ; then
- AC_CHECK_LIB([aspell], [new_aspell_config], ASPELL_LIBS="-laspell", BUILD_SWITCH_SPELL=no)
-AC_ARG_ENABLE(enchant, [AC_HELP_STRING([--disable-enchant], [compile with gtkspell using aspell])],
- enable_enchant="$enableval", enable_enchant="yes")
-if test "x$enable_enchant" = "xyes"; then
- PKG_CHECK_MODULES(ENCHANT, enchant, [
- ASPELL_LIBS=""], [gtkspell=no])
- ENCHANT_CFLAGS="-DUSE_ENCHANT $ENCHANT_CFLAGS"
- AC_SUBST(ENCHANT_CFLAGS)
+ AM_CONDITIONAL(BUILD_SWITCH_SPELL, true) + AM_CONDITIONAL(BUILD_SWITCH_SPELL, false) -AM_CONDITIONAL(BUILD_SWITCH_SPELL, test x"$BUILD_SWITCH_SPELL" = x"yes")
-if test x"$BUILD_SWITCH_SPELL" = x"yes" ; then
- DEPENDENCIES="$DEPENDENCIES,gtkspell,aspell"
+AC_SUBST(ENCHANT_CFLAGS) dnl #######################################################################