1 dnl sxe-iconv.m4 -- mule and other coding system stuff
6 AC_DEFUN([SXE_CHECK_MULE], [dnl
7 AC_MSG_CHECKING([for mule-related features])
10 AC_DEFINE([MULE], [1], [Description here!])
12 AC_DEFINE([ENCAPSULATE_CHDIR], [], [directory calls encapsulation])
13 AC_DEFINE([ENCAPSULATE_MKDIR], [], [directory calls encapsulation])
14 AC_DEFINE([ENCAPSULATE_OPENDIR], [], [directory calls encapsulation])
15 AC_DEFINE([ENCAPSULATE_READDIR], [], [directory calls encapsulation])
16 AC_DEFINE([ENCAPSULATE_RMDIR], [], [directory calls encapsulation])
18 if test "$ac_cv_func_eaccess" = "yes"; then
19 AC_DEFINE([ENCAPSULATE_EACCESS], [], [file information calls])
21 AC_DEFINE([ENCAPSULATE_ACCESS], [], [file information calls])
22 AC_DEFINE([ENCAPSULATE_LSTAT], [], [file information calls])
23 AC_DEFINE([ENCAPSULATE_READLINK], [], [file information calls])
24 AC_DEFINE([ENCAPSULATE_STAT], [], [file information calls])
26 AC_DEFINE([ENCAPSULATE_CHMOD], [], [file manipulation calls])
27 AC_DEFINE([ENCAPSULATE_CREAT], [], [file manipulation calls])
28 AC_DEFINE([ENCAPSULATE_LINK], [], [file manipulation calls])
29 AC_DEFINE([ENCAPSULATE_RENAME], [], [file manipulation calls])
30 AC_DEFINE([ENCAPSULATE_SYMLINK], [], [file manipulation calls])
31 AC_DEFINE([ENCAPSULATE_UNLINK], [], [file manipulation calls])
32 AC_DEFINE([ENCAPSULATE_EXECVP], [], [file manipulation calls])
36 AC_DEFINE([FILE_CODING], [1], [Description here!])
37 SXE_ADD_MULE_OBJS([mule.o mule-ccl.o mule-charset.o file-coding.o])
39 dnl Use -lintl to get internationalized strerror for Mule
40 SXE_CHECK_HEADERS([libintl.h])
41 AC_CHECK_LIB([intl], [strerror], [:], [:])
43 AC_MSG_CHECKING([for mule input methods])
50 AC_DEFUN([SXE_CHECK_XIM], [dnl
51 ## Do we have the XmIm* routines? And if so, do we want to use them?
52 ## XIM seems to be flaky except on Solaris...
53 ## test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
56 AC_MSG_CHECKING([for XIM])
58 AC_CHECK_LIB([X11], [XOpenIM], [with_xim=xlib], [with_xim=no])
59 dnl XIM + Lesstif is not (yet?) usable
60 if test "$have_motif $have_lesstif" = "yes no"; then
61 AC_CHECK_LIB([Xm], [XmImMbLookupString], [with_xim=motif])
66 if test "$with_xim" != "no"; then
67 AC_DEFINE([HAVE_XIM], [1], [Description here!])
68 if test "$with_xim" = "xlib"; then
69 AC_DEFINE([XIM_XLIB], [1], [Description here!])
70 SXE_ADD_MULE_OBJS([input-method-xlib.o])
72 if test "$with_xim" = "motif"; then
73 AC_DEFINE([XIM_MOTIF], [1], [Description here!])
75 SXE_ADD_MULE_OBJS([input-method-motif.o])
77 if test "$with_xim" = "motif"; then
83 AC_DEFUN([SXE_CHECK_XFS], [dnl
84 dnl "with_xfs" = "yes"
85 if test "$with_xfs" = "yes"; then
86 AC_MSG_CHECKING([for XFontSet])
88 AC_CHECK_LIB([X11], [XmbDrawString], [:], [with_xfs=no])
89 if test "$with_xfs" = "yes" -a "$with_menubars" = "lucid"; then
90 AC_DEFINE([USE_XFONTSET], [1], [Description here!])
91 if test "$with_xim" = "no"; then
92 SXE_ADD_MULE_OBJS([input-method-xlib.o])
98 AC_DEFUN([SXE_CHECK_WNN], [dnl
100 if test "$with_wnn6" = "yes"; then
101 with_wnn=yes # wnn6 implies wnn support
102 SXE_CHECK_HEADERS([wnn/jllib.h wnn/commonhd.h])
103 if test "$ac_cv_header_wnn_jllib_h" != "yes" -o \
104 "$ac_cv_header_wnn_commonhd_h" != "yes"; then
107 dnl gcc 2.97 fixincludes breaks inclusion of wnn/commonhd.h
108 dnl Detour to find crypt
109 AC_CHECK_FUNCS([crypt])
110 if test "$ac_cv_func_crypt" != "yes"; then
111 AC_CHECK_LIB([crypt], [crypt])
113 dnl Back to our regularly scheduled wnn hunting
114 SXE_CHECK_LIB_FUNCS([wnn wnn4 wnn6 wnn6_fromsrc],
115 [jl_dic_list_e jl_fi_dic_list])
117 if test "$ac_cv_lib_wnn_jl_dic_list_e" = "yes"; then
120 elif test "$ac_cv_lib_wnn4_jl_dic_list_e" = "yes"; then
123 elif test "$ac_cv_lib_wnn6_jl_dic_list_e" = "yes"; then
126 elif test "$ac_cv_lib_wnn6_fromsrc_jl_dic_list_e" = "yes"; then
133 if test "$have_wnn" = "yes"; then
134 AC_DEFINE([HAVE_WNN], [1], [Description here!])
135 SXE_PREPEND([-l$libwnn], [libs_x])
136 SXE_ADD_MULE_OBJS([mule-wnnfns.o])
138 if test "$ac_cv_lib_wnn_jl_dic_list" = "yes" -o \
139 "$ac_cv_lib_wnn4_jl_dic_list" = "yes" -o \
140 "$ac_cv_lib_wnn6_jl_dic_list" = "yes" -o \
141 "$ac_cv_lib_wnn6_fromsrc_jl_dic_list" = "yes"; then
142 AC_DEFINE([WNN6], [1], [Description here!])
147 AC_DEFUN([SXE_CHECK_CANNA], [dnl
149 if test "$with_canna" != "no"; then
150 SXE_CHECK_HEADERS([canna/jrkanji.h])
152 if test "$ac_cv_header_canna_jrkanji_h" != "yes"; then
154 CPPFLAGS="-I/usr/local/canna/include $CPPFLAGS"
155 unset ac_cv_header_canna_jrkanji_h
156 SXE_CHECK_HEADERS([canna/jrkanji.h])
159 if test "$ac_cv_header_canna_jrkanji_h" != "yes"; then
160 CPPFLAGS="$CPPFLAGS -I/usr/local/canna/include"
164 AC_CHECK_HEADER([canna/RK.h], [:], [have_canna=no])
165 AC_CHECK_LIB([RKC], [RkBgnBun], [:], [have_canna=no])
166 AC_CHECK_LIB([canna], [jrKanjiControl], [:], [have_canna=no])
167 if test "$have_canna" = "yes"; then
168 AC_DEFINE([HAVE_CANNA], [1], [Description here!])
169 SXE_PREPEND([-lcanna -lRKC], [libs_x])
170 SXE_ADD_MULE_OBJS([mule-canna.o])
172 AC_DEFINE([CANNA2], [], [Description here!])
173 AC_DEFINE([CANNA_MULE], [], [Description here!])
174 AC_DEFINE([CANNA_PURESIZE], [0], [Description here!])
176 AC_DEFINE([CANNA_PURESIZE], [0], [Description here!])
178 ])dnl SXE_CHECK_CANNA
180 dnl sxe-iconv.m4 ends here