diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-05-05 00:24:53 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-05-05 00:24:53 +0000 |
commit | 0ac1bdfc22fdc56ae898a22d8ecbdcafe2bced69 (patch) | |
tree | 6d52a03033fcadc6839620cd95bcdd919e7e23d4 /configure.in | |
parent | 131cecd1e83454db7c614a97ff9a745314746840 (diff) |
If the user explicitly specified "--enable-wireshark", fail immediately
if the test for GTK+ fails; that lets the user insist on getting
Wireshark and gives them immediate feedback if they can't have it, so
they can either give up and just get TShark or fix the problem.
svn path=/trunk/; revision=21687
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 6a28b0905c..9a9f220854 100644 --- a/configure.in +++ b/configure.in @@ -444,8 +444,8 @@ fi AC_ARG_ENABLE(wireshark, AC_HELP_STRING( [--enable-wireshark], - [build GTK+-based wireshark. @<:@default=yes@:>@]), - enable_wireshark=$enableval,enable_wireshark=yes) + [build GTK+-based wireshark. @<:@default=yes, if GTK+ available@:>@]), + enable_wireshark=$enableval,enable_wireshark=ifgtkavailable) AC_ARG_ENABLE(gtk2, AC_HELP_STRING( [--disable-gtk2], @@ -493,10 +493,12 @@ AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$datafiledir", [Directory for data]) # We don't add $GLIB_LIBS to LIBS, because we don't want to force all # programs to be built with GTK+. # -if test "x$enable_gtk2" = "xyes" -a "x$enable_wireshark" = "xyes" ; then +if test "x$enable_gtk2" = "xyes" -a \ + "(" "x$enable_wireshark" = "xyes" -o "x$enable_wireshark" = "xifgtkavailable" ")"; then GTK_OK=two AM_PATH_GTK_2_0(2.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no, gthread) -elif test "x$enable_gtk2" != "xyes" -a "x$enable_wireshark" = "xyes" ; then +elif test "x$enable_gtk2" != "xyes" \ + "(" "x$enable_wireshark" = "xyes" -o "x$enable_wireshark" = "xifgtkavailable" ")"; then GTK_OK=one AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no ) else @@ -514,6 +516,15 @@ fi # programs to be built with GLib. # if test "$GTK_OK" = "no" ; then + # + # We don't have GTK+. + # If they explicitly said "--enable-wireshark", fail (so that if + # they insist on building Wireshark, we don't drive on and build + # only TShark, we stop so they can fix the GTK+ problem). + # + if test "x$enable_wireshark" = "xyes"; then + AC_MSG_ERROR([GTK+ isn't available, so Wireshark can't be compiled]) + fi enable_wireshark="no" wireshark_bin="" wireshark_man="" |