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 part is already taken care of.
> BTW, you may want to provide a configure option to skip the check for
> libbsd, in case a distro wants to make sure they don't pull in a
> dependency on libbsd. Something like this:
so far my best effort is
AC_ARG_WITH([libbsd],
[AS_HELP_STRING([--without-libbsd], [do not use libbsd for strlcat and
strlcpy [default=check]])],
[],
[with_libbsd=check])
AS_IF([test "x$with_libbsd" != "xno"],
[AC_SEARCH_LIBS([strlcat],[bsd],
[AC_DEFINE(HAVE_STRLCAT, 1, [Define if strlcat is available])],
[if test "x$with_libbsd" != xcheck; then
AC_MSG_FAILURE([--with-libbsd was given, but test for libbsd failed])
fi
]
)]
)
case "$LIBS" in
*-lbsd*)
AC_DEFINE(HAVE_LIBBSD, 1, [Define if libbsd is used]) ;;
esac
and providing a custom wstring.h, which includes <string.h>, and
<bsd/string.h> if needed. it's quite ugly, and this unconditionally
links libbsd to every binary, even those not needing it...
or, on second thought, i could just let this be, and if it annoys
someone (probably debian) too much, they'll fix it :>
--
[-]
mkdir /nonexistent
--
To unsubscribe, send mail to [email protected].