Wireshark-dev: [Wireshark-dev] RFC: Add fallback path to get_datafile_dir

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Mon, 29 Aug 2011 16:50:25 +0200
Hello,

as the problem recently popped up how to load auxillary files in the source
directory that have not been installed to their final paths, I've created a
patch that will add a fallback directory path to get_datafile_dir.
So far get_datafile_dir would check wether some magic variable were set to
locate generated (i.e. compiled) stuff inside the build dir instead of the
install dir. This patch allows to override this behaviour to search in the
specified directory relative to the source dir. If the fallback path is
given as NULL, the previous behaviour is used. As the path may now be
different with different invocations, the caching of the path had to go.

Example call:

WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 WIRESHARK_SRC_DIR=../trunk ./wireshark

Comments whether to commit this at all, in the current form or proposed
changes are requested.

Thanks!
   Joerg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.