Add a build option for ispell.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/107/head
Slávek Banko 4 years ago
parent 70d26004f0
commit c66f921179
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -109,6 +109,7 @@ OPTION( WITH_XCOMPOSITE "Enable xcomposite support" ON )
OPTION( WITH_MITSHM "Use MIT-SHM for pixmap loading/saving" ${WITH_ALL_OPTIONS} )
OPTION( WITH_KDE4_MENU_SUFFIX "Add [KDE4] tag to KDE4 menu items" OFF )
OPTION( WITH_ISPELL "Enable ispell support" ON )
OPTION( WITH_ASPELL "Enable aspell support" ${WITH_ALL_OPTIONS} )
OPTION( WITH_HSPELL "Enable hspell support" ${WITH_ALL_OPTIONS} )
@ -1208,21 +1209,24 @@ endif( WITH_GAMIN )
##### check for ispell ##########################
if ( NOT ISPELL_LIBDIR )
find_program( ISPELL_EXECUTABLE NAMES ispell DOC "path to the ispell executable" )
if( ISPELL_EXECUTABLE )
execute_process (
COMMAND ${ISPELL_EXECUTABLE} -vv
COMMAND awk "$1 == \"LIBDIR\" && $2 == \"=\" {gsub(/\"/, \"\", $3); print $3;}"
OUTPUT_VARIABLE ISPELL_LIBDIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
if ( ISPELL_LIBDIR )
set ( ISPELL_LIBDIR "${ISPELL_LIBDIR}" CACHE PATH "ispell lib directory contains dictionaries" )
else ( ISPELL_LIBDIR )
unset ( ISPELL_LIBDIR )
endif ( ISPELL_LIBDIR )
endif( ISPELL_EXECUTABLE )
endif ( NOT ISPELL_LIBDIR )
if( WITH_ISPELL )
if( NOT ISPELL_LIBDIR )
find_program( ISPELL_EXECUTABLE NAMES ispell DOC "path to the ispell executable" )
if( ISPELL_EXECUTABLE )
execute_process (
COMMAND ${ISPELL_EXECUTABLE} -vv
COMMAND awk "$1 == \"LIBDIR\" && $2 == \"=\" {gsub(/\"/, \"\", $3); print $3;}"
OUTPUT_VARIABLE ISPELL_LIBDIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
if ( ISPELL_LIBDIR )
set ( ISPELL_LIBDIR "${ISPELL_LIBDIR}" CACHE PATH "ispell lib directory contains dictionaries" )
else ( ISPELL_LIBDIR )
unset ( ISPELL_LIBDIR )
endif ( ISPELL_LIBDIR )
endif( ISPELL_EXECUTABLE )
endif ( NOT ISPELL_LIBDIR )
endif( WITH_ISPELL )
##### check for aspell ##########################

@ -9,12 +9,6 @@
#
#################################################
if( WITH_ASPELL )
add_subdirectory( aspell )
endif(WITH_ASPELL)
if( WITH_HSPELL )
add_subdirectory( hspell )
endif(WITH_HSPELL)
add_subdirectory( ispell )
tde_conditional_add_subdirectory( WITH_ASPELL aspell )
tde_conditional_add_subdirectory( WITH_HSPELL hspell )
tde_conditional_add_subdirectory( WITH_ISPELL ispell )

Loading…
Cancel
Save