aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m4116
1 files changed, 39 insertions, 77 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 7c5aa1e7ab..b92e455d5f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2133,99 +2133,61 @@ AC_DEFUN([AC_WIRESHARK_QT_CHECK],
])
dnl AC_WIRESHARK_QT_TOOL_CHECK([TOOLPATHVAR, TOOL, REQUESTED-MAJOR_VERSION])
-dnl Test for a particular Qt tool, either for any version of Qt or for
-dnl some specific version of Qt
+dnl Test for a particular Qt tool for some specific version of Qt
dnl
AC_DEFUN([AC_WIRESHARK_QT_TOOL_CHECK],
[
- if test ! -z "$3"; then
- #
- # We're building with Qt, so we're looking for a particular
- # major version of Qt's flavor of that tool.
- #
- # If we don't find the tool, we can't build, so we fail.
- #
- # At least in some versions of Debian/Ubuntu, and perhaps
- # other OSes, the Qt build tools are just links to a
- # program called "qtchooser", and even if you want to
- # build with Qt 5, running the tool might give you the
- # Qt 4 version of the tool unless you run the tool with
- # a -qt=5 argument.
+ #
+ # At least in some versions of Debian/Ubuntu, and perhaps
+ # other OSes, the Qt build tools are just links to a
+ # program called "qtchooser", and even if you want to
+ # build with Qt 5, running the tool might give you the
+ # Qt 4 version of the tool unless you run the tool with
+ # a -qt=5 argument.
+ #
+ # So we look for qtchooser and, if we find it, use the
+ # -qt={version} argument, otherwise we look for particular
+ # tool versions using tool name suffixes.
+ #
+ AC_PATH_PROG(QTCHOOSER, qtchooser)
+ if test ! -z "$QTCHOOSER"; then
#
- # So we look for qtchooser and, if we find it, use the
- # -qt={version} argument, otherwise we look for particular
- # tool versions using tool name suffixes.
+ # We found qtchooser; we assume that means that
+ # the tool is linked to qtchooser, so that we
+ # can run it with the -qt={version} flag to get
+ # the appropriate version of the tool.
#
- AC_PATH_PROG(QTCHOOSER, qtchooser)
- if test ! -z "$QTCHOOSER"; then
- #
- # We found qtchooser; we assume that means that
- # the tool is linked to qtchooser, so that we
- # can run it with the -qt={version} flag to get
- # the appropriate version of the tool.
- #
- AC_PATH_PROG($1, $2)
- if test "x$$1" = x; then
- #
- # We can't build Qt Wireshark without that
- # tool..
- #
- AC_MSG_ERROR(I couldn't find $2; make sure it's installed and in your path)
- fi
-
- #
- # Add the -qt={version} argument to it.
- #
- $1="$$1 -qt=$qt_version"
- else
- #
- # Annoyingly, on some Linux distros (e.g. Debian)
- # the Qt 5 tools have no suffix and the Qt 4 tools
- # have suffix -qt4. On other distros (e.g. openSUSE)
- # the Qt 5 tools have suffix -qt5 and the Qt 4 tools
- # have no suffix.
+ AC_PATH_PROG($1, $2)
+ if test "x$$1" = x; then
#
- # So we check for the tool first with the -qtN suffix
- # and then with no suffix.
+ # We can't build Qt Wireshark without that
+ # tool..
#
- AC_PATH_PROGS($1, [$2-qt$qt_version $2])
- if test "x$$1" = x; then
- #
- # We can't build Qt Wireshark without that
- # tool..
- #
- AC_MSG_ERROR(I couldn't find $2-qt$qt_version or $2; make sure it's installed and in your path)
- fi
+ AC_MSG_ERROR(I couldn't find $2; make sure it's installed and in your path)
fi
- else
+
#
- # We're not building with Qt, so we just want some version
- # of the tool.
+ # Add the -qt={version} argument to it.
#
- # If we don't find the tool, we shouldn't fail, as the
- # user's not building with Qt, and we shouldn't force them
- # to have Qt installed if they're not doing so.
+ $1="$$1 -qt=$qt_version"
+ else
#
- # "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.
+ # Annoyingly, on some Linux distros (e.g. Debian)
+ # the Qt 5 tools have no suffix and the Qt 4 tools
+ # have suffix -qt4. On other distros (e.g. openSUSE)
+ # the Qt 5 tools have suffix -qt5 and the Qt 4 tools
+ # have no suffix.
#
- # For the annoying suffix reasons listed above, we check
- # for the tool first with the -qt5 suffix, then with no
- # suffix, then with the -qt4 suffix.
+ # So we check for the tool first with the -qtN suffix
+ # and then with no suffix.
#
- AC_PATH_PROGS($1, [$2-qt5 $2 $2-qt4])
+ AC_PATH_PROGS($1, [$2-qt$qt_version $2])
if test "x$$1" = x; then
#
- # 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.
+ # We can't build Qt Wireshark without that
+ # tool..
#
- $1=$$2
+ AC_MSG_ERROR(I couldn't find $2-qt$qt_version or $2; make sure it's installed and in your path)
fi
fi
])