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: Adam Jiang
Subject: Re: How to use PREFIX created by autoconf in source file
Date: Tue, 11 Feb 2014 01:05:52 +0900

Actually, the problem could be resolved by

AM_CFLAGS = -DPKGDATA=$(pkgdata)

just like the manual described. Paths of all files in $(pkgdata) could be
referred with PKGDATA + basename.

Thank you.


2014-02-10 22:54 GMT+09:00 Eric Blake <address@hidden>:

> 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
>
>


reply via email to

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