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

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

 



On 02/09/2014 01: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?
Autoconf has no business in handling Makefiles.

I.e. the answer to your question depends upon your way to propagate autoconf variables to your Makefile-system.

Ralf



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux