Subject: Re: hidden dependencies, Act II
To: Dan Winship <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 06/13/2001 13:42:12
Yes, we do this in some of the packages already where we pass
ac_cv_lib_foo=no through CONFIGURE_ENV.  The difference between this
and the pkgautoconf stuff is whether we explicitly remove libraries or
if we explicitly allow checks for them.  I think of it as kind of a
"default-allow" versus "default-deny" stance, to borrow firewall
terminology.  I guess we should answer the question of the philosophy
to which we want to adhere in pkgsrc.  I think we should be
"default-deny", meaning we should be required to explicitly name the
libraries we wish to allow to be found.


     -- Johnny C. Lam <>
        Department of Statistics, Carnegie Mellon University

Dan Winship <> writes:
> On 13 Jun 2001 05:42:48 -0400, Johnny C. Lam wrote:
> > There was a suggestion by Todd Vierling <> that we
> > try to hack the AC_CHECK_LIB macro in autoconf as an alternative way
> > to deal with hidden dependencies.
> You don't need to hack the macro. Just fake out the cache:
> danw@twelve-monkeys:/tmp> cat
> AC_CHECK_LIB(c, main)
> AC_CHECK_HEADER(stdio.h)
> AC_OUTPUT(Makefile)
> danw@twelve-monkeys:/tmp> echo ac_cv_lib_c_main=no > config.cache
> danw@twelve-monkeys:/tmp> echo ac_cv_header_stdio_h=no >> config.cache 
> danw@twelve-monkeys:/tmp> ./configure
> loading cache ./config.cache
> checking for main in -lc... (cached) no
> checking how to run the C preprocessor... cc -E
> checking for stdio.h... (cached) no
> updating cache ./config.cache
> creating ./config.status
> creating Makefile
> -- Dan