autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use PREFIX created by autoconf in source file


From: Peter Johansson
Subject: Re: How to use PREFIX created by autoconf in source file
Date: Mon, 10 Feb 2014 09:14:04 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 02/09/2014 10:17 PM, Adam Jiang wrote:
Autoconf could help to generate configure script which accepts an option
called --prefix in general. In this way, users could specific a path where
programs/data installed.

In my program, I'd like to refer the location where data files are
installed. In plain Makefile, it could be done like

gcc -DPREFIX "/usr/share"

and in the source file, data path is generated in

#define DATAPATH PREFIX "/data"

with autoconf, how could I use the path specified by --prefix in source
code? Is there a pre-defined MACRO for this?
Have a look in the manual

http://www.gnu.org/software/autoconf/manual/autoconf.html#Defining-Directories




--
Peter Johansson




reply via email to

[Prev in Thread] Current Thread [Next in Thread]