diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-04-13 11:05:08 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-04-13 19:16:23 +0000 |
commit | 5fa914c19e9dd4027710c52e964eb34566993f52 (patch) | |
tree | 481c0547dff76d0b2af80d9806fdcd01b8282774 /configure.ac | |
parent | 8d9441d2c28242761f470b5881874864773bfa0d (diff) |
Add a major version number argument to --with-qt.
Without a major version number, it behaves as before, picking whatever
version it finds, and preferring Qt 5 to Qt 4. With a major version
number, it looks only for the version in question.
Bug: 10793
Change-Id: Idf6c2c61e84bb87f7b601d8f09c33f31b67bf46d
Reviewed-on: https://code.wireshark.org/review/8052
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index dc69e7fb1b..6f6c34cadb 100644 --- a/configure.ac +++ b/configure.ac @@ -536,7 +536,7 @@ AC_SUBST(FLOORL_LO) # GUI toolkit options # AC_ARG_WITH([qt], - AC_HELP_STRING( [--with-qt=@<:@yes/no@:>@], + AC_HELP_STRING( [--with-qt=@<:@yes/no/4/5@:>@], [use Qt @<:@default=yes@:>@]), with_qt="$withval", with_qt="unspecified") @@ -1606,7 +1606,7 @@ if test "x$enable_wireshark" = "xyes"; then with_qt=yes with_gtk3=yes fi - if test "x$with_qt" = "xyes"; then + if test "x$with_qt" != "xno"; then # # Qt was specified; Make sure we have a C++ compiler. # @@ -1618,14 +1618,29 @@ if test "x$enable_wireshark" = "xyes"; then # Now make sure we have Qt and, if so, add the flags # for it to CFLAGS and CXXFLAGS. # - AC_WIRESHARK_QT_CHECK($QT_MIN_VERSION, + AC_WIRESHARK_QT_CHECK($QT_MIN_VERSION, "$with_qt", [ CFLAGS="$CFLAGS $Qt_CFLAGS" CXXFLAGS="$CXXFLAGS $Qt_CFLAGS" have_qt=yes GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-qt" ], - [AC_MSG_ERROR([Qt is not available])]) + [ + case "$with_qt" in + + yes) + AC_MSG_ERROR([Qt is not available]) + ;; + + 4) + AC_MSG_ERROR([Qt 4 is not available]) + ;; + + 5) + AC_MSG_ERROR([Qt 5 is not available]) + ;; + esac + ]) # # XXX - greasy hack to make ui/gtk/recent.c @@ -1799,7 +1814,7 @@ then AC_PATH_PROG(UIC, uic-qt4) if test "x$UIC" = x then - if test "x$with_qt" = "xyes"; then + if test "x$with_qt" != "xno"; then # # If you want to build with Qt, you'd better # have uic. @@ -1829,7 +1844,7 @@ then AC_PATH_PROG(MOC, moc-qt4) if test "x$MOC" = x then - if test "x$with_qt" = "xyes"; then + if test "x$with_qt" != "xno"; then # # If you want to build with Qt, you'd better # have moc. @@ -1859,7 +1874,7 @@ then AC_PATH_PROG(RCC, rcc) if test "x$RCC" = x then - if test "x$with_qt" = "xyes"; then + if test "x$with_qt" != "xno"; then # # If you want to build with Qt, you'd better # have moc. |