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)
The problem is we don't know what directory it gets in. :-)
Currently if it is /usr/local/etc/ or /etc, it works, but if someone chooses /opt/weird/etc, it won't be found.
Yes, it will be found. See below.
Why not use $(sysconfdir) in the code, as in the attached patch? I'm not sure about the usage of the quotation marks in src/Makefile.am, they may cause problems on different environments, perhaps someone has a better idea.
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 :-) .... Cheers Andreas -- **************************** NEW ADDRESS ****************************** Hamburger Sternwarte Universitaet Hamburg Gojenbergsweg 112 Tel. ++49 40 42891 4016 D-21029 Hamburg, Germany Fax. ++49 40 42891 4198