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 05:17 AM, 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.

ALL configure scripts generated by autoconf accept --prefix.

It sounds like what you want to do is turn ${prefix} (substituted at
autoconf time) into PREFIX (a C preprocessor macro at compilation time),
using Makefile as the place to do the expansion so as to cover nested
definitions (for example, ${exec_prefix)\} defaults to being defined in
terms of ${prefix}).

That is easy to do; in fact, the gnulib configmake module does just that.

http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=modules/configmake

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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