autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using AC_LIB_HAVE_LINKFLAGS with non standard named libraries genera


From: Eric Blake
Subject: Re: Using AC_LIB_HAVE_LINKFLAGS with non standard named libraries generates "non-POSIX" automake error?
Date: Fri, 22 Nov 2013 16:39:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 11/22/2013 04:29 PM, Johan Persson wrote:
> Fortunately that is easy (for once). The following trivial combo shows
> the problem. 
> 

> AC_LIB_HAVE_LINKFLAGS([[usb-1.0]],[],[],[],[libusb-1.0 Library needed.])

This macro is not provided by autoconf.  (It's a shame that the macro
author abused the AC_ namespace instead of putting it in another
namespace, because it means if autoconf ever DOES implement this macro,
it will break this third-party code.)  You'll need to track down the
implementation of AC_LIB_HAVE_LINKFLAGS before I can offer further
suggestions.

> AC_OUTPUT 
> 
> Makefile.am : 
> 
> bin_PROGRAMS = a
> SUBDIRS = .
> a_SOURCES = main.c 
> a_LDADD = $(LIBUSB-1.0) 

$(LIBUSB-1.0) is not a valid make variable name.  You probably want:

a_LDADD = $(LIBUSB_1_0)

(autoconf and automake both tend to normalize - and . into _).  But
whether that will help or not goes back to what AC_LIB_HAVE_LINKFLAGS is
doing under the hood.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]