Subject: Re: hidden dependencies, Act II
To: C. <lamj@stat.cmu.edu>
From: Dan Winship <danw@ximian.com>
List: tech-pkg
Date: 06/13/2001 21:51:09
On 13 Jun 2001 05:42:48 -0400, Johnny C. Lam wrote:
> There was a suggestion by Todd Vierling <tv@wasabisystems.com> 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 configure.in
AC_INIT(configure.in)
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