Pierre Abbat wrote:
> 
> I am writing a program that is compiled with popt if present, and falls back to
> a simple option parser if it isn't. I got that much to work, using
> AC_CHECK_HEADERS(popt.h) in configure.in . I am stumped, however, how to get it
> to link with popt if and only if it compiled with popt. How do I do this?
> 
> phma


Add program_LDADD = @SOME_AUTOCONF_VAR@ to the Makefile.am and then set
the variable to "-lpopt" in configure.in when the library is present. 
You can also modify the LIBS variable in configure.in but I have had
problems messing with the builtin variables.

        Michael 
-- 
------------------------------------------------------------------
Michael Bletzinger      Software Developer, Alliance Computational
[EMAIL PROTECTED]  Environment & Security
217 265 5137            NCSA

Reply via email to