summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in35
1 files changed, 22 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index 1a747ff6..addab346 100644
--- a/configure.in
+++ b/configure.in
@@ -364,28 +364,35 @@ AC_CHECK_FUNCS(flockfile)
AC_ARG_WITH(qt, [ --with-qt=DIR Location where Qt is installed],,with_qt=yes)
-QTDIR=
if test "$CXX" != "" ; then
AC_MSG_CHECKING(For Qt location)
- if test "x$with_qt" = xyes ; then
+ if test "x$with_qt" = xyes ; then
# Search for Qt in a common location. The ls -r is an attempt to find the newest
- dirs=`cd /usr/lib && ls -d -r qt*`
- for dir in $dirs ; do
- case $dir in
- qt2*|qt-2*)
- if test -x /usr/lib/$dir/bin/moc ; then
- QTDIR=/usr/lib/$dir
- break
- fi
- ;;
- esac
- done
+ if test "x$QTDIR" != x ; then
+ if test -x $QTDIR/bin/moc ; then : ; else
+ QTDIR=
+ fi
+ else
+ dirs=`cd /usr/lib && ls -d -r qt*`
+ for dir in $dirs ; do
+ case $dir in
+ qt2*|qt-2*|qt3*|qt-3*)
+ if test -x /usr/lib/$dir/bin/moc ; then
+ QTDIR=/usr/lib/$dir
+ break
+ fi
+ ;;
+ esac
+ done
+ fi
else
if test "x$with_qt" != xno ; then
if test -x $with_qt/bin/moc ; then
QTDIR=$with_qt
fi
+ else
+ QTDIR=""
fi
fi
@@ -394,6 +401,8 @@ if test "$CXX" != "" ; then
else
AC_MSG_RESULT($QTDIR)
fi
+else
+ QTDIR=""
fi
if test x"$QTDIR" != "x" ; then