1 # Process this file with autoconf to produce a configure script
2 #AC_INIT(scim, 1.4.7, suzhe@tsinghua.org.cn)
3 AC_INIT(isf, 2.4.6423, isf@samsung.com)
4 AC_CONFIG_SRCDIR([ism/src/scim.h])
5 m4_pattern_allow([^AS_])
7 ###########################################################
8 ## Some definitions of Version macros. ##
9 ###########################################################
14 ISF_MICRO_VERSION=6423
16 ISF_VERSION=$ISF_MAJOR_VERSION.$ISF_MINOR_VERSION.$ISF_MICRO_VERSION
18 AC_SUBST(ISF_MAJOR_VERSION)
19 AC_SUBST(ISF_MINOR_VERSION)
20 AC_SUBST(ISF_MICRO_VERSION)
28 SCIM_VERSION=$SCIM_MAJOR_VERSION.$SCIM_MINOR_VERSION.$SCIM_MICRO_VERSION
30 AC_SUBST(SCIM_MAJOR_VERSION)
31 AC_SUBST(SCIM_MINOR_VERSION)
32 AC_SUBST(SCIM_MICRO_VERSION)
33 AC_SUBST(SCIM_VERSION)
35 # libtool versioning for SCIM
37 # increment if the interface has additions, changes, removals.
40 # increment any time the source changes; set to 0 if you increment CURRENT
43 # increment if any interfaces have been added; set to 0
44 # if any interfaces have been removed. removal has
45 # precedence over adding, so set to 0 if both happened.
48 AC_SUBST(SCIM_CURRENT)
49 AC_SUBST(SCIM_REVISION)
52 # Define a string for the earliest version that this release cannot
53 # coexist with. This is used for directory hierarchies.
58 # Define a string for the earliest version that this release has
59 # binary compatibility with. This is used for module locations.
61 SCIM_BINARY_VERSION=1.4.0
62 AC_SUBST(SCIM_BINARY_VERSION)
64 AC_DEFINE_UNQUOTED(SCIM_BINARY_VERSION, "$SCIM_BINARY_VERSION", [The binary version of SCIM library.])
65 AC_DEFINE_UNQUOTED(SCIM_VERSION, "$SCIM_VERSION", [The release version of SCIM library.])
66 AC_DEFINE_UNQUOTED(SCIM_MAJOR_VERSION, $SCIM_MAJOR_VERSION, [The Major version of SCIM library.])
67 AC_DEFINE_UNQUOTED(SCIM_MINOR_VERSION, $SCIM_MINOR_VERSION, [The Minor version of SCIM library.])
68 AC_DEFINE_UNQUOTED(SCIM_MICRO_VERSION, $SCIM_MICRO_VERSION, [The Micro version of SCIM library.])
71 AC_SUBST(GETTEXT_PACKAGE)
72 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain])
74 ###########################################################
75 ## Start Configuration. ##
76 ###########################################################
81 AM_CONFIG_HEADER([config.h])
87 ALL_LINGUAS="hy az eu bg ca zh_CN zh_HK zh_TW hr cs da nl_NL en en_US et fi fr_FR gl ka de_DE el_GR hu is ga it_IT ja_JP kk ko_KR lv lt mk nb pl pt_PT pt_BR ro ru_RU sr sk sl es_ES es_US es_MX sv tr_TR uk uz ar zh_SG hi en_PH fr_CA"
94 AC_SUBST(LIBTOOL_DEPS)
96 # libtool option to control which symbols are exported
97 # right now, symbols starting with _ are not exported
98 # !!! DO NOT USE IT !!!
99 LIBTOOL_EXPORT_OPTIONS=''
100 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
102 # Checks for programs.
107 # Checks if doxygen is avaiable
110 if test "x$with_doxygen" != "xno"; then
111 AC_PATH_PROG(DOXYGEN, doxygen, no)
114 AM_CONDITIONAL(HAVE_DOXYGEN, test x$DOXYGEN != xno)
117 # Checks if graphviz is available
118 AC_CHECK_PROG(HAVE_GRAPHVIZ, dot, YES, NO)
119 AC_PATH_PROG(DOT, dot)
123 AC_PATH_PROG(PERL, perl)
127 IT_PROG_INTLTOOL([0.33], [no-xml])
129 # Checks for libraries.
132 AC_CHECK_HEADERS([langinfo.h libintl.h string.h dirent.h hash_map ext/hash_map])
133 AC_CHECK_HEADERS([stdio.h ctype.h errno.h assert.h])
135 # Checks for typedefs, structures, and compiler characteristics.
140 if test x$ac_cv_type_size_t != xyes; then
141 AC_MSG_ERROR([No type size_t, but SCIM needs it!])
144 AC_CHECK_SIZEOF(char)
145 AC_CHECK_SIZEOF(unsigned short int)
146 AC_CHECK_SIZEOF(unsigned int)
147 AC_CHECK_SIZEOF(unsigned long int)
148 AC_CHECK_SIZEOF(unsigned long long int)
149 AC_CHECK_HEADERS([stdint.h],[has_stdint=yes],[has_stdint=no])
151 if test x$ac_cv_sizeof_unsigned_short_int = x2 && test x$ac_cv_sizeof_char = x1 ; then
156 *** sizeof (unsigned short int) == 2
157 *** sizeof (char) == 1
158 *** You might want to consider using the GNU C compiler.
162 if test x$ac_cv_sizeof_wchar_t = x0 ; then
164 *** SCIM requires a compiler that supports wchar_t,
165 *** You might want to consider using the GNU C compiler.
169 if test x$has_stdint = xyes; then
170 INCLUDE_STDINT="#include <stdint.h>"
175 INCLUDE_STDINT="//#include <stdint.h>"
176 UINT16="unsigned short int"
177 if test x$ac_cv_sizeof_unsigned_int = x4; then
178 UINT32="unsigned int"
180 if test x$ac_cv_sizeof_unsigned_long_int = x4; then
181 UINT32="unsigned long int"
183 AC_MSG_ERROR([*** No suitable integer type for uint32 found.])
186 if test x$ac_cv_sizeof_unsigned_long_long_int = x8; then
187 UINT64="unsigned long long int"
189 AC_MSG_ERROR([*** No suitable integer type for uint64 found.])
192 AC_SUBST(INCLUDE_STDINT)
197 # Checks for library functions.
199 AC_CHECK_FUNCS([gettimeofday memmove memset nl_langinfo setlocale daemon])
200 AC_CHECK_FUNCS([memcpy strcmp strchr strrchr])
201 AC_CHECK_FUNCS([opendir closedir readdir])
202 AC_CHECK_FUNCS([usleep nanosleep])
203 AC_CHECK_FUNCS([gethostbyname gethostbyname_r socket bind accept connect listen],
209 # Check if we should build scim-panel-gtk with gconf
210 PKG_CHECK_MODULES(GCONF, [gconf-2.0 phonestatus noti-service],
214 if test "$ISF_HAS_GCONF" = "yes"; then
215 AC_DEFINE(HAVE_GCONF,1,[Have GConf functions.])
218 # Check if we should build isf-panel-efl daemon
219 PKG_CHECK_MODULES(EFL, [elementary ecore-x evas ecore ecore-evas ecore-file edje ecore-input ecore-imf],
223 if test "$ISF_HAS_EFL" = "yes"; then
224 EFL_LIBDIR=`$PKG_CONFIG --variable=libdir ecore-imf`
225 if test -z "$EFL_LIBDIR)"; then
228 EFL_IM_MODULEDIR=$EFL_LIBDIR/ecore/immodules
230 AC_SUBST(EFL_IM_MODULEDIR)
234 PKG_CHECK_MODULES(X11, [x11])
236 # Check ui-gadget library
237 PKG_CHECK_MODULES(UIGADGET, [ui-gadget-1])
239 # Check pkgmgr-info library
240 PKG_CHECK_MODULES(PKGMGR_INFO, [pkgmgr-info])
242 # Check utilX library
243 PKG_CHECK_MODULES(UTILX, [utilX])
245 # Check appcore-efl library
246 PKG_CHECK_MODULES(APPCORE_EFL, [appcore-efl])
249 PKG_CHECK_MODULES(DLOG, [dlog >= 0])
251 # Check privilege control library
252 PKG_CHECK_MODULES(PRIVILEGE_CONTROL, [libprivilege-control >= 0])
254 # Check notification library
255 PKG_CHECK_MODULES(NOTIFICATION, [notification])
257 # Check if we should build isf-setting-efl
258 PKG_CHECK_MODULES(VCONF, [vconf],
262 if test "$ISF_HAS_VCONF" = "yes"; then
263 AC_DEFINE(HAVE_VCONF,1,[Have VConf functions.])
266 # Check if we should build scim-panel-gtk daemon
267 PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.4.0 pango >= 1.1.0 gdk-pixbuf-2.0 >= 2.4.0],
272 if test "$SCIM_HAS_GTK2" = "yes"; then
273 if $PKG_CONFIG --exists "gtk+-2.0 >= 2.2" ; then
276 AC_DEFINE(GDK_MULTIHEAD_SAFE,1,[Force use of GDK's multihead-safe APIs.])
278 if $PKG_CONFIG --exists "gtk+-2.0 >= 2.3.5" ; then
281 AC_DEFINE(HAVE_GTK_DRAW_INSERTION_CURSOR,1,[Have gtk_draw_insertion_cursor ().])
283 GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
284 GTK_LIBDIR=`$PKG_CONFIG --variable=libdir gtk+-2.0`
285 if test -z "$GTK_LIBDIR)"; then
288 GTK_IM_MODULEDIR=$GTK_LIBDIR/gtk-2.0/$GTK_BINARY_VERSION/immodules
290 AC_SUBST(GTK_IM_MODULEDIR)
291 AC_SUBST(GTK_VERSION)
292 AC_SUBST(GTK_BINARY_VERSION)
295 # Check if we have gthread
296 PKG_CHECK_MODULES(GTHREAD2,[gthread-2.0 >= 2.0.0],
297 [SCIM_HAS_GTHREAD2=yes],
298 [SCIM_HAS_GTHREAD2=no])
300 # Checks for X11 header files.
303 # Add -lX11 to X_LIBS
304 if test "$have_x" = "yes"; then
305 X_LIBS="$X_LIBS -lX11"
312 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
314 ###########################################################
315 ## Definiation of compile args. ##
316 ###########################################################
317 AC_ARG_WITH(gtk-im-module-dir,
318 AS_HELP_STRING([--with-gtk-im-module-dir=dir],
319 [Select gtk immodule dir]),
320 GTK_IM_MODULEDIR=$with_gtk_im_module_dir)
322 AC_ARG_WITH(efl-im-module-dir,
323 AS_HELP_STRING([--with-efl-im-module-dir=dir],
324 [Select efl immodule dir]),
325 EFL_IM_MODULEDIR=$with_efl_im_module_dir)
327 AC_ARG_ENABLE(ld-version-script,
328 [ --enable-ld-version-script Use ld version script to limit exported symbols],
329 enable_ld_version_script=yes,
330 enable_ld_version_script=no)
333 [ --enable-debug Turn on debugging],
338 [ --enable-x86 Build for x86 host],
342 AC_ARG_ENABLE(hash-map,
343 [ --enable-hash-map Use hast_map instead of std::map internally],
347 AC_ARG_ENABLE(config-simple,
348 [ --disable-config-simple Do not build Simple Config module],
349 enable_config_simple=no,
350 enable_config_simple=yes)
352 AC_ARG_ENABLE(config-socket,
353 [ --disable-config-socket Do not build Socket Config module],
354 enable_config_socket=no,
355 enable_config_socket=yes)
357 AC_ARG_ENABLE(frontend-x11,
358 [ --disable-frontend-x11 Do not build X11 FrontEnd module],
359 enable_frontend_x11=no,
360 enable_frontend_x11=yes)
362 AC_ARG_ENABLE(frontend-socket,
363 [ --disable-frontend-socket Do not build Socket FrontEnd module],
364 enable_frontend_socket=no,
365 enable_frontend_socket=yes)
367 AC_ARG_ENABLE(im-socket,
368 [ --disable-im-socket Do not build Socket IMEngine module],
370 enable_im_socket=yes)
372 AC_ARG_ENABLE(filter-sctc,
373 [ --disable-filter-sctc Do not build Simplified/Traditional Chinese conversion Filter module],
374 enable_filter_sctc=no,
375 enable_filter_sctc=yes)
377 AC_ARG_ENABLE(gtk2-immodule,
378 [ --disable-gtk2-immodule Do not build GTK2 IMModule],
379 enable_gtk2_immodule=no,
380 enable_gtk2_immodule=yes)
382 AC_ARG_ENABLE(panel-gtk,
383 [ --disable-panel-gtk Do not build GTK2 Panel],
385 enable_panel_gtk=check)
387 AC_ARG_ENABLE(efl-immodule,
388 [ --disable-efl-immodule Do not build EFL IMModule],
389 enable_efl_immodule=no,
390 enable_efl_immodule=yes)
392 AC_ARG_ENABLE(panel-efl,
393 [ --disable-panel-efl Do not build EFL Panel],
395 enable_panel_efl=check)
397 AC_ARG_ENABLE(setting-efl,
398 [ --disable-setting-efl Do not build EFL Setting],
399 enable_setting_efl=no,
400 enable_setting_efl=check)
402 AC_ARG_ENABLE(tray-icon,
403 [ --disable-tray-icon Do not build Tray Icon],
405 enable_tray_icon=yes)
407 if test "$have_x" = "yes"; then
408 SCIM_BUILD_X11_UTILS=1
411 SCIM_BUILD_X11_UTILS=0
415 if test "$enable_hash_map" = "yes"; then
416 AC_DEFINE(ENABLE_HASH_MAP,1,[Use hash map instead of map in libscim])
419 if test "$enable_debug" = "yes"; then
420 AC_DEFINE(ENABLE_DEBUG,1,[Define this to enable the debug facility in libscim])
422 CXXFLAGS="$CXXFLAGS -g"
425 if test "$enable_x86" = "yes"; then
426 AC_DEFINE(ENABLE_X86_HOST,1,[Build for x86 host])
429 if test "$enable_tests" = "yes"; then
436 if test "$enable_config_simple" = "yes"; then
437 SCIM_BUILD_CONFIG_SIMPLE=1
439 SCIM_BUILD_CONFIG_SIMPLE=0
440 enable_config_simple=no
443 if test "$enable_config_socket" = "yes" -a "$socket_ok" = "yes"; then
444 SCIM_BUILD_CONFIG_SOCKET=1
446 SCIM_BUILD_CONFIG_SOCKET=0
447 enable_config_socket=no
450 if test "$enable_frontend_x11" = "yes" -a "$have_x" = "yes"; then
451 SCIM_BUILD_FRONTEND_X11=1
453 SCIM_BUILD_FRONTEND_X11=0
454 enable_frontend_x11=no
457 if test "$enable_frontend_socket" = "yes" -a "$socket_ok" = "yes"; then
458 SCIM_BUILD_FRONTEND_SOCKET=1
460 SCIM_BUILD_FRONTEND_SOCKET=0
461 enable_frontend_socket=no
464 if test "$enable_im_rawcode" = "yes"; then
465 SCIM_BUILD_IMENGINE_RAWCODE=1
467 SCIM_BUILD_IMENGINE_RAWCODE=0
471 if test "$enable_im_socket" = "yes" -a "$socket_ok" = "yes"; then
472 SCIM_BUILD_IMENGINE_SOCKET=1
474 SCIM_BUILD_IMENGINE_SOCKET=0
478 if test "$enable_filter_sctc" = "yes"; then
479 SCIM_BUILD_FILTER_SCTC=1
481 SCIM_BUILD_FILTER_SCTC=0
482 enable_filter_sctc=no
485 if test "$enable_gtk2_immodule" = "yes" -a "$SCIM_HAS_GTK2" = "yes"; then
486 SCIM_BUILD_GTK2_IMMODULE=1
488 SCIM_BUILD_GTK2_IMMODULE=0
489 enable_gtk2_immodule=no
492 if test "$SCIM_HAS_GTK2" = "yes"; then
494 SCIM_BUILD_GTK_UTILS=1
497 SCIM_BUILD_GTK_UTILS=0
500 if test "$enable_tray_icon" = "yes"; then
501 if test "$SCIM_HAS_GTK2_2" = "yes" -a "$no_x" != "yes"; then
503 AC_DEFINE(ENABLE_TRAY_ICON,1,[Enable the TrayIcon code.])
509 SCIM_BUILD_PANEL_GTK=0
510 if test "$enable_panel_gtk" != "no"; then
512 if test "$SCIM_HAS_GTHREAD2" = "yes" -a "$SCIM_HAS_GTK2" = "yes"; then
513 SCIM_BUILD_PANEL_GTK=1
518 if test "$enable_efl_immodule" = "yes" -a "$ISF_HAS_EFL" = "yes"; then
519 ISF_BUILD_EFL_IMMODULE=1
521 ISF_BUILD_EFL_IMMODULE=0
522 enable_efl_immodule=no
525 ISF_BUILD_PANEL_EFL=0
526 if test "$enable_panel_efl" != "no"; then
528 if test "$ISF_HAS_EFL" = "yes"; then
529 ISF_BUILD_PANEL_EFL=1
534 ISF_BUILD_SETTING_EFL=0
535 if test "$enable_setting_efl" != "no"; then
536 enable_setting_efl=no
537 if test "$ISF_HAS_EFL" = "yes" -a "$ISF_HAS_VCONF" = "yes"; then
538 ISF_BUILD_SETTING_EFL=1
539 enable_setting_efl=yes
543 #if nothing needs libscim-gtkutils, just disable it
544 if test "$enable_panel_gtk" != "yes"; then
546 SCIM_BUILD_GTK_UTILS=0
549 AM_CONDITIONAL(SCIM_LD_VERSION_SCRIPT,
550 [test "$enable_ld_version_script" = "yes"])
552 AM_CONDITIONAL(SCIM_BUILD_TESTS,
553 [test "$enable_tests" = "yes"])
555 AM_CONDITIONAL(SCIM_BUILD_CONFIG_SIMPLE,
556 [test "$enable_config_simple" = "yes"])
558 AM_CONDITIONAL(SCIM_BUILD_CONFIG_SOCKET,
559 [test "$enable_config_socket" = "yes"])
561 AM_CONDITIONAL(SCIM_BUILD_FRONTEND_X11,
562 [test "$enable_frontend_x11" = "yes"])
564 AM_CONDITIONAL(SCIM_BUILD_FRONTEND_SOCKET,
565 [test "$enable_frontend_socket" = "yes"])
567 AM_CONDITIONAL(SCIM_BUILD_IMENGINE_SOCKET,
568 [test "$enable_im_socket" = "yes"])
570 AM_CONDITIONAL(SCIM_BUILD_IMENGINE_RAWCODE,
571 [test "$enable_im_rawcode" = "yes"])
573 AM_CONDITIONAL(SCIM_BUILD_GTK2_IMMODULE,
574 [test "$enable_gtk2_immodule" = "yes"])
576 AM_CONDITIONAL(SCIM_BUILD_FILTER_SCTC,
577 [test "$enable_filter_sctc" = "yes"])
579 AM_CONDITIONAL(SCIM_BUILD_GTK_UTILS,
580 [test "$enable_gtk_utils" = "yes"])
582 AM_CONDITIONAL(SCIM_BUILD_X11_UTILS,
583 [test "$enable_x11_utils" = "yes"])
585 AM_CONDITIONAL(SCIM_BUILD_TRAY_ICON,
586 [test "$enable_tray_icon" = "yes"])
588 AM_CONDITIONAL(SCIM_BUILD_PANEL_GTK,
589 [test "$enable_panel_gtk" = "yes"])
591 AM_CONDITIONAL(ISF_BUILD_EFL_IMMODULE,
592 [test "$enable_efl_immodule" = "yes"])
594 AM_CONDITIONAL(ISF_BUILD_PANEL_EFL,
595 [test "$enable_panel_efl" = "yes"])
597 AM_CONDITIONAL(ISF_BUILD_SETTING_EFL,
598 [test "$enable_setting_efl" = "yes"])
600 AM_CONDITIONAL(ISF_BUILD_WITH_GCONF,
601 [test "$ISF_HAS_GCONF" = "yes"])
603 AC_SUBST(SCIM_BUILD_TESTS)
604 AC_SUBST(SCIM_BUILD_CONFIG_SIMPLE)
605 AC_SUBST(SCIM_BUILD_CONFIG_SOCKET)
606 AC_SUBST(SCIM_BUILD_FRONTEND_X11)
607 AC_SUBST(SCIM_BUILD_FRONTEND_SOCKET)
608 AC_SUBST(SCIM_BUILD_IMENGINE_RAWCODE)
609 AC_SUBST(SCIM_BUILD_IMENGINE_TABLE)
610 AC_SUBST(SCIM_BUILD_IMENGINE_SOCKET)
611 AC_SUBST(SCIM_BUILD_FILTER_SCTC)
612 AC_SUBST(SCIM_BUILD_GTK2_IMMODULE)
613 AC_SUBST(SCIM_BUILD_SCIM_SETUP)
614 AC_SUBST(SCIM_BUILD_PANEL_GTK)
615 AC_SUBST(SCIM_BUILD_GTK_UTILS)
616 AC_SUBST(SCIM_BUILD_X11_UTILS)
617 AC_SUBST(ISF_BUILD_EFL_IMMODULE)
618 AC_SUBST(ISF_BUILD_PANEL_EFL)
619 AC_SUBST(ISF_BUILD_SETTING_EFL)
620 AC_SUBST(ISF_BUILD_WITH_GCONF)
622 ISF_BUILDING_DLL="-DISF_BUILDING_DLL"
623 AC_SUBST(ISF_BUILDING_DLL)
625 # Output All necessary Paths.
626 SCIM_BINDIR="$prefix/bin"
627 SCIM_DATADIR="$datadir/scim"
628 SCIM_SYSCONFDIR="$sysconfdir"
629 SCIM_ICONDIR="$datadir/scim/icons"
630 SCIM_MODULE_PATH="$libdir/scim$SCIM_EPOCH"
631 SCIM_LIBEXECDIR="$libdir/scim$SCIM_EPOCH"
632 SCIM_LOCALEDIR="/usr/share/locale"
635 AC_SUBST(SCIM_BINDIR)
636 AC_SUBST(SCIM_DATADIR)
637 AC_SUBST(SCIM_SYSCONFDIR)
638 AC_SUBST(SCIM_ICONDIR)
639 AC_SUBST(SCIM_MODULE_PATH)
640 AC_SUBST(SCIM_LIBEXECDIR)
641 AC_SUBST(SCIM_LOCALEDIR)
642 AC_SUBST(SCIM_TEMPDIR)
644 ###########################################################
646 ###########################################################
648 AC_CONFIG_FILES([Makefile
651 po/isfsetting_efl/Makefile.in
652 po/kbwizard_efl/Makefile.in
657 ism/data/icons/Makefile
658 ism/data/pixmaps/Makefile
660 ism/modules/frontend/imdkit/Makefile
661 ism/modules/frontend/Makefile
662 ism/modules/imengine/Makefile
663 ism/modules/filter/Makefile
664 ism/modules/config/Makefile
667 ism/extras/gtk2_immodule/Makefile
668 ism/extras/gtk_panel/Makefile
669 ism/extras/efl_immodule/Makefile
670 ism/extras/efl_panel/Makefile
671 ism/extras/efl_setting/Makefile
685 Install prefix $prefix
686 Build shared libs $enable_shared
687 Build static libs $enable_static
688 Enable debug $enable_debug
689 Build for x86 host $enable_x86
690 Enable ld version script $enable_ld_version_script
693 Simple config module $enable_config_simple
694 Socket config module $enable_config_socket
696 X11 FrontEnd module $enable_frontend_x11
697 Socket FrontEnd module $enable_frontend_socket
699 Socket IMEngine module $enable_im_socket
701 SCTC Filter module $enable_filter_sctc
703 GTK2 Utility Library $enable_gtk_utils
704 X11 Utility Library $enable_x11_utils
706 GTK2 IMModule $enable_gtk2_immodule
707 GTK2 IMModule dir $GTK_IM_MODULEDIR
708 GTK2 Panel GUI $enable_panel_gtk
710 EFL IMModule $enable_efl_immodule
711 EFL IMModule dir $EFL_IM_MODULEDIR
712 EFL Panel GUI $enable_panel_efl
713 EFL Setting $enable_setting_efl
715 Enable TrayIcon $enable_tray_icon