fix built-in spelling on linux

This commit is contained in:
Berke Viktor 2011-12-11 19:27:37 +01:00
parent 13ee029364
commit 38a42ed519
3 changed files with 18 additions and 4 deletions

View File

@ -10,6 +10,7 @@ AC_CONFIG_SRCDIR([configure.in])
AM_INIT_AUTOMAKE([1.9 dist-bzip2 subdir-objects no-define])
AC_USE_SYSTEM_EXTENSIONS
AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_CC_C_O
@ -40,6 +41,7 @@ dnl AH_VERBATIM([USE_GNOME],[#undef USE_GNOME])
AH_VERBATIM([USE_SHM],[#undef USE_SHM])
AH_VERBATIM([USE_GTKSPELL],[#undef USE_GTKSPELL])
AH_VERBATIM([USE_LIBSEXY],[#undef USE_LIBSEXY])
AH_VERBATIM([HAVE_ISO_CODES],[#undef HAVE_ISO_CODES])
AH_VERBATIM([USE_LIBNOTIFY],[#undef USE_LIBNOTIFY])
AH_VERBATIM([USE_IPV6],[#undef USE_IPV6])
AH_VERBATIM([USE_MMX],[#undef USE_MMX])
@ -549,7 +551,14 @@ if test "$spell" = "libsexy" ; then
fi
if test "$spell" = "static" ; then
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.0.0, [
AC_DEFINE(HAVE_ISO_CODES)
AC_DEFINE(USE_LIBSEXY)
GUI_CFLAGS="$GUI_CFLAGS -I/usr/include/libxml2"
LIBS="$LIBS -lxml2"
], [
AC_MSG_ERROR("Cannot find libxml2")
])
fi
dnl *********************************************************************

View File

@ -10,8 +10,8 @@ EXTRA_DIST = \
about.h ascii.h banlist.h chanlist.h chanview.h chanview-tabs.c \
chanview-tree.c custom-list.h editlist.h fe-gtk.h fkeys.h gtkutil.h joind.h \
maingui.h menu.h mmx_cmod.S mmx_cmod.h notifygui.h palette.h pixmaps.h \
plugin-tray.h plugingui.c plugingui.h rawlog.h search.h sexy-spell-entry.h \
textgui.h urlgrab.h userlistgui.h xtext.h
plugin-tray.h plugingui.c plugingui.h rawlog.h search.h sexy-iso-codes.h \
sexy-spell-entry.h sexy-marshal.h textgui.h urlgrab.h userlistgui.h xtext.h
if USE_MMX
mmx_cmod_S = mmx_cmod.S
@ -22,11 +22,12 @@ plugingui_c = plugingui.c
endif
if USE_LIBSEXY
sexy_spell_entry_c = sexy-spell-entry.c
sexy_spell = \
sexy-iso-codes.c sexy-marshal.c sexy-spell-entry.c
endif
xchat_SOURCES = about.c ascii.c banlist.c chanlist.c chanview.c custom-list.c \
dccgui.c editlist.c fe-gtk.c fkeys.c gtkutil.c ignoregui.c joind.c menu.c \
maingui.c $(mmx_cmod_S) notifygui.c palette.c pixmaps.c plugin-tray.c $(plugingui_c) \
rawlog.c search.c servlistgui.c setup.c $(sexy_spell_entry_c) textgui.c \
rawlog.c search.c servlistgui.c setup.c $(sexy_spell) textgui.c \
urlgrab.c userlistgui.c xtext.c

View File

@ -115,7 +115,11 @@ load_iso_entries (int iso,
char *filename;
int ret = -1;
#ifdef WIN32
filename = g_strdup_printf (".\\share\\xml\\iso-codes\\iso_%d.xml", iso);
#else
filename = g_strdup_printf ("/usr/share/xml/iso-codes/iso_%d.xml", iso);
#endif
reader = xmlNewTextReaderFilename (filename);
if (reader == NULL) goto out;