diff options
author | Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> | 2010-08-31 11:34:37 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-09-01 10:14:29 -0400 |
commit | 133c5f7c10e4552ba41bcf03b9bda6c4e3413804 (patch) | |
tree | 06af2cdf01dfa289937537f31c88ce0498e1ac13 /scripts/kconfig/Makefile | |
parent | c94d3fb01fb6db1899cdf53ea4eb9d38e08a08fe (diff) |
kconfig qconf: port to QT4
A straight forward port to QT4 using qt3to4 and compiling against
qt3support
* Use pkg-config to detect QT4 which is hopefully portable enough
* If no QT4, QT3 will by tried instead
* Classes renamed using qt3to4
* If build using QT3 renamed to QT3 class names using defines
* ConfigInfoView::menu has to be renamed as QT4 moc strips struct from
struct menu and creates a name conflict
* QT2 support has been dropped
* The hidden options inserted in 39a4897c1bb66e8a36043c105d7fd73d8b32b480
are use in native API
Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/Makefile')
-rw-r--r-- | scripts/kconfig/Makefile | 76 |
1 files changed, 43 insertions, 33 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 06c1c2f80bb7..cef3f75e1c2b 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -235,40 +235,50 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile | |||
235 | # QT needs some extra effort... | 235 | # QT needs some extra effort... |
236 | $(obj)/.tmp_qtcheck: | 236 | $(obj)/.tmp_qtcheck: |
237 | @set -e; echo " CHECK qt"; dir=""; pkg=""; \ | 237 | @set -e; echo " CHECK qt"; dir=""; pkg=""; \ |
238 | pkg-config --exists qt 2> /dev/null && pkg=qt; \ | 238 | if ! pkg-config --exists QtCore 2> /dev/null; then \ |
239 | pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ | 239 | echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \ |
240 | if [ -n "$$pkg" ]; then \ | 240 | pkg-config --exists qt 2> /dev/null && pkg=qt; \ |
241 | cflags="\$$(shell pkg-config $$pkg --cflags)"; \ | 241 | pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ |
242 | libs="\$$(shell pkg-config $$pkg --libs)"; \ | 242 | if [ -n "$$pkg" ]; then \ |
243 | moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ | 243 | cflags="\$$(shell pkg-config $$pkg --cflags)"; \ |
244 | dir="$$(pkg-config $$pkg --variable=prefix)"; \ | 244 | libs="\$$(shell pkg-config $$pkg --libs)"; \ |
245 | moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ | ||
246 | dir="$$(pkg-config $$pkg --variable=prefix)"; \ | ||
247 | else \ | ||
248 | for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ | ||
249 | if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ | ||
250 | done; \ | ||
251 | if [ -z "$$dir" ]; then \ | ||
252 | echo "*"; \ | ||
253 | echo "* Unable to find any QT installation. Please make sure that"; \ | ||
254 | echo "* the QT4 or QT3 development package is correctly installed and"; \ | ||
255 | echo "* either qmake can be found or install pkg-config or set"; \ | ||
256 | echo "* the QTDIR environment variable to the correct location."; \ | ||
257 | echo "*"; \ | ||
258 | false; \ | ||
259 | fi; \ | ||
260 | libpath=$$dir/lib; lib=qt; osdir=""; \ | ||
261 | $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ | ||
262 | osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ | ||
263 | test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ | ||
264 | test -f $$libpath/libqt-mt.so && lib=qt-mt; \ | ||
265 | cflags="-I$$dir/include"; \ | ||
266 | libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ | ||
267 | moc="$$dir/bin/moc"; \ | ||
268 | fi; \ | ||
269 | if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ | ||
270 | echo "*"; \ | ||
271 | echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ | ||
272 | echo "*"; \ | ||
273 | moc="/usr/bin/moc"; \ | ||
274 | fi; \ | ||
245 | else \ | 275 | else \ |
246 | for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ | 276 | headerpath="\$$(shell qmake -query QT_INSTALL_HEADERS)"; \ |
247 | if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ | 277 | libpath="\$$(shell qmake -query QT_INSTALL_LIBS)"; \ |
248 | done; \ | 278 | binpath="\$$(shell qmake -query QT_INSTALL_BINS)"; \ |
249 | if [ -z "$$dir" ]; then \ | 279 | cflags="-I$$headerpath -I$$headerpath/QtCore -I$$headerpath/QtGui -I$$headerpath/Qt3Support -DQT3_SUPPORT"; \ |
250 | echo "*"; \ | 280 | libs="-L$$libpath -Wl,-rpath,$$libpath -lQtCore -lQtGui -lQt3Support"; \ |
251 | echo "* Unable to find the QT3 installation. Please make sure that"; \ | 281 | moc="$$binpath/moc"; \ |
252 | echo "* the QT3 development package is correctly installed and"; \ | ||
253 | echo "* either install pkg-config or set the QTDIR environment"; \ | ||
254 | echo "* variable to the correct location."; \ | ||
255 | echo "*"; \ | ||
256 | false; \ | ||
257 | fi; \ | ||
258 | libpath=$$dir/lib; lib=qt; osdir=""; \ | ||
259 | $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ | ||
260 | osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ | ||
261 | test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ | ||
262 | test -f $$libpath/libqt-mt.so && lib=qt-mt; \ | ||
263 | cflags="-I$$dir/include"; \ | ||
264 | libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ | ||
265 | moc="$$dir/bin/moc"; \ | ||
266 | fi; \ | ||
267 | if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ | ||
268 | echo "*"; \ | ||
269 | echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ | ||
270 | echo "*"; \ | ||
271 | moc="/usr/bin/moc"; \ | ||
272 | fi; \ | 282 | fi; \ |
273 | echo "KC_QT_CFLAGS=$$cflags" > $@; \ | 283 | echo "KC_QT_CFLAGS=$$cflags" > $@; \ |
274 | echo "KC_QT_LIBS=$$libs" >> $@; \ | 284 | echo "KC_QT_LIBS=$$libs" >> $@; \ |