On 04/23/2014 10:40 AM, Ludovic Courtès wrote: > Hello, > > $program_transform_name is apparently meant to be used in makefiles > > What’s the recommended way to use it in configure.ac? I'm not sure I follow the end goal. Why do you think you need to use it from within configure.ac? Are you trying to set up a config.h substitution that includes the transformed name that a program will be installed under for use within the program? This is actually one use case that I think really DOES make sense - there's discussion on the grep mailing list about making 'egrep' a simple C program wrapper around 'grep -E', but if 'grep' is installed under a different name due to program_transform_name, 'egrep' (or whatever actual name it gets installed as) needs to know the transformed name to be exec'd. One alternative would be to have 'grep' and 'egrep' both be shim wrappers, that can be installed under any transformed name, which then call ${libexecdir}/grep which gets installed without transform, although that feels a bit awkward. Off-hand, I _think_ what you want is something that mirrors what the gnulib 'configmake' module is able to do - it propagates the value of ${srcdir} and friends into a "configmake.h" header created at make time, which is then compiled into the C code so that the program can learn the values that were chosen at configure-time and/or overridden at make time. It sounds like exposing the transformed program name via a make rule that runs $program_transform_name and feeds the .h file for use by the rest of the program would give your C code introspective access into the transformed name it will be installed as. But your problem statement didn't give me many details to know if I'm on the right track for solving the actual problem you are facing. -- 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