X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fqimage%2Fconfigure;h=f10f4ac4bdcd72ff494407dada88bbe7c5f7ecea;hb=f7de757c48d3634113f129a3c727656f0cd2ed79;hp=a517be1f66e07b9a704ccf9094eeabd512e32cc7;hpb=1b9ac0e58548c38691c6ece781c26177c84e2baa;p=melted diff --git a/src/modules/qimage/configure b/src/modules/qimage/configure index a517be1..f10f4ac 100755 --- a/src/modules/qimage/configure +++ b/src/modules/qimage/configure @@ -65,11 +65,21 @@ else esac done - if [ -d "$qimage_libdir" -a -d "$qimage_includedir" ] + pkg-config --exists 'QtGui >= 4' + if [ $? -eq 0 ] && [ "$force_qt3" = "" ] + then + echo "Qt version 4.x detected, will compile Qt4 qimage producer" + qt4_found=true + echo "#define USE_QT4" > config.h + echo "USE_QT4=1" > config.mak + echo QTCXXFLAGS=$(pkg-config --cflags QtGui) >> config.mak + echo QTLIBS=$(pkg-config --libs QtGui) >> config.mak + + elif [ -d "$qimage_libdir" -a -d "$qimage_includedir" ] then # test if we have a Qt3 or Qt4 - if test -f $qimage_libdir/libQtCore.so && [ "$force_qt3" = "" ] + if [ -f "$qimage_libdir/libQtCore.so" ] || [ -d "$qimage_libdir/QtGui.framework" ] && [ "$force_qt3" = "" ] then echo "Qt version 4.x detected, will compile Qt4 qimage producer" qt4_found=true @@ -85,8 +95,14 @@ else then echo "#define USE_QT4" >> config.h echo "USE_QT4=1" >> config.mak - echo QTCXXFLAGS=-I$qimage_includedir >> config.mak - echo QTLIBS=-L$qimage_libdir -lQtGui >> config.mak + if [ -d "$qimage_libdir/QtGui.framework" ] + then + echo QTCXXFLAGS=$(pkg-config --cflags QtGui) >> config.mak + echo QTLIBS=$(pkg-config --libs QtGui) >> config.mak + else + echo QTCXXFLAGS=-I$qimage_includedir >> config.mak + echo QTLIBS=-L$qimage_libdir -lQtGui >> config.mak + fi else if [ -d "$kde_includedir" ] then