Re: autoconf wizardry needed... again..

2010-09-29 Thread Tamas TEVESZ
On Wed, 29 Sep 2010, Alexey I. Froloff wrote: > Try this: > > AC_ARG_ENABLE([lcov], > [AS_HELP_STRING([--enable-lcov[=output-directory]], [enable coverage > data generation using LCOV (GCC only) @<:@default=no@:>@])], > [], > [enable_lcov=no]) > > AS_IF([test "x$enable_lcov

Re: autoconf wizardry needed... again..

2010-09-29 Thread Alexey I. Froloff
On Wed, Sep 29, 2010 at 02:58:31PM +0200, Tamas TEVESZ wrote: > i'm trying to integrate lcov at least a bit. i've gotten this far, and > it completely doesn't work: Try this: AC_ARG_ENABLE([lcov], [AS_HELP_STRING([--enable-lcov[=output-directory]], [enable coverage data generation using LCO

autoconf wizardry needed... again..

2010-09-29 Thread Tamas TEVESZ
hi, as usual, i might add ;) i'm trying to integrate lcov at least a bit. i've gotten this far, and it completely doesn't work: dnl LCOV dnl enable_lcov=no AC_ARG_ENABLE([lcov], [AS_HELP_STRING([--enable-lcov[=output-directory]], [enable coverage data generation using LCOV (GCC only)

Re: autoconf wizardry needed

2010-09-21 Thread Tamas TEVESZ
On Tue, 21 Sep 2010, Brad Jorsch wrote: > > and this unconditionally links libbsd to every binary, even those not > > needing it... > > One easy fix for that is to grab ax_check_linker_flags.m4[1] and add > this rule to configure.ac: > > AX_CHECK_LINKER_FLAGS([-Wl,--as-needed], > [LDFL

Re: autoconf wizardry needed

2010-09-21 Thread Brad Jorsch
On Wed, Sep 22, 2010 at 12:34:50AM +0200, Tamas TEVESZ wrote: > > and this unconditionally links libbsd to every binary, even those not > needing it... One easy fix for that is to grab ax_check_linker_flags.m4[1] and add this rule to configure.ac: AX_CHECK_LINKER_FLAGS([-Wl,--as-needed], [LDFL

Re: autoconf wizardry needed

2010-09-21 Thread Tamas TEVESZ
On Tue, 21 Sep 2010, Brad Jorsch wrote: > Maybe. What you'll probably end up doing is providing fallback > implementations if HAVE_STRLCAT is not defined, so no matter what the > functions will exist. And in that case, the prototypes will have to be > provided in some local .h file. yes, this

Re: autoconf wizardry needed

2010-09-21 Thread Brad Jorsch
On Tue, Sep 21, 2010 at 06:32:20PM +0200, Tamas TEVESZ wrote: > On Tue, 21 Sep 2010, Brad Jorsch wrote: > > > Is there really a need to define HAVE_LIBBSD? All we care about is > > HAVE_STRLCAT, no matter how it is available. > > on the bsds (where these functions are in libc), they can be had

Re: autoconf wizardry needed

2010-09-21 Thread Tamas TEVESZ
On Tue, 21 Sep 2010, Brad Jorsch 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_S

Re: autoconf wizardry needed

2010-09-21 Thread Brad Jorsch
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 HA

Re: autoconf wizardry needed

2010-09-21 Thread Andreas Tscharner
On 21.09.2010 13:49, Tamas TEVESZ wrote: On Tue, 21 Sep 2010, Andreas Tscharner wrote: > > 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 li

Re: autoconf wizardry needed

2010-09-21 Thread Tamas TEVESZ
On Tue, 21 Sep 2010, Andreas Tscharner wrote: > > 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 likewi

Re: autoconf wizardry needed

2010-09-21 Thread Andreas Tscharner
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,

autoconf wizardry needed

2010-09-21 Thread Tamas TEVESZ
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 al