Bug 550649 - configure.in changes for Qt. fixing up with-qtdir so that it works. r=ted
authorDoug Turner <dougt@dougt.org>
Mon, 08 Mar 2010 09:02:29 -0800
changeset 39111 c4aafa6695fe6b3ab8627a78af70bf35ea3c3d4b
parent 39110 d2773f8f2c46f165329130b331e518ccadac99ff
child 39112 bb6599d7e0424297a59ba4104dc52905ba2726c1
push id12016
push userdougt@mozilla.com
push dateMon, 08 Mar 2010 17:03:08 +0000
treeherderautoland@c4aafa6695fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs550649
milestone1.9.3a3pre
Bug 550649 - configure.in changes for Qt. fixing up with-qtdir so that it works. r=ted
configure.in
--- a/configure.in
+++ b/configure.in
@@ -5062,46 +5062,38 @@ AC_SUBST(MOZ_ENABLE_STARTUP_NOTIFICATION
 AC_SUBST(MOZ_STARTUP_NOTIFICATION_CFLAGS)
 AC_SUBST(MOZ_STARTUP_NOTIFICATION_LIBS)
 
 dnl ========================================================
 dnl = QT support
 dnl ========================================================
 if test "$MOZ_ENABLE_QT"
 then
-    PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtCore)
-    AC_SUBST(MOZ_QT_CFLAGS)
-    AC_SUBST(MOZ_QT_LIBS)
-
     MOZ_ARG_WITH_STRING(qtdir,
     [  --with-qtdir=\$dir       Specify Qt directory ],
     [ QTDIR=$withval])
 
     if test -z "$QTDIR"; then
-      QTDIR="/usr"
-    fi
-    QTINCDIR="/include/qt"
-    if test ! -d "$QTDIR$QTINCDIR"; then
-       QTINCDIR="/include/X11/qt"
-    fi
-    if test ! -d "$QTDIR$QTINCDIR"; then
-       QTINCDIR="/include"
-    fi
-
-    if test -x "$QTDIR/bin/moc-qt4"; then
-      HOST_MOC="$QTDIR/bin/moc-qt4"
+        PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtCore)
+        AC_CHECK_PROGS(HOST_MOC, moc, "")
     else
-      if test -x "$QTDIR/bin/moc"; then
-        HOST_MOC="$QTDIR/bin/moc"
-      else
-        AC_CHECK_PROGS(HOST_MOC, moc, "")
-      fi
+        MOZ_QT_LIBS="-L$QTDIR/qt/lib/ -lQtGui -lQtNetwork -lQtCore"
+
+        MOZ_QT_CFLAGS="-DQT_SHARED"
+        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include"
+        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include/Qt"
+        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include/QtGui"
+        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include/QtCore"
+        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/qt/include/QtNetwork"
+
+        HOST_MOC="$QTDIR/qt/bin/moc"
     fi
     if test -z "$HOST_MOC"; then
-      AC_MSG_ERROR([no acceptable moc preprocessor found])
+        AC_MSG_ERROR([No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is
+incorrect])
     fi
     MOC=$HOST_MOC
 fi
 
 AC_SUBST(GTK_CONFIG)
 AC_SUBST(TK_CFLAGS)
 AC_SUBST(TK_LIBS)