summaryrefslogtreecommitdiffstats
path: root/kspell2/plugins/configure.in.in
blob: 16efb6b2f79922d2ac889cd85bd3d3863f70d8b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
   AC_ARG_WITH(aspell,AC_HELP_STRING([--with-aspell],[Enable aspell support [default=check]]),[aspell_test="$withval"],[aspell_test="yes"])
  
   if test "x$aspell_test" = "xyes" ; then
       AC_LANG_SAVE
       AC_LANG_C
       dnl Check for aspell library
       KDE_CHECK_LIB(aspell, new_aspell_config, [LIBASPELL="-laspell"])
       KDE_CHECK_HEADER(aspell.h)
       if test -z "$ac_cv_header_aspell_h"; then
           echo ""
           echo "Your libaspell is too old or not installed, I couldn't tqfind aspell.h."
           echo "You must download aspell >= 0.50.2, see http://aspell.net"
           echo "Spell-checking with libaspell will not be available, only with ispell dicts."
           echo ""
       fi
       AC_LANG_RESTORE
   fi

   aspell_datadir="/usr/lib/aspell"
   if test -f "/usr/bin/pspell-config"; then
      aspell_datadir=`/usr/bin/pspell-config --pkgdatadir`
   fi
   
   AC_DEFINE_UNQUOTED( ASPELL_DATADIR, ["$aspell_datadir"], [Define where aspell data dir is] )
   AM_CONDITIONAL(include_aspell_plugin, test -n "$ac_cv_header_aspell_h" -a -n "$LIBASPELL")
   
   AC_ARG_WITH(hspell,AC_HELP_STRING([--with-hspell],[Enable hspell support [default=check]]),[hspell_test="$withval"],[hspell_test="yes"])
  
   if test "x$hspell_test" = "xyes" ; then
       AC_LANG_SAVE
       AC_LANG_C
       dnl Check for hspell library
       KDE_CHECK_LIB(hspell, hspell_check_word, [LIBHSPELL="-lhspell"],[],-lz)
       KDE_CHECK_HEADER(hspell.h)
       if test "$ac_cv_header_hspell_h" != "yes"; then
	       unset LIBHSPELL
       fi
       AC_LANG_RESTORE
   fi

   AM_CONDITIONAL(include_hspell_plugin, test "$ac_cv_header_hspell_h" = "yes" -a -n "$LIBHSPELL")