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 ce74aebb14177a0f3182b3d0b9e792f6be8b619e..4e83e754144bdda7e9aef5ed1a4eafe157dfa6fe 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