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 <eblake@xxxxxxxxxx>: > 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 > > _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf