Petr> Hi I want to have a configuration file in the sysconfdir for my
Petr> program, but if I put AC_DEFINE_UNQUOTED(CONFFILE,
Petr> "$sysconfdir/file.conf"), I end up with the path being
Petr> "${prefix}/etc/file.conf" which is pretty meaningless to C.  I've
Petr> seen people hack it by just saying "$prefix/etc/file.conf" in the
Petr> configure.in, but this doesn't seem to be the right thing to do.
Petr> Should I do that, or is there a way to use the sysconfdir?

You could do it in the Makefile.in instead of configure.in:


%.o : %.c
        $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) 
-DCONFFILE=\\\"$(sysconfdir)/file.conf\\\" -c

or something like that (caution: I have not counted the backslashes, wink)

cus

-- 
"It's not true or not."  A reality show producer (real quote)


_______________________________________________
help-gnu-utils mailing list
help-gnu-utils@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-utils

Reply via email to