autoconf
[Top][All Lists]
Advanced

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

Re: checking for specific versions of operating system


From: Stepan Kasal
Subject: Re: checking for specific versions of operating system
Date: Tue, 23 Aug 2005 18:25:47 +0200
User-agent: Mutt/1.4.1i

Hello,

On Tue, Aug 23, 2005 at 04:53:58PM +0200, Baurzhan Ismagulov wrote:
> AC_CHECK_LIB(lib1, func, [LDFLAGS=-llib1], [])
> 
> if [ -z "$LDFLAGS" ]; then
>     AC_CHECK_LIB(lib2, func, [LDFLAGS=-llib2], [
>         echo "$0: Need lib1 or lib2" >&2
>         exit 2
>     ])
> fi

several comments:
1) AC_MSG_ERROR is better than "echo"
2) you should use LIBS, not LDFLAGS for -l flags
3) in the example you show, one call to AC_SEARCH_LIBS might be better.
   (But I don't know your real code, before you simplified it.)

Have a nice day,
        Stepan Kasal




reply via email to

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