Eric Blake <eblake@xxxxxxxxxx> writes: > On 03/22/2017 03:20 AM, Joakim Jalap wrote: >> Hello autoconf gurus! >> >> I am trying to write some autotools support for installing a latex >> package. On CTAN I found some autoconf macros (which I had to modify a >> bit) which I use to find for example latex(1) and pdflatex(1). So far so >> good. This CTAN package also has a macro to find the path to the tex >> installation, AC_TEXMF_PATH. This finds the correct path for me at > > It's poor practice to name a macro in the AC_ namespace if it is not > actually owned by autoconf; you may want to choose a different namespace > to make it obvious where the macro originates from. > Well I didn't choose it. That's the way it was in CTAN. But point taken. > Indeed, thanks to the magic of m4 diversions, AC_PREFIX_DEFAULT expands > to code that appears very early in configure, and using a shell variable > that early in the run is tricky; while AC_MSG_NOTICE expands to code > that runs at the place where the macro was used. Well that's a shame. But I found another way anyway. See below. > Is AC_PREFIX_PROGRAM any better for your use case? Not really. I'm not installing any programs, only data. But I found a solution: I can use the 'kpsewhich' program to find the correct texmf directory. So now I do AC_PREFIX_DEFAULT([`pksewhich --var-value TEXMFHOME`]) and it works! Thanks for your time! -- Joakim _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf