1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2043,21 +2043,23 @@
# Try the Qt 5 version first.
# (And be prepared to add Qt6 at some point....)
#
- for modprefix in Qt5 Qt
- do
- pkg_config_module="${modprefix}$1"
- AC_MSG_CHECKING(for $pkg_config_module - version >= $min_qt_version)
- if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
- mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
- AC_MSG_RESULT(yes (version $mod_version))
- Qt_CFLAGS="$Qt_CFLAGS `$PKG_CONFIG --cflags $pkg_config_module`"
- Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
- found_$1=yes
- break
- else
- AC_MSG_RESULT(no)
- fi
- done
+ if test "$with_qt5" = yes; then
+ modprefix=Qt5
+ else
+ modprefix=Qt
+ fi
+ pkg_config_module="${modprefix}$1"
+ AC_MSG_CHECKING(for $pkg_config_module - version >= $min_qt_version)
+ if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
+ mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
+ AC_MSG_RESULT(yes (version $mod_version))
+ Qt_CFLAGS="$Qt_CFLAGS `$PKG_CONFIG --cflags $pkg_config_module`"
+ Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
+ found_$1=yes
+ break
+ else
+ AC_MSG_RESULT(no)
+ fi
if test "x$found_$1" = "xyes"; then
# Run Action-If-Found
--- a/configure.ac
+++ b/configure.ac
@@ -456,10 +456,15 @@
#
# GUI toolkit options
#
-AC_ARG_WITH([qt],
- AC_HELP_STRING( [--with-qt=@<:@yes/no@:>@],
+AC_ARG_WITH([qt4],
+ AC_HELP_STRING( [--with-qt4=@<:@yes/no@:>@],
+ [use Qt @<:@default=yes@:>@]),
+ with_qt4="$withval", with_qt4="unspecified")
+
+AC_ARG_WITH([qt5],
+ AC_HELP_STRING( [--with-qt5=@<:@yes/no@:>@],
[use Qt @<:@default=yes@:>@]),
- with_qt="$withval", with_qt="unspecified")
+ with_qt5="$withval", with_qt5="unspecified")
AC_ARG_WITH([gtk2],
AC_HELP_STRING( [--with-gtk2=@<:@yes/no@:>@],
@@ -1373,7 +1378,6 @@
AC_SUBST(GTK2_MIN_VERSION)
GTK3_MIN_VERSION=3.0.0
AC_SUBST(GTK3_MIN_VERSION)
-QT_MIN_VERSION=4.6.0
AC_SUBST(QT_MIN_VERSION)
# GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
# GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later.
@@ -1417,14 +1421,15 @@
if test "x$enable_wireshark" = "xyes"; then
if test "x$with_gtk2" = "xunspecified" -a \
"x$with_gtk3" = "xunspecified" -a \
- "x$with_qt" = "xunspecified"; then
+ "x$with_qt4" = "xunspecified" -a \
+ "x$with_qt5" = "xunspecified"; then
#
# No GUI toolkit was explicitly specified; pick Qt and GTK+ 3.
#
with_qt=yes
with_gtk3=yes
fi
- if test "x$with_qt" = "xyes"; then
+ if test "x$with_qt" = "xyes" || test "x$with_qt4" = "xyes" || test "x$with_qt5" = "xyes"; then
#
# Qt was specified; Make sure we have a C++ compiler.
#
|