Permalink
Browse files

Make linking to KDE libraries optional (qimage).

  • Loading branch information...
1 parent ce11db2 commit 90228d2589d938867159e2dccafc7b4ab78212b9 @Enlik Enlik committed Nov 29, 2012
Showing with 26 additions and 20 deletions.
  1. +26 −20 src/modules/qimage/configure
@@ -12,6 +12,7 @@ QImage options:
--kde-includedir - Location of KDE include directory [/usr/include/kde]
--exif-libdir - Location of libexif lib directory [/usr/lib]
--exif-includedir - Location of libexif include directory [/usr/include/libexif]
+ --without-kde - Don't link to KDE libraries
EOF
@@ -42,6 +43,7 @@ else
export force_qt3=
export qt4_found=
+ export without_kde=
for i in "$@"
do
@@ -53,6 +55,7 @@ else
--exif-libdir=* ) exif_libdir="${i#--exif-libdir=}" ;;
--exif-includedir=* ) exif_includedir="${i#--exif-includedir=}" ;;
--force-qt3 ) force_qt3="true" ;;
+ --without-kde ) without_kde="true" ;;
esac
done
@@ -112,7 +115,7 @@ else
echo QTLIBS=-L$qimage_libdir -lQtCore -lQtGui -lQtXml -lQtSvg >> config.mak
fi
else
- if [ -d "$kde_includedir" ]
+ if [ "$without_kde" = "" ] && [ -d "$kde_includedir" ]
then
echo "#define USE_KDE3" >> config.h
echo "USE_KDE3=1" >> config.mak
@@ -121,7 +124,7 @@ else
echo QTCXXFLAGS=-I$qimage_includedir -I$kde_includedir -DQT_THREAD_SUPPORT >> config.mak
echo QTLIBS=-L$qimage_libdir -L$kde_libdir -lqt-mt >> config.mak
else
- echo "qimage: KDE environment not found - disabling extra image formats"
+ echo "qimage: KDE environment not found or disabled by request - disabling extra image formats"
echo "#define USE_QT3" >> config.h
echo "USE_QT3=1" >> config.mak
echo QTCXXFLAGS=-I$qimage_includedir -DQT_THREAD_SUPPORT>> config.mak
@@ -144,26 +147,29 @@ else
fi
fi
- kde4-config
- if [ $? -eq 0 ] && [ "$qt4_found" != "" ]
+ if [ "$without_kde" = "" ]
then
- # test if we have KDE4, required on some systems to get QImage extra formats (xcf, ...)
- if [ "$kde_includedir" = "" ]
+ kde4-config
+ if [ $? -eq 0 ] && [ "$qt4_found" != "" ]
then
- kde_includedir=`kde4-config --install include`
- fi
- if [ "$kde_libdir" = "" ]
- then
- kde_libdir=`kde4-config --install lib`
- fi
- if [ -d "$kde_includedir" ] && [ -d "$kde_libdir" ]
- then
- echo "KDE version 4.x detected, will enable extra image formats"
- echo "#define USE_KDE4" >> config.h
- echo "USE_KDE4=1" >> config.mak
- echo KDECXXFLAGS=-I$kde_includedir >> config.mak
- # the -L with kde4/devel is for Fedora
- echo KDELIBS=-L$kde_libdir -L${kde_libdir}/kde4/devel -lkdecore >> config.mak
+ # test if we have KDE4, required on some systems to get QImage extra formats (xcf, ...)
+ if [ "$kde_includedir" = "" ]
+ then
+ kde_includedir=`kde4-config --install include`
+ fi
+ if [ "$kde_libdir" = "" ]
+ then
+ kde_libdir=`kde4-config --install lib`
+ fi
+ if [ -d "$kde_includedir" ] && [ -d "$kde_libdir" ]
+ then
+ echo "KDE version 4.x detected, will enable extra image formats"
+ echo "#define USE_KDE4" >> config.h
+ echo "USE_KDE4=1" >> config.mak
+ echo KDECXXFLAGS=-I$kde_includedir >> config.mak
+ # the -L with kde4/devel is for Fedora
+ echo KDELIBS=-L$kde_libdir -L${kde_libdir}/kde4/devel -lkdecore >> config.mak
+ fi
fi
fi

0 comments on commit 90228d2

Please sign in to comment.