Andreas, On Wed, 2 Apr 2003, Andreas Schweitzer wrote:
Hi there,
On Wed, Apr 02, 2003 at 08:19:56PM +0200, Sebastian Geerken wrote:
On Mon, Mar 31, Jorge Arellano Cid wrote:
The location of the system dillorc should NOT be put in config.h according to the GNU docs, instead everything with prefix/sysconfdir and similar stuff should be defined on the command line. Hence, my src/Makefile.am patch. This syntax of ' and " works on a variety of systems (bash, ksh, csh, GNU make) finally. Also, the current toplevel Makefile.am first tries $(DESTDIR)$(sysconfdir) and then falls back on /etc but the code in prefs.c does it the other way round. One of them should probably be reverted.
Leaving the above intentionally :-) ... it contains more explanations (by me originally) for the following.
And while writing this : the patch supplied on the list will make dillorc be installed ONLY in $(DESTDIR)$(sysconfdir) with no fall-back to /etc but I think $(DESTDIR)$(sysconfdir) will be created if necessary.
I'm not sure of what to do here :(. For now I added Patrice's patch that simply adds:
sysconf_DATA = dillorc
in Makefile.am, and it works!
That can be done in conjunction with my suggestions for src/Makefile.am (NOT the toplevel Makefile.am)
Good!
[...] My original patch had something like that. Precisely :
AM_CPPFLAGS=-DDILLORC_SYS='"$(sysconfdir)/dillorc"' for src/Makefile.am
That way you can use fd = open(DILLORC_SYS, O_RDONLY) in src/prefs.c
THIS combination of quotes worked for me :-) on Linux, FreeBSD and OpenBSD. It certainly needs testing - but it did take me a while to get that combo of quotes :-) ....
I commited those changes to the CVS (with a new autogen.sh). Testing shows it works! At least dillo knows where the dillorc is placed by means of sysconfdir. Now, if you configure and make dillo, and later reconfigure with another sysconfdir, the data (dillorc) will be installed in the new directory correctly, but the binary will not be rebuilt so dillo will look for it in the old place. :( Touching prefs.c does the trick, but isn't this supossed to happen automagically? Cheers Jorge.-