[uim-commit] r492 - in trunk: . qt
kzk at freedesktop.org
kzk at freedesktop.org
Wed Feb 2 15:15:28 PST 2005
Author: kzk
Date: 2005-02-02 15:15:24 -0800 (Wed, 02 Feb 2005)
New Revision: 492
Modified:
trunk/configure.ac
trunk/qt/Makefile.am
Log:
* configure.ac
- more valid check for $QTINCDIR
- more valid check for $QTLIBDIR
- rename QT_CFLAGS to QT_CXXFLAGS
- rename UIM_QT_CFLAGS to UIM_QT_CXXFLAGS
* qt/Makefile.am
- use QT_CXXFLAGS instead of CXXFLAGS
- use QT_LDFLAGS instead of LDFLAGS
- add QT_CXXFLAGS and QT_LDFLAGS to each module
* These problems are suggested by tkng-san. Thank you!
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2005-02-02 23:03:14 UTC (rev 491)
+++ trunk/configure.ac 2005-02-02 23:15:24 UTC (rev 492)
@@ -422,27 +422,46 @@
QTDIR="/usr/lib/qt"
fi
if test -z "$QTDIR"; then
- QTDIR="/usr/share/qt3"
- fi
- if test -z "$QTDIR"; then
QTDIR="/usr"
fi
- # GUESS $QTINCDIR
- QTINCDIR="/include/qt"
- if test ! -d "$QTDIR$QTINCDIR"; then
- QTINCDIR="/include/X11/qt"
+ # GUESS $QTINCDIR from $QTDIR
+ QTINCDIR="$QTDIR/include/qt"
+ if test ! -d "$QTINCDIR"; then
+ QTINCDIR="$QTDIR/include/X11/qt"
fi
- if test ! -d "$QTDIR$QTINCDIR"; then
- QTINCDIR="/include/qt3"
+ if test ! -d "$QTINCDIR"; then
+ QTINCDIR="$QTDIR/include/qt3"
fi
- if test ! -d "$QTDIR$QTINCDIR"; then
- QTINCDIR="/include/qt"
+ if test ! -d "$QTINCDIR"; then
+ QTINCDIR="$QTDIR/include"
fi
- if test ! -d "$QTDIR$QTINCDIR"; then
- QTINCDIR="/include"
+ # GUESS $QTINCDIR independently
+ if test ! -d "$QTINCDIR"; then
+ QTINCDIR="/usr/include/X11/qt"
fi
+ if test ! -d "$QTINCDIR"; then
+ QTINCDIR="/usr/include/qt3"
+ fi
+ if test ! -d "$QTINCDIR"; then
+ QTINCDIR="/usr/include/qt"
+ fi
+ if test ! -d "$QTINCDIR"; then
+ QTINCDIR="/usr/include"
+ fi
+ # GUESS $QTLIBDIR
+ QTLIBDIR="$QTDIR/lib"
+ if test ! -d "$QTLIBDIR"; then
+ QTLIBDIR="/usr/lib/qt3"
+ fi
+ if test ! -d "$QTLIBDIR"; then
+ QTLIBDIR="/usr/lib/qt"
+ fi
+ if test ! -d "$QTLIBDIR"; then
+ QTINCDIR="/usr/lib"
+ fi
+
# Check For MOC
if test -x "$QTDIR/bin/moc"; then
HOST_MOC="$QTDIR/bin/moc"
@@ -477,12 +496,12 @@
# Process for compiler & linker flags
- QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL"
+ QT_CXXFLAGS="-I${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL"
if test -z "$enable_debug"; then
- QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG"
+ QT_CXXFLAGS="$QT_CXXFLAGS -DQT_NO_DEBUG -DNO_DEBUG"
fi
_SAVE_LDFLAGS=$LDFLAGS
- QT_LDFLAGS=-L${QTDIR}/lib
+ QT_LDFLAGS=-L${QTLIBDIR}
LDFLAGS="$LDFLAGS $QT_LDFLAGS"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
@@ -491,19 +510,16 @@
AC_MSG_ERROR([Cannot find QT libraries.])))
if test "$QT_LIB" = "-lqt-mt"; then
- QT_CFLAGS="$QT_CFLAGS -DQT_THREAD_SUPPORT"
+ QT_CXXFLAGS="$QT_CXXFLAGS -DQT_THREAD_SUPPORT"
fi
LDFLAGS=$_SAVE_LDFLAGS
QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11"
- UIM_QT_LDFLAGS=$QT_LIBS
- UIM_QT_CFLAGS=$QT_CFLAGS
-
_SAVE_CXXFLAGS=$CXXFLAGS
_SAVE_LIBS=$LIBS
- CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $QT_CXXFLAGS"
LIBS="$LIBS $QT_LIBS"
AC_MSG_CHECKING(Qt - version >= $QT_VERSION)
@@ -523,9 +539,12 @@
AC_LANG_RESTORE
+ UIM_QT_LDFLAGS=$QT_LIBS
+ UIM_QT_CXXFLAGS=$QT_CXXFLAGS
+
AC_SUBST(MOC)
AC_SUBST(UIC)
- AC_SUBST(UIM_QT_CFLAGS)
+ AC_SUBST(UIM_QT_CXXFLAGS)
AC_SUBST(UIM_QT_LDFLAGS)
fi
@@ -533,7 +552,7 @@
AC_MSG_CHECKING(for qt-immodule patch)
if test x$use_qtimmodule = xyes ; then
# Check for immodule for Qt patch
- if test ! -e $QTDIR$QTINCDIR/qinputcontext.h -o ! -e $QTDIR$QTINCDIR/qinputcontextplugin.h; then
+ if test ! -e $QTINCDIR/qinputcontext.h -o ! -e $QTINCDIR/qinputcontextplugin.h; then
AC_MSG_RESULT(no)
$use_qtimmodule="cannot"
else
Modified: trunk/qt/Makefile.am
===================================================================
--- trunk/qt/Makefile.am 2005-02-02 23:03:14 UTC (rev 491)
+++ trunk/qt/Makefile.am 2005-02-02 23:15:24 UTC (rev 492)
@@ -1,12 +1,12 @@
if QT
INCLUDES = -I$(top_srcdir) -I$(top_builddir)
-CXXFLAGS += $(UIM_QT_CFLAGS)
-CFLAGS += $(UIM_QT_CFLAGS)
-LDFLAGS += $(UIM_QT_LDFLAGS)
+QT_CXXFLAGS = $(UIM_QT_CXXFLAGS)
+QT_LDFLAGS = $(UIM_QT_LDFLAGS)
+
if QT_IMMODULE
-CXXFLAGS += -DQT_IMMODULE
+QT_CXXFLAGS += -DQT_IMMODULE
endif
HEADER_FILES = \
@@ -64,7 +64,9 @@
immodule-plugin.cpp immodule-candidatewindow.cpp immodule-qhelpermanager.cpp \
immodule-quiminputcontext.cpp immodule-quiminputcontext_with_slave.cpp \
immodule-subwindow.cpp
-libquiminputcontextplugin_la_LIBADD = $(top_builddir)/uim/libuim.la -lqt-mt
+libquiminputcontextplugin_la_CXXFLAGS = $(QT_CXXFLAGS)
+libquiminputcontextplugin_la_LDFLAGS = $(QT_LDFLAGS)
+libquiminputcontextplugin_la_LIBADD = $(top_builddir)/uim/libuim.la
immodule-candidatewindow.cpp: immodule-candidatewindow.moc
immodule-candidatewindow.moc: immodule-candidatewindow.h
@@ -85,8 +87,10 @@
# Toolbar Common
noinst_LTLIBRARIES = libtoolbarcommon.la
-libtoolbarcommon_la_SOURCES = toolbar-common-quimhelpertoolbar.cpp toolbar-common-uimstateindicator.cpp
-libtoolbarcommon_la_LIBADD = $(top_builddir)/uim/libuim.la
+libtoolbarcommon_la_SOURCES = toolbar-common-quimhelpertoolbar.cpp toolbar-common-uimstateindicator.cpp
+libtoolbarcommon_la_CXXFLAGS = $(QT_CXXFLAGS)
+libtoolbarcommon_la_LDFLAGS = $(QT_LDFLAGS)
+libtoolbarcommon_la_LIBADD = $(top_builddir)/uim/libuim.la
toolbar-common-quimhelpertoolbar.cpp: toolbar-common-quimhelpertoolbar.moc
toolbar-common-quimhelpertoolbar.moc: toolbar-common-quimhelpertoolbar.h
$(MOC) toolbar-common-quimhelpertoolbar.h -o toolbar-common-quimhelpertoolbar.moc
@@ -96,21 +100,27 @@
# Toolbar Standalone
uim_toolbar_qt_SOURCES = toolbar-standalone-qt.cpp
-uim_toolbar_qt_LDADD = $(top_builddir)/uim/libuim.la ./libtoolbarcommon.la
+uim_toolbar_qt_CXXFLAGS = $(QT_CXXFLAGS)
+uim_toolbar_qt_LDFLAGS = $(QT_LDFLAGS)
+uim_toolbar_qt_LDADD = $(top_builddir)/uim/libuim.la ./libtoolbarcommon.la
toolbar-standalone-qt.cpp: toolbar-standalone-qt.moc
toolbar-standalone-qt.moc: toolbar-standalone-qt.h
$(MOC) toolbar-standalone-qt.h -o toolbar-standalone-qt.moc
# Candidate Window
-uim_candwin_qt_SOURCES = candwin-qt.cpp
+uim_candwin_qt_SOURCES = candwin-qt.cpp
+uim_candwin_qt_CXXFLAGS = $(QT_CXXFLAGS)
+uim_candwin_qt_LDFLAGS = $(QT_LDFLAGS)
uim_candwin_qt_LDADD = $(top_builddir)/uim/libuim.la
candwin-qt.cpp: candwin-qt.moc
candwin-qt.moc: candwin-qt.h
$(MOC) candwin-qt.h -o candwin-qt.moc
# Switcher
-uim_im_switcher_qt_SOURCES = switcher-qt.cpp
-uim_im_switcher_qt_LDADD = $(top_builddir)/uim/libuim.la
+uim_im_switcher_qt_SOURCES = switcher-qt.cpp
+uim_im_switcher_qt_CXXFLAGS = $(QT_CXXFLAGS)
+uim_im_switcher_qt_LDFLAGS = $(QT_LDFLAGS)
+uim_im_switcher_qt_LDADD = $(top_builddir)/uim/libuim.la
switcher-qt.cpp: switcher-qt.moc
switcher-qt.moc: switcher-qt.h
$(MOC) switcher-qt.h -o switcher-qt.moc
@@ -120,7 +130,9 @@
pref-olisteditformbase.cpp pref-keyeditformbase.cpp pref-keygrabformbase.cpp \
pref-qt.cpp pref-customwidgets.cpp pref-kseparator.cpp
-uim_pref_qt_LDADD = $(top_builddir)/uim/libuim.la $(top_builddir)/uim/libuim-custom.la
+uim_pref_qt_CXXFLAGS = $(QT_CXXFLAGS)
+uim_pref_qt_LDFLAGS = $(QT_LDFLAGS)
+uim_pref_qt_LDADD = $(top_builddir)/uim/libuim.la $(top_builddir)/uim/libuim-custom.la
pref-customwidgets.h:pref-olisteditformbase.h pref-keyeditformbase.h pref-keygrabformbase.h
pref-qt.h:pref-olisteditformbase.h pref-keyeditformbase.h pref-keygrabformbase.h
More information about the Uim-commit
mailing list