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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
diff --git a/configure.ac b/configure.ac
index 2348512..1105b4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,8 +96,11 @@ AC_SUBST(M17NDIR)
dnl Checks which levels of APIs should be compiled.
-AC_ARG_ENABLE(gui,
- AS_HELP_STRING([--enable-gui],[enable GUI level APIs (default is YES)]))
+PKG_PROG_PKG_CONFIG
+AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != x])
+
+AC_ARG_WITH(gui,
+ AS_HELP_STRING([--with-gui],[enable GUI level APIs (default is YES)]))
AM_CONDITIONAL(WITH_GUI, test x$with_gui != xno)
@@ -117,14 +120,14 @@ dnl augmented.
M17N_EXT_LIBS=
-PKG_PROG_PKG_CONFIG
-AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != x])
-
if test "x$no_x" != "xyes"; then
AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11.])
X11_LD_FLAGS="-lXt -lX11"
M17N_EXT_LIBS="$M17N_EXT_LIBS X11"
+ AC_ARG_WITH(athena,
+ AS_HELP_STRING([--with-athena],[with X Athena Widget suport]))
+ if test "x$with_athena" != "xno"; then
if test "x$HAVE_XAW" = "xyes"; then
AC_DEFINE(HAVE_X11_XAW_COMMAND_H, 1,
[Define to 1 if you have the Xaw header files.])
@@ -132,11 +135,15 @@ if test "x$no_x" != "xyes"; then
CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_X11_XAW_COMMAND_H"
M17N_EXT_LIBS="$M17N_EXT_LIBS Xaw"
fi
+ fi
fi
AC_SUBST(X11_LD_FLAGS)
AC_SUBST(XAW_LD_FLAGS)
dnl Check for fribidi library.
+AC_ARG_WITH(fribidi,
+ AS_HELP_STRING([--with-fribidi],[with FriBidi suport]))
+if test "x$with_fribidi" != "xno"; then
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
AC_CHECK_PROG(HAVE_FRIBIDI_CONFIG, fribidi-config, yes)
@@ -158,6 +165,7 @@ else
FRIBIDI_LD_FLAGS=
fi
LIBS="$save_LIBS"
+fi
AC_SUBST(FRIBIDI_LD_FLAGS)
dnl Check for otflib usability.
@@ -201,11 +209,14 @@ fi
AC_SUBST(OTF_LD_FLAGS)
dnl Check for Freetype2 usability.
+AC_ARG_WITH(freetype,
+ AS_HELP_STRING([--with-freetype],[with FreeType support]))
+if test "x$with_freetype" != "xno"; then
PKG_CHECK_MODULES([FREETYPE], [freetype2], [HAVE_FREETYPE=yes],
[HAVE_FREETYPE=no])
AS_IF([test "x$HAVE_FREETYPE" = "xyes"],
[CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS";
- FREETYPE_LD_FLAGS=FREETYPE_LIBS;
+ FREETYPE_LD_FLAGS=$FREETYPE_LIBS;
AC_DEFINE([HAVE_FREETYPE], [1],
[Define to 1 if you have FreeType library and header file.])
M17N_EXT_LIBS="$M17N_EXT_LIBS freetype";
@@ -220,9 +231,13 @@ AS_IF([test "x$HAVE_FREETYPE" = "xyes"],
],
[]
)
+fi
AC_SUBST([FREETYPE_LD_FLAGS])
dnl Check for Xft2 usability.
+AC_ARG_WITH(xft,
+ AS_HELP_STRING([--with-xft],[with Xft support]))
+if test "x$with_xft" != "xno"; then
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
XFT2_LD_FLAGS="-lXft -lfreetype -lfontconfig -lXrender -lX11"
@@ -253,6 +268,7 @@ else
CPPFLAGS="$save_CPPFLAGS"
fi
LIBS="$save_LIBS"
+fi
AC_SUBST(XFT2_LD_FLAGS)
dnl Check for fontconfig usability.
@@ -306,6 +322,9 @@ AC_SUBST(GD_LD_FLAGS)
fi
dnl Check for libxml2 usability.
+AC_ARG_WITH(libxml2,
+ AS_HELP_STRING([--with-libxml2],[with libxml2 suport]))
+if test "x$with_libxml2" != "xno"; then
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
AC_CHECK_PROG(HAVE_XML2_CONFIG, xml2-config, yes)
@@ -328,10 +347,13 @@ else
CPPFLAGS="$save_CPPFLAGS"
fi
LIBS="$save_LIBS"
+fi
AC_SUBST(XML2_LD_FLAGS)
dnl Check for Anthy usability.
-
+AC_ARG_WITH(anthy,
+ AS_HELP_STRING([--with-anthy],[with Anthy suport]))
+if test "x$with_anthy" != "xno"; then
PKG_CHECK_MODULES(ANTHY, anthy-unicode,
[HAVE_ANTHY=yes
M17N_EXT_LIBS="$M17N_EXT_LIBS anthy-unicode"],
@@ -347,17 +369,21 @@ if test "x$HAVE_ANTHY" = "xyes"; then
ANTHY_LD_FLAGS="$ANTHY_LIBS"
CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_ANTHY"
fi
-
+fi
AC_SUBST(ANTHY_LD_CFLAGS)
AC_SUBST(ANTHY_LD_FLAGS)
dnl Check for Ispell usability.
+AC_ARG_WITH(ispell,
+ AS_HELP_STRING([--with-ispell],[with Ispell suport]))
+if test "x$with_ispell" != "xno"; then
AC_CHECK_PROG(HAVE_ISPELL, ispell, yes)
if test "x$HAVE_ISPELL" = "xyes"; then
AC_DEFINE(HAVE_ISPELL, 1, [Define if ispell is available.])
M17N_EXT_LIBS="$M17N_EXT_LIBS ispell"
CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_ISPELL"
fi
+fi
dnl Check for Thai word-segmentation library.
dnl If we have one, define HAVE_THAI_WORDSEG and one of these:
|