aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-12-01 16:42:30 -0800
committerGuy Harris <guy@alum.mit.edu>2016-12-02 00:43:04 +0000
commit007976b3abeb762b362b3c9d65f8d8bee28b7e81 (patch)
tree066191eb8001eb2164ad9edde6506cad9f088ecd
parentd28a68717c45132269c734284bc1ce58cf193026 (diff)
Clean up error messages.
Also, use elif in some chains of tests, to make it a bit clearer that the cases in question are disjoint. Change-Id: I6dc92d536450c7ac3db6ee118581a5ed0c3ce80c Reviewed-on: https://code.wireshark.org/review/19009 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--configure.ac19
1 files changed, 12 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index d03b3cccfa..1ba2415153 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1433,15 +1433,13 @@ if test "$have_gtk" = "yes" -a "$have_qt" = "yes" ; then
wireshark_bin="wireshark\$(EXEEXT) wireshark-gtk\$(EXEEXT)"
wireshark_man="wireshark.1"
wireshark_SUBDIRS="codecs ui/qt ui/gtk"
-fi
-if test "$have_gtk" = "no" -a "$have_qt" = "yes" ; then
+elif test "$have_gtk" = "no" -a "$have_qt" = "yes" ; then
# We don't have GTK+ but we have Qt.
wireshark_bin="wireshark\$(EXEEXT)"
wireshark_man="wireshark.1"
wireshark_SUBDIRS="codecs ui/qt"
-fi
-if test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then
+elif test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then
# We have GTK+ but not Qt.
wireshark_bin="wireshark-gtk\$(EXEEXT)"
@@ -1449,8 +1447,7 @@ if test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then
wireshark_SUBDIRS="codecs ui/gtk"
OSX_APP_FLAGS="$OSX_APP_FLAGS -gtk"
OSX_DMG_FLAGS="-gtk"
-fi
-if test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
+elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
# We have neither GTK+ nor Qt.
#
# If they didn't explicitly say "--disable-wireshark",
@@ -1460,7 +1457,15 @@ if test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
# problem).
#
if test "x$enable_wireshark" = "xyes"; then
- AC_MSG_ERROR([Neither Qt nor GTK+ are available, so Wireshark can't be compiled])
+ if test "$with_qt" != "no" -a "$with_gtk" != "no" ; then
+ AC_MSG_ERROR([Neither Qt nor GTK+ are available, so Wireshark can't be compiled])
+ elif test "$with_qt" != "no" -a "$with_gtk" = "no" ; then
+ AC_MSG_ERROR([Qt is not available and GTK+ was not requested, so Wireshark can't be compiled])
+ elif test "$with_qt" = "no" -a "$with_gtk" != "no" ; then
+ AC_MSG_ERROR([Qt was not requested and GTK+ is not available, so Wireshark can't be compiled])
+ elif test "$with_qt" = "no" -a "$with_gtk" = "no" ; then
+ AC_MSG_ERROR([Neither Qt nor GTK+ were requested, so Wireshark can't be compiled])
+ fi
fi
wireshark_bin=""
wireshark_man=""