On Tue, Mar 25, 2003 at 10:38:40PM +0100, Joerg Mayer wrote:
> Forgot: c) Find out why (t)ethereal still searches the manuf file in
> /usr/local/etc instead of its new location.
Probably because:
1) "initialize_ethers()" looks for it in the directory specified
whose pathname is returned by "get_datafile_dir()";
2) on UNIX, "get_datafile_dir()" returns the value of the
DATAFILE_DIR #define;
3) the epan configure script sets it based on "sysconfdir";
4) the epan Makefile sets "sysconfdir" to ${prefix}/etc.
The epan Makefile doesn't *use* "sysconfdir", however, nor does it use
the DATAFILE_DIR defined in it.
Currently, the top-level Makefile sets "etherealconfdir" to
"$(prefix)/share/ethereal". I would:
1) suggest that it should set it to "${datadir}/ethereal"
instead, as "datadir" is already set to "${prefix}/share";
2) change "epan/configure.in" to set DATAFILE_DIR to "$datadir"
rather than to "$sysconfdir";
3) change "get_datafile_dir()" to, on UNIX, return the
concatenation of DATAFILE_DIR and "/share".
If there's some way to arrange that the Makefile define DATAFILE_DIR to
be $etherealconfdir, then you wouldn't have to change
"get_datafile_dir()" (although you might want to change the name
DATAFILE_DIR to ETHEREALCONF_DIR).
BTW, it appears that automake 1.4 will arrange that "pkgdatadir" will be
defined as "$(datadir)/@PACKAGE@", so you could probably get rid of
"etherealconfdir" entirely and just use "pkgdatadir".