[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: detect libtool
From: |
Eric Blake |
Subject: |
Re: detect libtool |
Date: |
Fri, 22 Nov 2013 19:39:02 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
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
signature.asc
Description: OpenPGP digital signature
- detect libtool, Peter Johansson, 2013/11/22
- Re: detect libtool,
Eric Blake <=