From: Huang Peng Date: Tue, 5 Aug 2008 12:44:13 +0000 (+0800) Subject: Add --disable-qt4-immodule to configure. X-Git-Tag: 0.1.0.20080810~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17e95380ba43e90fc69eea24916226ff677de38a;p=platform%2Fupstream%2Fibus.git Add --disable-qt4-immodule to configure. --- diff --git a/configure.ac b/configure.ac index 1ff2f9e3..779b890d 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,13 @@ PKG_CHECK_MODULES(GTK2, [ gtk+-2.0 ]) +GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0` +GTK_LIBDIR=`$PKG_CONFIG --variable=libdir gtk+-2.0` +if test -z "$GTK_LIBDIR)"; then + GTK_LIBDIR="$libdir" +fi +GTK_IM_MODULEDIR=$GTK_LIBDIR/gtk-2.0/immodules + PKG_CHECK_MODULES(GDK2, [ gdk-2.0 ]) @@ -86,16 +93,19 @@ PKG_CHECK_MODULES(DBUS, [ # Check for Qt4 -PKG_CHECK_MODULES(QT, [ - QtCore >= 4.3.5 - QtDBus >= 4.3.5 -]) - -QMAKE=`$PKG_CONFIG --variable=qmake Qt` -if test x"$QMAKE" == x""; then - QMAKE=qmake-qt4 +PKG_CHECK_MODULES(QT, +[QtCore >= 4.3.5 QtDBus >= 4.3.5], +[IBUS_HAS_QT4=yes], +[IBUS_HAS_QT4=no] +) + +if test x"$HAS_QT4" == x"yes"; then + QMAKE=`$PKG_CONFIG --variable=qmake Qt` + if test x"$QMAKE" == x""; then + QMAKE=qmake-qt4 + fi + AC_SUBST(QMAKE) fi -AC_SUBST(QMAKE) # Check for x11 PKG_CHECK_MODULES(X11, [ @@ -139,6 +149,27 @@ AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION(0.16.1) +# define configure arguments +AC_ARG_WITH(gtk-im-module-dir, + AS_HELP_STRING([--with-gtk-im-module-dir[=DIR]], + [Select gtk immodule dir]), + GTK_IM_MODULEDIR=$with_gtk_im_module_dir +) +AC_SUBST(GTK_IM_MODULEDIR) + +AC_ARG_ENABLE(qt4-immodule, + AS_HELP_STRING([--disable-qt4-immodule], + [do not build qt4 immodule]), + [enable_qt4=$enableval], + [enable_qt4=yes], +) +if test x"$IBUS_HAS_QT4" != x"yes"; then + enable_qt4=no +fi +AM_CONDITIONAL(IBUS_BUILD_QT4, [test x"$enable_qt4" = x"yes" ]) +AC_SUBST(IBUS_BUILD_QT4) + + # OUTPUT files AC_CONFIG_FILES([ po/Makefile.in Makefile @@ -166,3 +197,14 @@ m4/Makefile ]) AC_OUTPUT + +AC_MSG_RESULT([ +Build options: + Version $VERSION + Install prefix $prefix + Build shared libs $enable_shared + Build static libs $enable_static + Gtk immodule dir $GTK_IM_MODULEDIR + Enable Qt4 IM module $enable_qt4 +]) + diff --git a/gconf/ibus-gconf b/gconf/ibus-gconf index f7ee86d6..0d996bbb 100644 --- a/gconf/ibus-gconf +++ b/gconf/ibus-gconf @@ -19,5 +19,5 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -exec python /usr/share/ibus/gconf/main.py $@ +exec python /usr/local/share/ibus/gconf/main.py $@ diff --git a/gtk2/Makefile.am b/gtk2/Makefile.am index 1ef494a4..d824e44b 100644 --- a/gtk2/Makefile.am +++ b/gtk2/Makefile.am @@ -40,7 +40,8 @@ libibus_gtk_la_LDFLAGS = \ @DBUS_LIBS@ \ $(NULL) -immoduledir = $(libdir)/gtk-2.0/immodules +immoduledir = @GTK_IM_MODULEDIR@ +# $(libdir)/gtk-2.0/immodules immodule_LTLIBRARIES = im-ibus.la im_ibus_la_DEPENDENCIES = libibus-gtk.la im_ibus_la_SOURCES = \ diff --git a/qt4/Makefile.am b/qt4/Makefile.am index 476ea6bd..012a6b0c 100644 --- a/qt4/Makefile.am +++ b/qt4/Makefile.am @@ -28,6 +28,7 @@ EXTRA_DIST = \ im-ibus-qt.cpp \ $(NULL) +if IBUS_BUILD_QT4 Makefile.qmake: ibus.pro $(QMAKE) -makefile -o Makefile.qmake $(srcdir)/ibus.pro @@ -50,3 +51,5 @@ uninstall-local: Makefile.qmake test: all QT_IM_MODULE=ibus kwrite +endif +