If GTK+ isn't available, fail unless the user explicitly specified
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 22 May 2007 07:52:11 +0000 (07:52 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 22 May 2007 07:52:11 +0000 (07:52 +0000)
"--disable-wireshark"; if they haven't explicitly said that they don't
want Wireshark, assume they do, and that they won't be happy if, when
the build finishes, they don't have Wireshark and weren't made
sufficiently aware that they wouldn't get it.

People who want to build TShark for machines that don't have GTK+
installed, but don't want to build Wireshark because they can't install
GTK+ on the build/target machine, can still do that; they just have to
explicitly specify "--disable-wireshark" to do it.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21883 f5534014-38df-0310-8fa8-9805f1628bb7

configure.in

index d39e2427d9cf14c09e4ed1440da3b0d0cc499256..69fdba0c0eff79ea1acbf21ed97941dea9f35ce6 100644 (file)
@@ -448,7 +448,7 @@ fi
 AC_ARG_ENABLE(wireshark,
   AC_HELP_STRING( [--enable-wireshark],
                   [build GTK+-based wireshark.  @<:@default=yes, if GTK+ available@:>@]),
-    enable_wireshark=$enableval,enable_wireshark=ifgtkavailable)
+    enable_wireshark=$enableval,enable_wireshark=yes)
 
 AC_ARG_ENABLE(gtk2,
   AC_HELP_STRING( [--disable-gtk2],
@@ -496,12 +496,10 @@ 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" -o "x$enable_wireshark" = "xifgtkavailable" ")"; then
+if test "x$enable_gtk2" = "xyes" -a "x$enable_wireshark" = "xyes"; 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" -o "x$enable_wireshark" = "xifgtkavailable" ")"; then
+elif test "x$enable_gtk2" != "xyes" -a "x$enable_wireshark" = "xyes"; then
        GTK_OK=one
        AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no )
 else
@@ -521,14 +519,14 @@ fi
 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 they didn't explicitly say "--disable-wireshark", fail (so
+       # that, unless they explicitly indicated that they don't want
+       # Wireshark, we stop so they know they won't be getting
+       # Wireshark unless they 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=""
        # Honor GLIB_CFLAGS