On Tue, 29 Jun 2010, Ralf Wildenhues wrote:
Well, first you need to use LT_OUTPUT before any such test, so the
libtool script is created early in configure. Then, you need to write
all link tests yourself, invoking ./libtool. Maybe somebody has written
a macro to do that, somewhere (Autoconf Macro Archive?), I'm not aware
of any existing ones, but I think a good one would be acceptable into
libtool.m4.
Here the macro we are using in TeX Live for such tests (C and C++). Our
purpose is to test properties of libraries that can be either
(1) uninstalled libtool libraries already built when this configure runs,
or (2) installed libraries -- libtool or not.
# _KPSE_USE_LIBTOOL()
# -------------------
AC_DEFUN([_KPSE_USE_LIBTOOL],
[## $0: Generate a libtool script for use in configure tests
AC_PROVIDE_IFELSE([LT_INIT], ,
[m4_fatal([$0: requires libtool])])[]dnl
LT_OUTPUT
m4_append([AC_LANG(C)],
[ac_link="./libtool --mode=link --tag=CC $ac_link"
])[]dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[m4_append([AC_LANG(C++)],
[ac_link="./libtool --mode=link --tag=CXX $ac_link"
])])[]dnl
AC_LANG(_AC_LANG)[]dnl
]) # _KPSE_USE_LIBTOOL
Regards
Peter Breitenlohner <[email protected]>
_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf