2d67633341daf91b86619146d83320c58bfc41d4
[framework/uifw/ise-engine-tables.git] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2 #AC_INIT(scim-tables, 0.5.10, suzhe@tsinghua.org.cn) #do not forget to edit skim/configure.in.in to change the version
3 AC_INIT(ise-engine-tables-zh, 0.0.0331, li2012.zhang@samsung.com)
4 AC_CONFIG_SRCDIR([src/scim_table_imengine.h])
5
6 ISF_VERSION=1.0.0
7
8 AC_SUBST(ISF_VERSION)
9
10 GETTEXT_PACKAGE=ise-engine-tables-zh
11 AC_SUBST(GETTEXT_PACKAGE)
12 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain])
13
14 # Init automake stuff
15 AM_INIT_AUTOMAKE
16 AM_CONFIG_HEADER([config.h])
17
18 # Init gettext
19 ALL_LINGUAS="zh_CN zh_TW ja ko de fr it pa nl"
20 AM_GNU_GETTEXT
21
22 AC_LIBTOOL_WIN32_DLL
23 AC_LIBTOOL_DLOPEN
24 AC_PROG_LIBTOOL
25 AC_LIB_LTDL
26 AC_SUBST(LIBTOOL_DEPS)
27
28 AC_PROG_CXX
29 AC_PROG_CC
30 AC_LANG(C++)
31
32 AC_C_CONST
33 AC_C_INLINE
34 AC_TYPE_SIZE_T
35
36 # Check SCIM 
37 PKG_CHECK_MODULES(SCIM,[isf >= $ISF_VERSION])
38 # Check Ecore
39 PKG_CHECK_MODULES(ECORE,[ecore >= 0.0])
40
41 # Check if we should build setup module
42 PKG_CHECK_MODULES(SCIM_GTKUTILS,[scim-gtkutils >= $SCIM_VERSION],
43                                 [SCIM_HAS_GTKUTILS=yes],
44                                 [SCIM_HAS_GTKUTILS=no])
45
46 if test "$SCIM_HAS_GTKUTILS" = "yes"; then
47   SCIM_BUILD_SETUP=1
48 else
49   SCIM_BUILD_SETUP=0
50 fi
51
52 AM_CONDITIONAL(SCIM_BUILD_SETUP, [test "$SCIM_HAS_GTKUTILS" = "yes"])
53 AC_SUBST(SCIM_BUILD_SETUP)
54
55 # Checks for header files.
56 AC_HEADER_STDC
57 AC_CHECK_HEADERS([langinfo.h libintl.h string.h hash_map ext/hash_map])
58
59 # libtool option to control which symbols are exported
60 # right now, symbols starting with _ are not exported
61 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
62 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
63
64 # Extra args.
65 AC_ARG_ENABLE(debug,
66               [  --enable-debug          Turn on debugging], ,
67               enable_debug=no)
68
69 AC_ARG_ENABLE(skim-support,
70               [  --enable-skim-support  Enable skim Setup UI], ,  
71               enable_skim_support=yes)
72
73 AM_CONDITIONAL(SCIM_BUILD_SKIM_SETUP, [test "$enable_skim_support" = "yes"])
74
75 if test "$enable_debug" = "yes"; then
76   AC_DEFINE(ENABLE_DEBUG,1,[Define this to enable the debug facility in libscim])
77   CFLAGS="$CFLAGS -g"
78   CXXFLAGS="$CXXFLAGS -g"
79 fi
80
81 SCIM_ICONDIR=`$PKG_CONFIG --variable=icondir scim`
82 SCIM_MODULEDIR=`$PKG_CONFIG --variable=moduledir scim`
83 SCIM_DATADIR=`$PKG_CONFIG --variable=scimdatadir scim`
84
85 if test "x$SCIM_ICONDIR" = "x"; then
86   SCIM_ICONDIR=${datadir}/scim/icons
87 fi
88
89 if test "x$SCIM_MODULEDIR" = "x"; then
90   SCIM_MODULEDIR=${libdir}/scim-1.0
91 fi
92
93 if test "x$SCIM_DATADIR" = "x"; then
94   SCIM_DATADIR=${datadir}/scim
95 fi
96
97 AC_SUBST(SCIM_ICONDIR)
98 AC_SUBST(SCIM_MODULEDIR)
99 AC_SUBST(SCIM_DATADIR)
100
101 SCIM_TABLEDIR=$SCIM_DATADIR/tables
102
103 AC_SUBST(SCIM_TABLEDIR)
104
105 AC_CONFIG_FILES([Makefile  intl/Makefile po/Makefile.in m4/Makefile 
106                  docs/Makefile
107                  icons/Makefile
108                  src/Makefile
109                  scim-tables.spec
110                  tables/Makefile
111                  tables/additional/IPA-Kirshenbaum.txt
112                  tables/additional/IPA-X-SAMPA.txt
113                  tables/additional/LaTeX.txt
114                  tables/additional/Makefile
115                  tables/am/Amharic.txt
116                  tables/am/Makefile
117                  tables/ar/Arabic.txt
118                  tables/ar/Makefile
119                  tables/bn/Bengali-inscript.txt
120                  tables/bn/Bengali-probhat.txt
121                  tables/bn/Makefile
122                  tables/gr/Makefile
123                  tables/gr/greekpoly.txt
124                  tables/gu/Gujarati-inscript.txt
125                  tables/gu/Gujarati-phonetic.txt
126                  tables/gu/Makefile
127                  tables/he/Makefile
128                  tables/he/classicalhebrew.txt
129                  tables/hi/Hindi-inscript.txt
130                  tables/hi/Hindi-phonetic.txt
131                  tables/hi/Hindi-remington.txt
132                  tables/hi/Makefile
133                  tables/ja/HIRAGANA.txt
134                  tables/ja/KATAKANA.txt
135                  tables/ja/Makefile
136                  tables/ja/Nippon.txt
137                  tables/kn/Kannada-inscript.txt
138                  tables/kn/Kannada-kgp.txt
139                  tables/kn/Makefile
140                  tables/ko/Hangul.txt
141                  tables/ko/HangulRomaja.txt
142                  tables/ko/Hanja.txt
143                  tables/ko/Makefile
144                  tables/ml/Makefile
145                  tables/ml/Malayalam-inscript.txt
146                  tables/ml/Malayalam-phonetic.txt
147                  tables/mr/Makefile
148                  tables/mr/Marathi-remington.txt
149                  tables/ne/Makefile
150                  tables/ne/Nepali_Rom.txt
151                  tables/ne/Nepali_Trad.txt
152                  tables/pa/Makefile
153                  tables/pa/Punjabi-inscript.txt
154                  tables/pa/Punjabi-jhelum.txt
155                  tables/pa/Punjabi-phonetic.txt
156                  tables/pa/Punjabi-remington.txt
157                  tables/ru/Makefile
158                  tables/ru/RussianTraditional.txt
159                  tables/ru/Translit.txt
160                  tables/ru/Yawerty.txt
161                  tables/ta/Makefile
162                  tables/ta/Tamil-inscript.txt
163                  tables/ta/Tamil-phonetic.txt
164                  tables/ta/Tamil-remington.txt
165                  tables/ta/Tamil-tamil99.txt
166                  tables/te/Makefile
167                  tables/te/Telugu-inscript.txt
168                  tables/th/Makefile
169                  tables/th/Thai.txt
170                  tables/ug/Makefile
171                  tables/ug/Uyghur-Romanized.txt
172                  tables/ug/Uyghur-Standard.txt
173                  tables/uk/Makefile
174                  tables/uk/Ukrainian-Translit.txt
175                  tables/vi/Makefile
176                  tables/vi/Viqr.txt
177                  tables/zh/Array30.txt
178                  tables/zh/CNS11643.txt
179                  tables/zh/CangJie.txt
180                  tables/zh/CangJie3.txt
181                  tables/zh/CangJie5.txt
182                  tables/zh/CantonHK.txt
183                  tables/zh/Cantonese.txt
184                  tables/zh/Dayi3.txt
185                  tables/zh/EZ-Big.txt
186                  tables/zh/Erbi-QS.txt
187                  tables/zh/Erbi.txt
188                  tables/zh/Jyutping.txt
189                  tables/zh/Makefile
190                  tables/zh/Quick.txt
191                  tables/zh/Simplex.txt
192                  tables/zh/SmartCangJie6.txt
193                  tables/zh/Stroke5.txt
194                  tables/zh/Wu.txt
195                  tables/zh/Wubi.txt
196                  tables/zh/ZhuYin-Big.txt
197                  tables/zh/ZhuYin.txt
198                  tables/zh/Ziranma.txt
199 ])
200
201 if test "$enable_skim_support" = "yes"; then
202   REQUIRED_SKIM_VERSION=1.2.1
203   dnl skim probably has been installed under prefix=$KDEDIR, so add it to search path of pkgconfig
204   kde_libsuffix=`kde-config --libsuffix`
205   test -z "$KDEDIR" && KDEDIR=`kde-config --prefix`
206   AC_SUBST(KDEDIR)
207   export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$KDEDIR/lib${kde_libsuffix}/pkgconfig
208   PKG_CHECK_MODULES(SKIM, [skim >= $REQUIRED_SKIM_VERSION],
209                           [HAS_SKIM=yes],
210                           [HAS_SKIM=no])
211 else
212   HAS_SKIM=no
213 fi
214
215 if test "x$HAS_SKIM" = "xyes"; then
216   PKG_CHECK_MODULES(SCIM_KDEUTILS,[scim_kdeutils >= $REQUIRED_SKIM_VERSION],
217                                 [HAS_KDEUTILS=yes],
218                                 [HAS_KDEUTILS=no])
219   if test "x$HAS_KDEUTILS" = "xyes"; then
220       AC_CONFIG_SUBDIRS(skim)
221       SCIM_TABLES_ENABLE_SKIM_SUPPORT=1
222       enable_skim_support=yes
223   else
224       SCIM_TABLES_ENABLE_SKIM_SUPPORT=0
225       enable_skim_support=no
226   fi
227 else
228   SCIM_TABLES_ENABLE_SKIM_SUPPORT=0
229   enable_skim_support=no
230 fi
231
232 AM_CONDITIONAL(SCIM_TABLES_ENABLE_SKIM_SUPPORT, [test "$SCIM_TABLES_ENABLE_SKIM_SUPPORT" = "1"])
233 AC_SUBST(SCIM_TABLES_ENABLE_SKIM_SUPPORT)
234 AC_OUTPUT
235
236 AC_MSG_RESULT([
237 Build options:
238   Version                  $VERSION
239   Install prefix           $prefix
240   Build shared libs        $enable_shared
241   Build static libs        $enable_static
242   Enable debug             $enable_debug  
243
244 Module options:
245   Enable skim support      $enable_skim_support
246 ])