1
votes

I'm quite frustrated. I'm trying to pass the name of the system configuration directory to a source file as a symbol. Some research on this very site gave me to understand that I should add the line

AM_CPPFLAGS = -DSYSCONFIR='$(sysconfdir)'

to my Makefile.am. I did so, and the define does show up in the invocation of gcc; in fact, here it is:

gcc -DHAVE_CONFIG_H -I. -I../../src -I..  -DSYSCONFIR='/usr/etc'   -g -O2 -MT perm.o -MD -MP -MF .deps/perm.Tpo -c -o perm.o ../../src/perm.c

The trouble is, gcc barfs anyway, telling me that SYSCONFDIR is undeclared.

I've got to be doing something wrong, but for the love of St. Gulik, I don't know what it is. My autoconf is 2.68, my automake is 1.11.3, my gcc is 4.6.3, and I'm trying to do this under Ubuntu 12.04.

A clean compile, a clean compile! My kingdom for a clean compile!

1
To improve the visual layout of this question, add four spaces to the start of lines containing terminal commands. This will then format them differently to make them easier to read - SDJMcHattie
If an answer solves your issue you might like to mark it as such by clicking the answer's check-mark. - alk

1 Answers

3
votes

What you show looks like typo.

You are setting and passing SYSCONFIR which is not the same as SYSCONFDIR.