Dj Dac Dj Dac - 1 year ago 68
C Question

How can I change these variables?

I have in my C code, which I based on GNU hello, this

printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);


Now I want to change the package variables but I can't find where they are set. Do you know where I can change them? If I serach for the variables in my project I only find auto-generated files such as
config.h
etc.

The variables must come from somewhere, where is it?

The way I build my project is
./configure && make && sudo make install

Answer Source

They come from the configure script:

# Identity of this package.
PACKAGE_NAME='GNU Hello'
PACKAGE_TARNAME='hello'
PACKAGE_VERSION='2.7'
PACKAGE_STRING='GNU Hello 2.7'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL='http://www.gnu.org/software/hello/'

Makefile.in contains:

PACKAGE_NAME = @[email protected]
PACKAGE_STRING = @[email protected]
PACKAGE_TARNAME = @[email protected]
PACKAGE_URL = @[email protected]
PACKAGE_VERSION = @[email protected]

and there's presumably something in the configure script that replaces all the @[email protected] placeholders with the values of the variables.

I found these with:

grep -R PACKAGE_NAME .

while in the hello-2.7 directory.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download