aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-02-04 20:03:01 +0000
committerGuy Harris <guy@alum.mit.edu>2013-02-04 20:03:01 +0000
commit9b01e0470f6c186649c75ab89a5ce1f5ac0d3fd0 (patch)
tree0eec16432ab5ff9c4e4b832cc77d208ebf0898b3 /configure.ac
parent74b8ef79b14db016ad9b630319b6d28559b3d14f (diff)
"make dist" uses uic and moc, so we have to try to find them no matter
what. If we don't find them, and the user specified --with-qt, fail (if we haven't already failed to find Qt at all); if we don't find them, and the user *didn't* specify --with-qt, just set UIC and MOC to "uic" and "moc", which will fail on "make dist" but will at least allow the user to build. svn path=/trunk/; revision=47475
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac90
1 files changed, 61 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index 0c2738a00f..2c144357a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -963,35 +963,6 @@ if test "x$enable_wireshark" = "xyes"; then
AC_MSG_NOTICE([QtPrintSupport not found. Assuming Qt4]))
#
- # OK, maybe uic is called uic, or maybe it's called
- # uic-qt4 (yay, Fedora 16).
- #
- AC_PATH_PROG(UIC, uic)
- if test "x$UIC" = x
- then
- AC_PATH_PROG(UIC, uic-qt4)
- if test "x$UIC" = x
- then
- AC_MSG_ERROR(I couldn't find uic or uic-qt4; make sure it's installed and in your path)
- fi
- fi
- AC_SUBST(UIC)
-
- #
- # And the same applies to moc.
- #
- AC_PATH_PROG(MOC, moc)
- if test "x$MOC" = x
- then
- AC_PATH_PROG(MOC, moc-qt4)
- if test "x$MOC" = x
- then
- AC_MSG_ERROR(I couldn't find moc or moc-qt4; make sure it's installed and in your path)
- fi
- fi
- AC_SUBST(MOC)
-
- #
# We don't know whether we have GTK+, but we
# won't be using it, so it's as if we don't
# have it.
@@ -1123,6 +1094,67 @@ else
fi
fi
+#
+# "make dist" requires that we have the Qt build tools.
+#
+# Annoyingly, at least on Fedora 16, uic and moc are named XXX-qt4
+# rather than just XXX, perhaps to allow Qt 3 and Qt 4 tools to be
+# installed; if they're still doing that in current Fedora releases,
+# perhaps there will also be XXX-qt5 when they pick up Qt 5.
+#
+AC_PATH_PROG(UIC, uic)
+if test "x$UIC" = x
+then
+ AC_PATH_PROG(UIC, uic-qt4)
+ if test "x$UIC" = x
+ then
+ if test "x$with_qt" = "xyes"; then
+ #
+ # If you want to build with Qt, you'd better
+ # have uic.
+ #
+ AC_MSG_ERROR(I couldn't find uic or uic-qt4; make sure it's installed and in your path)
+ else
+ #
+ # We shouldn't fail here, as the user's not
+ # building with Qt, and we shouldn't force them
+ # to have Qt installed if they're not doing so.
+ # "make dist" will fail if they do that, but
+ # we don't know whether they'll be doing that,
+ # so this is the best we can do.
+ #
+ UIC=uic
+ fi
+ fi
+fi
+AC_SUBST(UIC)
+AC_PATH_PROG(MOC, moc)
+if test "x$MOC" = x
+then
+ AC_PATH_PROG(MOC, moc-qt4)
+ if test "x$MOC" = x
+ then
+ if test "x$with_qt" = "xyes"; then
+ #
+ # If you want to build with Qt, you'd better
+ # have moc.
+ #
+ AC_MSG_ERROR(I couldn't find moc or moc-qt4; make sure it's installed and in your path)
+ else
+ #
+ # We shouldn't fail here, as the user's not
+ # building with Qt, and we shouldn't force them
+ # to have Qt installed if they're not doing so.
+ # "make dist" will fail if they do that, but
+ # we don't know whether they'll be doing that,
+ # so this is the best we can do.
+ #
+ MIC=moc
+ fi
+ fi
+fi
+AC_SUBST(MOC)
+
# Error out if a glib header other than a "top level" header
# (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h)
# is used.