On Mon, Feb 09, 2009 at 12:42:33AM +0100, Bruno Haible wrote:
> Sylvain Beucler wrote:
> > > > I got confused because `./configure --help` documents
> > > > '--with-libmylib-prefix', but doesn't mention '--with-mylib'.
> 
> If you use AC_LIB_LINKFLAGS, there is no --with[out]-mylib option,
> only a --with[out]-libmylib-prefix option. --without-libmylib-prefix
> instructs the configure file to not make special effort to search
> for libmylib.
> 
> If libmylib may or may not be present, you better use
> AC_LIB_HAVE_LINKFLAGS instead of AC_LIB_LINKFLAGS, and provide an
> AC_ARG_WITH([libmylib], ...) by yourself.

Thanks.

Do you think it's worth documenting this use case too?

I think the most common use would be for example:

  AC_ARG_WITH(check,
    AC_HELP_STRING([--with-check],[Use unit testing]),
    [],[with_check=yes])
  AC_LIB_HAVE_LINKFLAGS([check],[],[#include <check.h>],[void* t = 
suite_create;])
  
  echo "with_check    = $with_check"
  echo "HAVE_LIBCHECK = $HAVE_LIBCHECK"

-- 
Sylvain


Reply via email to