autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: checking for berkeley DB 4.x within configure.in


From: Adam Monsen
Subject: Re: checking for berkeley DB 4.x within configure.in
Date: Wed, 7 Jul 2004 16:20:34 -0700

Ok, I figured out what I was doing wrong. I wasn't including the .m4
files properly and I wasn't calling AX_PATH_BDB correctly.

Here's how I got this to work:

1. copied ax_path_bdb.m4 and ax_compare_version.m4 from
http://ac-archive.sourceforge.net/ to m4/ directory in project source
root.
2. added 'AX_PATH_BDB([4])' to top-level configure.ac
3. added 'ACLOCAL_AMFLAGS = -I m4' to top-level Makefile.am

Done! aclocal.m4 is properly rebuilt with subsequent invocations of
'autoreconf', and the 'configure' script checks for Berkeley DB >= 4
as expected.

On Wed, 7 Jul 2004, Adam Monsen wrote:
> How do I check for the presence of Berkeley DB 4.x libraries within a
> configure.in (autoconf) file?
>
> I found the following m4 macro file:
> http://ac-archive.sourceforge.net/Installed_Packages/ax_path_bdb.html
>
> So I add it to a file called 'acinclude.m4' in the root dir of my
> source tree, and add the following lines to configure.in:
>
> # check for Berkeley DB >= 4
> AX_PATH_BDB([4],
> [LIBS="$BDB_LIBS $LIBS"
> LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
> CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
> ])
>
>
> When I do this, it's as if autoconf starts failing in seemingly
> unrelated ways, possibly forgetting it's "core" macros:
>
> ...
> Running autoconf ...
> configure.in:13: error: possibly undefined macro: dnl
>      If this token and others are legitimate, please use
> m4_pattern_allow.
>      See the Autoconf documentation.
> configure:5421: error: possibly undefined macro: AS_VAR_PUSHDEF
> configure:5430: error: possibly undefined macro: AC_SEARCH_LIBS
> configure:5447: error: possibly undefined macro: AS_VAR_POPDEF
> ...
>
> wtf?
>
> I also see,
> ...
> ./configure: line 5416: syntax error near unexpected token
> `$HEADER_VERSION,ge,4,'
> ./configure: line 5416: `
> AX_COMPARE_VERSION($HEADER_VERSION,ge,4,'
> ...
>
> PS-
> I'm doing this for http://gnewsuck.sf.net/, so if anyone does have
> time to help me out with this autoconf stuff (and wants to try it out
> themselves), all the source code is very freely available under the
> GPL.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]