8 --force-qt3 - Force compile against Qt3 if Qt4 is present on the system
9 --qimage-libdir - Location of QT lib directory [/usr/lib/qt4 or /usr/lib/qt3]
10 --qimage-includedir - Location of QT include directory [/usr/include/qt4 or /usr/include/qt3]
11 --kde-libdir - Location of KDE lib directory [/usr/lib]
12 --kde-includedir - Location of KDE include directory [/usr/include/kde]
13 --exif-libdir - Location of libexif lib directory [/usr/lib]
14 --exif-includedir - Location of libexif include directory [/usr/include/libexif]
34 qimage_includedir=/usr/include/qt4
35 qimage_libdir=/usr/lib/qt4
37 if [ ! -d "$qimage_libdir" -o ! -d "$qimage_includedir" ]
39 qimage_includedir=/usr/include/qt3
40 qimage_libdir=/usr/lib/qt3
41 kde_includedir=/usr/include/kde
43 if [ "$KDEDIR" != "" ]
45 kde_includedir="$KDEDIR/include"
46 kde_libdir="$KDEDIR/lib"
52 qimage_includedir="$QTDIR/include"
53 qimage_libdir="$QTDIR/lib"
62 --qimage-libdir=* ) qimage_libdir="${i#--qimage-libdir=}" ;;
63 --qimage-includedir=* ) qimage_includedir="${i#--qimage-includedir=}" ;;
64 --kde-libdir=* ) kde_libdir="${i#--kde-libdir=}" ;;
65 --kde-includedir=* ) kde_includedir="${i#--kde-includedir=}" ;;
66 --exif-libdir=* ) exif_libdir="${i#--exif-libdir=}" ;;
67 --exif-includedir=* ) exif_includedir="${i#--exif-includedir=}" ;;
68 --force-qt3 ) force_qt3="true" ;;
75 pkg-config --exists 'libexif'
78 echo "Libexif found, enabling auto rotate"
79 echo "#define USE_EXIF" >> config.h
80 echo "USE_EXIF=1" >> config.mak
81 echo EXIFCXXFLAGS=$(pkg-config --cflags libexif ) >> config.mak
82 echo EXIFLIBS=$(pkg-config --libs libexif) >> config.mak
83 elif [ -d "$exif_libdir" -a -d "$exif_includedir" ]
85 # test if we have a libexif
86 if [ -f "$exif_libdir/exif-data.h" ]
88 echo "Libexif found, enabling auto rotate"
89 echo "#define USE_EXIF" >> config.h
90 echo "USE_EXIF=1" >> config.mak
91 echo EXIFCXXFLAGS=-I$exif_includedir >> config.mak
92 echo EXIFLIBS=-L$exif_libdir lexif >> config.mak
94 echo "Libexif not found, disabling exif features (auto rotate)"
98 pkg-config --exists 'QtGui >= 4'
99 if [ $? -eq 0 ] && [ "$force_qt3" = "" ]
101 echo "Qt version 4.x detected, will compile Qt4 qimage producer"
103 echo "#define USE_QT4" >> config.h
104 echo "USE_QT4=1" >> config.mak
105 echo QTCXXFLAGS=$(pkg-config --cflags QtCore QtGui QtXml QtSvg ) >> config.mak
106 echo QTLIBS=$(pkg-config --libs QtCore QtGui QtXml QtSvg) >> config.mak
108 elif [ -d "$qimage_libdir" -a -d "$qimage_includedir" ]
111 # test if we have a Qt3 or Qt4
112 if [ -f "$qimage_libdir/libQtCore.so" ] || [ -d "$qimage_libdir/QtGui.framework" ] && [ "$force_qt3" = "" ]
114 echo "Qt version 4.x detected, will compile Qt4 qimage producer"
117 echo "Qt version 3.x detected, will compile Qt3 qimage producer"
120 echo "Include directory: " $qimage_includedir
122 if [ "$qt4_found" != "" ] && [ "$force_qt3" = "" ]
124 echo "#define USE_QT4" >> config.h
125 echo "USE_QT4=1" >> config.mak
126 if [ -d "$qimage_libdir/QtGui.framework" ]
128 echo QTCXXFLAGS=$(pkg-config --cflags QtCore QtGui QtXml QtSvg ) >> config.mak
129 echo QTLIBS=$(pkg-config --libs QtCore QtGui QtXml QtSvg) >> config.mak
131 echo QTCXXFLAGS=-I$qimage_includedir >> config.mak
132 echo QTLIBS=-L$qimage_libdir -lQtCore -lQtGui -lQtXml -lQtSvg >> config.mak
135 if [ -d "$kde_includedir" ]
137 echo "#define USE_KDE" >> config.h
138 echo "USE_KDE=1" >> config.mak
139 echo "#define USE_QT3" >> config.h
140 echo "USE_QT3=1" >> config.mak
141 echo QTCXXFLAGS=-I$qimage_includedir -I$kde_includedir -DQT_THREAD_SUPPORT >> config.mak
142 echo QTLIBS=-L$qimage_libdir -L$kde_libdir -lqt-mt >> config.mak
144 echo "qimage: KDE environment not found - disabling extra image formats"
145 echo "#define USE_QT3" >> config.h
146 echo "USE_QT3=1" >> config.mak
147 echo QTCXXFLAGS=-I$qimage_includedir -DQT_THREAD_SUPPORT>> config.mak
148 echo QTLIBS=-L$qimage_libdir -lqt-mt >> config.mak
152 echo "qimage: QT environment not found - disabling"
153 touch ../disable-qimage