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/In..._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:
Code:
# 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:
Code:
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,
Code:
./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 (and wants to try it out themselves),
all the source code is very freely available under the GPL.