From 007976b3abeb762b362b3c9d65f8d8bee28b7e81 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 1 Dec 2016 16:42:30 -0800 Subject: 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 --- configure.ac | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'configure.ac') 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="" -- cgit v1.2.3