On 21.09.2010 12:51, Tamas TEVESZ wrote:

hi,

i found out that that (at least) several linuxes ship libbsd, which
(among other things) have strlcat/strlcpy. it would be preferable to
pick these up instead of the bundled ones.

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

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

anyone likes a nice challenge? :)

What about AC_CHECK_LIB? As far as I can see, it looks like you could use it and it does by default what you need.
For detailed information see here:
http://www.gnu.org/software/hello/manual/autoconf/Libraries.html

HTH and best regards
        Andreas
--
      ("`-''-/").___..--''"`-._
       `o_ o  )   `-.  (     ).`-.__.`)
       (_Y_.)'  ._   )  `._ `. ``-..-'
     _..`--'_..-_/  /--'_.' .'
    (il).-''  (li).'  ((!.-'

Andreas Tscharner   [email protected]   ICQ-No. 14356454


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

Reply via email to