Index: config_office/configure.in
===================================================================
RCS file: /cvs/tools/config_office/configure.in,v
retrieving revision 1.232
retrieving revision 1.221.4.23
diff -u -u -r1.232 -r1.221.4.23
--- config_office/configure.in	26 Nov 2007 18:03:39 -0000	1.232
+++ config_office/configure.in	4 Dec 2007 23:46:26 -0000	1.221.4.23
@@ -4272,13 +4367,22 @@
     AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
        [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
        [#include <hyphen.h>])
-    AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [],
+    AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
         [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    if test -z "$HYPHEN_LIB"; then
+       AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
+           [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    fi
+    if test -z "$HYPHEN_LIB"; then
+       AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
+           [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    fi
 else
     AC_MSG_RESULT([internal])
     SYSTEM_HYPH=NO
 fi
 AC_SUBST(SYSTEM_HYPH)
+AC_SUBST(HYPHEN_LIB)
 
 dnl ===================================================================
 dnl Checking for mythes
Index: config_office/set_soenv.in
===================================================================
RCS file: /cvs/tools/config_office/set_soenv.in,v
retrieving revision 1.164
retrieving revision 1.157.6.8
diff -u -u -r1.164 -r1.157.6.8
--- config_office/set_soenv.in	26 Nov 2007 18:04:00 -0000	1.164
+++ config_office/set_soenv.in	2 Dec 2007 12:34:14 -0000	1.157.6.8
@@ -1975,6 +1990,7 @@
 ToFile( "HUNSPELL_CFLAGS",   "@HUNSPELL_CFLAGS@",  "e" );
 ToFile( "HUNSPELL_LIBS",     "@HUNSPELL_LIBS@",    "e" );
 ToFile( "SYSTEM_HYPH",       "@SYSTEM_HYPH@",      "e" );
+ToFile( "HYPHEN_LIB",        "@HYPHEN_LIB@",       "e" );
 ToFile( "SYSTEM_MYTHES",     "@SYSTEM_MYTHES@",    "e" );
 ToFile( "PAM",               "@PAM@",              "e" );
 ToFile( "NEW_SHADOW_API",    "@NEW_SHADOW_API@",   "e" );
