[uim-commit] r620 - in trunk: . xim

ekato at freedesktop.org ekato at freedesktop.org
Wed Feb 9 23:42:09 PST 2005


Author: ekato
Date: 2005-02-09 23:42:06 -0800 (Wed, 09 Feb 2005)
New Revision: 620

Modified:
   trunk/configure.ac
   trunk/xim/Makefile.am
   trunk/xim/canddisp.cpp
Log:
* configure.ac : Don't compile fep unless curses library is found.

* xim/canddisp.c : Use uim-candwin-qt if selected toolkit is qt.
* xim/Makefile.am : Check default toolkit.


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2005-02-10 05:05:11 UTC (rev 619)
+++ trunk/configure.ac	2005-02-10 07:42:06 UTC (rev 620)
@@ -156,15 +156,8 @@
 # Checks for library
 AC_CHECK_LIB(dl,dlopen)
 AC_CHECK_LIB(socket,socket)
-AC_CHECK_LIB(curses, setupterm, FEP_LIBADD="-lcurses $FEP_LIBADD")
-AC_CHECK_LIB(ncurses, setupterm, FEP_LIBADD="-lncurses $FEP_LIBADD")
 
 # Checks for function
-AC_CHECK_FUNCS(forkpty)
-if test $ac_cv_func_forkpty = no; then
-  AC_CHECK_LIB(util, forkpty, [AC_DEFINE(HAVE_FORKPTY) FEP_LIBADD="-lutil $FEP_LIBADD"])
-fi
-AC_SUBST(FEP_LIBADD)
 AC_CHECK_FUNCS([cfmakeraw])
 AC_CHECK_FUNCS([wcswidth])
 AC_CHECK_FUNCS(getpeereid asprintf vasprintf setenv unsetenv strsep)
@@ -376,10 +369,27 @@
       ;;
       yes|*)
         use_uim_fep="yes"
+	AC_CHECK_LIB(ncurses, setupterm, FEP_LIBADD="-lncurses $FEP_LIBADD",
+	  [AC_CHECK_LIB(curses, setupterm, FEP_LIBADD="-lcurses $FEP_LIBADD",
+	    AC_MSG_WARN([fep needs libncurses. disabled...]);use_uim_fep="no")])
+	AC_CHECK_FUNCS(forkpty)
+	if test $ac_cv_func_forkpty = no; then
+	  AC_CHECK_LIB(util, forkpty, [AC_DEFINE(HAVE_FORKPTY) FEP_LIBADD="-lutil $FEP_LIBADD"])
+	fi
+	AC_SUBST(FEP_LIBADD)
       ;;
     esac
   ],
-  [ use_uim_fep="yes" ])
+  [ use_uim_fep="yes"
+    AC_CHECK_LIB(ncurses, setupterm, FEP_LIBADD="-lncurses $FEP_LIBADD",
+      [AC_CHECK_LIB(curses, setupterm, FEP_LIBADD="-lcurses $FEP_LIBADD",
+        AC_MSG_WARN([fep needs libncurses. disabled...]);use_uim_fep="no")])
+    AC_CHECK_FUNCS(forkpty)
+    if test $ac_cv_func_forkpty = no; then
+      AC_CHECK_LIB(util, forkpty, [AC_DEFINE(HAVE_FORKPTY) FEP_LIBADD="-lutil $FEP_LIBADD"])
+    fi
+    AC_SUBST(FEP_LIBADD)
+  ])
 
 AC_ARG_ENABLE(dict,
   AC_HELP_STRING([--enable-dict],

Modified: trunk/xim/Makefile.am
===================================================================
--- trunk/xim/Makefile.am	2005-02-10 05:05:11 UTC (rev 619)
+++ trunk/xim/Makefile.am	2005-02-10 07:42:06 UTC (rev 620)
@@ -7,6 +7,13 @@
 uim_xim_CFLAGS = @X_CFLAGS@ -Wall
 uim_xim_CXXFLAGS = @X_CFLAGS@ -Wall
 
+if DEFAULT_TOOLKIT_GTK
+uim_xim_CPPFLAGS += -DUSE_GTK_CANDWIN
+endif
+if DEFAULT_TOOLKIT_QT
+uim_xim_CPPFLAGS += -DUSE_QT_CANDWIN
+endif
+
 uim_xim_SOURCES = \
 	main.cpp convdisp.cpp \
         connection.cpp ximic.cpp \

Modified: trunk/xim/canddisp.cpp
===================================================================
--- trunk/xim/canddisp.cpp	2005-02-10 05:05:11 UTC (rev 619)
+++ trunk/xim/canddisp.cpp	2005-02-10 07:42:06 UTC (rev 620)
@@ -61,7 +61,9 @@
 
     candwin_prog = getenv("UIM_CANDWIN_PROG");
     if (candwin_prog == NULL) {
-#ifdef USE_GTK2
+#if defined(USE_QT_CANDWIN)
+	return "uim-candwin-qt";
+#elif defined(USE_GTK_CANDWIN) && defined(USE_GTK2)
 	return "uim-candwin-gtk";
 #else
 	return NULL;



More information about the Uim-commit mailing list