chiark / gitweb /
doc/.gitignore: Make the patterns more general.
[tripe] / configure.ac
index 4e83e754144bdda7e9aef5ed1a4eafe157dfa6fe..33ce67dd442ec50be78cfaffdb29dc4568f2b6e2 100644 (file)
@@ -210,22 +210,19 @@ AC_ARG_WITH([wireshark],
            esac],
            [wantshark=yes mustshark=no])
 
-case "$wantshark" in
-  yes)
-    PKG_CHECK_MODULES([WIRESHARK], [wireshark >= 1.12.1],
-       [haveshark=yes], [haveshark=no])
-    ;;
-  *)
-    haveshark=no
-    ;;
-esac
-
-case "$haveshark,$wireshark_plugindir" in
+case "$wantshark,$wireshark_plugindir" in
   yes,unknown)
     AC_CACHE_CHECK([where to put Wireshark plugins],
       [mdw_cv_wireshark_plugin_dir], [
       mdw_cv_wireshark_plugin_dir=$(
-       $PKG_CONFIG --variable=plugindir "wireshark >= 1.12.1")])
+       $PKG_CONFIG --variable=plugindir "wireshark >= 1.12.1")
+      dnl It seems that the Debian package has a habit of bungling the
+      dnl plugin path (#779788, #857729, ...).
+      case "$mdw_cv_wireshark_plugin_dir" in
+       /usr//usr/*)
+         mdw_cv_wireshark_plugin_dir=${mdw_cv_wireshark_plugin_dir#/usr/}
+         ;;
+      esac])
     case "$mdw_cv_wireshark_plugin_dir" in
       /*)
        if test ! -d "$mdw_cv_wireshark_plugin_dir"; then
@@ -242,11 +239,9 @@ case "$haveshark,$wireshark_plugindir" in
        ;;
     esac
     ;;
-esac
-
-dnl If we're still interested, find Glib.
-case "$haveshark" in
-  yes) AM_PATH_GLIB_2_0([2.4.0], [], [haveshark=false], [gmodule]) ;;
+  no,*)
+    haveshark=no
+    ;;
 esac
 
 case "$haveshark,$needshark" in
@@ -254,8 +249,6 @@ case "$haveshark,$needshark" in
     AC_MSG_ERROR([failed to configure Wireshark plugin])
     ;;
   yes,*)
-    WIRESHARK_CFLAGS="$GLIB_CFLAGS $WIRESHARK_CFLAGS"
-    AC_SUBST(WIRESHARK_CFLAGS)
     AC_SUBST(wireshark_plugindir)
     ;;
 esac