)`
AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$datafiledir", [Directory for data])
+# Create DOC_DIR #define for config.h
+docdir=`(
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
+ # Ugly hack, but I don't see how this problem can be solved
+ # properly that DOC_DIR had a value starting with
+ # "${prefix}/" instead of e.g. "/usr/local/"
+ eval eval echo "$docdir"
+)`
+AC_DEFINE_UNQUOTED(DOC_DIR, "$docdir", [Directory for docs])
+
# GTK checks; we require GTK+ 2.4 or later.
# We don't add $GLIB_LIBS to LIBS, because we don't want to force all
# programs to be built with GTK+.
url = g_string_new("");
- /* try to open the HTML page from wireshark.org instead */
- g_string_append_printf(url, "http://www.wireshark.org/docs/wsug_html_chunked/%s", topic);
+ if (g_file_test(DOC_DIR "/wsug_html_chunked", G_FILE_TEST_IS_DIR)) {
+ /* try to open the HTML page from wireshark.org instead */
+ g_string_append_printf(url, "file://" DOC_DIR "/wsug_html_chunked/%s", topic);
+ } else {
+ /* try to open the HTML page from wireshark.org instead */
+ g_string_append_printf(url, "http://www.wireshark.org/docs/wsug_html_chunked/%s", topic);
+ }
browser_open_url(url->str);