chiark / gitweb /
configure.ac: Check probed Wireshark plugin directory exists.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 10 Jul 2017 08:53:51 +0000 (09:53 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 10 Jul 2017 08:53:51 +0000 (09:53 +0100)
If we've found a plugin directory by probing, then check that the thing
actually exists.  It turns out that the `pkg-config' dropping is not as
accurate as one might na├»vely hope.

configure.ac

index ce74aeb..4e83e75 100644 (file)
@@ -227,7 +227,15 @@ case "$haveshark,$wireshark_plugindir" in
       mdw_cv_wireshark_plugin_dir=$(
        $PKG_CONFIG --variable=plugindir "wireshark >= 1.12.1")])
     case "$mdw_cv_wireshark_plugin_dir" in
-      /*) wireshark_plugindir=$mdw_cv_wireshark_plugin_dir ;;
+      /*)
+       if test ! -d "$mdw_cv_wireshark_plugin_dir"; then
+         AC_MSG_WARN([alleged Wireshark plugin directory $mdw_cv_wireshark_plugin_dir doesn't exist])
+         haveshark=no
+       else
+         wireshark_plugindir=$mdw_cv_wireshark_plugin_dir
+         haveshark=yes
+       fi
+       ;;
       *)
        AC_MSG_WARN([failed to read Wireshark plugin directory])
        haveshark=no