On 11/22/2013 07:26 PM, Peter Johansson wrote: > Hello, > > My apologies if this is more suited for libtool@ > > I'm writing a macro to provide some flags for users of our library. I > now realized that I would like to assign the falgs different values > depending on whether users are using libtool or not. What is the best > way to detect whether libtool is used or not? Detected at autoconf or > configure time doesn't really matter but I suppose autoconf is always > preferable if possible. You, as a macro writer, can write your macro to detect at autoconf time whether the package writer of configure.ac that is using your macro is also using libtool, by doing something like: dnl Check for both modern and obsolete witness macros that are only dnl defined when libtool's macros are in use m4_if(m4_ifdef([LT_INIT], [-])m4_ifdef([AM_PROG_LIBTOOL], [-], [], [code when libtool not in use], [code when libtool is in use]) -- 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