On 21.09.2010 12:51, Tamas TEVESZ wrote:
>
>i need someone to turn
>AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT, 1, Check for strlcat))
>into something along the lines of
>
>if (strlcat is in libc)
>     define HAVE_STRLCAT
>else if (strlcat is in libbsd)
>     define HAVE_STRLCAT
>     define HAVE_LIBBSD
>     add -lbsd to LIBS (wutil libs)
>else
>     just move along

Is there really a need to define HAVE_LIBBSD? All we care about is
HAVE_STRLCAT, no matter how it is available.

>(or, up to you, we could just assume
>whereever there's strlcat, there's also strlcpy, and only check for
>one of them).

That's probably a warranted assumption.
 

On Tue, Sep 21, 2010 at 01:06:25PM +0200, Andreas Tscharner wrote:
> What about AC_CHECK_LIB?

AC_SEARCH_LIBS is more like it, it really does do exactly what we want
here.

dnl Check for strlcat
dnl =================
AC_SEARCH_LIBS([strlcat],[bsd],[AC_DEFINE(HAVE_STRLCAT, 1, [Define if strlcat 
is available])])

Works correctly for me, at any rate.


-- 
To unsubscribe, send mail to [email protected].

Reply via email to