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
/usr/share/texmf-dist. Now I want to put this as the default prefix so
that configure will "do the right thing" by default, but this is where I
fail.

This is my configure.ac:
----------------------------------------
AC_INIT([package], [0.1], [blah])
AC_PREREQ([2.60])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])

AC_PROG_INSTALL
AC_PROG_LATEX
AC_PROG_KPSEWHICH
AC_PROG_PDFLATEX
AC_TEXMF_PATH

AC_PREFIX_DEFAULT([$texmfpath])
AC_MSG_NOTICE([$texmfpath])

AC_CONFIG_FILES(Makefile)
AC_OUTPUT
----------------------------------------
AC_TEXMF_PATH exports `texmfpath' and does AC_SUBST on it. (You can find
all the macros here: https://www.ctan.org/tex-archive/support/autoconf)

The problem is with the AC_PREFIX_DEFAULT. It sets the default prefix to
empty. But the AC_MSG_NOTICE macro on the line below prints the correct
path! So somehow $texmfpath is expanded to the correct value by
AC_MSG_NOTICE, but it is expanded to nothing on the line above. If I do
AC_PREFIX_DEFAULT(["some_path"]) then the default prefix is correctly
set to "some_path".

Is it not possible to set the default prefix in this way? What other
good ways are there to set the default prefix to something discovered at
configure time?

I'm not subscribed to the list so if somebody answers, please keep me on
cc :)

Regards,

Joakim

_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to